Bypass On Silence

For general discussion related FlowStone
Father
Posts: 177
Joined: Thu Jan 09, 2014 5:48 pm

Bypass On Silence

Post by Father »

Its nice to bypass the effects when there is no sound. So I've created something like this:
Bypass on Silence.fsm
(56.2 KiB) Downloaded 1071 times

This nicely works when going to bypass but when the sound comes in again, there is a tiny click at the beginning.
How to get rid of that?
Do we need to delay the whole signal to kinda look ahead?
RJHollins
Posts: 1573
Joined: Thu Mar 08, 2012 7:58 pm

Re: Bypass On Silence

Post by RJHollins »

Hi Father,

Just a guess on my part, but you may need to add a 'De-Zipper' module to deal with the on/off click.
Father
Posts: 177
Joined: Thu Jan 09, 2014 5:48 pm

Re: Bypass On Silence

Post by Father »

RJHollins wrote:Just a guess on my part, but you may need to add a 'De-Zipper' module to deal with the on/off click.

Hi. I don't think Its that kind of problem.
I used delay here:
Bypass on Silence_with delay.fsm
(58.05 KiB) Downloaded 1036 times

But i don't like the delay on my plugin.
KG_is_back
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Bypass On Silence

Post by KG_is_back »

This has been discussed several times before. The selector works in green, while the streams are in blue.

Blue code gets executed when your daw is processing the audio buffer.
Green code gets executed when your daw has completed the buffer calculation and is waiting for the next buffer to fill.

Result is, that when your audio gets nonzero, the selector gets updated in next buffer and you loose some samples that were in the previous one.
Also the tick100 to check for nonzero samples is not very smart - if your daw has high cpu load it simply omits the green code (because it is set to lower priority than blue).
There is not really a way around unfortunately other than lookahead delay you used.

However There are relatively easy ways to smart-bypass individual code components. I've posted examples on forum somewhere, I cam post them again if you're interrested
KimSteff
Posts: 31
Joined: Tue Dec 20, 2011 9:50 pm

Re: Bypass On Silence

Post by KimSteff »

The problem are that you only are testing on the signal every 10 mili secound and not for every sample.
When the sound are comming back the switch are happening at number of sampels into the sound.
This will always generate a klick.
My version will fade the sound ind and out.
Attachments
Bypass on Silence ks.fsm
(56.39 KiB) Downloaded 1049 times
KG_is_back
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Bypass On Silence

Post by KG_is_back »

Kim, your example doesn't actually bypass anything - even if the input is silence the code is still running, even though the input and output are both zero. I believe the point of this all is to save CPU when input is silence...
Father
Posts: 177
Joined: Thu Jan 09, 2014 5:48 pm

Re: Bypass On Silence

Post by Father »

KimSteff wrote:My version will fade the sound in and out.

Although you didn't do it right here, but fading in, like using delay, could be another desperate solution.
KG_is_back wrote:However There are relatively easy ways to smart-bypass individual code components. I've posted examples on forum somewhere, I cam post them again if you're interested

Tanks for the reply KG. Yes that would be great, if its related.
KG_is_back wrote:I believe the point of this all is to save CPU when input is silence...

Exactly. Saves a lot of CPU.
If we could just see a bit of future and pull it off from the host! :D
What does delay compensation do?
KG_is_back
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Bypass On Silence

Post by KG_is_back »

Father wrote:
KimSteff wrote:My version will fade the sound in and out.

Although you didn't do it right here, but fading in, like using delay, could be another desperate solution.
KG_is_back wrote:However There are relatively easy ways to smart-bypass individual code components. I've posted examples on forum somewhere, I cam post them again if you're interested

Tanks for the reply KG. Yes that would be great, if its related.
KG_is_back wrote:I believe the point of this all is to save CPU when input is silence...

Exactly. Saves a lot of CPU.
If we could just see a bit of future and pull it off from the host! :D
What does delay compensation do?


Delay compensation gives the DAW a number of samples the plugin is delaying the signal. Daw then simply delays all other tracks to keep things in sync. The plugin will work as if no delay was there in rendering mode, but in realtime mode it will simply delay everything.

Here I created a tutorial on how to smart-bypass code component on sample-precise basis. I hope is clear enough
Attachments
smart disable tutorial.fsm
(1.82 KiB) Downloaded 1045 times
Father
Posts: 177
Joined: Thu Jan 09, 2014 5:48 pm

Re: Bypass On Silence

Post by Father »

Took me a few minutes to figure it out, but i get it. Its useful to skip codes in defined conditions.
It checks nonzero for every sample, right?
I'm not sure how this could help in this case...
Loosing few samples is not important but not this much I'm loosing using tick100. Need to check more samples somehow...or do it another way or don't do it at all!
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: Bypass On Silence

Post by Nubeat7 »

Father wrote:It checks nonzero for every sample, right?
I'm not sure how this could help in this case...


yes, isn`t it what you wanted? and it checks the bypass signal for zero not the stream so it depends what you do to generate the bypass signal - normally a noisegate like you use it in your own example (or you integrate some condition directly in the code like in example 3) - if you switch imediately in asm code you also need no vol slide because the crackles are coming from recompiling when using the selector so this is the perfect solution - like this you also can get rid of delaying the signal..
Post Reply