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 4fb7a512ab Brought in Radio Classes and examples 4 years ago
docs GUI: update picture of Tympan 8 years ago
examples Brought in Radio Classes and examples 4 years ago
utility Libarary: big code update from my Tympan_Library 7 years ago
.gitattributes :neckbeard: Added .gitattributes & .gitignore files 8 years ago
.gitignore Update gitignore to ignore jedit backup files 8 years ago
.travis.yml Travis: remove xvfb 8 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 Libarary: big code update from my Tympan_Library 7 years ago
AudioEffectCompWDRC_F32.h Libarary: big code update from my Tympan_Library 7 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
AudioFilter90Deg_F32.cpp Add AudioFilter 90Deg and RadioIQMixer plus support for these. 4 years ago
AudioFilter90Deg_F32.h Add AudioFilter 90Deg and RadioIQMixer plus support for these. 4 years ago
AudioFilterBiquad_F32.cpp Libarary: big code update from my Tympan_Library 7 years ago
AudioFilterBiquad_F32.h Libarary: big code update from my Tympan_Library 7 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 Add radio rfcn AnalyzePhase, Equalizer, FirGeneral, FM Det, sin_cos, Nois Blanker + example INO 4 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
AudioMixer_F32.cpp Correct for T4, add peak, rms, Gaussian 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 Libarary: big code update from my Tympan_Library 7 years ago
AudioSettings_F32.cpp Libarary: big code update from my Tympan_Library 7 years ago
AudioSettings_F32.h Libarary: big code update from my Tympan_Library 7 years ago
AudioStream_F32.cpp Libarary: big code update from my Tympan_Library 7 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
OpenAudio_ArduinoLibrary.h Brought in Radio Classes and examples 4 years ago
RadioFMDetector_F32.cpp Add radio rfcn AnalyzePhase, Equalizer, FirGeneral, FM Det, sin_cos, Nois Blanker + example INO 4 years ago
RadioFMDetector_F32.h Add radio rfcn AnalyzePhase, Equalizer, FirGeneral, FM Det, sin_cos, Nois Blanker + example INO 4 years ago
RadioIQMixer_F32.cpp Add AudioFilter 90Deg and RadioIQMixer plus support for these. 4 years ago
RadioIQMixer_F32.h Add AudioFilter 90Deg and RadioIQMixer plus support for these. 4 years ago
USB_Audio_F32.h Libarary: big code update from my Tympan_Library 7 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
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.xxx Correct for T4, add peak, rms, Gaussian 4 years ago
input_i2s_f32.h.xxx Correct for T4, add peak, rms, Gaussian 4 years ago
keywords.txt Adding white and pink noise 8 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_OA_F32.cpp.xxx Brought in Radio Classes and examples 4 years ago
output_i2s_OA_f32.h.xxx Brought in Radio Classes and examples 4 years ago
output_i2s_f32.cpp.xxx Brought in Radio Classes and examples 4 years ago
output_i2s_f32.h.xxx Brought in Radio Classes and examples 4 years ago
play_queue_f32.cpp Add play and record queues 8 years ago
play_queue_f32.h Libarary: big code update from my Tympan_Library 7 years ago
radioNoiseBlanker_F32.cpp Add radio rfcn AnalyzePhase, Equalizer, FirGeneral, FM Det, sin_cos, Nois Blanker + example INO 4 years ago
radioNoiseBlanker_F32.h Add radio rfcn AnalyzePhase, Equalizer, FirGeneral, FM Det, sin_cos, Nois Blanker + example INO 4 years ago
readme.md Brought in Radio Classes and examples 4 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 Brought in Radio Classes and examples 4 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 Add radio rfcn AnalyzePhase, Equalizer, FirGeneral, FM Det, sin_cos, Nois Blanker + example INO 4 years ago
synth_sin_cos_f32.h Add radio rfcn AnalyzePhase, Equalizer, FirGeneral, FM Det, sin_cos, Nois Blanker + example INO 4 years ago
synth_sine_f32.cpp Correct for T4, add peak, rms, Gaussian 4 years ago
synth_sine_f32.h Correct for T4, add peak, rms, Gaussian 4 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

Special Note 17 June 2020 - This library is undergoing revision to make Teensy 4.x compatible and to add functionality. Changes are expected throughout the rest of June. See this readme for summaries during this period. Notes:

