ItsyBitsy M4 Circuit Python - frequencyio

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
msargent
 
Posts: 15
Joined: Thu Aug 21, 2014 3:13 am

ItsyBitsy M4 Circuit Python - frequencyio

Post by msargent »

I am trying to develop a Christmas light show to turn on different digitalIO pins based on the frequency of music fed into the ItsyBitsy from a MP3 player.
I've tried taking attaching the gnd and left connectors from the cable to a digital IO pin on the ItsyBitsy but running the frequencyio sample code returns 0.

Is it possible to feed a signal from an MP3 player and the read the frequency of the music being played?

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: ItsyBitsy M4 Circuit Python - frequencyio

Post by mikeysklar »

I've not seen a guide for how to process audio right off line-level. We do have a ton of guides that use an analog mic and react with lighting changes. These are often based on the MAX4466 and MAX9814.

https://learn.adafruit.com/search?q=max4466
https://learn.adafruit.com/search?q=max9814

User avatar
msargent
 
Posts: 15
Joined: Thu Aug 21, 2014 3:13 am

Re: ItsyBitsy M4 Circuit Python - frequencyio

Post by msargent »

I've seen (and built) a light controller based on an Arduino Micro that works OK.
https://www.instructables.com/Arduino-P ... as-Lights/

But I would like to try to build a controller that works with the ItsyBitsy M4 board for faster and maybe more accurate detection of the frequency coming from my MP3 player.

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: ItsyBitsy M4 Circuit Python - frequencyio

Post by mikeysklar »

Yeah, the 32-bit ARM cores would be ideal for audio collection and processing.

Here is an example of M4 doing input and visualization.

https://learn.adafruit.com/trellis-m4-a ... and-filter
Colored lights bouncing to the music is a must have for any party. Now you can bring the party to your NeoTrellis M4 Express with the Audio Visualizer and Filter! With realtime Fast Fourier Transform (FFT) frequency spectrum analysis, the music coming into your NeoTrellis STEMMA adapter (from a computer, phone, Walkman, turntable pre-amp, etc.) is converted into colors and lights on the buttons to display the magnitude of the sound in different frequency bands.

User avatar
msargent
 
Posts: 15
Joined: Thu Aug 21, 2014 3:13 am

Re: ItsyBitsy M4 Circuit Python - frequencyio

Post by msargent »

The Trellis board looks interesting.

Can you tell me what the different lines are in the audio input circuit are?
Green, black, and white?

Guessing one is ground, one analog input, and maybe power e.g., 3V3?

The Arduino instructable project has a similar audio input circuit and hoping this is something like that.

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: ItsyBitsy M4 Circuit Python - frequencyio

Post by mikeysklar »

The circuit is not specific to the Trellis M4. The audio circuit is made used the STEMMA i2c pins because they are broken out, but you can used any analog capable GPIOs on an ItsyBitsy M4. In the case of this circuit just to answer you question the green is SCL and white is SDA which will be labeled on any M4 controller. The black is GND.
stemma-audio-jack.png
stemma-audio-jack.png (239.94 KiB) Viewed 306 times

Locked
Please be positive and constructive with your questions and comments.

Return to “Itsy Bitsy Boards”