diff --git a/c++/carla-backend/Makefile.dbg b/c++/carla-backend/Makefile.dbg index cf1b01e..c0a62d3 100644 --- a/c++/carla-backend/Makefile.dbg +++ b/c++/carla-backend/Makefile.dbg @@ -39,8 +39,8 @@ endif ifeq ($(HAVE_PULSEAUDIO),true) WANT_RTAUDIO = true -CARLA_CXX_FLAGS += $(shell pkg-config --cflags libpulse-simple) -D__LINUX_PULSE__ -CARLA_LD_FLAGS += $(shell pkg-config --libs libpulse-simple) +CARLA_CXX_FLAGS += $(shell pkg-config --cflags libpulse-simple) -D__LINUX_PULSE__ +CARLA_LD_FLAGS += $(shell pkg-config --libs libpulse-simple) endif ifeq ($(HAVE_FLUIDSYNTH),true) @@ -82,6 +82,9 @@ endif all: carla_backend.so +doc: carla_backend.doxygen + doxygen $< + carla_backend.so: $(OBJS) $(CXX) $^ $(CARLA_LD_FLAGS) -o $@ && strip $@ diff --git a/c++/carla-backend/carla_engine.cpp b/c++/carla-backend/carla_engine.cpp index 3148956..30cecfb 100644 --- a/c++/carla-backend/carla_engine.cpp +++ b/c++/carla-backend/carla_engine.cpp @@ -281,9 +281,7 @@ bool CarlaEngine::removePlugin(const unsigned short id) plugin->setEnabled(false); processUnlock(); - if (m_checkThread.isRunning()) - m_checkThread.stopNow(); - + m_checkThread.stopNow(); delete plugin; m_carlaPlugins[id] = nullptr; @@ -291,13 +289,13 @@ bool CarlaEngine::removePlugin(const unsigned short id) if (carlaOptions.process_mode == PROCESS_MODE_CONTINUOUS_RACK) { - for (unsigned short i=id; i < MAX_PLUGINS; i++) + for (unsigned short i=id; i < MAX_PLUGINS-1; i++) { m_carlaPlugins[i] = m_carlaPlugins[i+1]; m_uniqueNames[i] = m_uniqueNames[i+1]; if (m_carlaPlugins[i]) - m_carlaPlugins[i]->setId(i+1); + m_carlaPlugins[i]->setId(i); } } @@ -992,8 +990,7 @@ void CarlaEngine::osc_send_set_parameter_ranges(const int32_t pluginId, const in void CarlaEngine::osc_send_set_parameter_midi_cc(const int32_t pluginId, const int32_t index, const int32_t cc) { qDebug("CarlaEngine::osc_send_set_parameter_midi_cc(%i, %i, %i)", pluginId, index, cc); - const CarlaOscData* const oscData = m_osc.getControllerData(); - Q_ASSERT(oscData); + Q_ASSERT(m_oscData); Q_ASSERT(pluginId >= 0 && pluginId < MAX_PLUGINS); Q_ASSERT(index >= 0); diff --git a/c++/carla-backend/carla_engine.h b/c++/carla-backend/carla_engine.h index fd1aab0..6e9b5b8 100644 --- a/c++/carla-backend/carla_engine.h +++ b/c++/carla-backend/carla_engine.h @@ -202,6 +202,11 @@ public: m_carlaPlugins[id] = plugin; } + CarlaPlugin* __getPlugin(const unsigned short id) const + { + return m_carlaPlugins[id]; + } + // ------------------------------------------------------------------- // Information (base) diff --git a/c++/carla-backend/carla_engine_jack.cpp b/c++/carla-backend/carla_engine_jack.cpp index 385b172..b999245 100644 --- a/c++/carla-backend/carla_engine_jack.cpp +++ b/c++/carla-backend/carla_engine_jack.cpp @@ -80,9 +80,13 @@ static void carla_jack_shutdown_callback(void* arg) // ------------------------------------------------------------------------------------------------------------------- // Carla Engine (JACK) -CarlaEngineJack::CarlaEngineJack() : - CarlaEngine(), - rackJackPorts{nullptr} +CarlaEngineJack::CarlaEngineJack() +#ifdef Q_COMPILER_INITIALIZER_LISTS + : CarlaEngine(), + rackJackPorts{nullptr} +#else + : CarlaEngine() +#endif { qDebug("CarlaEngineJack::CarlaEngineJack()"); @@ -94,6 +98,11 @@ CarlaEngineJack::CarlaEngineJack() : procThread = nullptr; memset(&pos, 0, sizeof(jack_position_t)); + +#ifndef Q_COMPILER_INITIALIZER_LISTS + for (unsigned short i=0; i < rackPortCount; i++) + rackJackPorts[i] = nullptr; +#endif } CarlaEngineJack::~CarlaEngineJack() @@ -308,7 +317,7 @@ void CarlaEngineJack::handleProcessCallback(uint32_t nframes) { for (unsigned short i=0; i < MAX_PLUGINS; i++) { - CarlaPlugin* const plugin = getPlugin(i); + CarlaPlugin* const plugin = __getPlugin(i); if (plugin && plugin->enabled()) { @@ -357,7 +366,57 @@ void CarlaEngineJack::handleProcessCallback(uint32_t nframes) // initialize control input memset(rackControlEventsIn, 0, sizeof(CarlaEngineControlEvent)*MAX_ENGINE_CONTROL_EVENTS); { - // TODO + jack_midi_event_t jackEvent; + const uint32_t jackEventCount = jack_midi_get_event_count(controlIn); + + uint32_t carlaEventIndex = 0; + + for (uint32_t jackEventIndex=0; jackEventIndex < jackEventCount; jackEventIndex++) + { + if (jack_midi_event_get(&jackEvent, controlIn, jackEventIndex) != 0) + continue; + + CarlaEngineControlEvent* const carlaEvent = &rackControlEventsIn[carlaEventIndex++]; + + uint8_t midiStatus = jackEvent.buffer[0]; + uint8_t midiChannel = midiStatus & 0x0F; + + carlaEvent->time = jackEvent.time; + carlaEvent->channel = midiChannel; + + if (MIDI_IS_STATUS_CONTROL_CHANGE(midiStatus)) + { + uint8_t midiControl = jackEvent.buffer[1]; + + if (MIDI_IS_CONTROL_BANK_SELECT(midiControl)) + { + uint8_t midiBank = jackEvent.buffer[2]; + carlaEvent->type = CarlaEngineEventMidiBankChange; + carlaEvent->value = midiBank; + } + else if (midiControl == MIDI_CONTROL_ALL_SOUND_OFF) + { + carlaEvent->type = CarlaEngineEventAllSoundOff; + } + else if (midiControl == MIDI_CONTROL_ALL_NOTES_OFF) + { + carlaEvent->type = CarlaEngineEventAllNotesOff; + } + else + { + uint8_t midiValue = jackEvent.buffer[2]; + carlaEvent->type = CarlaEngineEventControlChange; + carlaEvent->controller = midiControl; + carlaEvent->value = double(midiValue)/127; + } + } + else if (MIDI_IS_STATUS_PROGRAM_CHANGE(midiStatus)) + { + uint8_t midiProgram = jackEvent.buffer[1]; + carlaEvent->type = CarlaEngineEventMidiProgramChange; + carlaEvent->value = midiProgram; + } + } } // initialize midi input @@ -392,7 +451,7 @@ void CarlaEngineJack::handleProcessCallback(uint32_t nframes) // process plugins for (unsigned short i=0; i < MAX_PLUGINS; i++) { - CarlaPlugin* const plugin = getPlugin(i); + CarlaPlugin* const plugin = __getPlugin(i); if (plugin && plugin->enabled()) { @@ -445,6 +504,12 @@ void CarlaEngineJack::handleProcessCallback(uint32_t nframes) } } + // if plugin has no midi output, add previous midi input + if (plugin->midiOutCount() == 0) + { + memcpy(rackMidiEventsOut, rackMidiEventsIn, sizeof(CarlaEngineMidiEvent)*MAX_ENGINE_MIDI_EVENTS); + } + processed = true; } } @@ -463,7 +528,50 @@ void CarlaEngineJack::handleProcessCallback(uint32_t nframes) // output control { - // TODO + jack_midi_clear_buffer(controlOut); + + for (unsigned short i=0; i < MAX_ENGINE_CONTROL_EVENTS; i++) + { + CarlaEngineControlEvent* const event = &rackControlEventsOut[i]; + + if (event->type == CarlaEngineEventControlChange && MIDI_IS_CONTROL_BANK_SELECT(event->controller)) + event->type = CarlaEngineEventMidiBankChange; + + uint8_t data[4] = { 0 }; + + switch (event->type) + { + case CarlaEngineEventNull: + break; + case CarlaEngineEventControlChange: + data[0] = MIDI_STATUS_CONTROL_CHANGE + event->channel; + data[1] = event->controller; + data[2] = event->value * 127; + jack_midi_event_write(controlOut, event->time, data, 3); + break; + case CarlaEngineEventMidiBankChange: + data[0] = MIDI_STATUS_CONTROL_CHANGE + event->channel; + data[1] = MIDI_CONTROL_BANK_SELECT; + data[2] = event->value; + jack_midi_event_write(controlOut, event->time, data, 3); + break; + case CarlaEngineEventMidiProgramChange: + data[0] = MIDI_STATUS_PROGRAM_CHANGE + event->channel; + data[1] = event->value; + jack_midi_event_write(controlOut, event->time, data, 2); + break; + case CarlaEngineEventAllSoundOff: + data[0] = MIDI_STATUS_CONTROL_CHANGE + event->channel; + data[1] = MIDI_CONTROL_ALL_SOUND_OFF; + jack_midi_event_write(controlOut, event->time, data, 2); + break; + case CarlaEngineEventAllNotesOff: + data[0] = MIDI_STATUS_CONTROL_CHANGE + event->channel; + data[1] = MIDI_CONTROL_ALL_NOTES_OFF; + jack_midi_event_write(controlOut, event->time, data, 2); + break; + } + } } // output midi diff --git a/c++/carla-backend/carla_engine_rtaudio.cpp b/c++/carla-backend/carla_engine_rtaudio.cpp index 0f9fb3f..9befcc0 100644 --- a/c++/carla-backend/carla_engine_rtaudio.cpp +++ b/c++/carla-backend/carla_engine_rtaudio.cpp @@ -207,7 +207,7 @@ void CarlaEngineRtAudio::handleProcessCallback(void* outputBuffer, void* inputBu // process plugins for (unsigned short i=0; i < MAX_PLUGINS; i++) { - CarlaPlugin* const plugin = getPlugin(i); + CarlaPlugin* const plugin = __getPlugin(i); if (plugin && plugin->enabled()) { diff --git a/c++/carla-backend/carla_osc.cpp b/c++/carla-backend/carla_osc.cpp index 8d05c42..5b0ddd6 100644 --- a/c++/carla-backend/carla_osc.cpp +++ b/c++/carla-backend/carla_osc.cpp @@ -265,7 +265,7 @@ int CarlaOsc::handle_register(const int argc, const lo_arg* const* const argv, c for (unsigned short i=0; i < CarlaBackend::MAX_PLUGINS; i++) { - CarlaBackend::CarlaPlugin* const plugin = engine->getPlugin(i); + CarlaBackend::CarlaPlugin* const plugin = engine->__getPlugin(i); if (plugin && plugin->enabled()) plugin->registerToOsc(); diff --git a/c++/carla-backend/carla_plugin.h b/c++/carla-backend/carla_plugin.h index cd123cd..d6c2282 100644 --- a/c++/carla-backend/carla_plugin.h +++ b/c++/carla-backend/carla_plugin.h @@ -1802,7 +1802,7 @@ public: case PluginPostEventNoteOn: // Update OSC based UIs - if (true) + if (osc.data.target) { uint8_t midiData[4] = { 0 }; midiData[1] = MIDI_STATUS_NOTE_ON + event->value1; @@ -1820,7 +1820,7 @@ public: case PluginPostEventNoteOff: // Update OSC based UIs - if (true) + if (osc.data.target) { uint8_t midiData[4] = { 0 }; midiData[1] = MIDI_STATUS_NOTE_OFF + event->value1; diff --git a/c++/carla-backend/carla_threads.cpp b/c++/carla-backend/carla_threads.cpp index 154bfbb..6920b11 100644 --- a/c++/carla-backend/carla_threads.cpp +++ b/c++/carla-backend/carla_threads.cpp @@ -58,7 +58,7 @@ void CarlaCheckThread::run() { for (unsigned short i=0; i < CarlaBackend::MAX_PLUGINS; i++) { - CarlaBackend::CarlaPlugin* const plugin = engine->getPlugin(i); + CarlaBackend::CarlaPlugin* const plugin = engine->__getPlugin(i); if (plugin && plugin->enabled()) { diff --git a/c++/carla-backend/dssi.cpp b/c++/carla-backend/dssi.cpp index de4858d..84fcb57 100644 --- a/c++/carla-backend/dssi.cpp +++ b/c++/carla-backend/dssi.cpp @@ -1224,21 +1224,15 @@ public: for (i=0; i < count; i++) { - // Dry/Wet and Volume - if (do_drywet || do_volume) + // Dry/Wet + if (do_drywet) { for (k=0; k < frames; k++) { - if (do_drywet) - { - if (aout.count == 1 && ! h2) - outBuffer[i][k] = (outBuffer[i][k]*x_drywet)+(inBuffer[0][k]*(1.0-x_drywet)); - else - outBuffer[i][k] = (outBuffer[i][k]*x_drywet)+(inBuffer[i][k]*(1.0-x_drywet)); - } - - if (do_volume) - outBuffer[i][k] *= x_vol; + if (aout.count == 1 && ! h2) + outBuffer[i][k] = (outBuffer[i][k]*x_drywet)+(inBuffer[0][k]*(1.0-x_drywet)); + else + outBuffer[i][k] = (outBuffer[i][k]*x_drywet)+(inBuffer[i][k]*(1.0-x_drywet)); } } @@ -1268,6 +1262,13 @@ public: } } + // Volume + if (do_volume) + { + for (k=0; k < frames; k++) + outBuffer[i][k] *= x_vol; + } + // Output VU for (k=0; i < 2 && k < frames; k++) { diff --git a/c++/carla-backend/fluidsynth.cpp b/c++/carla-backend/fluidsynth.cpp index f8f2c50..423e4ff 100644 --- a/c++/carla-backend/fluidsynth.cpp +++ b/c++/carla-backend/fluidsynth.cpp @@ -1128,7 +1128,7 @@ public: CARLA_PROCESS_CONTINUE_CHECK; // -------------------------------------------------------------------------------------------------------- - // Post-processing (volume and balance) + // Post-processing (balance and volume) if (m_active) { @@ -1139,9 +1139,6 @@ public: for (i=0; i < aout.count; i++) { - // Volume, using fluidsynth internals - fluid_synth_set_gain(f_synth, x_vol); - // Balance if (do_balance) { @@ -1168,6 +1165,9 @@ public: } } + // Volume, using fluidsynth internals + fluid_synth_set_gain(f_synth, x_vol); + // Output VU for (k=0; i < 2 && k < frames; k++) { diff --git a/c++/carla-backend/ladspa.cpp b/c++/carla-backend/ladspa.cpp index 801594f..3075e74 100644 --- a/c++/carla-backend/ladspa.cpp +++ b/c++/carla-backend/ladspa.cpp @@ -887,21 +887,15 @@ public: for (i=0; i < count; i++) { - // Dry/Wet and Volume - if (do_drywet || do_volume) + // Dry/Wet + if (do_drywet) { for (k=0; k < frames; k++) { - if (do_drywet) - { - if (aout.count == 1 && ! h2) - outBuffer[i][k] = (outBuffer[i][k]*x_drywet)+(inBuffer[0][k]*(1.0-x_drywet)); - else - outBuffer[i][k] = (outBuffer[i][k]*x_drywet)+(inBuffer[i][k]*(1.0-x_drywet)); - } - - if (do_volume) - outBuffer[i][k] *= x_vol; + if (aout.count == 1 && ! h2) + outBuffer[i][k] = (outBuffer[i][k]*x_drywet)+(inBuffer[0][k]*(1.0-x_drywet)); + else + outBuffer[i][k] = (outBuffer[i][k]*x_drywet)+(inBuffer[i][k]*(1.0-x_drywet)); } } @@ -931,6 +925,13 @@ public: } } + // Volume + if (do_volume) + { + for (k=0; k < frames; k++) + outBuffer[i][k] *= x_vol; + } + // Output VU for (k=0; i < 2 && k < frames; k++) { diff --git a/c++/carla-backend/linuxsampler.cpp b/c++/carla-backend/linuxsampler.cpp index c5928f1..7def1b6 100644 --- a/c++/carla-backend/linuxsampler.cpp +++ b/c++/carla-backend/linuxsampler.cpp @@ -410,13 +410,6 @@ public: for (i=0; i < aout.count; i++) { - // Volume - if (do_volume) - { - for (k=0; k < frames; k++) - outBuffer[i][k] *= x_vol; - } - // Balance if (do_balance) { @@ -443,6 +436,13 @@ public: } } + // Volume + if (do_volume) + { + for (k=0; k < frames; k++) + outBuffer[i][k] *= x_vol; + } + // Output VU for (k=0; i < 2 && k < frames; k++) { diff --git a/c++/carla-backend/lv2.cpp b/c++/carla-backend/lv2.cpp index d6b1bd3..aea6884 100644 --- a/c++/carla-backend/lv2.cpp +++ b/c++/carla-backend/lv2.cpp @@ -2137,21 +2137,15 @@ public: for (i=0; i < count; i++) { - // Dry/Wet and Volume - if (do_drywet || do_volume) + // Dry/Wet + if (do_drywet) { for (k=0; k < frames; k++) { - if (do_drywet) - { - if (aout.count == 1 && ! h2) - outBuffer[i][k] = (outBuffer[i][k]*x_drywet)+(inBuffer[0][k]*(1.0-x_drywet)); - else - outBuffer[i][k] = (outBuffer[i][k]*x_drywet)+(inBuffer[i][k]*(1.0-x_drywet)); - } - - if (do_volume) - outBuffer[i][k] *= x_vol; + if (aout.count == 1 && ! h2) + outBuffer[i][k] = (outBuffer[i][k]*x_drywet)+(inBuffer[0][k]*(1.0-x_drywet)); + else + outBuffer[i][k] = (outBuffer[i][k]*x_drywet)+(inBuffer[i][k]*(1.0-x_drywet)); } } @@ -2181,6 +2175,13 @@ public: } } + // Volume + if (do_volume) + { + for (k=0; k < frames; k++) + outBuffer[i][k] *= x_vol; + } + // Output VU for (k=0; i < 2 && k < frames; k++) { diff --git a/c++/carla-backend/vst.cpp b/c++/carla-backend/vst.cpp index 629ccfc..5304a36 100644 --- a/c++/carla-backend/vst.cpp +++ b/c++/carla-backend/vst.cpp @@ -1085,21 +1085,15 @@ public: for (i=0; i < aout.count; i++) { - // Dry/Wet and Volume + // Dry/Wet if (do_drywet || do_volume) { for (k=0; k < frames; k++) { - if (do_drywet) - { - if (aout.count == 1) - outBuffer[i][k] = (outBuffer[i][k]*x_drywet)+(inBuffer[0][k]*(1.0-x_drywet)); - else - outBuffer[i][k] = (outBuffer[i][k]*x_drywet)+(inBuffer[i][k]*(1.0-x_drywet)); - } - - if (do_volume) - outBuffer[i][k] *= x_vol; + if (aout.count == 1) + outBuffer[i][k] = (outBuffer[i][k]*x_drywet)+(inBuffer[0][k]*(1.0-x_drywet)); + else + outBuffer[i][k] = (outBuffer[i][k]*x_drywet)+(inBuffer[i][k]*(1.0-x_drywet)); } } @@ -1129,6 +1123,13 @@ public: } } + // Volume + if (do_volume) + { + for (k=0; k < frames; k++) + outBuffer[i][k] *= x_vol; + } + // Output VU for (k=0; i < 2 && k < frames; k++) { diff --git a/c++/carla-discovery/carla-discovery.cpp b/c++/carla-discovery/carla-discovery.cpp index 63c67fa..dc7493b 100644 --- a/c++/carla-discovery/carla-discovery.cpp +++ b/c++/carla-discovery/carla-discovery.cpp @@ -49,7 +49,7 @@ const uint32_t bufferSize = 512; const double sampleRate = 44100.0; -// Since discovery can find multi-architecture binaries, don't print ELF related errors +// Since discovery can find multi-architecture binaries, don't print ELF/EXE related errors void print_lib_error(const char* const filename) { const char* const error = lib_error(filename); diff --git a/c++/xycontroller/xycontroller.cpp b/c++/xycontroller/xycontroller.cpp index 3e029fd..6d95aaa 100644 --- a/c++/xycontroller/xycontroller.cpp +++ b/c++/xycontroller/xycontroller.cpp @@ -428,15 +428,12 @@ public: return; if (abs_f(m_cursor->x() - m_smooth_x) <= 0.0005f) - { m_smooth_x = m_cursor->x(); - return; - } if (abs_f(m_cursor->y() - m_smooth_y) <= 0.0005f) - { m_smooth_y = m_cursor->y(); + + if (m_cursor->x() == m_smooth_x && m_cursor->y() == m_smooth_y) return; - } float newX = float(m_smooth_x + m_cursor->x()*7) / 8; float newY = float(m_smooth_y + m_cursor->y()*7) / 8; diff --git a/src/carla.py b/src/carla.py index bd7aabc..bc2ee15 100755 --- a/src/carla.py +++ b/src/carla.py @@ -1239,24 +1239,32 @@ class CarlaMainW(QMainWindow, ui_carla.Ui_CarlaMainW): pwidget = self.m_plugin_list[plugin_id] pwidget.edit_dialog.close() - if (pwidget.gui_dialog): + if pwidget.gui_dialog: pwidget.gui_dialog.close() - if (Carla.Host.remove_plugin(plugin_id)): + if Carla.Host.remove_plugin(plugin_id): pwidget.close() pwidget.deleteLater() self.w_plugins.layout().removeWidget(pwidget) self.m_plugin_list[plugin_id] = None - else: - if (showError): - CustomMessageBox(self, QMessageBox.Critical, self.tr("Error"), self.tr("Failed to remove plugin"), - cString(Carla.Host.get_last_error()), QMessageBox.Ok, QMessageBox.Ok) + elif showError: + CustomMessageBox(self, QMessageBox.Critical, self.tr("Error"), self.tr("Failed to remove plugin"), cString(Carla.Host.get_last_error()), QMessageBox.Ok, QMessageBox.Ok) + + # push all plugins 1 slot if rack mode + if Carla.processMode == PROCESS_MODE_CONTINUOUS_RACK: + for i in range(MAX_PLUGINS-1): + if i < plugin_id: continue + self.m_plugin_list[i] = self.m_plugin_list[i+1] + + if self.m_plugin_list[i]: + self.m_plugin_list[i].setId(i) + self.m_plugin_list[MAX_PLUGINS-1] = None + + # check if there are still plugins for i in range(MAX_PLUGINS): - if self.m_plugin_list[i] != None: - self.act_plugin_remove_all.setEnabled(True) - break + if self.m_plugin_list[i]: break else: self.act_plugin_remove_all.setEnabled(False) @@ -1601,8 +1609,23 @@ class CarlaMainW(QMainWindow, ui_carla.Ui_CarlaMainW): @pyqtSlot() def slot_remove_all(self): for i in range(MAX_PLUGINS): - if self.m_plugin_list[i]: - self.remove_plugin(i, False) + pwidget = self.m_plugin_list[i] + + if not pwidget: + continue + + pwidget.edit_dialog.close() + + if pwidget.gui_dialog: + pwidget.gui_dialog.close() + + if Carla.Host.remove_plugin(i): + pwidget.close() + pwidget.deleteLater() + self.w_plugins.layout().removeWidget(pwidget) + self.m_plugin_list[i] = None + + self.act_plugin_remove_all.setEnabled(False) @pyqtSlot() def slot_configureCarla(self): @@ -1798,8 +1821,8 @@ if __name__ == '__main__': dname = cString(Carla.Host.get_engine_driver_name(i)) print("%i - %s" % (i, dname)) - #if not Carla.Host.engine_init("JACK", "Carla"): - if not Carla.Host.engine_init("PulseAudio", "Carla"): + if not Carla.Host.engine_init("JACK", "Carla"): + #if not Carla.Host.engine_init("PulseAudio", "Carla"): CustomMessageBox(None, QMessageBox.Critical, "Error", "Could not connect to Audio backend, possible reasons:", cString(Carla.Host.get_last_error()), QMessageBox.Ok, QMessageBox.Ok) sys.exit(1) diff --git a/src/shared_carla.py b/src/shared_carla.py index 528e3ef..14ccae3 100644 --- a/src/shared_carla.py +++ b/src/shared_carla.py @@ -1332,6 +1332,10 @@ class PluginWidget(QFrame, ui_carla_plugin.Ui_PluginWidget): self.dial_b_right.setStatusTip(message) Carla.gui.statusBar().showMessage(message) + def setId(self, idx): + self.m_pluginId = idx + self.edit_dialog.m_pluginId = idx + def setWidgetColor(self, color): if color == PALETTE_COLOR_WHITE: r = 110