Disabling processing when input is silent. Worth it?

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

"it CAN oscillate from no input."

always run the process while the resonance or whatever control is above some threshold. if you want to keep your lfo's and stuff running, you'll have to calculate the res and everything as well. you could run the lfos at say 32x the rate, and then only check every 32 samples if the res is above that threshold. there are plenty of ways to try to do it.

i understand sometimes it isnt practical or even possible, like i said in my posts.

Post

Yeah, why don't I just go do that then? :roll:

Thanks though, I think we're just not agreeing on the threshold of practicality.

Post

aciddose wrote:float threshold = 1E-4; //-80db
Wouldn't -80dB be a bit high? You might be cutting away valuable data. Maybe the sound is attenuated pretty hard by an effect and boosted afterwards. I think it might be better to use something like 1e-10 (-200dB, which is close to the accuracy of a 32 bit integer), or even lower. But I'd be glad to hear other people's views on this.

Post

the reason i commented it is to allow anyone to adjust it. i'd probably use 80db in most places since in a mix you're not going to hear -80db, and using lower threshold will mean the effect stays on more often, making it more useless to have it in the first place. also, the type of envelope follower i'm using will return to 80db at a constant rate, after the input starts to fall toward some value below 80db at a rate higher than the follower rate. say you use a constant rate for the envelope follower of 1/256. the amount of time required will be:

exp(log(log(1E-4)) - log(log(1.0 - 1.0/256.0)))
== 2353.24 samples, assuming the input goes directly from 1.0 to 0.0 in one sample and remains there.

labeling it as -80db most likely made you think it would shut off while the signal was below -80db, but that is not true. it will shut off after the lossy integrator reaches a value of -80db, which means the signal could go below that level for a long time before the process stops.

actually calculating how long it will take to get from point A to point B at rate R with a fixed input (like 1.0 to 0.0) is a bit more complicated, but very possible. it isnt nessicary here though, and that is math i'm not willing to give away.

here is a hint, it moves at a constant rate and curve between any two points. it will take the same 2353 samples to reach from 1.0 to 0.5, 0.0 to 0.75, 0.3 to -50.0, or any range.

so, if the signal starts at 0.8 and drops immediately to -80db, it will take just as long (2353 samples) to turn off. if the signal starts at -79db and drops to -80db, it will still take the same time to turn off.

so, using this follower is like saying "make sure it takes X samples to shut off after the signald is moving downward faster than R(-80db - follower) and remains at that rate and eventually below -80db"

Post

aciddose wrote:labeling it as -80db most likely made you think it would shut off while the signal was below -80db
Yes, I don't use an envelope follower. I don't care what the input signal does, as soon as it's silent for a while (and the output too) I stop processing. When the input exceeds the threshold again it switches back on.

Post

BarendB wrote:
aciddose wrote:labeling it as -80db most likely made you think it would shut off while the signal was below -80db
Yes, I don't use an envelope follower. I don't care what the input signal does, as soon as it's silent for a while (and the output too) I stop processing. When the input exceeds the threshold again it switches back on.
Exactly. How much extra CPU load would this cause?? I'm sure not even 0.5% (of course that depends on the machine, but with any high CPU load plugin, this is worth the effort) - so whats the problem with this?? :roll:

And heres a pictures that shows my it DOES make sense: :hihi:

Image

so if we have two plugs that use e.g. 100% cpu, we could use still both but not at the same time. but if these plugs would process constantly we would have to manually enable/disbale them, which is a waste of time.
Image

Post

find the specific plugins you want this added to and then complain to the authors!

my plugins already have silence detection, i just need to bother to recompile them. nmake and gnu make are fairly different.

Post Reply

Return to “DSP and Plugin Development”