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
Solved

Beat-Counting

Posted on 1998-06-30
7
232 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 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
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
convert char array to number in c 5 86
How to convert MFC::CString to UTF8 wchar_t* 10 282
Outlook 13 41
Finding Divisors 5 19
Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

828 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