HISE Logo Forum
    • Categories
    • Register
    • Login

    How to switch on/off an FX module with Sustain Pedal (or other CC)?

    Scheduled Pinned Locked Moved General Questions
    12 Posts 3 Posters 488 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.
    • musictopM
      musictop
      last edited by musictop

      How to switch on/off an FX module with Sustain Pedal (or other CC)?

      my website: https://musictop69.wixsite.com/ilirbajri
      https://musictop69.wixsite.com/creatools
      https://musictop69.wixsite.com/orchestools

      LindonL 1 Reply Last reply Reply Quote 0
      • LindonL
        Lindon @musictop
        last edited by Lindon

        @musictop -look for MIDI CC64

        0 to 63 = Off, 64 to 127 = On

        HISE Development for hire.
        www.channelrobot.com

        musictopM 1 Reply Last reply Reply Quote 1
        • musictopM
          musictop @Lindon
          last edited by

          @Lindon cool, thanx a lot... would appreciate any hints on how to script it? :)
          I have no idea how to approach this!

          my website: https://musictop69.wixsite.com/ilirbajri
          https://musictop69.wixsite.com/creatools
          https://musictop69.wixsite.com/orchestools

          LindonL 1 Reply Last reply Reply Quote 0
          • LindonL
            Lindon @musictop
            last edited by

            @musictop said in How to switch on/off an FX module with Sustain Pedal (or other CC)?:

            @Lindon cool, thanx a lot... would appreciate any hints on how to script it? :)
            I have no idea how to approach this!

            function onController()
            {
            	Console.print(Message.getControllerNumber());
            	Console.print(Message.getControllerValue());
            }
            

            HISE Development for hire.
            www.channelrobot.com

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

              You can also make use of Synth.isSustainPedalDown()

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

              1 Reply Last reply Reply Quote 1
              • musictopM
                musictop
                last edited by musictop

                @Lindon @d-healey Thank you very much guys, i think i got it!

                I'm working on an update for my piano instrument. I have joined all piano samples in a single stereo wav file and use it with convolution reverb to simulate strings resonance of sustain pedal. I like how it sounds - it works as a kind of a simulation of the resonance effect. I thought to control it with sustain pedal - enabling and disabling convolution module according to pedal state!

                my website: https://musictop69.wixsite.com/ilirbajri
                https://musictop69.wixsite.com/creatools
                https://musictop69.wixsite.com/orchestools

                musictopM 1 Reply Last reply Reply Quote 0
                • musictopM
                  musictop @musictop
                  last edited by musictop

                  @musictop Thought I'd share this. Sustain pedal switching on/off "process input" on convolution reverb module.

                  function onController()
                  {
                  if (Synth.isSustainPedalDown() == true)
                  	ConvolutionReverb1.setAttribute(4, true);
                  if (Synth.isSustainPedalDown() == false) 
                  	ConvolutionReverb1.setAttribute(4, false);
                  }
                  

                  my website: https://musictop69.wixsite.com/ilirbajri
                  https://musictop69.wixsite.com/creatools
                  https://musictop69.wixsite.com/orchestools

                  LindonL d.healeyD 2 Replies Last reply Reply Quote 1
                  • LindonL
                    Lindon @musictop
                    last edited by

                    @musictop said in How to switch on/off an FX module with Sustain Pedal (or other CC)?:

                    @musictop Thought I'd share this. Sustain pedal switching on/off "process input" on convolution reverb module.

                    function onController()
                    {
                    if (Synth.isSustainPedalDown() == true)
                    	ConvolutionReverb1.setAttribute(4, true);
                    if (Synth.isSustainPedalDown() == false) 
                    	ConvolutionReverb1.setAttribute(4, false);
                    }
                    

                    or the slightly shorter version

                    function onController()
                    {
                        ConvolutionReverb1.setAttribute(4, Synth.isSustainPedalDown() );
                    }
                    

                    HISE Development for hire.
                    www.channelrobot.com

                    musictopM 2 Replies Last reply Reply Quote 2
                    • musictopM
                      musictop @Lindon
                      last edited by

                      @Lindon Thanks... I must learn to think in that way! Much appreciated!

                      my website: https://musictop69.wixsite.com/ilirbajri
                      https://musictop69.wixsite.com/creatools
                      https://musictop69.wixsite.com/orchestools

                      1 Reply Last reply Reply Quote 0
                      • musictopM
                        musictop @Lindon
                        last edited by

                        @Lindon May i bother you with some more please :)

                        I need to use this:

                        MidiAutomationHandler.setConsumeAutomatedControllers(bool shouldBeConsumed)
                        

                        but have no clue on how to use it! Any advice/suggestion in this regard?

                        my website: https://musictop69.wixsite.com/ilirbajri
                        https://musictop69.wixsite.com/creatools
                        https://musictop69.wixsite.com/orchestools

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

                          @musictop Try to avoid using magic numbers. Almost all effect controls have constants available (shown in the module browser).

                          ConvolutionReverb1.setAttribute(ConvolutionReverb1.ProcessInput, Synth.isSustainPedalDown() );

                          cc8c331d-d0b4-4c35-99ff-d4b2aa9fd3e7-image.png

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

                          musictopM 1 Reply Last reply Reply Quote 1
                          • musictopM
                            musictop @d.healey
                            last edited by

                            @d-healey Great, thanks!

                            my website: https://musictop69.wixsite.com/ilirbajri
                            https://musictop69.wixsite.com/creatools
                            https://musictop69.wixsite.com/orchestools

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

                            55

                            Online

                            1.7k

                            Users

                            11.7k

                            Topics

                            101.9k

                            Posts