Disable notes on keyboard
-
Hello everyone!
Looking for a way to disable certain notes on the keyboard.
I am aware that in the jSon editor I can choose how many keys can be in the keys, but I need a way disable while still maintaining the same graphics nature of the floating tile, maybe just colour the disabled notes differently like grey or something like that. Any help is appreciated. -
@Sawer Use an if statement in the on note on callback. If the incoming note is a match then ignore the event. And you can colour the keys however you like using Engine.setKeyColour();
You might use this script as inspiration - https://github.com/davidhealey/HISE-Scripting-Framework/blob/master/modules/NoteRangeFilter.js
-
@d-healey Thanks. Will try that
-
@d-healey
How can I get the reference of all the midi notes on the keyboard. something like :const noteC1 = Keyboard.getNoteNumber(60);
Is it
message.getNoteNumber()
?
-
How can I get the reference of all the midi notes on the keyboard. something like :
Message.getNoteNumber()
will give you the number of the incoming MIDI note inside the on note on and on note off callbacks. -
@d-healey Thanks.