Fully implement IMidiLearn

This commit is contained in:
Robbert van der Helm
2021-01-16 14:25:00 +01:00
parent 26c78df37c
commit 7fdf646270
4 changed files with 14 additions and 4 deletions
+1
View File
@@ -95,6 +95,7 @@ using ControlRequest =
YaInfoListener::SetChannelContextInfos,
YaKeyswitchController::GetKeyswitchCount,
YaKeyswitchController::GetKeyswitchInfo,
YaMidiLearn::OnLiveMIDIControllerInput,
YaMidiMapping::GetMidiControllerAssignment,
YaNoteExpressionController::GetNoteExpressionCount,
YaNoteExpressionController::GetNoteExpressionInfo,
@@ -566,10 +566,11 @@ tresult PLUGIN_API Vst3PluginProxyImpl::onLiveMIDIControllerInput(
int32 busIndex,
int16 channel,
Steinberg::Vst::CtrlNumber midiCC) {
// TODO: Implement
bridge.logger.log(
"TODO: Implement IMidiLearn::onLiveMIDIControllerInput()");
return Steinberg::kNotImplemented;
return bridge.send_message(
YaMidiLearn::OnLiveMIDIControllerInput{.instance_id = instance_id(),
.bus_index = busIndex,
.channel = channel,
.midi_cc = midiCC});
}
tresult PLUGIN_API Vst3PluginProxyImpl::getMidiControllerAssignment(
+7
View File
@@ -49,6 +49,7 @@ InstanceInterfaces::InstanceInterfaces(
edit_controller_host_editing(object),
info_listener(object),
keyswitch_controller(object),
midi_learn(object),
midi_mapping(object),
note_expression_controller(object),
note_expression_physical_ui_mapping(object),
@@ -465,6 +466,12 @@ void Vst3Bridge::run() {
return YaKeyswitchController::GetKeyswitchInfoResponse{
.result = result, .info = std::move(info)};
},
[&](const YaMidiLearn::OnLiveMIDIControllerInput& request)
-> YaMidiLearn::OnLiveMIDIControllerInput::Response {
return object_instances[request.instance_id]
.midi_learn->onLiveMIDIControllerInput(
request.bus_index, request.channel, request.midi_cc);
},
[&](const YaMidiMapping::GetMidiControllerAssignment& request)
-> YaMidiMapping::GetMidiControllerAssignment::Response {
Steinberg::Vst::ParamID id;
+1
View File
@@ -161,6 +161,7 @@ struct InstanceInterfaces {
info_listener;
Steinberg::FUnknownPtr<Steinberg::Vst::IKeyswitchController>
keyswitch_controller;
Steinberg::FUnknownPtr<Steinberg::Vst::IMidiLearn> midi_learn;
Steinberg::FUnknownPtr<Steinberg::Vst::IMidiMapping> midi_mapping;
Steinberg::FUnknownPtr<Steinberg::Vst::INoteExpressionController>
note_expression_controller;