Filter BLock

Status
Not open for further replies.

Kcvo

New member
Hi, I am in the middle of a project and am using a Teensy 3.2.
Our project is basically taking in audio(like an mp3) from an input (I2S master) which the Teensy will process and filter it using DSP routines and go to an output(I2S slave).
I'm confused on starting this since we are not using the audio shield and many examples I've seen rely on it.
We have pretty much got the hardware stuff figured out(input and output) and am stuck on the coding and how it interacts with the hardware.
 
The audioshield does nothing important - all is done "in software" by the audiolibrary. the audiolib-filters work without the shield, too.

p.s. you know that the Teensy can play mp3?
 
I'd recommend starting with the audio library tutorial. It has a 31 page PDF with step-by-step instructions, and there's a 45 minute walkthrough video you can watch if you get stuck.

https://www.pjrc.com/store/audio_tutorial_kit.html

Part 2-7 starting on page 19 shows how to use the state variable filter. It's the simplest, so best to start with that one. The biquad and FIR filters are a bit more complicated with more setup required in the Arduino code, but hopefully after you've used the library & its design tool you'll become familiar enough with how to use the library to see the path forward.

Even though you said you "have pretty much got the hardware stuff figured out", you might consider that the terms "master" and "slave" in I2S mean which creates the clock signals, not which side sends vs receives the audio data. In fact, both modes are able to transmit and receive data. When you do the tutorial, all of the material uses the audio shield which is controlled by Teensy in I2S master mode and the shield is an I2S slave. But that doesn't mean the shield in slave mode can't transmit audio. In part 2-4 to 2-6 of the tutorial (pages 16 to 18) you'll use the microphone. The audio shield with the mic, running as an I2S slave, transmits that microphone's audio to the Teensy running as an I2S master. The Teensy does processing on the audio, and as an I2S master, transmits data to the shield which is played on your headphones. In other mode, I2S can both transmit and receive (assuming the hardware has both TX and RX signals). The different modes are about which side controls the clocks.
 
Status
Not open for further replies.
Back
Top