Browse Source

Send initial state of internal params to carla-plugin

tags/1.9.5
falkTX 10 years ago
parent
commit
bc8d7c9645
3 changed files with 12 additions and 2 deletions
  1. +8
    -0
      source/backend/engine/CarlaEngineNative.cpp
  2. +0
    -1
      source/carla_host.py
  3. +4
    -1
      source/modules/native-plugins/resources/carla-plugin

+ 8
- 0
source/backend/engine/CarlaEngineNative.cpp View File

@@ -792,6 +792,14 @@ protected:

const uint pluginId(plugin->getId());

for (int32_t i=PARAMETER_ACTIVE; i>PARAMETER_MAX; --i)
{
std::sprintf(fTmpBuf, "PARAMVAL_%i:%i\n", pluginId, i);
fUiServer.writeMsg(fTmpBuf);
std::sprintf(fTmpBuf, "%f\n", plugin->getInternalParameterValue(i));
fUiServer.writeMsg(fTmpBuf);
}

uint32_t ins, outs, count;
plugin->getParameterCountInfo(ins, outs);
count = plugin->getParameterCount();


+ 0
- 1
source/carla_host.py View File

@@ -671,7 +671,6 @@ class HostWindow(QMainWindow):

self.projectLoadingFinished()

# just in case
self.host.remove_all_plugins()
self.removeAllPlugins()



+ 4
- 1
source/modules/native-plugins/resources/carla-plugin View File

@@ -144,7 +144,10 @@ class CarlaMiniW(ExternalUI, HostWindow):
elif msg.startswith("PARAMVAL_"):
pluginId, paramId = [int(i) for i in msg.replace("PARAMVAL_", "").split(":")]
paramValue = float(self.readlineblock())
self.host._set_parameterValue(pluginId, paramId, paramValue)
if paramId < 0:
self.host._set_internalValue(pluginId, paramId, paramValue)
else:
self.host._set_parameterValue(pluginId, paramId, paramValue)

elif msg.startswith("ENGINE_CALLBACK_"):
action = int(msg.replace("ENGINE_CALLBACK_", ""))


Loading…
Cancel
Save