Browse Source

CarlaControl fixing

tags/1.9.4
falkTX 11 years ago
parent
commit
0effad9dba
2 changed files with 30 additions and 3 deletions
  1. +1
    -1
      source/backend/engine/CarlaEngineOsc.cpp
  2. +29
    -2
      source/carla_control.py

+ 1
- 1
source/backend/engine/CarlaEngineOsc.cpp View File

@@ -167,13 +167,13 @@ bool isDigit(const char c)


int CarlaEngineOsc::handleMessage(const bool isTCP, const char* const path, const int argc, const lo_arg* const* const argv, const char* const types, const lo_message msg) int CarlaEngineOsc::handleMessage(const bool isTCP, const char* const path, const int argc, const lo_arg* const* const argv, const char* const types, const lo_message msg)
{ {
carla_debug("CarlaEngineOsc::handleMessage(%s, \"%s\", %i, %p, \"%s\", %p)", bool2str(isTCP), path, argc, argv, types, msg);
CARLA_ASSERT(fName.isNotEmpty()); CARLA_ASSERT(fName.isNotEmpty());
CARLA_ASSERT(fServerPathTCP.isNotEmpty()); CARLA_ASSERT(fServerPathTCP.isNotEmpty());
CARLA_ASSERT(fServerPathUDP.isNotEmpty()); CARLA_ASSERT(fServerPathUDP.isNotEmpty());
CARLA_ASSERT(fServerTCP != nullptr); CARLA_ASSERT(fServerTCP != nullptr);
CARLA_ASSERT(fServerUDP != nullptr); CARLA_ASSERT(fServerUDP != nullptr);
CARLA_ASSERT(path != nullptr); CARLA_ASSERT(path != nullptr);
carla_debug("CarlaEngineOsc::handleMessage(%s, \"%s\", %i, %p, \"%s\", %p)", bool2str(isTCP), path, argc, argv, types, msg);


if (path == nullptr) if (path == nullptr)
{ {


+ 29
- 2
source/carla_control.py View File

@@ -655,7 +655,6 @@ class CarlaControlW(QMainWindow):
self.connect(self.ui.act_help_about, SIGNAL("triggered()"), SLOT("slot_aboutCarlaControl()")) self.connect(self.ui.act_help_about, SIGNAL("triggered()"), SLOT("slot_aboutCarlaControl()"))
self.connect(self.ui.act_help_about_qt, SIGNAL("triggered()"), app, SLOT("aboutQt()")) self.connect(self.ui.act_help_about_qt, SIGNAL("triggered()"), app, SLOT("aboutQt()"))


self.connect(self, SIGNAL("SIGUSR1()"), SLOT("slot_handleSIGUSR1()"))
self.connect(self, SIGNAL("SIGTERM()"), SLOT("slot_handleSIGTERM()")) self.connect(self, SIGNAL("SIGTERM()"), SLOT("slot_handleSIGTERM()"))


self.connect(self, SIGNAL("AddPluginStart(int, QString)"), SLOT("slot_handleAddPluginStart(int, QString)")) self.connect(self, SIGNAL("AddPluginStart(int, QString)"), SLOT("slot_handleAddPluginStart(int, QString)"))
@@ -704,6 +703,11 @@ class CarlaControlW(QMainWindow):
self.fIdleTimerFast = self.startTimer(60) self.fIdleTimerFast = self.startTimer(60)
self.fIdleTimerSlow = self.startTimer(60*2) self.fIdleTimerSlow = self.startTimer(60*2)


@pyqtSlot()
def slot_handleSIGTERM(self):
print("Got SIGTERM -> Closing now")
self.close()

@pyqtSlot() @pyqtSlot()
def slot_fileConnect(self): def slot_fileConnect(self):
global lo_target, lo_targetName global lo_target, lo_targetName
@@ -757,7 +761,6 @@ class CarlaControlW(QMainWindow):
@pyqtSlot(int) @pyqtSlot(int)
def slot_handleAddPluginEnd(self, pluginId): def slot_handleAddPluginEnd(self, pluginId):
pwidget = PluginWidget(self, pluginId) pwidget = PluginWidget(self, pluginId)
pwidget.setRefreshRate(60)


self.ui.w_plugins.layout().addWidget(pwidget) self.ui.w_plugins.layout().addWidget(pwidget)


@@ -863,6 +866,9 @@ class CarlaControlW(QMainWindow):
if parameterId >= 0: if parameterId >= 0:
Carla.host._set_parameterValueS(pluginId, parameterId, value) Carla.host._set_parameterValueS(pluginId, parameterId, value)


if pluginId >= self.fPluginCount:
return

pwidget = self.fPluginList[pluginId] pwidget = self.fPluginList[pluginId]
if pwidget is None: if pwidget is None:
return return
@@ -873,6 +879,9 @@ class CarlaControlW(QMainWindow):
def slot_handleSetDefaultValue(self, pluginId, parameterId, value): def slot_handleSetDefaultValue(self, pluginId, parameterId, value):
Carla.host._set_parameterDefaultValue(pluginId, parameterId, value) Carla.host._set_parameterDefaultValue(pluginId, parameterId, value)


if pluginId >= self.fPluginCount:
return

pwidget = self.fPluginList[pluginId] pwidget = self.fPluginList[pluginId]
if pwidget is None: if pwidget is None:
return return
@@ -883,6 +892,9 @@ class CarlaControlW(QMainWindow):
def slot_handleSetParameterMidiCC(self, pluginId, index, cc): def slot_handleSetParameterMidiCC(self, pluginId, index, cc):
Carla.host._set_parameterMidiCC(pluginId, index, cc) Carla.host._set_parameterMidiCC(pluginId, index, cc)


if pluginId >= self.fPluginCount:
return

pwidget = self.fPluginList[pluginId] pwidget = self.fPluginList[pluginId]
if pwidget is None: if pwidget is None:
return return
@@ -893,6 +905,9 @@ class CarlaControlW(QMainWindow):
def slot_handleSetParameterMidiChannel(self, pluginId, index, channel): def slot_handleSetParameterMidiChannel(self, pluginId, index, channel):
Carla.host._set_parameterMidiChannel(pluginId, index, channel) Carla.host._set_parameterMidiChannel(pluginId, index, channel)


if pluginId >= self.fPluginCount:
return

pwidget = self.fPluginList[pluginId] pwidget = self.fPluginList[pluginId]
if pwidget is None: if pwidget is None:
return return
@@ -903,6 +918,9 @@ class CarlaControlW(QMainWindow):
def slot_handleSetProgram(self, pluginId, index): def slot_handleSetProgram(self, pluginId, index):
Carla.host._set_currentProgram(pluginId, index) Carla.host._set_currentProgram(pluginId, index)


if pluginId >= self.fPluginCount:
return

pwidget = self.fPluginList[pluginId] pwidget = self.fPluginList[pluginId]
if pwidget is None: if pwidget is None:
return return
@@ -921,6 +939,9 @@ class CarlaControlW(QMainWindow):
def slot_handleSetMidiProgram(self, pluginId, index): def slot_handleSetMidiProgram(self, pluginId, index):
Carla.host._set_currentMidiProgram(pluginId, index) Carla.host._set_currentMidiProgram(pluginId, index)


if pluginId >= self.fPluginCount:
return

pwidget = self.fPluginList[pluginId] pwidget = self.fPluginList[pluginId]
if pwidget is None: if pwidget is None:
return return
@@ -949,6 +970,9 @@ class CarlaControlW(QMainWindow):


@pyqtSlot(int, int, int, int) @pyqtSlot(int, int, int, int)
def slot_handleNoteOn(self, pluginId, channel, note, velo): def slot_handleNoteOn(self, pluginId, channel, note, velo):
if pluginId >= self.fPluginCount:
return

pwidget = self.fPluginList[pluginId] pwidget = self.fPluginList[pluginId]
if pwidget is None: if pwidget is None:
return return
@@ -957,6 +981,9 @@ class CarlaControlW(QMainWindow):


@pyqtSlot(int, int, int) @pyqtSlot(int, int, int)
def slot_handleNoteOff(self, pluginId, channel, note): def slot_handleNoteOff(self, pluginId, channel, note):
if pluginId >= self.fPluginCount:
return

pwidget = self.fPluginList[pluginId] pwidget = self.fPluginList[pluginId]
if pwidget is None: if pwidget is None:
return return


Loading…
Cancel
Save