You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
boblark 7a57dfc7b8 Corrected comments, only 4 weeks ago
docs Corrected long-dash parameter data type. 2 years ago
examples add PlayQueue2.ino simple example 2 years ago
gui Corrected long-dash parameter data type. 2 years ago
utility Delete SDTEST4.WAV 2 years ago
.gitattributes :neckbeard: Added .gitattributes & .gitignore files 8 years ago
.gitignore Update readme.md 4 years ago
.travis.yml Travis: remove xvfb 8 years ago
AudioAlignLR_F32.cpp removed conditional declare 3 years ago
AudioAlignLR_F32.h added L and R BPF at fs/4 to AlignLR & cleaned up comments 3 years ago
AudioAnalyzePhase_F32.cpp Add radio rfcn AnalyzePhase, Equalizer, FirGeneral, FM Det, sin_cos, Nois Blanker + example INO 4 years ago
AudioAnalyzePhase_F32.h Add radio rfcn AnalyzePhase, Equalizer, FirGeneral, FM Det, sin_cos, Nois Blanker + example INO 4 years ago
AudioCalcEnvelope_F32.h Libarary: big code update from my Tympan_Library 7 years ago
AudioCalcGainWDRC_F32.h Libarary: big code update from my Tympan_Library 7 years ago
AudioConfigFIRFilterBank_F32.cpp Libarary: big code update from my Tympan_Library 7 years ago
AudioConfigFIRFilterBank_F32.h Libarary: big code update from my Tympan_Library 7 years ago
AudioControlSGTL5000_Extended.h Update Blocks with GUI directive for ins and outs 8 years ago
AudioControlTester.cpp Libarary: big code update from my Tympan_Library 7 years ago
AudioControlTester.h Libarary: big code update from my Tympan_Library 7 years ago
AudioConvert_F32.h fixed a typo int -> float -> int conversion is now lossless 3 years ago
AudioEffectCompWDRC_F32.h Add i/o F32 from Chip Audette's Tympan library. 4 years ago
AudioEffectCompressor2_F32.cpp Add AudioEffectCompressor2_F32 4 years ago
AudioEffectCompressor2_F32.h Add AudioEffectCompressor2_F32 4 years ago
AudioEffectCompressor_F32.h Libarary: big code update from my Tympan_Library 7 years ago
AudioEffectDelay_OA_F32.cpp Brought in Radio Classes and examples 4 years ago
AudioEffectDelay_OA_F32.h Brought in Radio Classes and examples 4 years ago
AudioEffectEmpty_F32.h Libarary: big code update from my Tympan_Library 7 years ago
AudioEffectFreqShiftFD_OA_F32.cpp Added Frequency Shift Classes andINO; added id to Block_F32 4 years ago
AudioEffectFreqShiftFD_OA_F32.h Added Frequency Shift Classes andINO; added id to Block_F32 4 years ago
AudioEffectGain_F32.h Libarary: big code update from my Tympan_Library 7 years ago
AudioEffectNoiseGate_F32.h add NoiseGate effect 4 years ago
AudioEffectWDRC2_F32.h AddWDRC2 object and example 4 years ago
AudioFilter90Deg_F32.cpp Add AudioFilter 90Deg and RadioIQMixer plus support for these. 4 years ago
AudioFilter90Deg_F32.h Correct comments 2 years ago
AudioFilterBiquad_F32.cpp Added FMtoneCTCSS example 3 years ago
AudioFilterBiquad_F32.h Corrected comments, no code change 3 years ago
AudioFilterConvolution_F32.cpp Fixed to not have compile error for Teensy before T3.5 2 years ago
AudioFilterConvolution_F32.h Fixed to not have compile error for Teensy before T3.5 2 years ago
AudioFilterEqualizer_F32.cpp Add radio rfcn AnalyzePhase, Equalizer, FirGeneral, FM Det, sin_cos, Nois Blanker + example INO 4 years ago
AudioFilterEqualizer_F32.h Add radio rfcn AnalyzePhase, Equalizer, FirGeneral, FM Det, sin_cos, Nois Blanker + example INO 4 years ago
AudioFilterFIRGeneral_F32.cpp Add radio rfcn AnalyzePhase, Equalizer, FirGeneral, FM Det, sin_cos, Nois Blanker + example INO 4 years ago
AudioFilterFIRGeneral_F32.h Corrected comments, no code change 3 years ago
AudioFilterFIR_F32.cpp Libarary: big code update from my Tympan_Library 7 years ago
AudioFilterFIR_F32.h Libarary: big code update from my Tympan_Library 7 years ago
AudioFilterIIR_F32.h Add files from Tympan_Library 8 years ago
AudioLMSDenoiseNotch_F32.cpp Rev to new LMSDenoiseNotch 3 years ago
AudioLMSDenoiseNotch_F32.h Rev to new LMSDenoiseNotch 3 years ago
AudioMathAdd_F32.cpp Add math add, multiply, offset and scale 2 years ago
AudioMathAdd_F32.h Add math add, multiply, offset and scale 2 years ago
AudioMathConstant_F32.cpp Add AudioMathConstant_F32 2 years ago
AudioMathConstant_F32.h Add AudioMathConstant_F32 2 years ago
AudioMathMultiply_F32.cpp Add math add, multiply, offset and scale 2 years ago
AudioMathMultiply_F32.h Add math add, multiply, offset and scale 2 years ago
AudioMathOffset_F32.cpp Add math add, multiply, offset and scale 2 years ago
AudioMathOffset_F32.h Add math add, multiply, offset and scale 2 years ago
AudioMathScale_F32.cpp Add math add, multiply, offset and scale 2 years ago
AudioMathScale_F32.h Add math add, multiply, offset and scale 2 years ago
AudioMixer_F32.cpp Repair audio mixer_F32 4 years ago
AudioMixer_F32.h Libarary: big code update from my Tympan_Library 7 years ago
AudioMultiply_F32.cpp Added float audio multiply 8 years ago
AudioMultiply_F32.h Added note: Use AudioMathMultiply_F32 instead 2 years ago
AudioSDPlayer_F32.cpp Minor corrections for playing WAV files from SD cards 2 years ago
AudioSDPlayer_F32.h Add WaveFilePlayer, test files. Revised to lower WAV rates 2 years ago
AudioSettings_F32.cpp have defaults for AudioSettings_F32 3 years ago
AudioSettings_F32.h have defaults for AudioSettings_F32 3 years ago
AudioSpectralDenoise_F32.cpp spectral: Add Spectral noise reduction 3 years ago
AudioSpectralDenoise_F32.h spectral: Add Spectral noise reduction 3 years ago
AudioStream_F32.cpp Add i/o F32 from Chip Audette's Tympan library. 4 years ago
AudioStream_F32.h Added Frequency Shift Classes andINO; added id to Block_F32 4 years ago
AudioSwitch_OA_F32.cpp Correct _OA names 4 years ago
AudioSwitch_OA_F32.h Use _OA to prevent collisions 4 years ago
BTNRH_WDRC_Types.h Libarary: big code update from my Tympan_Library 7 years ago
FFT_OA_F32.h Use _OA to prevent collisions 4 years ago
FFT_Overlapped_OA_F32.cpp Use _OA to prevent collisions 4 years ago
FFT_Overlapped_OA_F32.h Correct _OA names 4 years ago
OA_LibraryStatus.gif Add status chart 4 years ago
OpenAudio_ArduinoLibrary.h Add Voice Clipper class 2 years ago
RadioFMDetector_F32.cpp New functionality for BFSK 2 years ago
RadioFMDetector_F32.h added squelch to FM 4 years ago
RadioFMDiscriminator_F32.cpp New functionality for BFSK 2 years ago
RadioFMDiscriminator_F32.h New functionality for BFSK 2 years ago
RadioIQMixer_F32.cpp Correct sample rate entry and add overall gain control 2 years ago
RadioIQMixer_F32.h Correct sample rate entry and add overall gain control 2 years ago
UART_F32.cpp New functionality for BFSK 2 years ago
UART_F32.h New functionality for BFSK 2 years ago
USB_Audio_F32.h Libarary: big code update from my Tympan_Library 7 years ago
analyze_CTCSS_F32.cpp Add 12 ksps rate and correct block from receiveReadOnly_f32() 2 years ago
analyze_CTCSS_F32.h Add 12 ksps rate and correct block from receiveReadOnly_f32() 2 years ago
analyze_fft256_iq_F32.cpp Fix xAxis cmd for dBFS & dBFS offset (+12dB) 4 years ago
analyze_fft256_iq_F32.h Fix xAxis cmd for dBFS & dBFS offset (+12dB) 4 years ago
analyze_fft1024_F32.cpp Corrections to comments 2 years ago
analyze_fft1024_F32.h Update real input 1024 fft 4 years ago
analyze_fft1024_iq_F32.cpp Corrected xAxis function for dBFS out on analyze_fft1024_iq_F32 4 years ago
analyze_fft1024_iq_F32.h Corrected xAxis function for dBFS out on analyze_fft1024_iq_F32 4 years ago
analyze_fft2048_iq_F32.cpp Corrected avaeraging in FFT IQ 2048 4 years ago
analyze_fft2048_iq_F32.h Corrected avaeraging in FFT IQ 2048 4 years ago
analyze_fft4096_iq_F32.cpp Corrected comments, only 3 years ago
analyze_fft4096_iq_F32.h Corrected array size, save 16kByte 2 years ago
analyze_fft4096_iqem_F32.cpp Corrected syntax to stop warnings 3 years ago
analyze_fft4096_iqem_F32.h Correct xAxis values 3 years ago
analyze_peak_f32.cpp Correct for T4, add peak, rms, Gaussian 4 years ago
analyze_peak_f32.h Correct for T4, add peak, rms, Gaussian 4 years ago
analyze_rms_f32.cpp Correct for T4, add peak, rms, Gaussian 4 years ago
analyze_rms_f32.h Correct for T4, add peak, rms, Gaussian 4 years ago
analyze_tonedetect_F32.cpp Add setGain() function 2 years ago
analyze_tonedetect_F32.h Add setGain() function 2 years ago
async_input_spdif3_F32.cpp Fixed to compile with T3.x (run only T4.x) 2 years ago
async_input_spdif3_F32.h Fixed to compile with T3.x (run only T4.x) 2 years ago
control_tlv320aic3206.cpp.xxx Correct for T4, add peak, rms, Gaussian 4 years ago
control_tlv320aic3206.h.xxx Correct for T4, add peak, rms, Gaussian 4 years ago
input_i2s_f32.cpp Removed old commented out code. No functional change 2 years ago
input_i2s_f32.h Removed old commented out code. No functional change 2 years ago
input_spdif3_f32.cpp Corrrected references to f32 and F32 3 years ago
input_spdif3_f32.h Added float modules for 24 bit precision S/PDIF I/O. They are forked from current code of the "offical" (16 bit 44.1kHz only) Teensy audio library, but extended to 24 bit precision and configurable sample rate. 3 years ago
keywords.txt Add AudioAlignLR_F32 3 years ago
mathDSP_F32.cpp Add AudioFilter 90Deg and RadioIQMixer plus support for these. 4 years ago
mathDSP_F32.h Add AudioFilter 90Deg and RadioIQMixer plus support for these. 4 years ago
memcpy_audio.h Brought in Radio Classes and examples 4 years ago
output_i2s_f32.cpp Removed old commented out code. No functional change 2 years ago
output_i2s_f32.h Removed old commented out code. No functional change 2 years ago
output_spdif3_f32.cpp Added float modules for 24 bit precision S/PDIF I/O. They are forked from current code of the "offical" (16 bit 44.1kHz only) Teensy audio library, but extended to 24 bit precision and configurable sample rate. 3 years ago
output_spdif3_f32.h Added float modules for 24 bit precision S/PDIF I/O. They are forked from current code of the "offical" (16 bit 44.1kHz only) Teensy audio library, but extended to 24 bit precision and configurable sample rate. 3 years ago
play_queue_f32.cpp Removed old comments 2 years ago
play_queue_f32.h Major addition of functions from J. Oakley per I16 library. Thanks! 2 years ago
radioBFSKmodulator_F32.cpp Corrected comments, only 4 weeks ago
radioBFSKmodulator_F32.h Corrected comments, only 4 weeks ago
radioCESSB_Z_transmit_F32.cpp Added IQ corrections for hardware errors 2 years ago
radioCESSB_Z_transmit_F32.h Added IQ corrections for hardware errors 2 years ago
radioCESSBtransmit_F32.cpp Corrected comments 2 years ago
radioCESSBtransmit_F32.h Corrected comments 2 years ago
radioCWModulator_F32.cpp Added class radioCWModulator_F32 for Morse code 2 years ago
radioCWModulator_F32.h Added class radioCWModulator_F32 for Morse code 2 years ago
radioFT8Demodulator_F32.cpp Fixed unused ii 2 years ago
radioFT8Demodulator_F32.h Corrected comment 2 years ago
radioFT8Modulator_F32.cpp Add new radioFT8Modulator_F32 2 years ago
radioFT8Modulator_F32.h Clarified copyright 2 years ago
radioModulatedGenerator_F32.cpp Corrected warnings (no problems) 3 years ago
radioModulatedGenerator_F32.h Added setFMScale to radioModulatedGenerator_F32 3 years ago
radioNoiseBlanker_F32.cpp Corrected block release for 1 channel operation 4 years ago
radioNoiseBlanker_F32.h Revised NoisBlanker to have I+Q option 4 years ago
radioVoiceClipper_F32.cpp Add Voice Clipper class 2 years ago
radioVoiceClipper_F32.h Add Voice Clipper class 2 years ago
readme.md Fixed typos. 2 years ago
record_queue_f32.cpp Clarifying record_queue_f32 8 years ago
record_queue_f32.h Libarary: big code update from my Tympan_Library 7 years ago
sinTable512_f32.h Add AudioFilter 90Deg and RadioIQMixer plus support for these. 4 years ago
synth_GaussianWhiteNoise_F32.cpp Changed to allow very small noise power 3 years ago
synth_GaussianWhiteNoise_F32.h Correct for T4, add peak, rms, Gaussian 4 years ago
synth_pinknoise_f32.cpp Correct for T4, add peak, rms, Gaussian 4 years ago
synth_pinknoise_f32.h Correct for T4, add peak, rms, Gaussian 4 years ago
synth_sin_cos_f32.cpp Added pureSpectrum filtering option. 3 years ago
synth_sin_cos_f32.h Added pureSpectrum filtering option. 3 years ago
synth_sine_f32.cpp Added pureSpectrum filtering option. 3 years ago
synth_sine_f32.h Added pureSpectrum filtering option. 3 years ago
synth_waveform_F32.cpp Added an oscillator in float format 8 years ago
synth_waveform_F32.h Add files from Tympan_Library 8 years ago
synth_whitenoise_f32.cpp Correct for T4, add peak, rms, Gaussian 4 years ago
synth_whitenoise_f32.h Libarary: big code update from my Tympan_Library 7 years ago

