Hi all,
I'm working on a university senior design team to implement an acoustic feedback cancellation device using the teensy4.0 and audio shield. At this point we'd like to use the CMSIS-DSP library, which has an easy to use normalized lms adaptive filter.
We've successfully got our teensy 4.0 modules up and running processing audio, but need to close the gap between the under-the-hood operations of the audio library, and the CMSIS-DSP library.
Our main challenge at this point is figuring out how to access the packets of data that stream between teensy audio objects. It's very easy to use the audio library with other audio library objects, but is there a way to store these packets to a buffer instead of sending straight to another processing or output object? If this is possible, we could "intercept" the packets with our normalized LMS filter, do some processing, and then send it to the audio output object.
The code below is just a basic sketch that passes audio between the line-in and line-out.
#include <Audio.h>
#include <Wire.h>
#include <SD.h>
#include <SPI.h>
#include <SerialFlash.h>
AudioInputI2S i2s_in;
AudioOutputI2S i2s_out;
AudioConnection patchcord1(i2s_in,0,i2s_out,0);
AudioConnection patchcord2(i2s_in,0,i2s_out,1);
AudioControlSGTL5000 sgtl5000;
void setup() {
Serial.begin(115200);
AudioMemory(10);
sgtl5000.enable();
sgtl5000.volume(0.5);
Serial.print("Setup Complete \n");
}
void loop() {
Serial.print("Streaming audio \n");
delay(1000);
}
I'm working on a university senior design team to implement an acoustic feedback cancellation device using the teensy4.0 and audio shield. At this point we'd like to use the CMSIS-DSP library, which has an easy to use normalized lms adaptive filter.
We've successfully got our teensy 4.0 modules up and running processing audio, but need to close the gap between the under-the-hood operations of the audio library, and the CMSIS-DSP library.
Our main challenge at this point is figuring out how to access the packets of data that stream between teensy audio objects. It's very easy to use the audio library with other audio library objects, but is there a way to store these packets to a buffer instead of sending straight to another processing or output object? If this is possible, we could "intercept" the packets with our normalized LMS filter, do some processing, and then send it to the audio output object.
The code below is just a basic sketch that passes audio between the line-in and line-out.
#include <Audio.h>
#include <Wire.h>
#include <SD.h>
#include <SPI.h>
#include <SerialFlash.h>
AudioInputI2S i2s_in;
AudioOutputI2S i2s_out;
AudioConnection patchcord1(i2s_in,0,i2s_out,0);
AudioConnection patchcord2(i2s_in,0,i2s_out,1);
AudioControlSGTL5000 sgtl5000;
void setup() {
Serial.begin(115200);
AudioMemory(10);
sgtl5000.enable();
sgtl5000.volume(0.5);
Serial.print("Setup Complete \n");
}
void loop() {
Serial.print("Streaming audio \n");
delay(1000);
}