send-note-on

copsmusic/midi-basic/send-note-on

Send a Note On msg to MIDI output
send-note-on
@/send-note-on
Send a Note On msg to MIDI output
TRGpulse
Trigger the play of the note
CH_INnumber
Channel of the msg
Notenumber
Note to play
Velnumber
Velocity of the note
send-note-on
TRG
CH_IN
Note
Vel
Sent
Sentpulse
Triggered when the NoteON 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 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);
    }
}