Hey, so I know James already posted this (and thanks James for writing an

(Daniel Haber) #1

Hey, so I know James already posted this (and thanks James for writing an article on it!) but I’d like to post it here in the “show off your work” section because I had been planning on posting it here haha. If you have any specific questions, I’d be happy to answer them but I’d like to write a little about how I’m detecting the music. (Teensy 3.6, audio shield and library is performing FFT)

I used the Statistics library to do beat analytics, where a running average and standard deviation is taken for 3 different FFT bins (there are 15 total but I’ve found bins 2, 8, and 12 are good for low, medium, and high frequency). If a new value is detected that is > 3.5 x st. dev, it is registered as a beat. When silence is detected, it clears the running stats. I have a counter variable that counts the # of beats in these 3 bins and every 10 seconds, it decides what set of designs to put the mirror in. Examples are designs purely reacting to low frequency beats, or reacting to both high and low, or not silence but no beats being detected.

I described this mostly to say that I want to make it more complex and I’ve looked for libraries that do this but with no success. I want one that will analyze the intricacies of a song and output info on it, like how active each frequency is, which frequency to react to, detecting when the beat drops, the speed of a beat, etc. If anyone knows of something like this or has any advice, I’d love to hear about it. I think I may resort to doing this myself but I’d like to know if the wheel has been invented.

(Daniel Haber) #2

And here’s a pic of what it looks like with the lights on.
missing/deleted image from Google+

(Steve Anken) #3

I’m more interested in LED patterns that illustrate pitch and harmonic structures than beats. Harmony and color are a natural match but I think the most important element is one humans can learn to do, find a melody in the harmony and track a “voice”. Not trivial but it could help create LED displays that are as not “following” the music the same way most people are doing it.

(Marc Miller) #4

Really nice work! Seems like you have some pretty good stuff going on with FFT already. Can’t wait to hear/see more.

And great looking piece when it’s not running and the lights are on too.

(Daniel Haber) #5

Steve, that’s an interesting idea and hopefully I understand it. Hopefully one day I make it there.

and thanks Marc! I like the way it looks too :slight_smile:

(Steve Anken) #6

@Daniel_Haber , I think it will take a lot more work to create displays that do analysis, and justice to the masters of the art like Bach. I assume that FFT is just a starting point and real time would require some pre-processing so the real time reactions would be more like how a jazz musician follows the chords using a lot of pre-processed chunks like ii V7 ! patterns.

(Dougal Campbell) #7

@Steve_Anken @Daniel_Haber Try perusing the software libraries available from Echo Nest. They’ve got tools for all sorts of cool music analysis and manipulation. You’re sure to find some inspiration there:

(Yves BAZIN) #8

Great job. Really cool stuff

(Daniel Haber) #9

@dougal That looks really interesting. Do you have any experience using it? I’m starting to think it could it be time to reprogram this whole thing in python on a raspberry Pi uh oh

(Dougal Campbell) #10

@Daniel_Haber Afraid I don’t. I just remember running across a few of their interesting projects (and hearing them mentioned in a couple of podcasts) over the past few years.

It looks like they haven’t done much in those repos in a while, but one of the remix projects there points to a newer project that was based on it, which seems to be more maintained.

In any case, like I said, I think there’s probably at least something in there that could give you ideas for new features.

(Jay) #11

This is a very cool project and I’m curious what kind of microphone are you using for the sound reactivity? Do you perhaps have a video that is based on using just the microphone for this specific project? And how would you expect the mic to be for audio reactivity for large events? Since I am attempting to do something similar like this but first with an at home project before moving to a more portable one. Nonetheless, an amazing project and deserves a lot of attention!

(Daniel Haber) #12

Thanks! I use the electret mic on pjrc .com and I solder it to the mic’s spot on the audio shield. And I don’t have a video that uses the mic.

In a large, noisy environment, I don’t think a mic would be very good unless the music is much louder than the background noise like at a concert. A mic is pretty good though at detecting the bass of a song so if you at least make LEDs react to that, then it can still look cool.

(Jay) #13

@Daniel_Haber Thanks for the response! And my goal is essentially that! I am planning to make a small totem that will have a board with WS2812B strips around it and on the pole itself to do simplistic animations but have it set max white on bass hits and that’s why I wanted to ask! I’m not too sure how I would go about doing this since I currently have an audio adapter board from PJRC + an OctoWS2811 adapter as well and realized how pins conflict. Do you perhaps have any experience with this type of problem arise in your project(s) and have any suggestions on how to work around this?

(Daniel Haber) #14

@Jay111 haha I spent about a month on that problem. You can’t use both shields at the same time but you can use the OctoWS2811 library without the shield. I have the LED data coming out of pin 2. A totem is actually something I’m thinking about building so if you want to email me at dehaber@gmail.com, we can help each other out with this stuff. :slight_smile:

(Jay) #15

@Daniel_Haber I’m sort of confused haha. So it’s not possible at all to use the OctoWS2811 adapter and audio shield simultaneously? Well I’ll be damned as I need it to be able to drive 8 data outputs (to update the strips) but also would love to add audio reactivity. This is a part that I am struggling on haha. And for sure! I’ll hit you up soon, or if you have discord it would be easier too.

(Daniel Haber) #16

That’s possible without the adapter. Just using the library outputs LED strip data to 8 pins on the teensy. You’ll just have to route them all through a level shifter. My discord is Haybur.

(Jay) #17

@Daniel_Haber Your discord is missing the #** part haha so can’t add you!