Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

vavdiyaharesh

macrumors newbie
Original poster
May 15, 2008
24
0
Hi,

In my application, i have to detect all the songs and BPM og those songs. Detect the songs are finished now i have to detect BPM of songs.


Does anyone tell me that how can i detect BPM of each song by programming in Cocoa.

Thanks,
Haresh.
 

ChrisA

macrumors G5
Jan 5, 2006
12,581
1,697
Redondo Beach, California
Hi,

In my application, i have to detect all the songs and BPM og those songs. Detect the songs are finished now i have to .


Does anyone tell me that how can i detect BPM of each song by programming in Cocoa.

Thanks,
Haresh.

You have picked a hard problem. One that no one yet has solved completely. If you do this well you will be the first to do so.

OK here is what you have to do. Stop thinking about programming and cocoa. How would YOU figure it out your self without a computer. Let's say you found a person who somehow had never heard music of any kind how would you tell him to find the BPM. Write down those instructions in detail.

Good now you have about 10 or 20 steps all you have to do is write software for each of those steps.

What you have shown by your question is that in order to write a non-trivial program yo need to know a lot about no only programming but the subject area too. For example how would you write an airplane flight simulator. You'd need to understand about the physics of flight and many other subjects. In your case you are going to have to learn about music and signal processing. Programming is the easy part.
 

AUFan

macrumors newbie
Feb 2, 2008
27
0
I will preface this comment by stating I have absolutely no experience with analyzing music via electronic devices or otherwise. ;)

Perhaps you should look into counting drum beats per minute since they usually set the beat/pace for the song--however if the song doesn't use drums it might work so well. Besides counting drum beats, your other best bet might be to see what mathematical analysis has been done and if there are any existing algorithms that perform a similar function.
 

lazydog

macrumors 6502a
Sep 3, 2005
709
6
Cramlington, UK
Hi

I've never done anything like this before but I was wondering if a low pass filter feeding a number of narrow band pass filters covering the range of bpm would do the trick. Pick the bpm of the filter with the highest output.

b e n
 

Consultant

macrumors G5
Jun 27, 2007
13,314
34
A number of DJing software does it, some have component that allows users to tap the beats for BPM calculations.
 

GorillaPaws

macrumors 6502a
Oct 26, 2003
932
8
Richmond, VA
...some have component that allows users to tap the beats for BPM calculations.

I think this kind of thing would be the easiest implementation by far from a programming standpoint. Clearly it's less optimal for the user than having the computer calculate it in the background, but it's going to be more accurate and won't have any of the issues of handling songs without a strong rhythmic bass/drum line (like a cappella singing for example). Of course if your user is anything like Steve Martin's character in "The Jerk" you may have problems :D.
 

AUFan

macrumors newbie
Feb 2, 2008
27
0
A number of DJing software does it, some have component that allows users to tap the beats for BPM calculations.

I think the only problem with this would be that it probably relies on having some sort of strong drum/baseline to set the beat for the song if it's anything like some of the DJ's I've run across recently.

I've never done anything like this before but I was wondering if a low pass filter feeding a number of narrow band pass filters covering the range of bpm would do the trick. Pick the bpm of the filter with the highest output.

Or perhaps in a similar vein, try and seperate the different sources (vocals, instruments etc.) and then have the program look for the graph/audio range with the most consistent and constant beat -- even accapella has one. Might this be possible with something like Core Audio or OpenAL?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.