FFT + Delay + Serial

Status
Not open for further replies.

acoulson

Member
I just bought an Teensy 3.2 and am certain it will help with some of my goals, but I'm hoping it packs enough horsepower to do all simultaneously and am looking for some feedback on that. I have an application where I would like to take in and audio stream (13 bit mono is plenty), perform FFT on it and bucket into 7 or 8 "octaves", delay it be about 300-500 ms., then output via DAC (11 bit is fine). Simultaneously I would like to be shipping the FFT octave values across the serial port (1 byte magnitude per octave, so, say 8 bytes) 10 times a second. Should one 3.2 be capable of keeping up with all this on its own?

Andy
 
Yes, Teensy 3.2 should handle that. 500 ms is a pretty long delay for only the internal RAM. It might fit, just barely, but the FFT takes some RAM for buffers. You might need to add a 23LC1023 chip for the delay memory.
 
This is very cool and impressive. I'm getting 400ms easy.

One issue...I'm getting hiss in my delayed audio using the dac for line-out. Should I put a low-pass filter on the output? Is there a sample circuit you recommend?

Thanks,
Andy
 
Never mind - looks like I solved it myself. A low pass filter did help, but not all that much. Turned out I did not have a good ground, and apparently there is a lot of noise coming over the power from USB. When powered from an independent source (LIPO battery), the hiss is gone.

Really great product - I pretty much just ran the pass-trough example (with input filter as specified in the ADC help in the designer) and it immediately started working. Created a simple delay design in the node-red designer (neat idea, by the way), added a statement to increase memory allocation, ran it and it worked the first try. Added in an FFT routing and still working fine. I'll probably be playing with actually averaging the FFT into buckets and shipping over serial in the next couple days.
 
Paul,

I've played around with this a little more over the weekend and have a couple of observations I could use some feedback on.

First, I can get a decent, but not quite long enough delay using just the ADC->Delay->DAC with internal memory. The weird thing is, at some point...hard for me to say, since I don't have a scope or anything..it seems like there is a point at which the delay does not increase, even if I increase the MS value in the .delay([output], [ms]) call. Does it internally limit the delay automatically based on available memory?

Also, I'm getting a low frequency (maybe around 100hz) continuous noise coming throuhg when I run off an external supply, not USB through the programming connector. This is true whether I use my Dc-Dc buck converter or just run off a LIPO battery. Any thoughts on why I might be getting this?

Andy
 
Last edited:
Just thought I'd update this thread having resolved my long delay problem. Based on Paul's feedback that external RAM would probably be required for delays beyond a couple hundred milliseconds, I took a stab at attaching some. Not knowing exactly how to attach the RAM, I looked at the schematic for the Audio Adapter. That board includes an SD slot and a pad on the bottom for surface-mounting a RAM chip. I bought a regular DIP form factor chip and DIP socket, then just wired up the portion of the circuitry relating to the RAM chip. This worked great and immediately, I had plenty of RAM for at least a full second of delay. Once again, I'm really pleased with Teensy and the audio capabilities. Feel free to check out my blog where I intend to post more details of the project...https://austinlightguy.wordpress.com/

Capture.JPG
 
Still getting the low frequency noise problem? Usually I suspect ground loops for such things, but it's really difficult to know for sure.
 
No, once I assembled everything a bit more permanently with soldered connections it went away. I still seem to get a bit of high frequency noise when no audio is supplied on the audio in, but it isn't that noticeable when I actually have music playing.
 
Status
Not open for further replies.
Back
Top