Hi all, I know I've been spamming this news group alot lately but I finally seem to have found a place where I can expect no-nonsense answers to my unlimited amount of questions. So here's another one for you :-) I am developing a laser control application for use in discotheques and other live events. So far I am very succesful when it comes to graphical performance (nice-looking laser motions, 3d rendering, marching cubes algoritm for blobbing circles etc.). One part of my application has the task of generating events to which the other parts respond. One of the events I would like to add is the 'OnBass' event. I would like to use a software based bassdrum detection. Does any of you DSP guru's have a suggestion on how to implement such a thing? I tried to measure the difference between the current sound energy level and the average level but that method does not work on all kinds of music. The same for an FFT based detection. There's just no solid definition for a 'bass drum'. I'd appreciate any respond on this question. Best regards, Rob Vermeulen.
bassdrum detection
Started by ●June 4, 2004
Reply by ●June 4, 20042004-06-04
Rob Vermeulen wrote:> Hi all, > > I know I've been spamming this news group alot lately but I finally seem to > have found a place where I can expect no-nonsense answers to my unlimited > amount of questions. > So here's another one for you :-) > > I am developing a laser control application for use in discotheques and > other live events. > So far I am very succesful when it comes to graphical performance > (nice-looking laser motions, 3d rendering, marching cubes algoritm for > blobbing circles etc.). > One part of my application has the task of generating events to which the > other parts respond. One of the events I would like to add is the 'OnBass' > event. > I would like to use a software based bassdrum detection. > Does any of you DSP guru's have a suggestion on how to implement such a > thing? > > I tried to measure the difference between the current sound energy level and > the average level but that method does not work on all kinds of music. The > same for an FFT based detection. There's just no solid definition for a > 'bass drum'. > > I'd appreciate any respond on this question. > > Best regards, > Rob Vermeulen. > > >Are you low-pass filtering the sound first? That'll at least get you all the bass (tuba as well as drum). You can probably go better than that by low-pass filtering and looking for a fast attack (that sounds mutually exclusive, yet it describes the "bass drum chest thump" pretty well). Come to think of it, having a matched filter (or a bank of them) to detect that thump might be the way to go. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Reply by ●June 4, 20042004-06-04
Hello Tim, Thanks for the response! Can you give me some more information in that approach? It looks kinda logical the way you explain it but I still have some questions. For instance, how do I detect a fast attack? And what do you mean by 'having a matched filter' ? The idea I have about a fast attack is a big increase in sound level within a short period of time, is this correct? But wouldn't I erase this attack with a low-pass filter? (as you probably mentioned by the words 'mutually exclusive') Looking forward to your answer. Best regards, Rob. "Tim Wescott" <tim@wescottnospamdesign.com> schreef in bericht news:10c170fiehn0836@corp.supernews.com...> > Are you low-pass filtering the sound first? That'll at least get you > all the bass (tuba as well as drum). You can probably go better than > that by low-pass filtering and looking for a fast attack (that sounds > mutually exclusive, yet it describes the "bass drum chest thump" pretty > well). > > Come to think of it, having a matched filter (or a bank of them) to > detect that thump might be the way to go. > > -- > > Tim Wescott > Wescott Design Services > http://www.wescottdesign.com
Reply by ●June 4, 20042004-06-04
Maybe you already tried this, as you mention FFT-based detection, but how about comparing the energy in the low frequencies to the total energy and watching for it to exceed a threshold? Perhaps the threshold could be dynamic/learning to accommodate different types of music? Another idea might be comparing a "slow" average with a "fast" average. This might be along the lines of what Tim Wescott was describing. Basically, first LP filter the waveform to isolate the bass range. Then run an averaging/RMS filter with a slow response on the signal to find the average LF energy. In parallel, run an averaging/RMS filter with a fast response on the same LP signal to find the "instantaneous" LF energy. When the second exceeds the first by a threshold, you've got your bass event. I'm guessing some combination of these two ideas, combined with sufficient tweaking will get you a reasonable solution. Keep in mind with DSP it is also simple to use asymmetrical filters (faster attack than release for example), if that is at all useful. Best wishes! -Jon "Rob Vermeulen" <rvermeulen@arbor-audio-antispam-.com> wrote in message news:10c13qcre0s5kaf@corp.supernews.com...> > One part of my application has the task of generating events to which the > other parts respond. One of the events I would like to add is the 'OnBass' > event. > I would like to use a software based bassdrum detection. > Does any of you DSP guru's have a suggestion on how to implement such a > thing? > > I tried to measure the difference between the current sound energy level and > the average level but that method does not work on all kinds of music. The > same for an FFT based detection. There's just no solid definition for a > 'bass drum'.
Reply by ●June 4, 20042004-06-04
A matched filter is a filter with an impulse response that equals the expected signal. In the case of a drum that would be a _big_ signal followed by a rapidly decaying sinusoidish "thing". Yes, you would tend to erase a fast attack with a low-pass -- but I suspect that a bass drum probably has a fairly rounded "fast" attack, probably with fairly high low-frequency content. Looking at some signals on an O-scope would probably be very educational. Jon Harris's suggestion of comparing "fast attack" in the low frequencies vs. high would be good; it would be a good way of distinguishing your bass drum from snare, for instance. Keep in mind that I haven't done any of this, so all I can offer are suggestions. The general approach that you want to take is to find characteristics of the desired signal that will let you tell the difference between it and the undesired signal, and that you can find with the hardware at hand. Rob Vermeulen wrote:> Hello Tim, > > Thanks for the response! > Can you give me some more information in that approach? It looks kinda > logical the way you explain it but I still have some questions. > For instance, how do I detect a fast attack? And what do you mean by 'having > a matched filter' ? > > The idea I have about a fast attack is a big increase in sound level within > a short period of time, is this correct? But wouldn't I erase this attack > with a low-pass filter? (as you probably mentioned by the words 'mutually > exclusive') > > Looking forward to your answer. > > Best regards, > > Rob. > > "Tim Wescott" <tim@wescottnospamdesign.com> schreef in bericht > news:10c170fiehn0836@corp.supernews.com... > >>Are you low-pass filtering the sound first? That'll at least get you >>all the bass (tuba as well as drum). You can probably go better than >>that by low-pass filtering and looking for a fast attack (that sounds >>mutually exclusive, yet it describes the "bass drum chest thump" pretty >>well). >> >>Come to think of it, having a matched filter (or a bank of them) to >>detect that thump might be the way to go. >> >>-- >> >>Tim Wescott >>Wescott Design Services >>http://www.wescottdesign.com > > >-- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Reply by ●June 4, 20042004-06-04
On Fri, 4 Jun 2004 17:03:39 +0200, "Rob Vermeulen" <rvermeulen@arbor-audio-antispam-.com> wrote:>Hi all, > >I know I've been spamming this news group alot lately but I finally seem to >have found a place where I can expect no-nonsense answers to my unlimited >amount of questions. >So here's another one for you :-) > >I am developing a laser control application for use in discotheques and >other live events.Dare I mention all the safety and legal ramifications of this...I don't know what country you're in, but I recall hearing that the USA has some strict (and justifiably needed) laws concerning safe use of lasers for entertainment purposes. But I presume you've got all that covered. :)>So far I am very succesful when it comes to graphical performance >(nice-looking laser motions, 3d rendering, marching cubes algoritm for >blobbing circles etc.). >One part of my application has the task of generating events to which the >other parts respond. One of the events I would like to add is the 'OnBass' >event. >I would like to use a software based bassdrum detection. >Does any of you DSP guru's have a suggestion on how to implement such a >thing? > >I tried to measure the difference between the current sound energy level and >the average level but that method does not work on all kinds of music. The >same for an FFT based detection. There's just no solid definition for a >'bass drum'.I mostly agree with the low-pass filtering technique (you can look for a short pulse in the envelope of the LPF output), but there's also the idea of doing an FFT and looking for a bass drum 'signature.' This is more complicated, but may more reliably detect a wider range of bass drum sounds. A bass drum is not usually just a big spike that quickly comes and goes in the low-frequency section, it often extends over most of the audio band. A kick-drum beater essentially gives an impulse to the head, causing a near-instant displacement of the head under and near the beater, resulting in the 'click' part of many bass drum sounds. I've even read about taping a quarter (coin) onto the beater or the head where the beater strikes it to give a brighter 'click.' The high frequencies decay much more quickly than the lower ones, especially the pitch the drum is tuned to. But there can be substantial EQ on a bass drum that alters its balance, to make it "sit in the mix" of a recording. There's the characteristic that a bass drum most often (almost always) occurs on the quarter note beat (and scarcely at any other time). Music tempo might vary from (taking a SWAG at these numbers, though I'm an amateur musician and like to think I know SOMETHING about all this), 60 BPM (Beats Per Minute) to 200 BPM (though ISTR metronomes having dials from 40 to 240 BPM). Most "dance music" deriving from the late-70's Disco era centers around 120BPM and might vary at most +/-30 from that. I'd take the 'beat' output of whatever detector and run it through something like a phase-locked loop. This would allow the timing to stay on beat if the music has several beats of rest, or off-beat bass drum strikes. You can then choose whether to run the lighting on the bass drum output (which would always follow the music) or the PLL beat-detection output (which would follow the timing of the music even during silent parts).>I'd appreciate any respond on this question.Also ask this on rec.audio.pro - I know there have been products that detect drum beats in music, and someone over there might know a lot about it.>Best regards, >Rob Vermeulen. > >----- http://mindspring.com/~benbradley
Reply by ●June 5, 20042004-06-05
"Ben Bradley" <ben_nospam_bradley@mindspring.com> wrote in message news:je02c0drkcdvpg766je9pq7dsmpk9brqel@4ax.com...> On Fri, 4 Jun 2004 17:03:39 +0200, "Rob Vermeulen" > <rvermeulen@arbor-audio-antispam-.com> wrote: > > >Hi all, > > > > > >I am developing a laser control application for use in discotheques and > >other live events. > > Dare I mention all the safety and legal ramifications of this...I > don't know what country you're in, but I recall hearing that the USA > has some strict (and justifiably needed) laws concerning safe use of > lasers for entertainment purposes. But I presume you've got all that > covered. :) >A good reference for the AEL (Accessible Exposure Limits) is Waynant and Ediger's "Electro-Optics Handbook." All of Chapter 23 is devoted to laser safety and a complete breakdown of the exposure limits based on wavelength and time duration is presented. Also it mentions the laser safety specs by number that are used almost universally around the world. Pretty much laser shows where the viewer is able to get within the beam, the lasers are limited to be class 1 devices, which in the visible are less than 0.4 mW of output optical power. -- Clay S. Turner, V.P. Wireless Systems Engineering, Inc. Satellite Beach, Florida 32937 (321) 777-7889 www.wse.biz csturner@wse.biz
Reply by ●June 5, 20042004-06-05
"Rob Vermeulen" <rvermeulen@arbor-audio-antispam-.com> wrote in message> I would like to use a software based bassdrum detection. > Does any of you DSP guru's have a suggestion on how to implement such a > thing? > > I tried to measure the difference between the current sound energy level and > the average level but that method does not work on all kinds of music. The > same for an FFT based detection. There's just no solid definition for a > 'bass drum'. >OK, so here is a simple suggestion: Put a microphone directly in front of the drum. Granted, this will only work with a live band and it doesn't involve any cool DSP work - but as Ol' Albert Einstein is alledged to have said: 'A thing should be as simple as possible, but no simpler'... Cheers, Herman http://www.AerospaceSoftware.com
Reply by ●June 7, 20042004-06-07
Herman Oosthuysen <HermanZA8@netscape.net> wrote in message news:25c456ac.0406051249.3aa5c211@posting.google.com...> "Rob Vermeulen" <rvermeulen@arbor-audio-antispam-.com> wrote in message > > I would like to use a software based bassdrum detection. > > Does any of you DSP guru's have a suggestion on how to implement such a > > thing? > > > > I tried to measure the difference between the current sound energy level and > > the average level but that method does not work on all kinds of music. The > > same for an FFT based detection. There's just no solid definition for a > > 'bass drum'. > > > OK, so here is a simple suggestion: > Put a microphone directly in front of the drum. Granted, this will > only work with a live band and it doesn't involve any cool DSP work - > but as Ol' Albert Einstein is alledged to have said: 'A thing should > be as simple as possible, but no simpler'...I think the problem is that, especially with dance music, the "bass drum" sound is often not really produced by a bass drum. It may be synthetically generated and have no real connection to an actual physical bass drum.
Reply by ●June 8, 20042004-06-08
"Jon Harris" <goldentully@hotmail.com> wrote:> I think the problem is that, especially with dance music, the "bass drum" sound > is often not really produced by a bass drum. It may be synthetically generated > and have no real connection to an actual physical bass drum.Yes indeed. In dance music it's usually an exponentially decaying sinusoid with exponentially decreasing frequency, just like this one here: http://www.dspdimension.com/audio/bassdrum.wav --smb