readme.md

OpenAudio Library for Teensy

This is a library of Teensy Arduino classes to provide audio signal processing with 32-bit floating point data transfers. This parallels the 16-bit integer Teensy Audio Library but, interconnects blocks using 32-bit floating point data types. Converters for inter-connecting the two types are provided. Both data types can be used in the same sketch. To distinguish the two types, file and class names for this library have a trailing "_F32."

This library was originally put together by Chip Audette and he summed up the reasons for this:

Purpose: The purpose of this library is to build upon the Teensy Audio Library to enable new functionality for real-time audio processing.

Approach: To follow the structure and approach of the Teensy Audio Library, so that coding techniques, style, and structure that works for the Teensy Audio Library will also work with this library.

Send Help!: If you see ways to make my code better aligned with the Teensy Audio Library, send a pull request!

Information

Design Tool Many changes and additions were made in the 2020 time period. Hopefully this has brought this library to the point where blocks can be just assembled and run. To make that practical, there is now an OpenAudio Library Design Tool that again parallels the Teensy Audio Design Tool, that has been borrowed upon for both code and content. This OpenAudio Design Tool is intended to be a temporary design aid with improvements to come, like being able to combine integer and floating point blocks.

The primary documentation is the Design Tool. Clicking on any of the classes brings up a right-side help panel. This lists the use of the class, the constraints, all the functions and at the botom are general notes. Most classes have example INO files and these are listed and available when this library is installed. Sometimes elements of this documentation is not completed, yet. In some of those cases it is worth looking at the .h include file for the class. At the top of these files are comments with more information.

