Hi Pio..I have been testing your wonderful hexefx on a T4.1 project I am working on. The StereoPhaser, PlateReverb and PingPong Delay in particular are just awesome sounding! I have an issue which I think might be memory related. Firstly I am using your i16 library so I can use the effects along with standard 16bit Teensy Audio design elements. I have tested each of these effects using your examples via platformio, usb+midi serial and the web interface for controlling them. All work great. When I incorporate the 3 effects into my project, the Phaser and PPdelay work perfectly . But for some reason that I cant figure out, the Plate Reverb just wont run. I mean it wont even allow audio through when I invoke bypass. When I compile my project the memory stats are :-Oh, i forgot about the mix. Fixed.
You can build your own html interfaces by adding buttons (sending Midi NoteON/Off) or dials sending ControlChange.
The part where the code starts is here.
For example:
adding
<midi-encoder label="Mix\n%p" chan="1" cc="52" colour="#FFF9C4" label-scale="0.8"></midi-encoder>
creates a dial with label Mix, sending CC=52 on channel 1,\n%pputs a new line + displays the dial value.
<midi-button toggle note="4" colour="#B3E5FC" label="On/Off" label-scale="0.8"></midi-button>
creates a button sending a NoteOn/Off #4 on channel 1.
Thanks! Yes I have already soldered 8Mb psram and flash chips to the underside of the T4.1 but have not yet utilised them. I am just reading how to do this. I think I read somwwhere about editing audiostream.h to replace DMAMEM with EXTMEM?For longer delays it's worth to add a PSRAM and move the buffers there.
Since the delay and reverb objects allocate memory in runtime the RAM2 report does not include them.
AudioMemoryUsageMax();will tell the peak memory usage in blocks.
Hope it helps! Have fun![]()
#include <Audio.h>
#include <hexefx_audiolib_i16.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
// GUItool: begin automatically generated code
AudioInputI2S i2s1; //xy=217.0833282470703,238.08334350585938
AudioEffectPhaserStereo_i16 PhaserStereo1; //xy=388.08331298828125,245.08334350585938
// change this line
// AudioEffectDelayStereo_i16 PP_delay1; //xy=574.0833129882812,245.08334350585938
// into this, 1000 is the max delay time in ms, "true" tells the object to put the sample buffers into PSRAM
AudioEffectDelayStereo_i16 PP_delay1 = AudioEffectDelayStereo_i16(1000, true);
AudioEffectPlateReverb_i16 PlateReveverb1; //xy=768.0833129882812,246.08334350585938
AudioOutputI2S i2s2; //xy=937.0833129882812,245.08334350585938
AudioConnection patchCord1(i2s1, 0, PhaserStereo1, 0);
AudioConnection patchCord2(i2s1, 1, PhaserStereo1, 1);
AudioConnection patchCord3(PhaserStereo1, 0, PP_delay1, 0);
AudioConnection patchCord4(PhaserStereo1, 1, PP_delay1, 1);
AudioConnection patchCord5(PP_delay1, 0, PlateReveverb1, 0);
AudioConnection patchCord6(PP_delay1, 1, PlateReveverb1, 1);
AudioConnection patchCord7(PlateReveverb1, 0, i2s2, 0);
AudioConnection patchCord8(PlateReveverb1, 1, i2s2, 1);
AudioControlSGTL5000 sgtl5000_1; //xy=191.0833282470703,405.0833282470703
// GUItool: end automatically generated code
AudioEffectReverbSc_i16 reverb = AudioEffectReverbSc_i16(true);wow thank you! I wasted too many hours trying to read up about how to correctly use psram with audio (!!) and not getting anything that worked. I will try your suggestions.Some of the RAM hungry effects have an option to start with their sample buffers placed in PSRAM.
Using Stereo Delay as an example
View attachment 39454
Another RAM heavy effect is the ReverbSC, to make it work with PSRAM create the object as below:C++:#include <Audio.h> #include <hexefx_audiolib_i16.h> #include <Wire.h> #include <SPI.h> #include <SD.h> #include <SerialFlash.h> // GUItool: begin automatically generated code AudioInputI2S i2s1; //xy=217.0833282470703,238.08334350585938 AudioEffectPhaserStereo_i16 PhaserStereo1; //xy=388.08331298828125,245.08334350585938 // change this line // AudioEffectDelayStereo_i16 PP_delay1; //xy=574.0833129882812,245.08334350585938 // into this, 1000 is the max delay time in ms, "true" tells the object to put the sample buffers into PSRAM AudioEffectDelayStereo_i16 PP_delay1 = AudioEffectDelayStereo_i16(1000, true); AudioEffectPlateReverb_i16 PlateReveverb1; //xy=768.0833129882812,246.08334350585938 AudioOutputI2S i2s2; //xy=937.0833129882812,245.08334350585938 AudioConnection patchCord1(i2s1, 0, PhaserStereo1, 0); AudioConnection patchCord2(i2s1, 1, PhaserStereo1, 1); AudioConnection patchCord3(PhaserStereo1, 0, PP_delay1, 0); AudioConnection patchCord4(PhaserStereo1, 1, PP_delay1, 1); AudioConnection patchCord5(PP_delay1, 0, PlateReveverb1, 0); AudioConnection patchCord6(PP_delay1, 1, PlateReveverb1, 1); AudioConnection patchCord7(PlateReveverb1, 0, i2s2, 0); AudioConnection patchCord8(PlateReveverb1, 1, i2s2, 1); AudioControlSGTL5000 sgtl5000_1; //xy=191.0833282470703,405.0833282470703 // GUItool: end automatically generated code
AudioEffectReverbSc_i16 reverb = AudioEffectReverbSc_i16(true);
Loving the layoutyes undertsood. I tried with the StereoDelay and it works super ! I guess this is not an option for the stereoPlateReverb..? well I tried and it gave an error. No matter. I will also try with the SC reverb but am sure it will work. Originally I was trying to figure out how to use the regular delay in the standard Teensy Audio library to make use of the psram for audio blocks instead of AudioMemoty() in RAM. But after a lot of reading I gave up. In anycase I really love your amaxzing fX, so its not a problem. Here is my test 'rig' : an esp32s3 2.8" touch screen with lvgl GUI (still in development) controlling a Teensy4.1. Quad audio (just 2x audio shields currently) and a bunch of knobs and switches with mux's to scan them to control both synth engine and some fx parameters.