1-synth_sine_f32.h & .cpp allowed both KINETISK and__IMXRT1062__ to support T4.x. Tested 3.6, 4.0 2-Fix synth_pinknoise_f32.h & .cpp built in I16 to F32. Now T3 and T4. 3-Fix synth_whitenoise_f32.cpp to include IMXRT1062 and built in I16 to F32. Now T3 and T4. 4-Added Gaussian White Noise F32. This is T3 and T4. 5-Renamed 3206 codec to .xxx to stop collisions with Teensy I16 library. Needs work. 6-Added new examples/SignalNoise_float.ino to test white, pink, Gaussian noise and sine. Audio out. 7-Disabled output_i2s_f32.h, .cpp by .xxxfile type. These need rework for T4. Use Convert_F32toI16. 8-Disabled control_tlv320aic3206.h, .cpp by .xxxfile type. These collide with Teensy I16 Audio. 9-Added new analyze_peak_f32.h and .cpp that parallel similar classes in the Teensy I16 library. 10-Added new analyze_rms_f32.h and .cpp that parallel similar classes in the Teensy I16 library. 11-Moved AudioSwitch_F32 from Tympan, added 8-channel version. 12-Added /examples/Switches_float.ino for 4 and 8 channel switches. 13-Moved FFT_Overlapped_F32 files from Tympan, revised for T4.0, added _OA name isolation. 14-Moved Overlapped FFT LPF .INO from Tympan to OA. Working T3.6 and T4.0 15-Moved Overlapped FFT AudioFormantShifter INO and related from Tympan to _OA Open Audio. Tested 3.6 and 4.0. 16-Moved AudioFrequencyShifter INO and related from Tympan to _OA Open Audio. Tested 3.6 and 4.0. 17-Working on SdFatWriter and related SdFat files. DO NOT USE. 18-Modified AudioEffectDelay for T4.0. 19-Moved in radio function AudioFilter90Deg_F32. 20-Moved in radio function RadioIQMixer_F32. 21-Added Example INO, FineFreqShift_OA.ino with Hilbert shifter and delay stereo. 22-Brought in support stuff mathDSP_F32 and sinTable512_F32.h. 23-Brought in AudioAnalyzePhase_F32 and Example 24-Brought in AudioFilterEqualyzer_F32 and 2 Example 25-Brought in AudioFilterFIRGeneral_F32 and 2 Example INOs 26-Brought in RadioFMDetector_F32 and Example 27-Brought in synth_sin_cos_F32 and test example 28-Brought in RadioNoiseBlanker_F32 and Example 29-Created output_i2s_OA_F32.h and .cpp to have F32 input. Work in Progress, DO NOT USE. Set to .xxx

Special Note 2* 2 July 2020 - Recently, the input and output I2S for F32 have been disabled as they had major hardware problems with Teensy 4.x. The previous output_i2s_f32 files supported variable sample rate and variable block size, but only for T3.x. To get this going again, the old classes will be re-enabled for T3.x only . And, new classes have been created that compile and run under T4.x (and T3.5, T3.6) but, for now, have no provision for changing block size, sample rate or ADC output word (always 16-bit). The new files are output_i2s_OA_F32.h and output_i2s_OA_F32.cpp with the corresponding inputs to come soon. The classes are AudioInputI2S_OA_F32 and AudioOutputI2S_OA_F32 with the same functionality as their parallel 16-bit integer classes under Teensy Audio. If you need variable block size and/or variable data rate (T3.x only) use the Convert_I16toF32 and Convert_F32toU16 classes.

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

Approach: I am attempting 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 my library. synth_sine_f32

Send Help!: While I'm hoping to follow the pattern of the Teensy Audio Library, I am not a well trained programmer, so I have difficulty chosing the right path. If you see ways to make my code better aligned with the Teensy Audio Library, send a pull request!

Contents

As I said, the goal of this library is to extend the functionality of the Teensy Audio Library. My extensions are focused in these areas:

Floating Point Audio Processing: The Teensy Audio Library processes the audio data as fixed-point Int16 values. While very fast for the Teensy 3.0-3.2, it is unnecessarily constraining (IMO) for the Teensy 3.5 and 3.6, which both have floating-point units. To enable floating-point audio processing, I have created:

  • **AudioStream_F32: Following the model of Teensy's AudioStream class. In addition to the new AudioStream_F32, this file includes a new audio_block_f32_t in place of audio_block_t, as well as a new AudioConnection_F32 in place of AudioConnection.
  • New F32 Audio Processing Blocks: Using this new floating-point capability, I've written some new audio processing blocks that operate using floating-point audio values instead of fixed-point values. Examples include AudioEffectGain_F32 and AudioEffectComperessor_F32.
  • F32 Versions of Existing Blocks: To maintain continuity with the Teensy Audio Library, a number of the Audio Library's Audio blocks (which process as Int16 data) to operate on floating-point (ie, Float32) data. Thanks to other people's contributions, examples include AudioMixer4_F32 and AudioMultiply_F32. Feel free to convert more blocks, if you'd like!
  • New Hardware Controls: The Teensy Audio Library does a great job of wrapping up the complicated control of hardware elements (such as the SGTL5000 audio codec) into a nice easy-to-use classes. But, sometimes, certain features of the hardware were not exposed in those classes. Here, I've extended the default classes to expose the extra features that I want. See AudioControlSGTL5000_Extended as an example.

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>.

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

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 M4F core inside the Teensy 3.5/3.6 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.