diff --git a/data/windows/Dockerfile b/data/windows/Dockerfile index f69a7612d..9c5aa8d86 100644 --- a/data/windows/Dockerfile +++ b/data/windows/Dockerfile @@ -20,6 +20,7 @@ RUN apt-get install -qy mingw-w64 && \ apt-get install -qy automake binutils build-essential cmake libglib2.0-dev-bin libtool-bin && \ apt-get clean +# basic setup RUN locale-gen en_US.UTF-8 RUN echo "source /etc/bash_completion" >> $HOME/.bashrc diff --git a/source/backend/engine/CarlaEngineOscSend.cpp b/source/backend/engine/CarlaEngineOscSend.cpp index b0827ee70..27a0e30de 100644 --- a/source/backend/engine/CarlaEngineOscSend.cpp +++ b/source/backend/engine/CarlaEngineOscSend.cpp @@ -131,33 +131,63 @@ void CarlaEngineOsc::sendPluginParameterInfo(const CarlaPlugin* const plugin, co CARLA_SAFE_ASSERT_RETURN(plugin != nullptr,); carla_debug("CarlaEngineOsc::sendPluginParameterInfo(%p, %u)", plugin, index); - char bufName[STR_MAX+1], bufUnit[STR_MAX+1]; + char bufName[STR_MAX+1], bufUnit[STR_MAX+1], bufComment[STR_MAX+1], bufGroupName[STR_MAX+1]; carla_zeroChars(bufName, STR_MAX+1); carla_zeroChars(bufUnit, STR_MAX+1); + carla_zeroChars(bufComment, STR_MAX+1); + carla_zeroChars(bufGroupName, STR_MAX+1); if (! plugin->getParameterName(index, bufName)) bufName[0] = '\0'; if (! plugin->getParameterUnit(index, bufUnit)) bufUnit[0] = '\0'; + if (! plugin->getParameterComment(index, bufComment)) + bufComment[0] = '\0'; + if (! plugin->getParameterGroupName(index, bufGroupName)) + bufGroupName[0] = '\0'; const ParameterData& paramData(plugin->getParameterData(index)); const ParameterRanges& paramRanges(plugin->getParameterRanges(index)); - char targetPath[std::strlen(fControlDataTCP.path)+20]; + const int32_t pluginId = static_cast(plugin->getId()); + const int32_t paramId = static_cast(index); + + char targetPath[std::strlen(fControlDataTCP.path)+24]; + std::strcpy(targetPath, fControlDataTCP.path); - std::strcat(targetPath, "/param"); - try_lo_send(fControlDataTCP.target, targetPath, "iiiiiissfffffff", - static_cast(plugin->getId()), static_cast(index), - static_cast(paramData.type), static_cast(paramData.hints), - static_cast(paramData.mappedControlIndex), static_cast(paramData.midiChannel), - bufName, bufUnit, + std::strcat(targetPath, "/paramInfo"); + try_lo_send(fControlDataTCP.target, targetPath, "iissss", + pluginId, + paramId, + bufName, + bufUnit, + bufComment, + bufGroupName); + + std::strcpy(targetPath, fControlDataTCP.path); + std::strcat(targetPath, "/paramData"); + try_lo_send(fControlDataTCP.target, targetPath, "iiiiiifff", + pluginId, + paramId, + static_cast(paramData.type), + static_cast(paramData.hints), + static_cast(paramData.midiChannel), + static_cast(paramData.mappedControlIndex), + static_cast(paramData.mappedMinimum), + static_cast(paramData.mappedMaximum), + static_cast(plugin->getParameterValue(index))); + + std::strcpy(targetPath, fControlDataTCP.path); + std::strcat(targetPath, "/paramRanges"); + try_lo_send(fControlDataTCP.target, targetPath, "iiffffff", + pluginId, + paramId, static_cast(paramRanges.def), static_cast(paramRanges.min), static_cast(paramRanges.max), static_cast(paramRanges.step), static_cast(paramRanges.stepSmall), - static_cast(paramRanges.stepLarge), - static_cast(plugin->getParameterValue(index))); + static_cast(paramRanges.stepLarge)); } void CarlaEngineOsc::sendPluginDataCount(const CarlaPlugin* const plugin) const noexcept diff --git a/source/frontend/carla_control.py b/source/frontend/carla_control.py index a9345de72..45fb644d6 100755 --- a/source/frontend/carla_control.py +++ b/source/frontend/carla_control.py @@ -376,34 +376,49 @@ class CarlaControlServerTCP(Server): self.host._set_midiCountInfo(pluginId, {'ins': midiOuts, 'outs': midiOuts}) self.host._set_parameterCountInfo(pluginId, paramTotal, {'ins': paramIns, 'outs': paramOuts}) - @make_method('/ctrl/param', 'iiiiiissfffffff') - def carla_param(self, path, args): + @make_method('/ctrl/paramInfo', 'iissss') + def carla_paramInfo(self, path, args): if DEBUG: print(path, args) self.fReceivedMsgs = True - ( - pluginId, paramId, type_, hints, mappedControlIndex, midiChan, name, unit, - def_, min_, max_, step, stepSmall, stepLarge, value - ) = args - - hints &= ~(PARAMETER_USES_SCALEPOINTS | PARAMETER_USES_CUSTOM_TEXT) + pluginId, paramId, name, unit, comment, groupName = args paramInfo = { 'name': name, 'symbol': "", 'unit': unit, + 'comment': comment, + 'groupName': groupName, 'scalePointCount': 0, + 'scalePoints': [], } self.host._set_parameterInfo(pluginId, paramId, paramInfo) + @make_method('/ctrl/paramData', 'iiiiiifff') + def carla_paramData(self, path, args): + if DEBUG: print(path, args) + self.fReceivedMsgs = True + pluginId, paramId, type_, hints, midiChan, mappedCtrl, mappedMin, mappedMax, value = args + + hints &= ~(PARAMETER_USES_SCALEPOINTS | PARAMETER_USES_CUSTOM_TEXT) + paramData = { 'type': type_, 'hints': hints, 'index': paramId, 'rindex': -1, - 'mappedControlIndex': mappedControlIndex, 'midiChannel': midiChan, + 'mappedControlIndex': mappedCtrl, + 'mappedMinimum': mappedMin, + 'mappedMaximum': mappedMax, } self.host._set_parameterData(pluginId, paramId, paramData) + self.host._set_parameterValue(pluginId, paramId, value) + + @make_method('/ctrl/paramRanges', 'iiffffff') + def carla_paramRanges(self, path, args): + if DEBUG: print(path, args) + self.fReceivedMsgs = True + pluginId, paramId, def_, min_, max_, step, stepSmall, stepLarge = args paramRanges = { 'def': def_, @@ -413,9 +428,7 @@ class CarlaControlServerTCP(Server): 'stepSmall': stepSmall, 'stepLarge': stepLarge, } - self.host._set_parameterRangesUpdate(pluginId, paramId, paramRanges) - - self.host._set_parameterValue(pluginId, paramId, value) + self.host._set_parameterRanges(pluginId, paramId, paramRanges) @make_method('/ctrl/count', 'iiiiii') def carla_count(self, path, args):