HISE Logo Forum
    • Categories
    • Register
    • Login

    How to make a Panic Button (Send All MIDI Off)?

    Scheduled Pinned Locked Moved Solved Scripting
    39 Posts 7 Posters 1.6k 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.
    • d.healeyD
      d.healey @WillDevelop
      last edited by

      @WillDevelop It's internal to HISE's engine.

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

      W 1 Reply Last reply Reply Quote 0
      • W
        WillDevelop @d.healey
        last edited by

        @d-healey

        Ah Okay, do you happen to have an idea how I can make a panic button that sends data to the outside (to the next plugin)?

        d.healeyD ulrikU 2 Replies Last reply Reply Quote 0
        • d.healeyD
          d.healey @WillDevelop
          last edited by

          @WillDevelop I don't know if it's possible. You can forward incoming MIDI messages out but I don't know about all notes off.

          65b481b1-79c2-458e-9c2e-b48455fba398-image.png

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

          W 1 Reply Last reply Reply Quote 0
          • W
            WillDevelop @d.healey
            last edited by

            @d-healey If I find a solution, I will post it here. Thank you

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

              @WillDevelop just send 128 note off messages?

              HISE Development for hire.
              www.channelrobot.com

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

                @Lindon can you give me an example code how I can send this via a button click?

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

                  @WillDevelop

                  do you know how to generate a midi note off message?

                  HISE Development for hire.
                  www.channelrobot.com

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

                    @Lindon Ah such a simple idea!

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

                    LindonL 1 Reply Last reply Reply Quote 0
                    • LindonL
                      Lindon @d.healey
                      last edited by

                      @d-healey said in How to make a Panic Button (Send All MIDI Off)?:

                      @Lindon Ah such a simple idea!

                      thats me - full of simple ideas.....

                      HISE Development for hire.
                      www.channelrobot.com

                      1 Reply Last reply Reply Quote 0
                      • W
                        WillDevelop @Lindon
                        last edited by

                        @Lindon Not really, only in conjunction with a Note On command

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

                          @WillDevelop said in How to make a Panic Button (Send All MIDI Off)?:

                          @Lindon Not really, only in conjunction with a Note On command

                          so look in the documentation for NoteOff

                          eventually` you will find:

                          Synth.noteOff(int noteNumber)
                          

                          so ...

                          for(i=0; i<128;i++)
                          {
                             Synth.noteOff(i);
                          }
                          

                          HISE Development for hire.
                          www.channelrobot.com

                          W 1 Reply Last reply Reply Quote 0
                          • W
                            WillDevelop @Lindon
                            last edited by

                            @Lindon
                            But does it also send a Note Off command to another plugin?
                            Because the plugin does not generate its own sounds, but only outputs MIDI data.

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

                              @WillDevelop really, just type it in and try it.. if not - then you have learned something.

                              HISE Development for hire.
                              www.channelrobot.com

                              W 1 Reply Last reply Reply Quote 1
                              • W
                                WillDevelop @Lindon
                                last edited by

                                @Lindon Okay, I tried it and it didn't work.

                                1 Reply Last reply Reply Quote 0
                                • W
                                  WillDevelop
                                  last edited by WillDevelop

                                  I have found a solution

                                  Button Callback

                                  if(isMidiPanicBtnActive == 0)
                                  {
                                     isMidiPanicBtnActive = button.getValue;
                                     button.setValue(0);
                                  }
                                  

                                  onNoteOff Callback

                                  if (isMidiPanicBtnActive == 1)
                                  {
                                  
                                  	for(i=0; i<128; i++)
                                  	{
                                  		Message.setNoteNumber(i);
                                  		Message.sendToMidiOut();
                                  	}
                                  
                                  	isMidiPanicBtnActive = 0;
                                  }
                                  

                                  The only downside of this solution is that you have to press the button and then press a midi key
                                  Because I don't think it is possible to send a message command with a button click, at least not "Message.setNoteNumber()"

                                  1 Reply Last reply Reply Quote 0
                                  • J
                                    johnmike
                                    last edited by

                                    I know you guys are always looking at the “coding” way to do this…but wouldn’t a simple “no code” way to do this be to just create a button…make it momentary and assign it to the project master bypass? Because doesn’t that send an “All notes off” message that kills any midi/audio playing?

                                    W 1 Reply Last reply Reply Quote 0
                                    • W
                                      WillDevelop @johnmike
                                      last edited by

                                      @johnmike that would be a much simpler solution, but I found nothing in the documentation about project master bypass.

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

                                        That would just bypass your plugin, it wouldn't send MIDI out.

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

                                        Christoph HartC 1 Reply Last reply Reply Quote 0
                                        • Christoph HartC
                                          Christoph Hart @d.healey
                                          last edited by

                                          The proper solution would be adding a sendToMidiOut() to the MessageHolder API object, then you can call this from anywhere. But it's a sensible request, I just didn't use the MIDI out functionality myself too much in order to need it.

                                          d.healeyD W 2 Replies Last reply Reply Quote 0
                                          • d.healeyD
                                            d.healey @Christoph Hart
                                            last edited by

                                            @Christoph-Hart Would it be possible to add a more generic midi out that allows to send artificial events too?

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

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

                                            25

                                            Online

                                            1.7k

                                            Users

                                            11.9k

                                            Topics

                                            103.5k

                                            Posts