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.
    • 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
        • Christoph HartC
          Christoph Hart @d.healey
          last edited by

          @d-healey sure, the idea would be that you can send any message type like this.

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

            Gotcha...def the scripting stuff for sending midi out to other plugins...but as far as just creating a generic "Panic" button this is what I was talking about...just for the guys and gals that are trying to accomplish a simple task of creating a simple "Panic" button...WARNING turn speakers down for the audio example...

            Dropbox - File Deleted - Simplify your life

            favicon

            (www.dropbox.com)

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

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

              sendToMidiOut

              That's a good suggestion, but when trying around with the MessageHolder object I noticed that the object does not have the function sendToMidiOut() at all and if I understand correctly sendToMidiOut() only works in the Midi callbacks, which is only triggered when a Midi signal comes in

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

                @WillDevelop Christoph is saying he needs to add this functionality to HISE, it isn't there yet

                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

                  Okay, my bad.
                  I have now solved the problem like this:
                  When you press the panic button you have one second to press any MIDI note so it can send a note off command to the next plugin for each note.

                  Here is the code for it

                  onInit()

                  // MIDI Panic Btn
                  const midiPanicBtn = Content.addButton("midiPanicBtn").setPosition(204, 40, 70, 43);
                  var isMidiPanicBtnActive = midiPanicBtn.getValue;
                  
                  // MIDI Panic Btn Timer
                  const midiPanicBtn_timer = Engine.createTimerObject();
                  midiPanicBtn_timer.setTimerCallback(function(){
                  	var panicBtn = Content.getComponent("midiPanicBtn");
                  	isMidiPanicBtnActive = 0;
                  	midiPanicBtn_timer.stopTimer();
                  });
                  

                  Button-Callback

                  if(isMidiPanicBtnActive == 0)
                  {
                     isMidiPanicBtnActive = 1;
                     midiPanicBtn_timer.startTimer(1000);
                  }
                  

                  onNoteOff()

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

                  Thank you all for helping me!

                  d.healeyD 1 Reply Last reply Reply Quote 0
                  • W WillDevelop has marked this topic as solved on
                  • d.healeyD
                    d.healey @WillDevelop
                    last edited by

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

                    var isMidiPanicBtnActive = midiPanicBtn.getValue;

                    Check this...

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

                    1 Reply Last reply Reply Quote 0
                    • ulrikU
                      ulrik @WillDevelop
                      last edited by

                      @WillDevelop If you want to send note off to the outside, you can use the Synth.sendToMidiOut() function.

                      Here's an example, the project has to have "Enable Midi Out" enabled

                      This example works in Logic, the plugin is an MidiFX plugin

                      video

                      HiseSnippet 967.3oc6W0saSjCE1NIdESfEsHwCvnd0TQUUBKvhTWfPSaQQPZiHEDRbA35wowpyXOxiGJQnJw6K2v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EmaU1RLDlwyO7U3yTksKaNrJaWp7+jXDSYZ0aXESXVxgqjKAdtk4+YJORe6Y+1mcrJFZ7eCiU8pNii2dYc7uWVGuyx53cWVGu2x53+rrNd+eri18RONynhKFMQn9C1NeMHFusjBc44SDnuA4V4ZhC
                      

                      Hise Develop branch
                      MacOs 15.3.1, Xcode 16.2
                      http://musikboden.se

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

                        @ulrik Yes it works but unfortunately only as a VST2 plugin

                        ulrikU 1 Reply Last reply Reply Quote 0
                        • ulrikU
                          ulrik @WillDevelop
                          last edited by

                          @WillDevelop Ok, I think Logics MidiFX works in another way.
                          Now I have set the

                          Message.sendToMidiOut();
                          

                          in onNoteOn and onController callbacks as well, (to let all midi information slip through)
                          and it works as vst3 in Live and Reaper here

                          Ableton Live
                          Reaper

                          snippet

                          HiseSnippet 950.3oc6W0saaaCElz1ZnxsaXEnO.B4JEzf.qrtsBj0MuXmTXz5Di5zhc0JXnniIhDo.EU6LJ56bQe.Z6gRVVTN1atFMCXC0WId9gmOc96SdjRRYooREB6d9rDFBeGmwyD5o8lR3Bzf9H7scFxC4iHBNEczrDRZJKDgwMerw.raKT9u28aGQhHBJqRDB8BImxdJOlqqjNp6S3QQmPBYmyisr9AcGPkhdxHYF.llNcPID5UjKYmRLl0vAg+liC4ZoZrlnYoHbqijgyFOU9ZQg8ufmxuHhYNDfFCWTg3SjQgFDajh5MkGENp7kNEgvNipRAMKRA2q3MtTdUp36yU3U4gc9.2nN7ZVCdA1vqiE7VAjvVPpUAjtqyXphmnqzTTZFHzL0DBj1sgRgsH7Gb5IACD58iIWwNQAGV3f+Ac5rmWPmN6dX61PlOU6snNeVl16Qd48A6eISWKa3uisY6r6gSxDTMWJ7jhSkZ1YB+ca+l1tseaaukUMYxJ0Y.oRFEwTqTsoOQ824nuHK9BlZOuWQhxXKLDRd0qHNquhX2vPKxYVFJECDb8YILw5ZiPySzlp2bTAlpyqce27Z2QYZsTf3g0moxAs8TC54C5SzjxqBtUHRILkladIv8YuBlpJZKbc5yRuRKSxsMNQJLX.6tQA9upBZ+typN7qceMOTOsRve1cJie4TssI7zgxXHXD0rhbRRY1XPnIx1MIvjrBFhgFuAKAAz06zgYLYXVDQWevyrsYtBn1Wqa2zRKR45Y1ai9hMMtoP7tNi3Z5zUiwFq.iP88l.iy2g8sNGOYBipq.XKmS9ialEV1g+VqgE4N4qhfSLUvWBZjjMlFA27lf1n0+goMVZ5bELGMdO1YINAfPnjLgDFVrRwhKXm87.5DCYxBQ6mxz96Xsn.rQqfEz.gCWDAsB16xW3V4RcZ49L6857Id9yO45NQp774.v5bnG26W7BN3gvC2+9FctErWhBZGf5K94C7C1yiCQ+s..pgx4grGIJ5B3iN7uNZVKM2PHsBejBbKhvykF2fTpuIHqm9aC8YYZwMzsuRW94RW5rozkNXS7lU9PMNPGbtruRn8+ABsmIyzbwkCIZE2T2OMKdLPnPYPzEBVjY5.2vzGWbtSYKwXX1L+vGgeyUFT1bXTFTp7ekXDSnJ4KoESXFNhakKAduE4+qJWmglydAWerJFZ7eIkV+ptliGrsN9CaqiOXac7G2VG+os0wedac7g+yNZ1K86YZYbwnIBMbzw4qAw3iEDnKOeh.8Ij0MtUA
                          

                          Hise Develop branch
                          MacOs 15.3.1, Xcode 16.2
                          http://musikboden.se

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

                            @ulrik Nice, but after playing around with it a bit, I realized that you still have to press a midi Note to send the NoteOff commands

                            ulrikU 1 Reply Last reply Reply Quote 0
                            • ulrikU
                              ulrik @WillDevelop
                              last edited by

                              @WillDevelop What is not working, have you the same setup as in my snippet?
                              It's working here both as au and vst3

                              Hise Develop branch
                              MacOs 15.3.1, Xcode 16.2
                              http://musikboden.se

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

                                @WillDevelop HOW ARE THERE 36 REPLIES IN THIS THREAD?!:face_with_tears_of_joy: :face_with_tears_of_joy:

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

                                  @ulrik
                                  It does not work with stuck notes

                                  Example Video

                                  ulrikU 1 Reply Last reply Reply Quote 0
                                  • ulrikU
                                    ulrik @WillDevelop
                                    last edited by

                                    @WillDevelop Ok I see,

                                    Hise Develop branch
                                    MacOs 15.3.1, Xcode 16.2
                                    http://musikboden.se

                                    1 Reply Last reply Reply Quote 0
                                    • C card100 referenced this topic on
                                    • First post
                                      Last post

                                    15

                                    Online

                                    1.7k

                                    Users

                                    11.9k

                                    Topics

                                    103.5k

                                    Posts