General question here. I have an Adafruit FX Mini Sound Board https://www.adafruit.com/product/2341. I have it connected to a TPA 2016 amp https://www.adafruit.com/product/1712. I use it to put sounds into wearable projects. It works great.
Now I want to connect neo-pixels to a Flora and have them respond to the different frequencies that are output from the sound board. In my mind it seems that I could connect the R & L out of the sound board to the analog pin on the Flora, and convert to digital ( analogRead and digitalWrite statements) from there to control the neo-pixels. Is that possible?
Of course, I would also want to connect R & L of the sound board to the amp and play sound as well. Is it possible to do both from the same R & L pins on the sound board?
Thanks.
Lights and Sound
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_mike
- Posts: 67446
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Lights and Sound
The signal connections should be okay, but I'd suggest putting 10k resistors between the FX Board's L and R outputs and the analog pins to keep the maximum possible current at a safely low level.
I'm not sure how well the Flora will be able to do frequency recognition though. You'll need FFTs for that, and those use a lot of CPU speed and RAM. You'll also run into limits with the ATmega32u4's sampling rate and ADC multiplexing.. I think the highest frequency it can identify with the default settings is about 5kHz.
I'm not sure how well the Flora will be able to do frequency recognition though. You'll need FFTs for that, and those use a lot of CPU speed and RAM. You'll also run into limits with the ATmega32u4's sampling rate and ADC multiplexing.. I think the highest frequency it can identify with the default settings is about 5kHz.
- crusaderabbit
- Posts: 122
- Joined: Wed Apr 13, 2016 1:55 pm
Re: Lights and Sound
Thanks Mike for the quick response and the info. Never heard of FFT, so I looked it up and the next thing I knew I was knee deep in the Nyquist Theroem. I did find an interesting project on Adafruit. I don't have the link but the title is FFT: Fun with Fourier Transform. I think that would be a good place for me to start. Once again, thank you. Would be interested in anything else you would like to add.
- adafruit_support_mike
- Posts: 67446
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Lights and Sound
Yeah, Fourier analysis was one of the Officially Cool Things of the Victorian era, but wasn't practical because it requires bargeloads of math. The FFT is one of the Officially Cool Things of the computer age because it moved Fourier analysis into the realm of practical signal processing. Almost all of today's wireless communication can be summed up as "another neat way to use FFTs".
There's still a heavy processing load, and the Fun With FFTs project used a Teensy for its CPU speed and memory. I'm pretty sure the Flora can't handle the load of real-time FFT processing across the audio band for more than about four frequency bands.
We have volume-based projects that are less processing intensive:
https://learn.adafruit.com/led-ampli-tie/overview
https://learn.adafruit.com/vu-meter-bas ... t/overview
There's still a heavy processing load, and the Fun With FFTs project used a Teensy for its CPU speed and memory. I'm pretty sure the Flora can't handle the load of real-time FFT processing across the audio band for more than about four frequency bands.
We have volume-based projects that are less processing intensive:
https://learn.adafruit.com/led-ampli-tie/overview
https://learn.adafruit.com/vu-meter-bas ... t/overview
- crusaderabbit
- Posts: 122
- Joined: Wed Apr 13, 2016 1:55 pm
Re: Lights and Sound
And your are officially cool for turning me on to this, Mike. Haha
One more question. Is it possible to use the FX Sound Board as input to the Teensy analog pin instead of a microphone? I have the same track on both R&L channels, so I would only need to use one side to connect to the analog pin.
And I would still want to connect an amp (Adafruit TPA 2016) to the the sound board as well.
One more question. Is it possible to use the FX Sound Board as input to the Teensy analog pin instead of a microphone? I have the same track on both R&L channels, so I would only need to use one side to connect to the analog pin.
And I would still want to connect an amp (Adafruit TPA 2016) to the the sound board as well.
- Disciple
- Posts: 852
- Joined: Tue Jan 06, 2015 8:13 pm
Re: Lights and Sound
Hello. I'm a bystander with a question for the expert.
I got a nicely responsive color-frequency display working using an electret mic, 30-pixel strip, and a Pro Trinket. It's not a ATmega32u4, but I thought the processors were mostly similar. Are they?
Hallelujah!
Disciple
I got a nicely responsive color-frequency display working using an electret mic, 30-pixel strip, and a Pro Trinket. It's not a ATmega32u4, but I thought the processors were mostly similar. Are they?
Hallelujah!
Disciple
- adafruit_support_mike
- Posts: 67446
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Lights and Sound
Yes, a Teensy can read an FX Board's output with its ADC pins.
Different versions of the Teensy are based on different microcontrollers. The one used in the FFT project was a Teensy 3.0 based on a 32-bit Freescale M4 microcontroller with a 48MHz clock and DSP extensions (Digital Signal Processing.. a highly efficient math engine for bulk number crunching).
Different versions of the Teensy are based on different microcontrollers. The one used in the FFT project was a Teensy 3.0 based on a 32-bit Freescale M4 microcontroller with a 48MHz clock and DSP extensions (Digital Signal Processing.. a highly efficient math engine for bulk number crunching).
Please be positive and constructive with your questions and comments.