I have a project with both Plugin wants midi input and produces midi output enabled. I want to send MIDI note on/off from the GUI to the host.
When I click on a button on the interface I use this code to send a midi note:
processor.keyboardState.noteOn(1, 60, 127);
All is fine, my synth class reads the note on and plays. The problem is, the DAW doesn't record that note.
What should I do to "pass" the midi data to the host?
but you have mixed up the two versions of MidiMessage::noteOn, I think.
static MidiMessage noteOn (int channel, int noteNumber, float velocity) wants velocity in the range 0.0 to 1.0, whereas
static MidiMessage noteOn (int channel, int noteNumber, uint8 velocity). wants it between 1 and 127.
Perhaps testing your plugin in the plugin host demo would help you debug it.