HISE Logo Forum
    • Categories
    • Register
    • Login

    Choke Group script Help

    Scheduled Pinned Locked Moved Newbie League
    choke groupdrums samplerdrumseventid
    10 Posts 2 Posters 111 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.
    • S
      ScreamingWaves
      last edited by ScreamingWaves

      Hello everyone,
      i searched on the forum for ways to have choke groups for the hihat, and i found a snippet that is only partly working for me. The hihat chokes each of its articulations correctly, but ALL the other drums get choked too (actually don't play at all). I have some samplers that are mixed, they contain samples from multiple drum parts, so i need to put the script processor under the master chain (and i need it to stay that way for routing reasons)

      this is the "half-working" script on "oninit" interface

      const var HihatFT = 44;
      const var HihatSO = 45;
      const var HihatO = 46;
      const var HihatSC = 41;
      const var HihatC = 42;
      
      const var HihatProcessor = Synth.getMidiProcessor("Hihat Processor");
      

      oninit (script processor)

      const var HihatFT = 44;
      const var HihatSO = 45;
      const var HihatO = 46;
      const var HihatSC = 41;
      const var HihatC = 42;
      
      const var HihatArt = [HihatFT, HihatC, HihatSC, 
      HihatSO, HihatO];
      
      const var evtList = [];
      
      evtList.reserve(64);
      

      onNoteon (script Processor

      function onNoteOn()
      {
          for (i = 0; i < 5; i++)
              
          if(Message.getNoteNumber() == HihatArt[i])
          {
              // Always use the for ... in loop if you don't need the index
              for(eventId in evtList)
              {
                  // Send the note off command for the given event id            
                  Synth.addVolumeFade(eventId, 30, -100);            
              }
              
              // Clear all notes
              evtList.clear();
              
              // This is necessary because you will kill the note artificially and HISE
              // can only kill artifical notes for stability reasons
              Message.makeArtificial();            
                  
              // Add this ID to the list (it'll add the artificial event ID)
              evtList.push(Message.getEventId());
          }
          
              
          if(Message.getNoteNumber() != HihatFT & Message.getNoteNumber() != HihatC & Message.getNoteNumber() != HihatSC 
          & Message.getNoteNumber() != HihatSO & Message.getNoteNumber() != HihatO)
          {
            Message.ignoreEvent(true);
          }
       
      }
      

      I tried to make an array and name it evtListHH to tell hise to kill only the notes coming from the Hihat note numbers, but that did not work (or maybe the idea was right but i did it wrong).

      how can i make it work?

      Thanx in advance!

      d.healeyD 1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey @ScreamingWaves
        last edited by

        @ScreamingWaves Are you using the built in choke group processor script?

        Free HISE Bootcamp Full Course for beginners.
        YouTube Channel - Public HISE tutorials
        My Patreon - HISE tutorials

        S 1 Reply Last reply Reply Quote 0
        • S
          ScreamingWaves @d.healey
          last edited by

          @d-healey
          no, i tried it but it didn't work. as far as i understood that works within a sampler or container, doesn't it?

          d.healeyD 1 Reply Last reply Reply Quote 0
          • d.healeyD
            d.healey @ScreamingWaves
            last edited by

            @ScreamingWaves I think so. There's probably examples on the forum, I haven't tried it myself. I think you need to put each type of drum into a separate sampler to use it.

            Free HISE Bootcamp Full Course for beginners.
            YouTube Channel - Public HISE tutorials
            My Patreon - HISE tutorials

            S 1 Reply Last reply Reply Quote 0
            • S
              ScreamingWaves @d.healey
              last edited by

              @d-healey but how can i make multiple event lists that contain only certain note numbers, so that "evtList.clear()" does not mute all the notes? at least that's what i think it's happening now

              d.healeyD 1 Reply Last reply Reply Quote 0
              • d.healeyD
                d.healey @ScreamingWaves
                last edited by

                @ScreamingWaves You could use multiple arrays, one for each drum type.

                Free HISE Bootcamp Full Course for beginners.
                YouTube Channel - Public HISE tutorials
                My Patreon - HISE tutorials

                S 1 Reply Last reply Reply Quote 0
                • S
                  ScreamingWaves @d.healey
                  last edited by

                  @d-healey
                  does this make sense? or how would it work?

                  evtList1 = [];
                  {
                  	Message.getEventId(41,42,43,44,45)
                  }
                  
                  d.healeyD 1 Reply Last reply Reply Quote 0
                  • d.healeyD
                    d.healey @ScreamingWaves
                    last edited by

                    @ScreamingWaves said in Choke Group script Help:

                    does this make sense?

                    Nope, that's not going to work.

                    I think you might benefit from going through this doc

                    Free HISE Bootcamp Full Course for beginners.
                    YouTube Channel - Public HISE tutorials
                    My Patreon - HISE tutorials

                    S 1 Reply Last reply Reply Quote 0
                    • S
                      ScreamingWaves @d.healey
                      last edited by

                      @d-healey
                      I figured it out and now it works! the only issue is that if i transpose the choke groups don't work anymore. how can i fix that?

                      d.healeyD 1 Reply Last reply Reply Quote 0
                      • d.healeyD
                        d.healey @ScreamingWaves
                        last edited by

                        @ScreamingWaves I'm not sure, like I say I've never used it

                        Free HISE Bootcamp Full Course for beginners.
                        YouTube Channel - Public HISE tutorials
                        My Patreon - HISE tutorials

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

                        24

                        Online

                        2.0k

                        Users

                        12.9k

                        Topics

                        111.7k

                        Posts