Pages: [1] 2   Go Down
Author Topic: The "Beat/Music Detection" code you have always wanted  (Read 31468 times)
0 Members and 1 Guest are viewing this topic.
Norfolk, VA
Offline Offline
Newbie
*
Karma: 2
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: August 16, 2013, 10:09:02 pm by Arduinoid » Logged

All that is necessary for the triumph of evil is that good men do not debug.

Ky.
Offline Offline
Newbie
*
Karma: 0
Posts: 5
The answer is 42
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

No one knows what the question really is

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Ky.
Offline Offline
Newbie
*
Karma: 0
Posts: 5
The answer is 42
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

No one knows what the question really is

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

North Yorkshire, UK
Offline Offline
Faraday Member
**
Karma: 104
Posts: 5531
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Nice work none the less smiley

Mowcius
Logged

Norfolk, VA
Offline Offline
Newbie
*
Karma: 2
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

All that is necessary for the triumph of evil is that good men do not debug.

North Yorkshire, UK
Offline Offline
Faraday Member
**
Karma: 104
Posts: 5531
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley

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  smiley-razz

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
Logged

North Yorkshire, UK
Offline Offline
Faraday Member
**
Karma: 104
Posts: 5531
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley-grin
Logged

Offline Offline
Newbie
*
Karma: 2
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey very cool! And nice video smiley

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:



You can see some pictures of the shield I built (and more instructions to follow) here:
http://majordecibel.blogspot.com/
« Last Edit: February 10, 2011, 01:11:16 pm by majordecibel » Logged

+++ Check out The MajorDecibel Project Review, a third party project review site spotlighting electr

0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Brazil
Offline Offline
God Member
*****
Karma: 3
Posts: 626
Beat707.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Great project! (oh, over 1000 views?!)  smiley-eek

Wk
Logged


Offline Offline
Edison Member
*
Karma: 8
Posts: 1341
If you're not living on the Edge, you're taking up too much space!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@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.
Logged

If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Offline Offline
Edison Member
*
Karma: 8
Posts: 1341
If you're not living on the Edge, you're taking up too much space!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Pages: [1] 2   Go Up
Jump to: