cfredisded
Active member
I've been messing around with the Teensy 4.1 and the audio library and noticed when I play audio through a delay block and adjust the delay length it makes a crackling sound. Is this normal? Does this happen on the Teensy 3.6 as well?
Here's the simplified code:
Also from the digging that I've done its seems like the audio library isn't able to make use of the teensy 4.1 extended psram yet. Like the delayExt, granular effect or other memory intensive effects?
Here's the simplified code:
Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
// GUItool: begin automatically generated code
AudioInputI2S i2s1; //xy=385,211
AudioEffectDelay delay1; //xy=683,309
AudioMixer4 mixer1; //xy=853,238
AudioOutputI2S i2s2; //xy=987,232
AudioConnection patchCord1(i2s1, 1, delay1, 0);
AudioConnection patchCord2(i2s1, 1, mixer1, 0);
AudioConnection patchCord3(delay1, 0, mixer1, 1);
AudioConnection patchCord4(mixer1, 0, i2s2, 1);
AudioControlSGTL5000 sgtl5000_1; //xy=393,306
// GUItool: end automatically generated code
#include <Encoder.h>
Encoder delayEnc(38,39);
int delayVal;
int oldDelayPos;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
AudioMemory(100);
mixer1.gain(0,1); // dry
mixer1.gain(1,1); // delay
}
void loop() {
// put your main code here, to run repeatedly:
long newDelayPos = delayEnc.read();
long delayVal1 = (newDelayPos - oldDelayPos);
delayVal = delayVal+delayVal1;
if (delayVal <= 0){
delayVal = 0;
}
if (delayVal >= 1000){
delayVal = 1000;
}
if (newDelayPos != oldDelayPos){
oldDelayPos = newDelayPos;
Serial.print("delayVal = ");
Serial.println(delayVal);
}
//Set output channel (0 to 7) to delay the signals by milliseconds.
//See the table below for the maximum delay. The actual delay is rounded to the nearest sample.
//Each channel can be configured for any delay. There is no requirement to configure the "taps" in increasing delay order.
//if (delaysmoothing >= 10){
delay1.delay(0, delayVal); //Teensy 3.6 2413.94 ms
}
Also from the digging that I've done its seems like the audio library isn't able to make use of the teensy 4.1 extended psram yet. Like the delayExt, granular effect or other memory intensive effects?