HISE Logo Forum
    • Categories
    • Register
    • Login
    1. HISE
    2. Shinami-Sound
    3. Best
    S
    • Profile
    • Following 0
    • Followers 0
    • Topics 6
    • Posts 13
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: ERROR C1083 when Building HISE

      @MikeB Thanks! It worked now! Apparently, I had to make sure all steps for enabling IPP are done right.

      posted in General Questions
      S
      Shinami-Sound
    • Function onNote range [Level:Beginner]

      [Level:Beginner]
      Hello!
      I'm trying figure out how to make a non-repetitive round robin for each drum. So, I decided just to split drums into separate Sampler modules.

      Then I made a script in each:
      "on init"

      const var SamplerOpen = Synth.getSampler("SamplerOpen");
      
      SamplerOpen.enableRoundRobin(false);
      
      reg counter = 0;
      reg lastCount = 0; 
      

      Next, to separate the round-robin counter for both each drums I though of cutting the note range for "onNote".
      So, for one of my drums in the "onNote" section I tried:

      function onNoteOn(60, 64)
      {
      	counter = (lastCount - 1 + Math.randInt(2, 5)) % 4;
      	SamplerOpen.setActiveGroup(counter + 1);
      	lastCount = counter;
      }
      

      and it gave me this error:
      "Line 1, column 19: Found Literal when expecting ')'.

      Does anyone know what's wrong here and what would be a better approach?

      posted in Scripting
      S
      Shinami-Sound