diff --git a/src/common/logging/vst3.cpp b/src/common/logging/vst3.cpp index 1b6ea53d..69117b23 100644 --- a/src/common/logging/vst3.cpp +++ b/src/common/logging/vst3.cpp @@ -466,6 +466,31 @@ bool Vst3Logger::log_request( }); } +bool Vst3Logger::log_request( + bool is_host_vst, + const YaNoteExpressionPhysicalUIMapping::GetNotePhysicalUIMapping& + request) { + return log_request_base(is_host_vst, [&](auto& message) { + message << request.instance_id + << ": " + "INoteExpressionPhysicalUIMapping::getNotePhysicalUIMapping(" + "busIndex = " + << request.bus_index << ", channel = " << request.channel + << ", list = "; + for (bool first = true; const auto& mapping : request.list.maps) { + if (!first) { + message << ", "; + } + + // The host provides the physical UI elements, and the plugin should + // fill in a note expression ID for each of them. + message << mapping.physicalUITypeID << " => ?"; + first = false; + } + message << ")"; + }); +} + bool Vst3Logger::log_request(bool is_host_vst, const YaParameterFinder::FindParameter& request) { return log_request_base(is_host_vst, [&](auto& message) { @@ -1396,6 +1421,26 @@ void Vst3Logger::log_response( }); } +void Vst3Logger::log_response( + bool is_host_vst, + const YaNoteExpressionPhysicalUIMapping::GetNotePhysicalUIMappingResponse& + response) { + log_response_base(is_host_vst, [&](auto& message) { + message << response.result.string(); + if (response.result == Steinberg::kResultOk) { + message << ", ["; + for (bool first = true; const auto& mapping : response.list.maps) { + if (!first) { + message << ", "; + } + message << mapping.physicalUITypeID << " => " + << mapping.noteExpressionTypeID; + first = false; + } + } + }); +} + void Vst3Logger::log_response( bool is_host_vst, const YaParameterFinder::FindParameterResponse& response) { diff --git a/src/common/logging/vst3.h b/src/common/logging/vst3.h index c60d5f99..75808789 100644 --- a/src/common/logging/vst3.h +++ b/src/common/logging/vst3.h @@ -122,6 +122,9 @@ class Vst3Logger { bool log_request( bool is_host_vst, const YaNoteExpressionController::GetNoteExpressionValueByString&); + bool log_request( + bool is_host_vst, + const YaNoteExpressionPhysicalUIMapping::GetNotePhysicalUIMapping&); bool log_request(bool is_host_vst, const YaParameterFinder::FindParameter&); bool log_request(bool is_host_vst, const YaPlugView::IsPlatformTypeSupported&); @@ -252,6 +255,9 @@ class Vst3Logger { void log_response(bool is_host_vst, const YaNoteExpressionController:: GetNoteExpressionValueByStringResponse&); + void log_response(bool is_host_vst, + const YaNoteExpressionPhysicalUIMapping:: + GetNotePhysicalUIMappingResponse&); void log_response(bool is_host_vst, const YaParameterFinder::FindParameterResponse&); void log_response(bool is_host_vst, const YaPlugView::GetSizeResponse&); diff --git a/src/common/serialization/vst3/physical-ui-map-list.h b/src/common/serialization/vst3/physical-ui-map-list.h index 57bb12ad..70616626 100644 --- a/src/common/serialization/vst3/physical-ui-map-list.h +++ b/src/common/serialization/vst3/physical-ui-map-list.h @@ -46,7 +46,6 @@ class YaPhysicalUIMapList { s.container(maps, 1 << 31); } - private: std::vector maps; };