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

Thread: Which Teensy is best for this effects processor?

  1. #1
    Junior Member
    Join Date
    Oct 2020
    Posts
    4

    Which Teensy is best for this effects processor?

    Hello! I have two questions:

    1) I'm building a thing that will be able to effect incoming signals in many ways, including Reverb, Granular synthesis, Delay, EQ & Enveloping. My first question is which Teensy is best between the 4.0 and 4.1? I see that the 4.1 has way more advantages but I'm not sure what this project will require and I don't want to overdo it.

    2) Regarding the audio system design tool, i've created this small system just to test if I understand what's going on. Does this route the input through an envelope first, then a filter, then that signal to both reverb / granular synthesis, to an output? Is this correct for a Stereo sound? I understand i'll have to write additional code for these modules to work but if I'm missing anything here please let me know! Thanks for your time!

    Click image for larger version. 

Name:	Screen Shot 2020-10-23 at 3.39.00 PM.jpg 
Views:	22 
Size:	72.0 KB 
ID:	22181
    Last edited by damonb82; 10-23-2020 at 11:40 PM.

  2. #2
    Senior Member
    Join Date
    Nov 2012
    Posts
    1,488
    Your diagram is essentially mono. To handle stereo you would need to have a separate path for each channel. Import this into the audio design tool:
    Code:
    #include <Audio.h>
    #include <Wire.h>
    #include <SPI.h>
    #include <SD.h>
    #include <SerialFlash.h>
    
    // GUItool: begin automatically generated code
    AudioInputI2S            i2s1;           //xy=117.88330078125,281.8833312988281
    AudioEffectEnvelope      envelope2;      //xy=321.88330078125,449.8833312988281
    AudioEffectEnvelope      envelope1;      //xy=333.88330078125,114.88333129882812
    AudioFilterStateVariable filter1;        //xy=517.88330078125,113.88333129882812
    AudioFilterStateVariable filter2;        //xy=516.88330078125,446.8833312988281
    AudioMixer4              mixer1;         //xy=725.88330078125,118.88333129882812
    AudioMixer4              mixer2;         //xy=727.8832702636719,449.8833312988281
    AudioEffectFreeverb      freeverb1;      //xy=935.88330078125,96.88333129882812
    AudioEffectGranular      granular1;      //xy=938.88330078125,153.88333129882812
    AudioEffectFreeverb      freeverb2;      //xy=956.8832702636719,421.8833312988281
    AudioEffectGranular      granular2;      //xy=957.88330078125,478.8833312988281
    AudioMixer4              mixer3;         //xy=1138.88330078125,122.88333129882812
    AudioMixer4              mixer4;         //xy=1142.8832702636719,437.8833312988281
    AudioOutputI2S           i2s2;           //xy=1314.88330078125,271.8833312988281
    AudioConnection          patchCord1(i2s1, 0, envelope1, 0);
    AudioConnection          patchCord2(i2s1, 1, envelope2, 0);
    AudioConnection          patchCord3(envelope2, 0, filter2, 0);
    AudioConnection          patchCord4(envelope1, 0, filter1, 0);
    AudioConnection          patchCord5(filter1, 0, mixer1, 0);
    AudioConnection          patchCord6(filter1, 1, mixer1, 1);
    AudioConnection          patchCord7(filter1, 2, mixer1, 2);
    AudioConnection          patchCord8(filter2, 0, mixer2, 0);
    AudioConnection          patchCord9(filter2, 1, mixer2, 1);
    AudioConnection          patchCord10(filter2, 2, mixer2, 2);
    AudioConnection          patchCord11(mixer1, freeverb1);
    AudioConnection          patchCord12(mixer1, granular1);
    AudioConnection          patchCord13(mixer2, freeverb2);
    AudioConnection          patchCord14(mixer2, granular2);
    AudioConnection          patchCord15(freeverb1, 0, mixer3, 0);
    AudioConnection          patchCord16(freeverb1, 0, mixer3, 3);
    AudioConnection          patchCord17(granular1, 0, mixer3, 1);
    AudioConnection          patchCord18(granular1, 0, mixer3, 2);
    AudioConnection          patchCord19(freeverb2, 0, mixer4, 0);
    AudioConnection          patchCord20(freeverb2, 0, mixer4, 3);
    AudioConnection          patchCord21(granular2, 0, mixer4, 1);
    AudioConnection          patchCord22(granular2, 0, mixer4, 2);
    AudioConnection          patchCord23(mixer3, 0, i2s2, 0);
    AudioConnection          patchCord24(mixer4, 0, i2s2, 1);
    AudioControlSGTL5000     sgtl5000_1;     //xy=566.88330078125,657.88330078125
    // GUItool: end automatically generated code
    I think this will implement your design in stereo.

    As to the processor: the 4.0 and 4.1 use the same processor chip so the raw CPU power is the same. The 4.1 has more memory, more pins, four more ADC inputs. It'll depend upon how many devices you want to attach that will determine whether you need a 4.1 or the 4.0

    Pete

  3. #3
    Junior Member
    Join Date
    Oct 2020
    Posts
    4
    Thank you very much for the reply, that makes sense now that I see it this way. I'll be studying more now that you've pointed me in the right direction! Thanks. Below is what I have now, and will be building on.

    Click image for larger version. 

