HISE Logo Forum
    • Categories
    • Register
    • Login

    Creating 1 second silence when the program first opens

    Scheduled Pinned Locked Moved General Questions
    1 Posts 1 Posters 260 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • orangeO
      orange
      last edited by

      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);
      	}
      }
      
      
      
      

      develop Branch / XCode 13.1
      macOS Monterey / M1 Max

      1 Reply Last reply Reply Quote 0
      • First post
        Last post

      44

      Online

      1.7k

      Users

      11.7k

      Topics

      101.9k

      Posts