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 controlNumber;
int controlValue;
int channel;
if (isInputDirty<input_TRG>(ctx)) {
channel = getValue<input_CH_IN>(ctx);
controlNumber = getValue<input_CtlNum>(ctx);
controlValue = getValue<input_CtlVal>(ctx);
xod::copsmusic__midi::MIDI.sendControlChange(controlNumber, controlValue, channel);
emitValue<output_Sent>(ctx,1);
}
}