Creating 1 second silence when the program first opens



  • Hi guys
    I need to create an only 1 second silence when the program first opens.
    I am also using below code for muting the demo version of my plugin (it also makes 1 second silence in 20 seconds)

    But I couldn't figured it out to use both silence methods.

    const var DEMO_MUTIZER = Synth.getEffect("DEMO_MUTIZER");
    
    Synth.startTimer(20);
    
    reg on = true;
    
    
    
    function onTimer()
    {
    	if(on)
    	{
    		on = false;
    		Synth.startTimer(1);
    		DEMO_MUTIZER.setAttribute(DEMO_MUTIZER.Gain, -100);
    	}
    	else
    	{
    		on = true;
    		Synth.startTimer(20);
    		DEMO_MUTIZER.setAttribute(DEMO_MUTIZER.Gain, 0);
    	}
    }
    
    
    
    

Log in to reply
 

11
Online

491
Users

1.7k
Topics

12.9k
Posts