Overclocked Teensy 3.6 + Audio Adaptor + APA102?

Status
Not open for further replies.

StefanPetrick

Well-known member
Teensy 3.6 + Audio Adaptor + APA102?

Hello everyone,

just some short questions before I get myself a 3.6 + Audio Adaptor. Please correct me in case I misunderstood something.

A) The Audio Library and FastLED are working together fine.
B) Are with this combination still hardware SPI pins available to drive the the leds? (I don´t need SD communication.) Supported by FastLED?
C) Is 256 point FFT the fastest possible way to get spectral data? I would be fine with way less bands, too. Priorities are speed and data quality.
D) I´ve no clue yet how FFT works. Is there an answer to the question: How long does a sine wave with 100 Hz need to be present until the FFT detects a change? One wavelength (10 ms)?

Thanks, Stefan
 
Last edited:
Okay, I spend the night reading the forum - some answers I found myself and I just ordered the boards.
Answers to question C and D would still be of great interest for me.
 
A) The Audio Library and FastLED are working together fine.

I believe FastLED still disables interrupts when driving WS2812, unless you tell it to use OctoWS2811 as a driver.

Interrupt disable for short strips is usually ok, but longer ones can easily glitch the audio.

C) Is 256 point FFT the fastest possible way to get spectral data? I would be fine with way less bands, too. Priorities are speed and data quality.

Yes, but there's probably little reason to use it. The 1024 point FFT gives you new data 86 times per second. That's a pretty good refresh rate for most LED projects.

You can also use the tone detector or filters and analysis object like RMS. Those involve a whole different set of trade offs, but might be useful for some projects?

D) I´ve no clue yet how FFT works. Is there an answer to the question: How long does a sine wave with 100 Hz need to be present until the FFT detects a change? One wavelength (10 ms)?

256 point FFT doesn't have enough resolution. The lowest bins are DC and than 172 Hz. Together with the smearing from a Hanning window, it's just not useful for 100 Hz.

I recommend looking at the audio library tutorial. Part 3-02 near the end covers FFT. Details like the analysis time are explained.

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

The printed manual and the video are the exact same info, but if you don't have the hardware handy to run the tutorial yourself, seeing me & Alysia do it on the video is the next best thing. The FFT section has a lot of tough concepts that really only make sense when you see and hear what happens.
 
If you need accurate resolution of low frequency signals, it's best to aggressively LPF the data, and downsample, then run the FFT ( at the expense of greater latency).

How many bins you need to accurately detect something like the presence of a particular wavelength depends on the number of bins of course, but far more important is the the minimum separation between the frequency of interest and the next nearest frequency.

The number of FFT bins will determine how much spectral leakage you get into adjacent bins. But as long as the the leakage doesn't overlap with the leakage of another peak, then you can use peak interpolation techniques to get the actual frequency of the peak using fewer bins.

E.g. If you have downsampled to a few Khz sampling rate, and want to detect 100 Hz, and you know there will be no other tones within 50 Hz, you don't need a lot of bins, and you can use peak interpolation to improve accuracy of the detected frequency.

However, if you've want to accurately detect the amplitude of a 100 Hz signal that is next to a 95 Hz signal, well their responses will overlap too much and you will need a lot of bins in order to keep the peaks separate enough that their frequency and amplitude can be accurately measured.
 
Thank you guys a lot for the detailed summary. That gets me started. I have the hardware on my table now and I´m excited to learn about the new possibilities.
Looking forward to creating soundreactive led effects without the tradeoffs the MSGEQ7 enforces.
 
Status
Not open for further replies.
Back
Top