Activating/Deactivating a GUI Button via MIDI Keys in HISE?
-
@d-healey Ok, now it works. Thanks. However, it only works when I press the physical key on the controller. Is there a way to make the button activate when a MIDI player is playing those notes? To simulate an instrument animation that triggers when the MIDI is played? Thanks.
-
@lijas90 Have you tested it in a daw? It should work
-
I’ve tried it and it doesn’t work. Do I need to do it in a Script Processor inside the MIDI Processor in some specific way?
-
@lijas90 Sorry, it does work.
-
@lijas90 Thanks David!
-
@d-healey How can I make the button activate only while the key is being pressed, and deactivate when the key is released? Thanks.
-
@lijas90 In
onNoteOn
turn the button on, inonNoteOff
turn the button off. -
@d-healey I’ve tried it like this but it doesn’t work; the button only deactivates when pressing it again, not when releasing the key. Thanks, my friend.
function onNoteOff() { local n = Message.getNoteNumber(); if (ks.contains(n)) btn1.setValue(0); }
-
@lijas90 Post a snippet so I can see the full code
-
@d-healey Sorry, it works now. Thanks again, David