Yes that works, and then im guessing i used it in a manner im not suppose too. Is there a better way of passing midiNotes to the VirtualMidiDevice ?
Using midi recording demo
//in constructtor
if (engine.getDeviceManager().getDefaultMidiInDevice() == nullptr)
engine.getDeviceManager().createVirtualMidiDevice("Virtual");
//in create tracks
int trackNum = 0;
for (auto instance : edit->getAllInputDevices())
{
if (instance->getInputDevice().getDeviceType() == te::InputDevice::physicalMidiDevice || instance->getInputDevice().getDeviceType() == te::InputDevice::virtualMidiDevice)
{
if (auto t = EngineHelpers::getOrInsertAudioTrackAt(*edit, trackNum))
{
instance->setTargetTrack(*t, 0, true);
instance->setRecordingEnabled(*t, true);
trackNum++;
}
}
}
//just on click button for now
tracktion_engine::MidiInputDevice* dev = engine.getDeviceManager().getDefaultMidiInDevice();
if (on)
dev->keyboardState.noteOn(1, 77, 1.0);
else
dev->keyboardState.noteOff(1, 77, 1.0);
on = !on;
Are you sure that doesn’t work? Can you trace through the call to handleIncomingMidiMessage and see where the message ends up? It should get passed to the audio playback graph and then on to the plugin nodes.