MIDI FX Chord Plugin -- Using Message.sendToMidiOut() For Generated Notes
-
I'm trying to create a MIDI FX plugin that generates chords based on a single note played by the user. I'm able to send the original played note to the host DAW using Message.sendToMidiOut(), but is doesn't include the additional notes generated using Synth.addNoteOn().
When I test the plugin inside HISE with a temporary Sampler set up, it works just fine, but inside Ableton, it only forwards the original note played, and not the rest of the chord. I'm not sure how to use something like Message.sendToMidiOut() for the rest of the chord.
Here is my onNoteOn code:
function onNoteOn() { var noteNumber = Message.getNoteNumber(); var noteChannel = Message.getChannel(); var noteVelocity = Message.getVelocity(); var noteID = Message.getEventId() % 128; if(chordMode == true) { // activeNotes is an array of Engine.createMidiList() objects for(x = 0; x < activeNotes.length; x++) { setKeyColor(noteNumber + tChord[x], "ON"); activeNotes[x].setValue(noteID, Synth.addNoteOn(noteChannel, noteNumber + tChord[x], noteVelocity, chordDelay)); } } setKeyColor(noteNumber, "ON"); Message.sendToMidiOut(); }
-
@dusseldorf
sendToMidiOut() will not capture generated notes at that level.
You have to place sendToMidiOut() in a script in a container level beyond the one your MIDI notes are being generated in.And don't forget to put it on the other MIDI callbacks as well!