send-control-change

copsmusic/midi-basic/send-control-change

Send CC msg to MIDI output
send-control-change
@/send-control-change
Send CC msg to MIDI output
TRGpulse
Trigger the sending of the CC msg to MIDI output
CH_INnumber
Channel of the msg
CtlNumnumber
Controller Number
CtlValnumber
Controller Value 0-127
send-control-change
TRG
CH_IN
CtlNum
CtlVal
Sent
Sentpulse
Triggered when the CC msg has been sent
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);
    }
}