05 April 2007

beat detection in pure data

Today I've also been working on a beat detection algorithm for pure data.
The basic idea behind the whole algorithm is outlined in beat this!.
It consists of four steps:
  • filterbank
  • smoothing
  • diff-rect
  • comb filtering
The first three steps (see website for more explanation) are done by the bonk~ block that is included in the standard Pd download. So as an output we get, for eleven parts of the frequency spectrum, the loudness of an attack.
The last step use a bunch of combfilters, each representing a specific tempo. All filters are convoluted with each signal and this should have to give higher energy values for comb filters that are close to the tempo of the signal.
I made a combfilter block that we can use afterwards. It uses three arguments: window, frame or blocksize firstly, then the resonant frequency and then the bandwidth. The bandwidth specifies how wide the teeth of the comb are: when it is close to zero, most of the signal is let through. When it's close to 0.5, the teeth are very wide and there is not much space between them.
I already realize that the convolution is better done in the frequency domain, because it is a multiplication there.
But the rest is for tomorrow or something.
Sleep tight

3 comments:

Unknown said...

This is great news. Can you share your example.

I am trying to mix software beat detection with an in-house developed light show ( on the computer's lpt port)

If you cold point me in the right direction I would appreciate it.

Anonymous said...

Hey Oliver -- I'm working on something very similar (beat detection to support in-house developed light show connected via parallel port). Have you had any luck locating beat detection extensions to pd (or using some other method)? Thanks!

DewBlue said...

Yep, doing the same--led lights connected to serial port, and i would greatly appreciate someone posting a solution for beat detection.