bonk~ mask

forge13's icon

Hi all. Been using MaxMSP a little while now but still learning. Currently I am developing a beat detection patch with it. I have used the likes of bonk~ with pleasing results.

However, I need to go further than just using bonk~, i need to effectively make my own bonk~ at a lower level.

Currently I have 6 reson~ objects whose squared outputs are summed and passed to a thresh~ object for detection.

However, in the Puckette paper and the bonk~ documentation it mentions the mask setting, I quoute:

"We defi ne a growth function as follows. For each
channel we maintain a mask m which represents the
current power in the channel. To accomplish this, af-
ter each analysis we look at the current power p. If
p > m we replace m by p; otherwise if m hasn't been
updated for more than masktime analyses (5 by de-
fault), the mask decays by multiplication by maskde-
cay (0.8)."

So my question is; any idea how to implement this in Max?

Any help would be extremely appreciated!

Dan

MIB's icon
Max Patch
Copy patch and select New From Clipboard in Max.

it's untested, but this might get you started... however it's in the max domain not msp. of course there is always a good chance I misunderstood :)

forge13's icon

great thanks I'll let you know how I get on!