Keyboard/Midi note triggering button
-
Hello,
I have figured out how to get a button to trigger a note. I’m wondering if someone could show what to put in the callback so a note will trigger the button.
reg eventid;
Inline function onbtnTriggerControl (component, value)
{
if (value)
eventId = Synth. playNote(72, 64);
else
Synth.noteOffByEventId(eventId);
};Content getComponent ("btnTrigger").setControlCallback(onbtnTriggerControl
-
@cassettedeath you need the note on callback, and in there use Message.getNoteNumber() to test for your chosen note,
then use .setValue() and .changed() on your button
-
@Lindon awesome thank you