Teensy 3 and 4 During 2020 this library has undergone revision to make it Teensy 4.x compatible. Much of this related to using multiple sampling rates with the I2S clocks and the interrupt/DMA code for data transfer. The files and associated classes output_i2s_f32.h, output_i2s_f32.cpp, input_i2s_f32.h, input_i2s_f32.cpp are now ready to be used for T3.x and T4.x. There are some restrictions, particularly this should be used with 16-bit I2S codec data. Codec sample rates can be varied. Variable block size is supported, but be sure the settings option is used. Thanks to Chip, @jcj83429 and all the Teensy development folks.

Tympan Project Many of the classes in this library were put together as part of the Tympan Project. That is oriented towards open-source hearing aid and hearing aid development tools. It has its own Tympan Design Tool as well as some custom Teensy-based hardware. Additionally, there are a few classes in this library that use terminology and variables that are specific to audiology. It is intended that these, in time, be replaced by similar classes with more conventional descriptors. And, of course, if your interest is in hearing aids, you should spend time at the Tympan project!

Notes

1 - The USB_Audio_F32.h includes all the functions needed to use USB audio for input and output. However, it is not in the OpenAudio_ArduinoLibrary.h as would be expected. To use this class, add "#include USB_Audio_F32.h" to the INO file and before compiling, go to the IDE Tools>USB Type and set the radio button to "Audio." This should then compile without error. Also, using this class requires some amount of I16 audio memory, such as a line in the top of the INO, "AudioMemory(10);"

