Forum
    • Categories
    • Register
    • Login

    How to ignore Modwheel for a sampler

    Scheduled Pinned Locked Moved Scripting
    9 Posts 2 Posters 799 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.
    • virtuscapeaudioV
      virtuscapeaudio
      last edited by

      I was trying to use Message.Ignore CC1 of some kind but couldn't figure out on my own.

      there is some code on the sampler in the onController for custom Sustain Pedal actions so maybe that's why.

      Any help would be great! Thanks.

      David HealeyD 1 Reply Last reply Reply Quote 0
      • David HealeyD
        David Healey @virtuscapeaudio
        last edited by

        @virtuscapeaudio

        In the onController callback you check if the incoming CC is CC1, if it is you ignore it.

        if (Message.getControllerNumber() == 1)
        {
            Message.ignoreEvent(true);
        }
        

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

        virtuscapeaudioV 1 Reply Last reply Reply Quote 0
        • virtuscapeaudioV
          virtuscapeaudio @David Healey
          last edited by

          @d-healey Thank you!

          I put the ignore message in the same script processor as the sustain pedal behavior script and indeed the modwheel still triggers note 13....the sample gets triggered at every step of moving the modwheel up.

          I tried using a seperate script processer in slot 2 and still the same thing. Any ideas?

          Here's the code in a single processor:

          function onController()
          {
          const eventId = Synth.playNote(12, 127)
          Synth.noteOffByEventId(eventId);

          	if (!Synth.isSustainPedalDown())
          		 Synth.playNote(13, 127);
          		 
          	if (Message.getControllerNumber() == 1)
          				{
          				    Message.ignoreEvent(true);
          				}
          

          };

          David HealeyD 1 Reply Last reply Reply Quote 0
          • David HealeyD
            David Healey @virtuscapeaudio
            last edited by

            @virtuscapeaudio The script is processed in order from top to bottom. Try putting the part that ignores the note above the part that plays the note.

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

            virtuscapeaudioV 1 Reply Last reply Reply Quote 0
            • virtuscapeaudioV
              virtuscapeaudio @David Healey
              last edited by

              @d-healey I tried that and still nothing...the note actually gets triggered on Pitchbend as well...

              funnily...I opened the same project one day and it was working and ignoring all controllers except CC64 which is what i want.

              Any ideas?

              David HealeyD 1 Reply Last reply Reply Quote 0
              • David HealeyD
                David Healey @virtuscapeaudio
                last edited by

                @virtuscapeaudio You'll need to put the sustain stuff in the else clause of the mod-wheel section. Or use a return statement.

                    if (Message.getControllerNumber() == 1)
                    {
                	    Message.ignoreEvent(true);
                    }
                    else
                    {
                	if (!Synth.isSustainPedalDown())
                		 Synth.playNote(13, 127);
                    }
                

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

                virtuscapeaudioV 1 Reply Last reply Reply Quote 0
                • virtuscapeaudioV
                  virtuscapeaudio @David Healey
                  last edited by

                  @d-healey Flawless, David! Thank you.

                  And if i wanted to ignore ALL CCs except 64?

                  Would I use the setControllerNumber for an array with all CCs?

                  I'm slowly wrapping my brain around HISE scripting, ugh ;)

                  I've plenty of notes for HISE Scripting 101 haha

                  David HealeyD 1 Reply Last reply Reply Quote 0
                  • David HealeyD
                    David Healey @virtuscapeaudio
                    last edited by

                    @virtuscapeaudio

                        if (Message.getControllerNumber() != 64)
                        {
                    	    Message.ignoreEvent(true);
                        }
                        else
                        {
                    	if (!Synth.isSustainPedalDown())
                    		 Synth.playNote(13, 127);
                        }
                    

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

                    virtuscapeaudioV 1 Reply Last reply Reply Quote 0
                    • virtuscapeaudioV
                      virtuscapeaudio @David Healey
                      last edited by

                      @d-healey oh I see... it's the (!).

                      Thanks a ton!

                      1 Reply Last reply Reply Quote 0
                      • gorangroovesG gorangrooves referenced this topic on
                      • First post
                        Last post

                      30

                      Online

                      2.1k

                      Users

                      13.0k

                      Topics

                      112.6k

                      Posts