Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: Please test this example on Teensy 3.6 for me

  1. #1
    Junior Member
    Join Date
    Apr 2020
    Posts
    7

    Please test this example on Teensy 3.6 for me

    Hi all, I'm having problems programming sound effects into a guitar pedal I am building. I'm using Teensy 3.2 without audio shield, just using filters and adc-dac.

    I am unable to control many effects including reverb parameters (they are stuck at max) and waveshaper. The waveshape example shown below has no effect on the sine-wave generated and I am wondering if it is a hardware issue. If somebody could test the example below on a 3.6 (or even 3.2 with shield?) and let me know if it works then I would be very grateful and can figure out where to go with my project.

    Waveshape example - https://github.com/dxinteractive/Tee...ster/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've spent a lot of time on this project so It would be a shame to get stuck now. Thanks for any help.

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    17,138
    The link is malformed and repositories doesn't indicate a place for it: github.com/dxinteractive/Tee...ster/README.md

  3. #3
    Junior Member
    Join Date
    Apr 2020
    Posts
    7
    Quote Originally Posted by defragster View Post
    The link is malformed and repositories doesn't indicate a place for it: github.com/dxinteractive/Tee...ster/README.md
    Thanks - https://github.com/dxinteractive/TeensyAudioWaveshaper

  4. #4
    Do you hear the difference between
    Code:
    AudioConnection patchCord1(waveform, 0, waveshaper, 0);
    AudioConnection patchCord2(waveshaper, 0, output, 0);
    and
    Code:
    AudioConnection patchCord1(waveform, 0, output, 0);
    Tested on T3.6 and T4.0 with I2S DAC, waveshaper definitely works okay and I can hear the difference between the pure sine wave and waveshaped tone. It has no controls except the shape array (which you can change dinamically if you want), so I'm not really sure what you're up to

  5. #5
    Junior Member
    Join Date
    Apr 2020
    Posts
    7
    Thanks for taking time to try that out for me.

    Yes I've tried the sketch with the patchcord going straight through also and it sounds exactly the same. I've also tried altering the array pretty drastically but there are no changes.

    Another example of my issue is with the reverb and freeverb effects. They can be applied just fine but they always have maxed out parameters and I cannot change them. It will sound like im paying in a cathedral regardless of wether I set example.roomsize(); to 0.01 0r 1.00 or anything inbetween.

    I'm thinking these issues may be something to do with my lack of an audioshield. Maybe I2S is needed or something. I can't find any more information regarding how the library works.

    I think I will buy a 4.0 & shield and use the 3.2 for a simpler project instead.

    Thanks for having a look.

    Quote Originally Posted by Subfanatic View Post
    Do you hear the difference between
    Code:
    AudioConnection patchCord1(waveform, 0, waveshaper, 0);
    AudioConnection patchCord2(waveshaper, 0, output, 0);
    and
    Code:
    AudioConnection patchCord1(waveform, 0, output, 0);
    Tested on T3.6 and T4.0 with I2S DAC, waveshaper definitely works okay and I can hear the difference between the pure sine wave and waveshaped tone. It has no controls except the shape array (which you can change dinamically if you want), so I'm not really sure what you're up to

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •