Go Down

Topic: The "Beat/Music Detection" code you have always wanted (Read 46474 times) previous topic - next topic

Arduinoid

Jan 27, 2011, 12:12 am Last Edit: Aug 17, 2013, 05:09 am by Arduinoid Reason: 1
I plan to make a product using this code soon and decided to take it down, sorry.  I hope everyone who got a chance to try out the code enjoyed it.

dlminton

Nice work. :)
A ruff schematic of the input side would be nice. I guess my electronic skills need work :~ I have been trying to get audio from LM386's into my nano and have had some trouble.
Thanks,
BEAN

Diebor

Hi, we are new in the forum, so hi everybody!
We are doing a project with an arduino and sound detection. So we would like to know which is the maximum frequency of data adquisition by the analogic input.
After doing some experiments we have scored 8333 Hz. Is that correct?
Thank you!

dlminton

Thanks for taking the time to post the schematic. It addressed the problem I was having. Just means I have to keep working at it
Thanks again,
BEAN

hapoo

Hi,
do you know if i could do the same thing --> control led lights using a playlist of say 3 songs in max/msp and then sending it to arduino to change the led colors?

mowcius

Unfortunately not actually beat detection, I was kinda hoping for some true 'beat detection' code which is extremely difficult.

Nice work none the less :)

Mowcius

Arduinoid


Hi,
do you know if i could do the same thing --> control led lights using a playlist of say 3 songs in max/msp and then sending it to arduino to change the led colors?

I'm not familiar with max/msp, I just got Arduino 2 weeks ago.  Any analog signal will work with this program regardless of the source.  To get bass isolated you would still need to create a filter before the signal is put into the Arduino since the code only performs actions based on amplitude and doesn't do any filtering.  I looked up max/msp and plan to mess with it in the near future so if you still have trouble I may be of more assistance later.


Unfortunately not actually beat detection, I was kinda hoping for some true 'beat detection' code which is extremely difficult.

Yes, but I couldn't think of any good reason to actually detect the beat pattern of music, if you want to play different songs or very dynamic music a program that detected beats would not be very useful.  This program allows for rapid change in music intensity and rhythm and will still perform actions based on the bass hits as long as you have a halfway decent filter. 

I can add a few lines of code to estimate BPM if you were looking for something like that.  If you have an awesome project idea that requires being able to estimate the upcoming beats in music before they are played then you can let me know and maybe it will inspire me to take up the coding challenge, for the projects I have in mind though this is all I need.

mowcius

Quote
I can add a few lines of code to estimate BPM if you were looking for something like that.

The main issue is that the estimated BMP changes during the song. Hmm - Perhaps the whole song can be analysed and then the bpm worked out after it has finished. That sounds like an interesting project to me :)

I'm using an rMP3 board for my audio stuff (which will analyse the frequencies of the audio you are playing - so you can do visualisers) so I can also easily tell when the song has finished. Unfortunately my projects meter is already full so I don't think I want to try this right at the mo  :P

Btw, Rogue Robotics are currently doing a compo where you can win an rMP3 - see http://arduino.cc/forum/index.php/topic,50016.0.html

Mowcius

mowcius


I did a little research into measuring tempo, aka BPM, and found it to be a very non exact science.

Indeed - that's the issue :D

majordecibel

#9
Feb 07, 2011, 01:44 am Last Edit: Feb 10, 2011, 07:11 pm by majordecibel Reason: 1
Hey very cool! And nice video :)

I'm new to the Arduino world - and have been working on the exact same type of project (the implementation is a bit different, however). Here's my video:

http://www.youtube.com/watch?v=OgiEAk2C66Q

You can see some pictures of the shield I built (and more instructions to follow) here:
http://majordecibel.blogspot.com/

D2kagw

Hey Arduinoid, did you ever get around to scribbling down the schematic for this circuit?
Would love to include it in my current project.

Thanks

mikewalter

Hi,
Is it possible that you can post schematics?
I like your project to do some christmas lights-
Thanks
Bye
Michael
Venezuela


sbright33

@Diebor - You can sample faster than you can process or send the data.  It sounds good at 40K samples / sec.
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1208715493/11

The only use I can see for this is to oversample and average ever pair of samples.
This way you can avoid using a hardware Nyquist filter at lower sample rates.

sbright33

I made a cool light show with the MSGEQ7 chip and 4 LED's.
Also works with El wire.

See this post for pseudocode:
http://arduino.cc/forum/index.php/topic,77572.0.html

Go Up