[music-dsp] Drum beats again

Ted David ted.david at verizon.net
Thu Aug 1 20:16:56 EDT 2002


If you want to do more, like try to detect the tempo as well (or some
subdivision of a bar, depending on the drum kick pattern) try doing this.  When
you've detected what you hypothesize is a drum beat by Jon's method, start a
clock count (a few ms ought to be OK).
Keep the time deltas, say 4 such events out.  That is for each new beat, start
at zero and keep track of the next 4 events' counts relative to that event.
You'll need 4 simultaneous trackers, each counting its own deltas.  On the 5th
beat, zero the earliest tracker and start it over.  Set up a range of memory to
encounter say 5 times the longest count (so you don't miss a late 4th delta).
You'll need one memory location representing 1 clock delta, 2 clocks, ... out
to 1.25 times the 4th event delta.  Increment each memory value by one if its
address is that delta.  (You're integrating deltas.)  8 bits of depth should be
plenty, that's 127 beats  When you reach 128 in any cell, divide all cells by 2
to allow another 64 beats till you have to normalize (divide by 2) again.  You
should see a histogram emerge that indicates the fundamental pulse of the
beat.  Maybe the best way is to spawn 4 identical processing threads, and reset
one, starting it anew, after processing the 4th event.

I'd love to know how this works, as I'm expounding an idea on the fly that I
have no time to try it out.

Ted David (ted.david at verizon.net)

Jon Watte wrote:

> Emulating how typical dance-hall blinking-lights do this is easy
> as 1-2-3:
>
> 1) run a narrow peak bandpass filter around 120 Hz on the signal
> 2) run an envelope detector on output of filter
> 3) there is no stage 3
>
> Cheers,
>
>                         / h+
>
> > -----Original Message-----
> > From: owner-music-dsp at shoko.calarts.edu
> > [mailto:owner-music-dsp at shoko.calarts.edu]On Behalf Of Pavel Savygin
> > Sent: Thursday, August 01, 2002 6:28 AM
> > To: music-dsp at shoko.calarts.edu
> > Subject: [music-dsp] Drum beats again
> >
> >
> > Hello All,
> >
> > I want to re-ask again.
> > May be somebody know any algorithm of detecting drum beats.
> >
> > I mean bass drums.
> >
> > --
> > Best regards,
> >  Pavel                            mailto:savyhpav at vpi-minsk.com
> >
> >
> > dupswapdrop -- the music-dsp mailing list and website: subscription info,
> > FAQ, source code archive, list archive, book reviews, dsp links
> > http://shoko.calarts.edu/musicdsp/
> >
>
> dupswapdrop -- the music-dsp mailing list and website: subscription info,
> FAQ, source code archive, list archive, book reviews, dsp links
> http://shoko.calarts.edu/musicdsp/


dupswapdrop -- the music-dsp mailing list and website: subscription info,
FAQ, source code archive, list archive, book reviews, dsp links
http://shoko.calarts.edu/musicdsp/




More information about the music-dsp mailing list