I figured this example might be of use to someone out there. It detects note attacks on audio. Useful for triggering effects and sequences based on live audio or instruments.
-
Audio note attack detection
-
Hello,
In what is it different from [bonk~] object you can find in pd-vanilla? -
from what i understand by reading the documentation, bonk~ performs spectral analysis on the incoming signal, and outputs a bang when there is a significant change in the spectrum. that's a fair bit more complicated than this patch, and requires significantly more cpu power, i would assume.
also, with bonk~, unless you search for the source code, and open that up and understand how to interpret it, there's very little you can see as to how it works. with this patch, you can see the workings, and thus learn more about pd and audio dsp in general.
an extendion to this patch might be to add a couple of serial lowpass filters before the [env~] so that it would only detect bass attacks. and similarly you could use bandpass or highpass filters to detect other sounds such as hihats.
-
actually, with no discredit to dack, stunningly bonk~ seems to use less CPU here!
Dual 1.8 IBM G5: Mac OSX 10.4.11 -- Asus eeePC 701: Pure:Dyne / eeeXubuntu GNU/Linux -- myspace.com/thearifd
-
Hello,
Thank you. I asked because I can't use Pure Data at the moment, after a linux distro update. Being unable to test the patch, I can't guess what it is capable of.
Hugo
PS : Sorry for my poor english. -
>>actually, with no discredit to dack, stunningly bonk~ seems to use less CPU here!<<
yes, you need to modify dack's patch to reduce the cpu load. remove the number box from after the [env~], and remove the graphical bang and print.
then it uses much less CPU than bonk~.
i just got 27% CPU from 256 instances of dack's patch, and more than 40% cpu with only 128 instances of bonk~
so, anyway, on a desktop computer like this, it hardly matters anyway. but if you are developing for handheld devices or games or something where resources are precious, then it is very important.
-
sorry guys and girls, wrong thread
-
heh...I guess I should read the documentation more. Somehow I overlooked bonk~. In any case, as hardoff said, this approach might be useful if you are using a large number of these and are tight on CPU requirements.
-
Detecting the audio note , I would like to play a Vsti note in real time.
Some ideas ??
-
@mnugenty said:
Detecting the audio note , I would like to play a Vsti note in real time.
Some ideas ??
i'm curious, what do you mean by this?