mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 12:10:09 +02:00
Fully implement IMidiLearn
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user