To use the node in your project you should have the copsmusic/midi-basic library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.
C++ implementation
struct State {
};
{{ GENERATED_CODE }}
void evaluate(Context ctx) {
int note;
int velocity;
int channel;
if (isInputDirty<input_TRG>(ctx)) {
channel = getValue<input_CH_IN>(ctx);
note = getValue<input_Note>(ctx);
velocity = getValue<input_Vel>(ctx);
xod::copsmusic__midi::MIDI.sendNoteOn(note, velocity, channel);
emitValue<output_Sent>(ctx,1);
}
}