HISE Logo Forum
    • Categories
    • Register
    • Login

    How to use piano pedals to switch between groups?

    Scheduled Pinned Locked Moved Scripting
    6 Posts 3 Posters 524 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.
    • ShikiSuenS
      ShikiSuen
      last edited by ShikiSuen

      I am migrating one of my Piano SFZ instruments to HISE in order to make it standalone.

      The original SFZ instrument utilizes two groups of samples: PedalUp and PedalDown. When Sustain Pedal is pressed, only the PedalDown group articulates; When Sustain Pedal is not pressed, only the PedalUp group articulates.

      Is there any necessary scripting steps? I am totally new to HISE.

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

        @ShikiSuen Yes this will require scripting. If you don't have round robin samples the simplest way would be to map the samples into two groups and write a little script to select the group based on the state of the sustain pedal.

        If you do have round robins then I would use the groups for RR and separate the sustain/non-sustain using velocity.

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

        1 Reply Last reply Reply Quote 1
        • Christoph HartC
          Christoph Hart
          last edited by

          Another way would be to put the samples in two different sampler modules and use the MidiMuter like this:

          404 Not Found

          favicon

          (docs.hise.audio)

          ShikiSuenS 1 Reply Last reply Reply Quote 1
          • ShikiSuenS
            ShikiSuen @Christoph Hart
            last edited by

            @Christoph-Hart Thank you for your reply. Unfortunately, when I copied the snipped and tried to load it in HISE on my Mac Pro (mojave 10.14.6 2nd supplemental update, latest HISE public release at this moment), HISE simply reloads a new blank preset.

            1 Reply Last reply Reply Quote 0
            • ShikiSuenS
              ShikiSuen
              last edited by

              Update: I wrote the following and put it into both "oninit" and "onController" of the preset, it works except very fast & frequent pedal movements with fast piano pieces.

              var muteup = Synth.getMidiProcessor("muteup");
              var mutedn = Synth.getMidiProcessor("mutedn");
              function onController()
              {
              	if (Synth.isSustainPedalDown() == true) {
              		muteup.setAttribute(0, 0);
              		mutedn.setAttribute(0, 1);
              	}
              	if (Synth.isSustainPedalDown() == false) {
              		mutedn.setAttribute(0, 0);
              		muteup.setAttribute(0, 1);
              	}
              }
              
              ShikiSuenS 1 Reply Last reply Reply Quote 0
              • ShikiSuenS
                ShikiSuen @ShikiSuen
                last edited by

                Update: The note stuck problem solved. Tick on "fix stuck notes" among all MidiMuters.

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

                13

                Online

                1.7k

                Users

                11.9k

                Topics

                103.5k

                Posts