| @@ -8,8 +8,8 @@ CXX ?= g++ | |||
| WINECXX ?= wineg++ | |||
| BUILD_FLAGS = -DBUILD_BRIDGE -Wall -std=c++0x -I. -I../carla-includes -I../carla `pkg-config --cflags jack liblo QtCore QtGui` $(CXXFLAGS) | |||
| # BUILD_FLAGS += -DNDEBUG -DQT_NO_DEBUG -DQT_NO_DEBUG_STREAM -DQT_NO_DEBUG_OUTPUT -O2 -ffast-math -fomit-frame-pointer -mtune=generic -msse | |||
| BUILD_FLAGS += -DDEBUG -O0 -g | |||
| BUILD_FLAGS += -DNDEBUG -DQT_NO_DEBUG -DQT_NO_DEBUG_STREAM -DQT_NO_DEBUG_OUTPUT -O2 -ffast-math -fomit-frame-pointer -mtune=generic -msse | |||
| # BUILD_FLAGS += -DDEBUG -O0 -g | |||
| BUILD_FLAGS += -DVESTIGE_HEADER -I../carla-includes/vestige # Comment this line to not use vestige header | |||
| LINK_FLAGS = `pkg-config --libs jack liblo QtCore QtGui` $(LDFLAGS) | |||
| @@ -31,8 +31,7 @@ WINE_LINK_FLAGS = $(LINK_FLAGS) | |||
| WINE_32BIT_FLAGS = -L/usr/lib32/wine -L/usr/lib/i386-linux-gnu/wine $(32BIT_FLAGS) | |||
| WINE_64BIT_FLAGS = -L/usr/lib64/wine -L/usr/lib/x86_64-linux-gnu/wine $(64BIT_FLAGS) | |||
| SOURCES = carla_bridge.cpp carla_osc.cpp ../carla/carla_jack.cpp ../carla/carla_shared.cpp ../carla/vst.cpp | |||
| #../carla/ladspa.cpp ../carla/dssi.cpp | |||
| SOURCES = carla_bridge.cpp carla_osc.cpp ../carla/carla_jack.cpp ../carla/carla_shared.cpp ../carla/ladspa.cpp ../carla/dssi.cpp ../carla/lv2.cpp ../carla/vst.cpp ../carla/lv2-rtmempool/rtmempool.o ../carla-lilv/carla_lilv.a | |||
| all: | |||
| @@ -22,19 +22,16 @@ | |||
| #include <QtGui/QDialog> | |||
| // plugin specific | |||
| short add_plugin_ladspa(const char* filename, const char* label, void* extra_stuff); | |||
| short add_plugin_dssi(const char* filename, const char* label, void* extra_stuff); | |||
| short add_plugin_ladspa(const char* filename, const char* label, const void* extra_stuff); | |||
| short add_plugin_dssi(const char* filename, const char* label, const void* extra_stuff); | |||
| short add_plugin_lv2(const char* filename, const char* label); | |||
| short add_plugin_vst(const char* filename, const char* label); | |||
| // global variables | |||
| QDialog* dialog = nullptr; | |||
| bool close_now = false; | |||
| void plugin_bridge_show_gui(bool yesno) | |||
| void plugin_bridge_show_gui(bool /*yesno*/) | |||
| { | |||
| //if (CarlaPlugins[0]) | |||
| // CarlaPlugins[0]->show_gui(yesno); | |||
| //dialog->setVisible(yesno); | |||
| } | |||
| void plugin_bridge_quit() | |||
| @@ -62,6 +59,8 @@ int main(int argc, char* argv[]) | |||
| itype = PLUGIN_LADSPA; | |||
| else if (strcmp(stype, "DSSI") == 0) | |||
| itype = PLUGIN_DSSI; | |||
| else if (strcmp(stype, "LV2") == 0) | |||
| itype = PLUGIN_LV2; | |||
| else if (strcmp(stype, "VST") == 0) | |||
| itype = PLUGIN_VST; | |||
| else | |||
| @@ -73,16 +72,21 @@ int main(int argc, char* argv[]) | |||
| QApplication app(argc, argv); | |||
| osc_init(label, osc_url); | |||
| set_last_error("no error"); | |||
| osc_init(label, osc_url); | |||
| osc_send_update(); | |||
| switch (itype) | |||
| { | |||
| case PLUGIN_LADSPA: | |||
| //id = add_plugin_ladspa(filename, label, nullptr); | |||
| id = add_plugin_ladspa(filename, label, nullptr); | |||
| break; | |||
| case PLUGIN_DSSI: | |||
| //id = add_plugin_dssi(filename, label, nullptr); | |||
| id = add_plugin_dssi(filename, label, nullptr); | |||
| break; | |||
| case PLUGIN_LV2: | |||
| id = add_plugin_lv2(filename, label); | |||
| break; | |||
| case PLUGIN_VST: | |||
| id = add_plugin_vst(filename, label); | |||
| @@ -94,27 +98,15 @@ int main(int argc, char* argv[]) | |||
| if (id >= 0) | |||
| { | |||
| qDebug("HERE 00 -> %i", id); | |||
| CarlaPlugin* plugin = CarlaPlugins[id]; | |||
| if (plugin && plugin->id() >= 0) | |||
| { | |||
| //osc_send_update(); | |||
| //if (itype == PLUGIN_VST) | |||
| //{ | |||
| dialog = new QDialog(nullptr); | |||
| //dialog->resize(300, 300); | |||
| plugin->set_gui_data(0, dialog); | |||
| dialog->show(); | |||
| //} | |||
| // FIXME | |||
| plugin->set_active(true, false, false); | |||
| qDebug("HERE exec"); | |||
| //app.exec(); | |||
| // qDebug("HERE after!"); | |||
| bool send_update = true; | |||
| ParameterData* param_data; | |||
| while (close_now == false) | |||
| { | |||
| @@ -139,13 +131,26 @@ int main(int argc, char* argv[]) | |||
| if (close_now) break; | |||
| for (uint32_t i=0; i < plugin->param_count(); i++) | |||
| { | |||
| param_data = plugin->param_data(i); | |||
| if (param_data->type == PARAMETER_OUTPUT && (param_data->hints & PARAMETER_IS_AUTOMABLE) > 0) | |||
| osc_send_control(nullptr, param_data->rindex, plugin->get_parameter_value(i)); | |||
| } | |||
| if (close_now) break; | |||
| if (send_update) | |||
| { | |||
| send_update = false; | |||
| osc_send_bridge_update(); | |||
| } | |||
| carla_msleep(50); | |||
| } | |||
| delete plugin; | |||
| if (dialog) | |||
| delete dialog; | |||
| } | |||
| } | |||
| else | |||
| @@ -154,6 +159,7 @@ int main(int argc, char* argv[]) | |||
| return 1; | |||
| } | |||
| osc_send_exiting(); | |||
| osc_close(); | |||
| return 0; | |||
| @@ -123,8 +123,8 @@ int osc_message_handler(const char* path, const char* types, lo_arg** argv, int | |||
| return osc_handle_control(argv); | |||
| else if (strcmp(method, "program") == 0) | |||
| return osc_handle_program(argv); | |||
| // else if (strcmp(method, "midi_program") == 0) | |||
| // return osc_midi_program_handler(argv); | |||
| else if (strcmp(method, "midi_program") == 0) | |||
| return osc_handle_midi_program(argv); | |||
| // else if (strcmp(method, "note_on") == 0) | |||
| // return osc_note_on_handler(argv); | |||
| // else if (strcmp(method, "note_off") == 0) | |||
| @@ -135,7 +135,7 @@ int osc_message_handler(const char* path, const char* types, lo_arg** argv, int | |||
| return osc_handle_hide(); | |||
| else if (strcmp(method, "quit") == 0) | |||
| return osc_handle_quit(); | |||
| #ifdef WANT_EXTRA_OSC_SUPPORT | |||
| #if 0 | |||
| else if (strcmp(method, "set_parameter_midi_channel") == 0) | |||
| return osc_set_parameter_midi_channel_handler(argv); | |||
| else if (strcmp(method, "set_parameter_midi_cc") == 0) | |||
| @@ -180,6 +180,24 @@ int osc_handle_program(lo_arg** argv) | |||
| return 0; | |||
| } | |||
| int osc_handle_midi_program(lo_arg** argv) | |||
| { | |||
| int bank = argv[0]->i; | |||
| int program = argv[1]->i; | |||
| #ifdef BUILD_BRIDGE_UI | |||
| //if (ui && index >= 0) | |||
| // ui->queque_message(BRIDGE_MESSAGE_MIDI_PROGRAM, index, 0, 0.0); | |||
| (void)bank; | |||
| (void)program; | |||
| #else | |||
| if (CarlaPlugins[0]) | |||
| CarlaPlugins[0]->set_midi_program_full(bank, program, false, true, true, true); | |||
| #endif | |||
| return 0; | |||
| } | |||
| int osc_handle_show() | |||
| { | |||
| #ifdef BUILD_BRIDGE_UI | |||
| @@ -264,6 +282,94 @@ void osc_send_bridge_aouts_peak(int index, double value) | |||
| } | |||
| } | |||
| void osc_send_bridge_audio_count(int ins, int outs, int total) | |||
| { | |||
| if (global_osc_data.target) | |||
| { | |||
| char target_path[strlen(global_osc_data.path)+20]; | |||
| strcpy(target_path, global_osc_data.path); | |||
| strcat(target_path, "/bridge_audio_count"); | |||
| lo_send(global_osc_data.target, target_path, "iii", ins, outs, total); | |||
| } | |||
| } | |||
| void osc_send_bridge_midi_count(int ins, int outs, int total) | |||
| { | |||
| if (global_osc_data.target) | |||
| { | |||
| char target_path[strlen(global_osc_data.path)+19]; | |||
| strcpy(target_path, global_osc_data.path); | |||
| strcat(target_path, "/bridge_midi_count"); | |||
| lo_send(global_osc_data.target, target_path, "iii", ins, outs, total); | |||
| } | |||
| } | |||
| void osc_send_bridge_param_count(int ins, int outs, int total) | |||
| { | |||
| if (global_osc_data.target) | |||
| { | |||
| char target_path[strlen(global_osc_data.path)+20]; | |||
| strcpy(target_path, global_osc_data.path); | |||
| strcat(target_path, "/bridge_param_count"); | |||
| lo_send(global_osc_data.target, target_path, "iii", ins, outs, total); | |||
| } | |||
| } | |||
| void osc_send_bridge_plugin_info(int type, int category, int hints, const char* name, const char* label, const char* maker, const char* copyright, long unique_id) | |||
| { | |||
| if (global_osc_data.target) | |||
| { | |||
| char target_path[strlen(global_osc_data.path)+20]; | |||
| strcpy(target_path, global_osc_data.path); | |||
| strcat(target_path, "/bridge_plugin_info"); | |||
| lo_send(global_osc_data.target, target_path, "iiissssh", type, category, hints, name, label, maker, copyright, unique_id); | |||
| } | |||
| } | |||
| void osc_send_bridge_param_info(int index, const char* name, const char* unit) | |||
| { | |||
| if (global_osc_data.target) | |||
| { | |||
| char target_path[strlen(global_osc_data.path)+19]; | |||
| strcpy(target_path, global_osc_data.path); | |||
| strcat(target_path, "/bridge_param_info"); | |||
| lo_send(global_osc_data.target, target_path, "iss", index, name, unit); | |||
| } | |||
| } | |||
| void osc_send_bridge_param_data(int type, int index, int rindex, int hints, int midi_channel, int midi_cc) | |||
| { | |||
| if (global_osc_data.target) | |||
| { | |||
| char target_path[strlen(global_osc_data.path)+19]; | |||
| strcpy(target_path, global_osc_data.path); | |||
| strcat(target_path, "/bridge_param_data"); | |||
| lo_send(global_osc_data.target, target_path, "iiiiii", type, index, rindex, hints, midi_channel, midi_cc); | |||
| } | |||
| } | |||
| void osc_send_bridge_param_ranges(int index, double def, double min, double max, double step, double step_small, double step_large) | |||
| { | |||
| if (global_osc_data.target) | |||
| { | |||
| char target_path[strlen(global_osc_data.path)+21]; | |||
| strcpy(target_path, global_osc_data.path); | |||
| strcat(target_path, "/bridge_param_ranges"); | |||
| lo_send(global_osc_data.target, target_path, "iffffff", index, def, min, max, step, step_small, step_large); | |||
| } | |||
| } | |||
| void osc_send_bridge_update() | |||
| { | |||
| if (global_osc_data.target) | |||
| { | |||
| char target_path[strlen(global_osc_data.path)+14]; | |||
| strcpy(target_path, global_osc_data.path); | |||
| strcat(target_path, "/bridge_update"); | |||
| lo_send(global_osc_data.target, target_path, ""); | |||
| } | |||
| } | |||
| // ------------------------------------------------------------------------- | |||
| void osc_send_configure(OscData*, const char* key, const char* value) | |||
| @@ -38,6 +38,7 @@ int osc_message_handler(const char* path, const char* types, lo_arg** argv, int | |||
| // common plugin handlers | |||
| int osc_handle_control(lo_arg** argv); | |||
| int osc_handle_program(lo_arg** argv); | |||
| int osc_handle_midi_program(lo_arg** argv); | |||
| int osc_handle_show(); | |||
| int osc_handle_hide(); | |||
| int osc_handle_quit(); | |||
| @@ -47,6 +48,18 @@ void osc_send_update(); | |||
| void osc_send_exiting(); | |||
| void osc_send_bridge_ains_peak(int index, double value); | |||
| void osc_send_bridge_aouts_peak(int index, double value); | |||
| void osc_send_bridge_audio_count(int ins, int outs, int total); | |||
| void osc_send_bridge_midi_count(int ins, int outs, int total); | |||
| void osc_send_bridge_param_count(int ins, int outs, int total); | |||
| //void osc_send_bridge_program_count(); | |||
| //void osc_send_bridge_midi_program_count(); | |||
| void osc_send_bridge_plugin_info(int type, int category, int hints, const char* name, const char* label, const char* maker, const char* copyright, long unique_id); | |||
| void osc_send_bridge_param_info(int index, const char* name, const char* unit); | |||
| void osc_send_bridge_param_data(int type, int index, int rindex, int hints, int midi_channel, int midi_cc); | |||
| void osc_send_bridge_param_ranges(int index, double def, double min, double max, double step, double step_small, double step_large); | |||
| //void osc_send_bridge_program_info(); | |||
| //void osc_send_bridge_midi_program_info(); | |||
| void osc_send_bridge_update(); | |||
| // common plugin calls | |||
| void osc_send_configure(OscData* osc_data, const char* key, const char* value); | |||
| @@ -1,9 +1,12 @@ | |||
| # QtCreator project file | |||
| CONFIG = warn_on qt release | |||
| QT = core gui | |||
| CONFIG += warn_on qt debug link_pkgconfig | |||
| PKGCONFIG = jack liblo fluidsynth | |||
| TEMPLATE = app | |||
| VERSION = 0.5.0 | |||
| VERSION = 0.5.0 | |||
| SOURCES = \ | |||
| ../carla_bridge.cpp \ | |||
| @@ -12,7 +15,9 @@ SOURCES = \ | |||
| ../../carla/carla_shared.cpp \ | |||
| ../../carla/ladspa.cpp \ | |||
| ../../carla/dssi.cpp \ | |||
| ../../carla/vst.cpp | |||
| ../../carla/lv2.cpp \ | |||
| ../../carla/vst.cpp \ | |||
| ../../carla/lv2-rtmempool/rtmempool.c | |||
| HEADERS = \ | |||
| ../carla_osc.h \ | |||
| @@ -24,11 +29,14 @@ HEADERS = \ | |||
| INCLUDEPATH = .. \ | |||
| ../../carla-includes \ | |||
| ../../carla-includes/vestige \ | |||
| # ../../carla-includes/vestige \ | |||
| ../../carla-includes/vst \ | |||
| ../../carla | |||
| TARGET = carla-bridge-qtcreator | |||
| DEFINES = VESTIGE_HEADER BUILD_BRIDGE | |||
| DEFINES = BUILD_BRIDGE | |||
| LIBS = ../../carla-lilv/carla_lilv.a | |||
| LIBS += -ldl -ljack -llo | |||
| QMAKE_CXXFLAGS *= -std=c++0x | |||
| @@ -52,7 +52,7 @@ | |||
| # define P_SIZE "%lu" | |||
| #else | |||
| # define P_INTPTR "%i" | |||
| # define P_UINTPTR "%lu" | |||
| # define P_UINTPTR "%u" | |||
| # define P_SIZE "%u" | |||
| #endif | |||
| @@ -3011,18 +3011,18 @@ class CarlaMainW(QMainWindow, ui_carla.Ui_CarlaMainW): | |||
| build = plugin['build'] | |||
| ptype = plugin['type'] | |||
| if (build != BINARY_NATIVE): | |||
| if (build != BINARY_NATIVE or True): | |||
| # Store object so we can return a pointer | |||
| if (self.m_bridge_info == None): | |||
| self.m_bridge_info = PluginBridgeInfo() | |||
| self.m_bridge_info.category = plugin['category'] | |||
| self.m_bridge_info.hints = plugin['hints'] | |||
| self.m_bridge_info.name = plugin['name'].encode("utf-8") | |||
| self.m_bridge_info.maker = plugin['maker'].encode("utf-8") | |||
| self.m_bridge_info.category = plugin['category'] | |||
| self.m_bridge_info.hints = plugin['hints'] | |||
| self.m_bridge_info.name = plugin['name'].encode("utf-8") | |||
| self.m_bridge_info.maker = plugin['maker'].encode("utf-8") | |||
| self.m_bridge_info.unique_id = plugin['unique_id'] | |||
| self.m_bridge_info.ains = plugin['audio.ins'] | |||
| self.m_bridge_info.ains = plugin['audio.ins'] | |||
| self.m_bridge_info.aouts = plugin['audio.outs'] | |||
| self.m_bridge_info.mins = plugin['midi.ins'] | |||
| self.m_bridge_info.mins = plugin['midi.ins'] | |||
| self.m_bridge_info.mouts = plugin['midi.outs'] | |||
| return pointer(self.m_bridge_info) | |||
| @@ -3437,7 +3437,7 @@ if __name__ == '__main__': | |||
| if (carla_bridge_unix32): | |||
| CarlaHost.set_option(OPTION_PATH_BRIDGE_UNIX32, 0, carla_bridge_unix32) | |||
| if (carla_bridge_unix32): | |||
| if (carla_bridge_unix64): | |||
| CarlaHost.set_option(OPTION_PATH_BRIDGE_UNIX64, 0, carla_bridge_unix64) | |||
| if (carla_bridge_win32): | |||
| @@ -17,6 +17,11 @@ | |||
| #include "carla_plugin.h" | |||
| struct BridgeParamInfo { | |||
| QString name; | |||
| QString unit; | |||
| }; | |||
| class BridgePlugin : public CarlaPlugin | |||
| { | |||
| public: | |||
| @@ -35,11 +40,13 @@ public: | |||
| m_info.unique_id = 0; | |||
| m_info.ains = 0; | |||
| m_info.aouts = 0; | |||
| m_info.mins = 0; | |||
| m_info.mouts = 0; | |||
| m_thread = new CarlaPluginThread(this, CarlaPluginThread::PLUGIN_THREAD_BRIDGE); | |||
| } | |||
| virtual ~BridgePlugin() | |||
| ~BridgePlugin() | |||
| { | |||
| qDebug("BridgePlugin::~BridgePlugin()"); | |||
| @@ -74,69 +81,80 @@ public: | |||
| if (m_info.maker) | |||
| free((void*)m_info.maker); | |||
| if (m_thread->isRunning()) | |||
| m_thread->quit(); | |||
| } | |||
| virtual PluginCategory category() | |||
| PluginCategory category() | |||
| { | |||
| return m_info.category; | |||
| } | |||
| virtual long unique_id() | |||
| long unique_id() | |||
| { | |||
| return m_info.unique_id; | |||
| } | |||
| virtual uint32_t ain_count() | |||
| uint32_t ain_count() | |||
| { | |||
| return m_info.ains; | |||
| } | |||
| virtual uint32_t aout_count() | |||
| uint32_t aout_count() | |||
| { | |||
| return m_info.aouts; | |||
| } | |||
| virtual uint32_t min_count() | |||
| uint32_t min_count() | |||
| { | |||
| return m_info.mins; | |||
| } | |||
| virtual uint32_t mout_count() | |||
| uint32_t mout_count() | |||
| { | |||
| return m_info.mouts; | |||
| } | |||
| virtual void get_label(char* buf_str) | |||
| double get_parameter_value(uint32_t param_id) | |||
| { | |||
| return fix_parameter_value(param_buffers[param_id], param.ranges[param_id]); | |||
| } | |||
| void get_label(char* buf_str) | |||
| { | |||
| strncpy(buf_str, m_label, STR_MAX); | |||
| } | |||
| virtual void get_maker(char* buf_str) | |||
| void get_maker(char* buf_str) | |||
| { | |||
| strncpy(buf_str, m_info.maker, STR_MAX); | |||
| } | |||
| virtual void get_copyright(char* buf_str) | |||
| void get_copyright(char* buf_str) | |||
| { | |||
| strncpy(buf_str, m_info.maker, STR_MAX); | |||
| } | |||
| virtual void get_real_name(char* buf_str) | |||
| void get_real_name(char* buf_str) | |||
| { | |||
| strncpy(buf_str, m_info.name, STR_MAX); | |||
| } | |||
| virtual void get_gui_info(GuiInfo* info) | |||
| void get_parameter_name(uint32_t param_id, char* buf_str) | |||
| { | |||
| strncpy(buf_str, param_info[param_id].name.toUtf8().constData(), STR_MAX); | |||
| } | |||
| void get_parameter_unit(uint32_t param_id, char* buf_str) | |||
| { | |||
| // FIXME | |||
| info->type = GUI_EXTERNAL_OSC; | |||
| strncpy(buf_str, param_info[param_id].unit.toUtf8().constData(), STR_MAX); | |||
| } | |||
| void get_gui_info(GuiInfo* info) | |||
| { | |||
| info->type = GUI_NONE; | |||
| info->resizable = false; | |||
| } | |||
| virtual void show_gui(bool yesno) | |||
| void show_gui(bool yesno) | |||
| { | |||
| if (yesno) | |||
| osc_send_show(&osc.data); | |||
| @@ -144,7 +162,17 @@ public: | |||
| osc_send_hide(&osc.data); | |||
| } | |||
| virtual void reload() | |||
| void set_parameter_value(uint32_t param_id, double value, bool gui_send, bool osc_send, bool callback_send) | |||
| { | |||
| param_buffers[param_id] = fix_parameter_value(value, param.ranges[param_id]); | |||
| if (param.data[param_id].type == PARAMETER_INPUT) | |||
| osc_send_control(&osc.data, param.data[param_id].rindex, value); | |||
| CarlaPlugin::set_parameter_value(param_id, value, gui_send, osc_send, callback_send); | |||
| } | |||
| void reload() | |||
| { | |||
| // plugin checks | |||
| m_hints &= ~(PLUGIN_IS_SYNTH | PLUGIN_USES_CHUNKS | PLUGIN_CAN_DRYWET | PLUGIN_CAN_VOLUME | PLUGIN_CAN_BALANCE); | |||
| @@ -161,35 +189,184 @@ public: | |||
| m_hints |= m_info.hints; | |||
| } | |||
| bool init(const char* filename, const char* label, void* extra_stuff) | |||
| int set_osc_bridge_info(PluginBridgeInfoType intoType, lo_arg** argv) | |||
| { | |||
| if (extra_stuff == nullptr) | |||
| qDebug("set_osc_bridge_info(%i, %p)", intoType, argv); | |||
| // PluginBridgeProgramCountInfo, | |||
| // PluginBridgeMidiProgramCountInfo, | |||
| // PluginBridgePluginInfo, | |||
| // PluginBridgeParameterInfo, | |||
| // PluginBridgeProgramInfo, | |||
| // PluginBridgeMidiProgramInfo, | |||
| switch (intoType) | |||
| { | |||
| set_last_error("Invalid bridge info, cannot continue"); | |||
| return false; | |||
| case PluginBridgeAudioCountInfo: | |||
| { | |||
| m_info.ains = argv[0]->i; | |||
| m_info.aouts = argv[1]->i; | |||
| break; | |||
| } | |||
| case PluginBridgeMidiCountInfo: | |||
| { | |||
| m_info.mins = argv[0]->i; | |||
| m_info.mouts = argv[1]->i; | |||
| break; | |||
| } | |||
| case PluginBridgeParameterCountInfo: | |||
| { | |||
| // delete old data | |||
| if (param.count > 0) | |||
| { | |||
| delete[] param.data; | |||
| delete[] param.ranges; | |||
| delete[] param_buffers; | |||
| } | |||
| // create new if needed | |||
| param.count = argv[2]->i; | |||
| if (param.count > 0 && param.count < MAX_PARAMETERS) | |||
| { | |||
| param.data = new ParameterData[param.count]; | |||
| param.ranges = new ParameterRanges[param.count]; | |||
| param_buffers = new double[param.count]; | |||
| param_info = new BridgeParamInfo[param.count]; | |||
| } | |||
| else | |||
| param.count = 0; | |||
| // initialize | |||
| for (uint32_t i=0; i < param.count; i++) | |||
| { | |||
| param.data[i].type = PARAMETER_UNKNOWN; | |||
| param.data[i].index = -1; | |||
| param.data[i].rindex = -1; | |||
| param.data[i].hints = 0; | |||
| param.data[i].midi_channel = 0; | |||
| param.data[i].midi_cc = -1; | |||
| param.ranges[i].def = 0.0; | |||
| param.ranges[i].min = 0.0; | |||
| param.ranges[i].max = 1.0; | |||
| param.ranges[i].step = 0.01; | |||
| param.ranges[i].step_small = 0.0001; | |||
| param.ranges[i].step_large = 0.1; | |||
| param_buffers[i] = 0.0; | |||
| param_info[i].name = QString(); | |||
| param_info[i].unit = QString(); | |||
| } | |||
| break; | |||
| } | |||
| set_last_error("Valid bridge info"); | |||
| case PluginBridgeParameterInfo: | |||
| { | |||
| int index = argv[0]->i; | |||
| if (index >= 0 && index < (int32_t)param.count) | |||
| { | |||
| param_info[index].name = QString((const char*)&argv[1]->s); | |||
| param_info[index].unit = QString((const char*)&argv[2]->s); | |||
| } | |||
| break; | |||
| } | |||
| PluginBridgeInfo* info = (PluginBridgeInfo*)extra_stuff; | |||
| m_info.category = info->category; | |||
| m_info.hints = info->hints; | |||
| m_info.unique_id = info->unique_id; | |||
| m_info.ains = info->ains; | |||
| m_info.aouts = info->aouts; | |||
| case PluginBridgeParameterDataInfo: | |||
| { | |||
| int index = argv[1]->i; | |||
| if (index >= 0 && index < (int32_t)param.count) | |||
| { | |||
| param.data[index].type = static_cast<ParameterType>(argv[0]->i); | |||
| param.data[index].index = index; | |||
| param.data[index].rindex = argv[2]->i; | |||
| param.data[index].hints = argv[3]->i; | |||
| param.data[index].midi_channel = argv[4]->i; | |||
| param.data[index].midi_cc = argv[5]->i; | |||
| } | |||
| break; | |||
| } | |||
| m_info.name = strdup(info->name); | |||
| m_info.maker = strdup(info->maker); | |||
| case PluginBridgeParameterRangesInfo: | |||
| { | |||
| int index = argv[0]->i; | |||
| if (index >= 0 && index < (int32_t)param.count) | |||
| { | |||
| param.ranges[index].def = argv[1]->f; | |||
| param.ranges[index].min = argv[2]->f; | |||
| param.ranges[index].max = argv[3]->f; | |||
| param.ranges[index].step = argv[4]->f; | |||
| param.ranges[index].step_small = argv[5]->f; | |||
| param.ranges[index].step_large = argv[6]->f; | |||
| } | |||
| break; | |||
| } | |||
| m_label = strdup(label); | |||
| m_name = get_unique_name(info->name); | |||
| m_filename = strdup(filename); | |||
| case PluginBridgeUpdateNow: | |||
| callback_action(CALLBACK_RELOAD_ALL, m_id, 0, 0, 0.0); | |||
| break; | |||
| default: | |||
| break; | |||
| } | |||
| // FIXME - verify if path exists, if not return false | |||
| m_thread->setOscData(binarytype2str(m_binary), label, plugintype2str(m_type)); | |||
| m_thread->start(); | |||
| return 0; | |||
| } | |||
| return true; | |||
| void delete_buffers() | |||
| { | |||
| qDebug("BridgePlugin::delete_buffers() - start"); | |||
| if (param.count > 0) | |||
| { | |||
| delete[] param_buffers; | |||
| delete[] param_info; | |||
| } | |||
| param_buffers = nullptr; | |||
| param_info = nullptr; | |||
| qDebug("BridgePlugin::delete_buffers() - end"); | |||
| } | |||
| bool init(const char* filename, const char* label, PluginBridgeInfo* info) | |||
| { | |||
| if (info) | |||
| { | |||
| m_info.category = info->category; | |||
| m_info.hints = info->hints; | |||
| m_info.unique_id = info->unique_id; | |||
| m_info.ains = info->ains; | |||
| m_info.aouts = info->aouts; | |||
| m_info.mins = info->mins; | |||
| m_info.mouts = info->mouts; | |||
| m_info.name = strdup(info->name); | |||
| m_info.maker = strdup(info->maker); | |||
| m_label = strdup(label); | |||
| m_name = get_unique_name(info->name); | |||
| m_filename = strdup(filename); | |||
| const char* bridge_binary = binarytype2str(m_binary); | |||
| if (bridge_binary) | |||
| { | |||
| m_thread->setOscData(bridge_binary, label, plugintype2str(m_type)); | |||
| m_thread->start(); | |||
| return true; | |||
| } | |||
| else | |||
| set_last_error("Bridge not possible, bridge-binary not found"); | |||
| } | |||
| else | |||
| set_last_error("Invalid bridge info, cannot continue"); | |||
| return false; | |||
| } | |||
| private: | |||
| @@ -197,6 +374,9 @@ private: | |||
| const BinaryType m_binary; | |||
| PluginBridgeInfo m_info; | |||
| CarlaPluginThread* m_thread; | |||
| double* param_buffers; | |||
| BridgeParamInfo* param_info; | |||
| }; | |||
| short add_plugin_bridge(BinaryType btype, PluginType ptype, const char* filename, const char* label, void* extra_stuff) | |||
| @@ -209,7 +389,7 @@ short add_plugin_bridge(BinaryType btype, PluginType ptype, const char* filename | |||
| { | |||
| BridgePlugin* plugin = new BridgePlugin(btype, ptype); | |||
| if (plugin->init(filename, label, extra_stuff)) | |||
| if (plugin->init(filename, label, (PluginBridgeInfo*)extra_stuff)) | |||
| { | |||
| plugin->reload(); | |||
| plugin->set_id(id); | |||
| @@ -240,6 +240,7 @@ bool carla_jack_register_plugin(CarlaPlugin* plugin, jack_client_t** client) | |||
| jack_set_buffer_size_callback(*client, carla_jack_bufsize_callback, nullptr); | |||
| jack_set_sample_rate_callback(*client, carla_jack_srate_callback, nullptr); | |||
| jack_set_freewheel_callback(*client, carla_jack_freewheel_callback, nullptr); | |||
| jack_set_process_callback(*client, carla_jack_process_callback, nullptr); | |||
| jack_on_shutdown(*client, carla_jack_shutdown_callback, nullptr); | |||
| #else | |||
| @@ -322,7 +322,7 @@ int osc_handle_configure(CarlaPlugin* plugin, lo_arg** argv) | |||
| int osc_handle_control(CarlaPlugin* plugin, lo_arg** argv) | |||
| { | |||
| qDebug("osc_handle_control()"); | |||
| //qDebug("osc_handle_control()"); | |||
| int32_t rindex = argv[0]->i; | |||
| double value = argv[1]->f; | |||
| @@ -20,10 +20,13 @@ | |||
| #include "carla_jack.h" | |||
| #include "carla_midi.h" | |||
| #include "carla_osc.h" | |||
| #include "carla_shared.h" | |||
| #ifndef BUILD_BRIDGE | |||
| #ifdef BUILD_BRIDGE | |||
| #include <QtCore/QThread> | |||
| #include "../carla-bridge/carla_osc.h" | |||
| #else | |||
| #include "carla_osc.h" | |||
| #include "carla_threads.h" | |||
| #endif | |||
| @@ -467,9 +470,10 @@ public: | |||
| void set_active(bool active, bool osc_send, bool callback_send) | |||
| { | |||
| m_active = active; | |||
| double value = active ? 1.0 : 0.0; | |||
| #ifndef BUILD_BRIDGE | |||
| double value = active ? 1.0 : 0.0; | |||
| if (osc_send) | |||
| { | |||
| osc_global_send_set_parameter_value(m_id, PARAMETER_ACTIVE, value); | |||
| @@ -593,7 +597,7 @@ public: | |||
| virtual void set_parameter_value(uint32_t param_id, double value, bool /*gui_send*/, bool osc_send, bool callback_send) | |||
| { | |||
| #ifndef BUILD_BRIDGE | |||
| if (osc_send) | |||
| if (osc_send && param.data[param_id].type == PARAMETER_INPUT) | |||
| { | |||
| osc_global_send_set_parameter_value(m_id, param_id, value); | |||
| @@ -613,6 +617,20 @@ public: | |||
| void set_parameter_value_rindex(int32_t rindex, double value, bool gui_send, bool osc_send, bool callback_send) | |||
| { | |||
| if (m_hints & PLUGIN_IS_BRIDGE) | |||
| { | |||
| if (rindex == PARAMETER_ACTIVE) | |||
| return set_active(value > 0.0, osc_send, callback_send); | |||
| else if (rindex == PARAMETER_DRYWET) | |||
| return set_drywet(value, osc_send, callback_send); | |||
| else if (rindex == PARAMETER_VOLUME) | |||
| return set_volume(value, osc_send, callback_send); | |||
| else if (rindex == PARAMETER_BALANCE_LEFT) | |||
| return set_balance_left(value, osc_send, callback_send); | |||
| else if (rindex == PARAMETER_BALANCE_LEFT) | |||
| return set_balance_right(value, osc_send, callback_send); | |||
| } | |||
| for (uint32_t i=0; i < param.count; i++) | |||
| { | |||
| if (param.data[i].rindex == rindex) | |||
| @@ -764,6 +782,15 @@ public: | |||
| } | |||
| } | |||
| void set_midi_program_full(uint32_t bank_id, uint32_t program_id, bool gui_send, bool osc_send, bool callback_send, bool block) | |||
| { | |||
| for (uint32_t i=0; i < midiprog.count; i++) | |||
| { | |||
| if (midiprog.data[i].bank == bank_id && midiprog.data[i].program == program_id) | |||
| return set_midi_program(i, gui_send, osc_send, callback_send, block); | |||
| } | |||
| } | |||
| virtual void set_gui_data(int /*data*/, void* /*ptr*/) | |||
| { | |||
| } | |||
| @@ -921,9 +948,38 @@ public: | |||
| return 1; | |||
| } | |||
| #ifndef BUILD_BRIDGE | |||
| void osc_global_register_new() | |||
| { | |||
| #ifdef BUILD_BRIDGE | |||
| // Base data | |||
| //const PluginInfo* info = get_plugin_info(m_id); | |||
| //osc_send_bridge_plugin_info(m_type, category(), m_hints, get_real_plugin_name(m_id), info->label, info->maker, info->copyright, unique_id()); | |||
| osc_send_bridge_audio_count(ain_count(), aout_count(), ain_count() + aout_count()); | |||
| osc_send_bridge_midi_count(min_count(), mout_count(), min_count() + mout_count()); | |||
| PortCountInfo param_info = { false, 0, 0, 0 }; | |||
| get_parameter_count_info(¶m_info); | |||
| osc_send_bridge_param_count(param_info.ins, param_info.outs, param_info.total); | |||
| // Parameters | |||
| uint32_t i; | |||
| char buf_name[STR_MAX], buf_unit[STR_MAX]; | |||
| if (param.count > 0 && param.count < MAX_PARAMETERS) | |||
| { | |||
| for (i=0; i < param.count; i++) | |||
| { | |||
| get_parameter_name(i, buf_name); | |||
| get_parameter_unit(i, buf_unit); | |||
| osc_send_bridge_param_info(i, buf_name, buf_unit); | |||
| osc_send_bridge_param_data(param.data[i].type, i, param.data[i].rindex, param.data[i].hints, param.data[i].midi_channel, param.data[i].midi_cc); | |||
| osc_send_bridge_param_ranges(i, param.ranges[i].def, param.ranges[i].min, param.ranges[i].max, param.ranges[i].step, param.ranges[i].step_small, param.ranges[i].step_large); | |||
| set_parameter_value(i, param.ranges[i].def, false, false, false); | |||
| } | |||
| } | |||
| #else | |||
| if (osc_global_registered()) | |||
| { | |||
| // Base data | |||
| @@ -972,8 +1028,10 @@ public: | |||
| osc_global_send_set_midi_program(m_id, midiprog.current); | |||
| } | |||
| #endif | |||
| } | |||
| #ifndef BUILD_BRIDGE | |||
| void update_osc_data(lo_address source, const char* url) | |||
| { | |||
| const char* host; | |||
| @@ -138,7 +138,7 @@ const char* get_unique_name(const char* name) | |||
| qname = "(No name)"; | |||
| qname.truncate(max_client_name_size); | |||
| //qname.replace(":", "."); // ":" is used in JACK to split client/port names | |||
| qname.replace(":", "."); // ":" is used in JACK to split client/port names | |||
| for (unsigned short i=0; i<MAX_PLUGINS; i++) | |||
| { | |||
| @@ -158,7 +158,7 @@ void CarlaCheckThread::run() | |||
| // Update ports | |||
| // Check if it needs update | |||
| bool update_ports_gui = (osc_data->target != nullptr); | |||
| bool update_ports_gui = (osc_data->target != nullptr && (plugin->hints() != PLUGIN_IS_BRIDGE) == 0); | |||
| if (osc_global_registered() == false && update_ports_gui == false) | |||
| continue; | |||
| @@ -1252,7 +1252,7 @@ public: | |||
| m_hints |= PLUGIN_HAS_GUI; | |||
| } | |||
| #else | |||
| Q_UNUSED(extra_stuff); | |||
| Q_UNUSED(gui_filename); | |||
| #endif | |||
| return true; | |||
| } | |||
| @@ -1301,9 +1301,7 @@ short add_plugin_dssi(const char* filename, const char* label, const void* extra | |||
| unique_names[id] = plugin->name(); | |||
| CarlaPlugins[id] = plugin; | |||
| #ifndef BUILD_BRIDGE | |||
| plugin->osc_global_register_new(); | |||
| #endif | |||
| } | |||
| else | |||
| { | |||
| @@ -927,7 +927,7 @@ public: | |||
| m_active_before = m_active; | |||
| } | |||
| virtual void delete_buffers() | |||
| void delete_buffers() | |||
| { | |||
| qDebug("LadspaPlugin::delete_buffers() - start"); | |||
| @@ -1018,9 +1018,7 @@ short add_plugin_ladspa(const char* filename, const char* label, const void* ext | |||
| unique_names[id] = plugin->name(); | |||
| CarlaPlugins[id] = plugin; | |||
| #ifndef BUILD_BRIDGE | |||
| plugin->osc_global_register_new(); | |||
| #endif | |||
| } | |||
| else | |||
| { | |||
| @@ -134,30 +134,19 @@ const char* lv2bridge2str(LV2_Property type) | |||
| { | |||
| switch (type) | |||
| { | |||
| #ifndef BUILD_BRIDGE | |||
| case LV2_UI_GTK2: | |||
| return carla_options.bridge_lv2gtk2; | |||
| case LV2_UI_QT4: | |||
| return carla_options.bridge_lv2qt4; | |||
| case LV2_UI_X11: | |||
| return carla_options.bridge_lv2x11; | |||
| #endif | |||
| default: | |||
| return nullptr; | |||
| } | |||
| } | |||
| #if 1 | |||
| short add_plugin_lv2(const char* filename, const char* label); | |||
| int main() | |||
| { | |||
| short id = add_plugin_lv2("/usr/lib/lv2/Bitcrusher.lv2", "urn:distrho:Bitcrusher"); | |||
| set_active(id, true); | |||
| remove_plugin(id); | |||
| //carla_log_printf(nullptr, CARLA_URI_MAP_ID_LOG_ERROR, "%s aaa %i", "ola", 90); | |||
| return 0; | |||
| } | |||
| #endif | |||
| class Lv2Plugin : public CarlaPlugin | |||
| { | |||
| public: | |||
| @@ -219,6 +208,7 @@ public: | |||
| case GUI_INTERNAL_X11: | |||
| break; | |||
| #ifndef BUILD_BRIDGE | |||
| case GUI_EXTERNAL_OSC: | |||
| if (osc.data.target) | |||
| { | |||
| @@ -247,6 +237,7 @@ public: | |||
| osc_clear_data(&osc.data); | |||
| break; | |||
| #endif | |||
| case GUI_EXTERNAL_LV2: | |||
| if (gui.visible && ui.widget) | |||
| @@ -595,9 +586,11 @@ public: | |||
| } | |||
| break; | |||
| #ifndef BUILD_BRIDGE | |||
| case GUI_EXTERNAL_OSC: | |||
| osc_send_control(&osc.data, param.data[param_id].rindex, value); | |||
| break; | |||
| #endif | |||
| default: | |||
| break; | |||
| @@ -717,6 +710,7 @@ public: | |||
| break; | |||
| #ifndef BUILD_BRIDGE | |||
| case GUI_EXTERNAL_OSC: | |||
| if (yesno) | |||
| { | |||
| @@ -729,6 +723,7 @@ public: | |||
| osc_clear_data(&osc.data); | |||
| } | |||
| break; | |||
| #endif | |||
| case GUI_EXTERNAL_LV2: | |||
| if (ui.handle == nullptr) | |||
| @@ -2426,22 +2421,28 @@ public: | |||
| switch (rdf_descriptor->UIs[i].Type) | |||
| { | |||
| case LV2_UI_QT4: | |||
| #ifndef BUILD_BRIDGE | |||
| if (is_ui_bridgeable(i)) | |||
| eQt4 = i; | |||
| else | |||
| #endif | |||
| iQt4 = i; | |||
| break; | |||
| case LV2_UI_X11: | |||
| #ifndef BUILD_BRIDGE | |||
| if (is_ui_bridgeable(i)) | |||
| eX11 = i; | |||
| else | |||
| #endif | |||
| iX11 = i; | |||
| break; | |||
| #ifndef BUILD_BRIDGE | |||
| case LV2_UI_GTK2: | |||
| eGtk2 = i; | |||
| break; | |||
| #endif | |||
| case LV2_UI_EXTERNAL: | |||
| case LV2_UI_OLD_EXTERNAL: | |||
| @@ -2466,7 +2467,9 @@ public: | |||
| else if (iExt >= 0) | |||
| iFinal = iExt; | |||
| #ifndef BUILD_BRIDGE | |||
| bool is_bridged = (iFinal == eQt4 || iFinal == eX11 || iFinal == eGtk2); | |||
| #endif | |||
| // Use proper UI now | |||
| if (iFinal >= 0) | |||
| @@ -2507,6 +2510,7 @@ public: | |||
| QString gui_title = QString("%1 (GUI)").arg(m_name); | |||
| LV2_Property UiType = ui.rdf_descriptor->Type; | |||
| #ifndef BUILD_BRIDGE | |||
| if (is_bridged) | |||
| { | |||
| const char* osc_binary = lv2bridge2str(UiType); | |||
| @@ -2519,6 +2523,7 @@ public: | |||
| } | |||
| } | |||
| else | |||
| #endif | |||
| { | |||
| // Initialize UI features | |||
| LV2_Extension_Data_Feature* UI_Data_Feature = new LV2_Extension_Data_Feature; | |||
| @@ -3237,9 +3242,7 @@ short add_plugin_lv2(const char* filename, const char* label) | |||
| unique_names[id] = plugin->name(); | |||
| CarlaPlugins[id] = plugin; | |||
| #ifndef BUILD_BRIDGE | |||
| plugin->osc_global_register_new(); | |||
| #endif | |||
| } | |||
| else | |||
| { | |||
| @@ -1804,9 +1804,7 @@ short add_plugin_vst(const char* filename, const char* label) | |||
| unique_names[id] = plugin->name(); | |||
| CarlaPlugins[id] = plugin; | |||
| #ifndef BUILD_BRIDGE | |||
| plugin->osc_global_register_new(); | |||
| #endif | |||
| } | |||
| else | |||
| { | |||
| @@ -65,29 +65,29 @@ if WINDOWS: | |||
| print("COMMONPROGRAMFILES variable not set, cannot continue") | |||
| sys.exit(1) | |||
| DEFAULT_LADSPA_PATH = ( | |||
| DEFAULT_LADSPA_PATH = [ | |||
| os.path.join(APPDATA, "LADSPA"), | |||
| os.path.join(PROGRAMFILES, "LADSPA") | |||
| ) | |||
| ] | |||
| DEFAULT_DSSI_PATH = ( | |||
| DEFAULT_DSSI_PATH = [ | |||
| os.path.join(APPDATA, "DSSI"), | |||
| os.path.join(PROGRAMFILES, "DSSI") | |||
| ) | |||
| ] | |||
| DEFAULT_LV2_PATH = ( | |||
| DEFAULT_LV2_PATH = [ | |||
| os.path.join(APPDATA, "LV2"), | |||
| os.path.join(COMMONPROGRAMFILES, "LV2") | |||
| ) | |||
| ] | |||
| DEFAULT_VST_PATH = ( | |||
| DEFAULT_VST_PATH = [ | |||
| os.path.join(PROGRAMFILES, "VstPlugins"), | |||
| os.path.join(PROGRAMFILES, "Steinberg", "VstPlugins") | |||
| ) | |||
| ] | |||
| DEFAULT_SF2_PATH = ( | |||
| DEFAULT_SF2_PATH = [ | |||
| os.path.join(APPDATA, "SF2"), | |||
| ) | |||
| ] | |||
| #if (is64bit): | |||
| # TODO | |||
| @@ -95,61 +95,61 @@ if WINDOWS: | |||
| elif MACOS: | |||
| splitter = ":" | |||
| DEFAULT_LADSPA_PATH = ( | |||
| DEFAULT_LADSPA_PATH = [ | |||
| os.path.join(HOME, "Library", "Audio", "Plug-Ins", "LADSPA"), | |||
| os.path.join("/", "Library", "Audio", "Plug-Ins", "LADSPA") | |||
| ) | |||
| ] | |||
| DEFAULT_DSSI_PATH = ( | |||
| DEFAULT_DSSI_PATH = [ | |||
| os.path.join(HOME, "Library", "Audio", "Plug-Ins", "DSSI"), | |||
| os.path.join("/", "Library", "Audio", "Plug-Ins", "DSSI") | |||
| ) | |||
| ] | |||
| DEFAULT_LV2_PATH = ( | |||
| DEFAULT_LV2_PATH = [ | |||
| os.path.join(HOME, "Library", "Audio", "Plug-Ins", "LV2"), | |||
| os.path.join("/", "Library", "Audio", "Plug-Ins", "LV2") | |||
| ) | |||
| ] | |||
| DEFAULT_VST_PATH = ( | |||
| DEFAULT_VST_PATH = [ | |||
| os.path.join(HOME, "Library", "Audio", "Plug-Ins", "VST"), | |||
| os.path.join("/", "Library", "Audio", "Plug-Ins", "VST") | |||
| ) | |||
| ] | |||
| DEFAULT_SF2_PATH = ( | |||
| DEFAULT_SF2_PATH = [ | |||
| # TODO | |||
| ) | |||
| ] | |||
| else: | |||
| splitter = ":" | |||
| DEFAULT_LADSPA_PATH = ( | |||
| DEFAULT_LADSPA_PATH = [ | |||
| os.path.join(HOME, ".ladspa"), | |||
| os.path.join("/", "usr", "lib", "ladspa"), | |||
| os.path.join("/", "usr", "local", "lib", "ladspa") | |||
| ) | |||
| ] | |||
| DEFAULT_DSSI_PATH = ( | |||
| DEFAULT_DSSI_PATH = [ | |||
| os.path.join(HOME, ".dssi"), | |||
| os.path.join("/", "usr", "lib", "dssi"), | |||
| os.path.join("/", "usr", "local", "lib", "dssi") | |||
| ) | |||
| ] | |||
| DEFAULT_LV2_PATH = ( | |||
| DEFAULT_LV2_PATH = [ | |||
| os.path.join(HOME, ".lv2"), | |||
| os.path.join("/", "usr", "lib", "lv2"), | |||
| os.path.join("/", "usr", "local", "lib", "lv2") | |||
| ) | |||
| ] | |||
| DEFAULT_VST_PATH = ( | |||
| DEFAULT_VST_PATH = [ | |||
| os.path.join(HOME, ".vst"), | |||
| os.path.join("/", "usr", "lib", "vst"), | |||
| os.path.join("/", "usr", "local", "lib", "vst") | |||
| ) | |||
| ] | |||
| DEFAULT_SF2_PATH = ( | |||
| DEFAULT_SF2_PATH = [ | |||
| os.path.join(HOME, ".sounds"), | |||
| os.path.join("/", "usr", "share", "sounds", "sf2") | |||
| ) | |||
| ] | |||
| # ------------------------------------------------------------------------------------------------ | |||
| # Search for Carla library and tools | |||
| @@ -384,14 +384,14 @@ class SettingsW(QDialog, ui_settings_app.Ui_SettingsW): | |||
| @pyqtSlot() | |||
| def slot_resetSettings(self): | |||
| if self.lw_page.currentIndex() == TAB_INDEX_MAIN: | |||
| if self.lw_page.currentRow() == TAB_INDEX_MAIN: | |||
| self.le_main_def_folder.setText(SETTINGS_DEFAULT_PROJECT_FOLDER) | |||
| self.cb_tray_enable.setChecked(self.ms_UseSystemTray) | |||
| self.cb_tray_close_to.setChecked(self.ms_CloseToTray) | |||
| self.sb_gui_refresh.setValue(self.ms_RefreshInterval) | |||
| self.cb_jack_port_alias.setCurrentIndex(2) | |||
| elif self.lw_page.currentIndex() == TAB_INDEX_CANVAS: | |||
| elif self.lw_page.currentRow() == TAB_INDEX_CANVAS: | |||
| self.cb_canvas_theme.setCurrentIndex(0) | |||
| self.cb_canvas_hide_groups.setChecked(self.ms_AutoHideGroups) | |||
| self.cb_canvas_bezier_lines.setChecked(True) | |||
| @@ -401,18 +401,18 @@ class SettingsW(QDialog, ui_settings_app.Ui_SettingsW): | |||
| self.cb_canvas_render_text_aa.setChecked(True) | |||
| self.cb_canvas_render_hq_aa.setChecked(False) | |||
| elif self.lw_page.currentIndex() == TAB_INDEX_LADISH: | |||
| elif self.lw_page.currentRow() == TAB_INDEX_LADISH: | |||
| self.cb_ladish_notify.setChecked(LADISH_CONF_KEY_DAEMON_NOTIFY_DEFAULT) | |||
| self.cb_ladish_studio_autostart.setChecked(LADISH_CONF_KEY_DAEMON_STUDIO_AUTOSTART_DEFAULT) | |||
| self.le_ladish_shell.setText(LADISH_CONF_KEY_DAEMON_SHELL_DEFAULT) | |||
| self.le_ladish_terminal.setText(LADISH_CONF_KEY_DAEMON_TERMINAL_DEFAULT) | |||
| elif self.lw_page.currentIndex() == TAB_INDEX_CARLA_ENGINE: | |||
| elif self.lw_page.currentRow() == TAB_INDEX_CARLA_ENGINE: | |||
| self.ch_engine_global_client.setChecked(False) | |||
| self.ch_engine_dssi_chunks.setChecked(False) | |||
| self.ch_engine_prefer_bridges.setChecked(True) | |||
| elif self.lw_page.currentIndex() == TAB_INDEX_CARLA_PATHS: | |||
| elif self.lw_page.currentRow() == TAB_INDEX_CARLA_PATHS: | |||
| ladspas, dssis, lv2s, vsts, sf2s = SETTINGS_DEFAULT_PLUGINS_PATHS | |||
| if self.tw_paths.currentIndex() == 0: | |||
| @@ -284,7 +284,7 @@ | |||
| <item row="4" column="1"> | |||
| <widget class="QLabel" name="label_rdflib"> | |||
| <property name="text"> | |||
| <string>python-rdflib (LADSPA RDF and LV2 support)</string> | |||
| <string>python-rdflib (LADSPA-RDF support)</string> | |||
| </property> | |||
| </widget> | |||
| </item> | |||