Audio triggered envelope?

Official support for: sonicbirth.sourceforge.net
Post Reply New Topic
RELATED
PRODUCTS

Post

Am i right in thinking that the point envelopes are automatically triggered by incoming midi notes?

And: what would be the best way to se up an envelope that would be triggered when the incoming audio exceeded a certain threshold?

thanks in advance!

Post

yes, the points envelope is triggered by each incoming midi note. Do do what you suggest and have it be triggered by audio exceeding a certain level you basicaly need to build a level detector. You have to remove the negative parts of your waveform and smooth it out. SB already has one sort of. It's the envelope follower. But that's built with a compressor circuit in mind and so has attack and release controls which use more processing power than you need.

I would take the absolute value of the incoming waveform (or square it and then take the square root). Then I would low pass filter it. The cutoff on your LPF will determine just what "gets through" to constitute an "over" for your trigger. Then use an if-then structure built from the comparator modules. For example use Greater and have it output a 1 if your filtered signal is greater than some threshold constant you specify and output a 0 if it's not. Then send that output to the timer module to start a clock running. When the audio exceeds the threshold, the 1 is output, the timer runs and the envelope kicks in. You can build variations with the timer loop module as well. Do you want the envelope to just cut when the audio goes below the threshold or to always play itself out etc. . .

Post

thanks for your reply
When the audio exceeds the threshold, the 1 is output, the timer runs and the envelope kicks in.
I noticed that the point envelope has no input 'socket', which is confusing me a bit. How do you arrange things so that the timer starts the envelope?

Post

Right. The points envelope doesn't have any input. But the points apply does. The points envelope output goes into the special points input on the points apply module. The timer output also goes into the points apply module and I think is serving as the x coordinate (I can't recall if it's that or the width parameter). So it works like this: you are telling the points apply module to take the time as the input and apply the points envelope to it so that the output is envelope.

Check out this thread http://www.kvraudio.com/forum/viewtopic.php?t=198993
anout 5 posts down (posted on Nov 29th) where I gave a link to an working sb file that shows how it's done.

Post Reply

Return to “SonicBirth”