Name:	Screen Shot 2020-10-23 at 4.43.01 PM.jpg 
Views:	17 
Size:	73.4 KB 
ID:	22182Click image for larger version. 

Name:	Screen Shot 2020-10-23 at 4.43.01 PM.jpg 
Views:	17 
Size:	73.4 KB 
ID:	22182

  4. #4
    Senior Member
    Join Date
    Nov 2012
    Posts
    1,488
    If mixer3 and mixer4 will only have one input in the final design, they can be removed and the diagram simplifies to this:
    Code:
    #include <Audio.h>
    #include <Wire.h>
    #include <SPI.h>
    #include <SD.h>
    #include <SerialFlash.h>
    
    // GUItool: begin automatically generated code
    AudioInputI2S            i2s1;           //xy=117.88330078125,281.8833312988281
    AudioEffectEnvelope      envelope2;      //xy=321.88330078125,449.8833312988281
    AudioEffectEnvelope      envelope1;      //xy=333.88330078125,114.88333129882812
    AudioFilterStateVariable filter1;        //xy=517.88330078125,113.88333129882812
    AudioFilterStateVariable filter2;        //xy=516.88330078125,446.8833312988281
    AudioEffectGranular      granular1;      //xy=732.88330078125,139.88333129882812
    AudioEffectFreeverb      freeverb1;      //xy=733.88330078125,95.88333129882812
    AudioEffectGranular      granular2;      //xy=744.88330078125,475.8833312988281
    AudioEffectFreeverb      freeverb2;      //xy=748.88330078125,424.8833312988281
    AudioMixer4              mixer4;         //xy=939.88330078125,460.8833312988281
    AudioMixer4              mixer3;         //xy=941.88330078125,133.88333129882812
    AudioOutputI2S           i2s2;           //xy=1259.88330078125,298.8833312988281
    AudioConnection          patchCord1(i2s1, 0, envelope1, 0);
    AudioConnection          patchCord2(i2s1, 1, envelope2, 0);
    AudioConnection          patchCord3(envelope2, 0, filter2, 0);
    AudioConnection          patchCord4(envelope1, 0, filter1, 0);
    AudioConnection          patchCord5(filter1, 0, freeverb1, 0);
    AudioConnection          patchCord6(filter1, 0, granular1, 0);
    AudioConnection          patchCord7(filter2, 0, freeverb2, 0);
    AudioConnection          patchCord8(filter2, 0, granular2, 0);
    AudioConnection          patchCord9(granular1, 0, mixer3, 1);
    AudioConnection          patchCord10(freeverb1, 0, mixer3, 0);
    AudioConnection          patchCord11(granular2, 0, mixer4, 1);
    AudioConnection          patchCord12(freeverb2, 0, mixer4, 0);
    AudioConnection          patchCord13(mixer4, 0, i2s2, 1);
    AudioConnection          patchCord14(mixer3, 0, i2s2, 0);
    AudioControlSGTL5000     sgtl5000_1;     //xy=566.88330078125,657.88330078125
    // GUItool: end automatically generated code
    Pete

Posting Permissions

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