Urgent. "volume filter" how??

    Aug 14 2012 | 7:07 am
    Hi all! I'm in urgent need of some help with the following, and it needs to be up and running by the end of tomorrow, so any tips are appreciated!
    What I need to do in Max: Effectively a volume filter. I have recorded audio fragments with loud sounds (skateboarders grinding, landing, etc.) and background/quiet sound (people talking, skateboards rolling around, etc). De audio output (just the ezdac I suppose) should be on when there is loud sound, and off the rest of the time. It's ok for background sound to be audible during loud sounds, but I just need to have to audio off while there's only background sound and nothing else.. I've been playing around with the thresh~ object but can't quite get it to work and not sure if that's the best way..
    Thanks a lot!

    • Aug 14 2012 | 8:12 am
      What you're looking for is called a gate or expander. I'm sure there'll be something in the /Examples folder, but the process is really quite simple; you need to avg~ the incoming signal then use that to open a gate~. You set a threshold at which you want the gate~ to open so that the signal is let through only when the average signal level is above the threshold, i.e. during the loud bits. Look at >=~ for setting the threshold and opening/closing your gate~ and maybe trapezoid~ or line~ to prevent clicks when your gate is opened/closed. I could post an example, but it will be much more instructive/fun for you to build it yourself ;-) Cheers Roger
    • Aug 14 2012 | 8:47 am
      I started making a noise gate for you, went something like this:
      that's just one way of doin it. And I too encourage you to try making one yrself first, it's a fun exercise :) I think you might also be able to do noise gating with omx.comp~ but I can't figure out how. And surely there are other examples of gating on the forums. Definitely don't "turn audio on and off". When it's off, none of the MSP objects (anything with a ~ at the end) will function :P