Solved

Beat-Counting

Posted on 1998-06-30
7
235 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 32

Accepted Solution

by:
jhance earned 100 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
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!

 
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 84

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

Industry Leaders: 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

Suggested Solutions

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
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 clear a vector as well as how to detect empty vectors in C++.

710 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