2 - This library generally supports changing sample rates within the range of the Codec hardware being used. See Examples/PassthroughF32/PassthroughF32.ino. In addition, be aware that classes that need speed scaling such as waveform generators and filters must be modified individually using built-in functions such as AudioSynthWaveformSine_F32::setSampleRate_Hz(float &fs_Hz). Also, see https://forum.pjrc.com/threads/38753-Discussion-about-a-simple-way-to-change-the-sample-rate for discussion of both T3.x and T4.x I2S sample rates.

Installation

Download (and unzip) this library into the Arduino libraries directory on your computer. On my computer, that means I put it here:

C:\Users\chipaudette\Documents\Arduino\libraries\OpenAudio_ArduinoLibrary

Restart your Arduino IDE and you should now see this libraries example sketches under File->Examples->OpenAudio_ArduinoLibrary

After installing this library into your Arduino->Libraries direction, you can have access to any of these capabilities simply by including the following command in your Arduino sketch: #include <OpenAudio_ArduinoLibrary.h>.

As an alternative to the ZIP download, you can use git to maintain a local copy of the library. This has the advantage of easy updating. See GitHub and git documentation on how to do this.

Dependencies

This library extends the functionality of the Teensy Audio Library, so you'll need to install it per its instructions.

The floating-point processing takes advantage of the DSP acceleration afforded by the ARM core inside the Teensy 3.x and 4.x processor. Therefore, it uses arm_math.h. This dependencies is installed automatically when you install the Teensy Audio Library, so you don't need to take any extra steps. It's there already.