HISE Logo Forum
    • Categories
    • Register
    • Login

    Built-in Sustain Pedal Behavior and NoteOff Suspension

    Scheduled Pinned Locked Moved Scripting
    4 Posts 2 Posters 165 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.
    • A
      aaronventure
      last edited by

      Currently, in the sampler, the sustain pedal works as one would expect... for a piano.

      Internally, it looks like there's something really cool going on. My note launches 5 samples, all one next to another (neighbouring zones). So in any downstream MIDI processor, the Message.getNoteNumber() returns the number of the sample that will play, not the physical real note that was pressed.

      The built in sustain pedal, once released, correctly notes off these voices based on which physical key isn't pressed anymore, even though the samples themselves were triggered by a different internal note number.

      This lead me to believe that the built in sustain pedal merely suspends the execution of note-offs instead of doing its own noteOffAllNotesThatDontHaveKeyDownthing.

      Great! Is there any way to gain more control over this? If you're working on a guitar, you want notes on the same strings to override other playing notes. The currently built-in sustain pedal behavior doesn't allow for this as it ignores all note-offs.

      Is there a way to disable the built in sustain pedal? I could then script my own sustain pedal behavior. I only found a 7 year old post about ignoring it, but ignoring CC64 will make that controller unusable for using the built-in MIDI learn capabilities of knobs.

      Additionally, if I could specify which noteoffs aren't to be suspended, that would be extra cool and add more control over the built-in sustain pedal.

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

        @aaronventure

        but ignoring CC64 will make that controller unusable for using the built-in MIDI learn capabilities of knobs.

        Works here

        function onController()
        {
        	if (Message.getControllerNumber() == 64)
        		Message.ignoreEvent(true);
        } 
        

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        A 1 Reply Last reply Reply Quote 1
        • A
          aaronventure @d.healey
          last edited by

          @d-healey Ah, I ignore it down the line but not in the interface.

          Alright, that solves the bypass question! Thanks!

          1 Reply Last reply Reply Quote 0
          • A
            aaronventure
            last edited by

            So there's a workaround for my request of the sustain pedal ignoring certain note offs.

            The built-in sustain pedal will not delay execution of Synth.addVolumeFade, and I can use this instead of Synth.noteOff when the pedal is pressed.

            I hope this isn't a bug, @Christoph-Hart :face_with_tongue:

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

            41

            Online

            1.7k

            Users

            11.7k

            Topics

            101.9k

            Posts