Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Beat-Counting

Posted on 1998-06-30
7
Medium Priority
?
241 Views
Last Modified: 2010-04-10
Does anyone how I can implement Beat-Counting (let my program 'know' wether or not there is a beat at a certain moment and determin the amount of this per minute) if I have acces to fft and pcm data (real-time).
0
Comment
Question by:Odie
7 Comments
 
LVL 32

Accepted Solution

by:
jhance earned 200 total points
ID: 1166973
I've not done this in software but have done it in hardware.  I once built a light system for a dance floor and the requirement was to index a series of lights once for every beat of the music.  I built a low pass filter that rolled off sharply above 100Hz.  This then went to an integrator that needed a signal for about 0.125 seconds before triggering it's output.  This output went to a flip-flop circuit that performed a divide-by-2 function (it looked better to do every other beat that every one).  

Since you are doing this in software and you have the fft, it should be a easy task to run this filter and make it work.  You can even add adaptive features so that as the music changes it can "search" different frequencies and windows for a beat if the default one is lost.
0
 

Expert Comment

by:overworked
ID: 1166974
I'm very interested in doing the same thing in my app SuperSonic. If you come up with a successful beat counting routine, would you be willing to put it in a dll and license it to me?

-Rob
rob@gosupersonic.com
http://www.gosupersonic.com

0
 
LVL 1

Author Comment

by:Odie
ID: 1166975
Overworked,

No problem
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 1

Author Comment

by:Odie
ID: 1166976
JHance,

Could you explain that a little more detailed?

I know I have to search for "pulses" in the lower fft-values, but could you be a little more specific in your explanation?  How do I do this?
0
 
LVL 32

Expert Comment

by:jhance
ID: 1166977
You pick you range of frequencies and then watch for the presence of a signal for a given time period.  For example, let's say you have broken down your input signal using a FFT into 3 bands, 20-200Hz, 200-2000Hz, and 2000-20000Hz and the values are normalized to 8-bits.  Now your software can "watch" the 20-200Hz band for a signal above a threshold that is present for "X" mS.  After that time, you assume that there is a beat.  Then you wait for it to go away for "X" mS.  Now you assume that the beat is over.
0
 
LVL 85

Expert Comment

by:ozo
ID: 1166978
I might have been inclined to look for peaks in the residuals from the Linear Prediction Coefficients
But windowed pulses in low FFT bands sounds lika promising idea too.
0
 
LVL 1

Author Comment

by:Odie
ID: 1166979
JHance,

I'm nearly ready with implementing your method.


Ozo,

Could you explain that Linear Prediction Coefficient stuff a little more.  I might want to implement different methods to make sure I'm counting beats (and not noise or something).

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
Suggested Courses

782 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question