How to make a Panic Button (Send All MIDI Off)?
-
Unfortunately, it didn't work.
Does the
Engine.allNotesOff();
function only send the command within HISE or also to the next plugin?Because the plugin should not produce its own sound but only output MIDI data (pass it on to the next plugin in the DAW)
-
@WillDevelop It's internal to HISE's engine.
-
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)?
-
@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.
-
@d-healey If I find a solution, I will post it here. Thank you
-
@WillDevelop just send 128 note off messages?
-
@Lindon can you give me an example code how I can send this via a button click?
-
do you know how to generate a midi note off message?
-
@Lindon Ah such a simple idea!
-
@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.....
-
@Lindon Not really, only in conjunction with a Note On command
-
@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); }
-
@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. -
@WillDevelop really, just type it in and try it.. if not - then you have learned something.
-
@Lindon Okay, I tried it and it didn't work.
-
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()" -
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?
-
@johnmike that would be a much simpler solution, but I found nothing in the documentation about project master bypass.
-
That would just bypass your plugin, it wouldn't send MIDI out.
-
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.