Audio lib not functioning properly on Teensy 3.2

Status
Not open for further replies.

ellis

Member
Morning all, I'm having issues with programming effects into my Teensy based guitar effects pedal.

I am using Teensy 3.2 without the audio shield. I just have various filters going to ADC and leaving DAC.

Now that I come to program effects into the pedal I find that I cannot use a lot of functions. For example I can apply chorus or reverb or 'freeverb' effects however parameters are set to maximum all the time and I cannot effect them at all. I have little clue why this could be. For example the freeverb effect will always sound like i'm playing in a cathedral even if I reduce roomsize parameter to 1%.

One straight forward example I can show is this example code for "TeensyAudioWaveshaper" since I can play the sine wave perfectly but the wave shaper effect is never applied regardless of how I change around parameters.

Here is the Github link, I will post the code below. https://github.com/dxinteractive/TeensyAudioWaveshaper/blob/master/README.md

Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
#include "effect_waveshaper.h"

AudioSynthWaveform waveform;
AudioEffectWaveshaper waveshaper;
AudioOutputI2S output;

AudioConnection patchCord1(waveform, 0, waveshaper, 0);
AudioConnection patchCord2(waveshaper, 0, output, 0);
AudioControlSGTL5000 audioAdaptor;

float WAVESHAPE_EXAMPLE[17] = {
  -0.588,
  -0.579,
  -0.549,
  -0.488,
  -0.396,
  -0.320,
  -0.228,
  -0.122,
  0,
  0.122,
  0.228,
  0.320,
  0.396,
  0.488,
  0.549,
  0.579,
  0.588
};



void setup() {
  AudioMemory(40);
  audioAdaptor.enable();
  waveform.begin(1.0, 200.0, WAVEFORM_SINE);
  waveshaper.shape(WAVESHAPE_EXAMPLE, 17);
}

void loop() {
}

I spent quite a lot of time making the hardware and enclosure for this project and had to learn a lot about analogue electronics (I'm a mech engineer). It would be a shame to have all that work wasted by this problem but I cannot find any information to help me. I think my only remaining option may be to buy the audio shield and/or a newer teensy but I understand the 4.0 does not yet have ADC compatibility with the audio lib.

Please let me know if anyone has any ideas or if they can give me an example they have made which uses these features and works, I can adapt to that.

Thanks for any help!
 
Status
Not open for further replies.
Back
Top