Signed-off-by: falkTX <falktx@falktx.com>tags/v2.1-alpha2
| @@ -1155,13 +1155,13 @@ | |||||
| </layout> | </layout> | ||||
| </item> | </item> | ||||
| <item> | <item> | ||||
| <widget class="QGroupBox" name="groupBox_4"> | |||||
| <widget class="QGroupBox" name="group_osc_core"> | |||||
| <property name="title"> | <property name="title"> | ||||
| <string>Core</string> | <string>Core</string> | ||||
| </property> | </property> | ||||
| <layout class="QGridLayout" name="gridLayout_13"> | <layout class="QGridLayout" name="gridLayout_13"> | ||||
| <item row="0" column="1"> | <item row="0" column="1"> | ||||
| <widget class="QCheckBox" name="checkBox"> | |||||
| <widget class="QCheckBox" name="ch_osc_enable"> | |||||
| <property name="text"> | <property name="text"> | ||||
| <string>Enable OSC</string> | <string>Enable OSC</string> | ||||
| </property> | </property> | ||||
| @@ -1197,7 +1197,7 @@ | |||||
| </widget> | </widget> | ||||
| </item> | </item> | ||||
| <item> | <item> | ||||
| <widget class="QGroupBox" name="groupBox_2"> | |||||
| <widget class="QGroupBox" name="group_osc_tcp_port"> | |||||
| <property name="title"> | <property name="title"> | ||||
| <string>Enable TCP port</string> | <string>Enable TCP port</string> | ||||
| </property> | </property> | ||||
| @@ -1205,59 +1205,13 @@ | |||||
| <bool>true</bool> | <bool>true</bool> | ||||
| </property> | </property> | ||||
| <layout class="QGridLayout" name="gridLayout_12"> | <layout class="QGridLayout" name="gridLayout_12"> | ||||
| <item row="0" column="0" rowspan="2"> | |||||
| <spacer name="horizontalSpacer_41"> | |||||
| <property name="orientation"> | |||||
| <enum>Qt::Horizontal</enum> | |||||
| </property> | |||||
| <property name="sizeHint" stdset="0"> | |||||
| <size> | |||||
| <width>40</width> | |||||
| <height>20</height> | |||||
| </size> | |||||
| </property> | |||||
| </spacer> | |||||
| </item> | |||||
| <item row="0" column="1" colspan="2"> | |||||
| <widget class="QRadioButton" name="radioButton"> | |||||
| <property name="text"> | |||||
| <string>Use randomly assigned port:</string> | |||||
| </property> | |||||
| </widget> | |||||
| </item> | |||||
| <item row="0" column="3" rowspan="2"> | |||||
| <spacer name="horizontalSpacer_42"> | |||||
| <property name="orientation"> | |||||
| <enum>Qt::Horizontal</enum> | |||||
| </property> | |||||
| <property name="sizeHint" stdset="0"> | |||||
| <size> | |||||
| <width>40</width> | |||||
| <height>20</height> | |||||
| </size> | |||||
| </property> | |||||
| </spacer> | |||||
| </item> | |||||
| <item row="1" column="1"> | <item row="1" column="1"> | ||||
| <widget class="QRadioButton" name="radioButton_2"> | |||||
| <widget class="QRadioButton" name="rb_osc_tcp_port_specific"> | |||||
| <property name="text"> | <property name="text"> | ||||
| <string>Use specific port:</string> | <string>Use specific port:</string> | ||||
| </property> | </property> | ||||
| </widget> | </widget> | ||||
| </item> | </item> | ||||
| <item row="1" column="2"> | |||||
| <widget class="QSpinBox" name="sb_engine_max_params_3"> | |||||
| <property name="toolTip"> | |||||
| <string>Maximum number of parameters to allow in the built-in 'Edit' dialog</string> | |||||
| </property> | |||||
| <property name="minimum"> | |||||
| <number>1024</number> | |||||
| </property> | |||||
| <property name="maximum"> | |||||
| <number>32767</number> | |||||
| </property> | |||||
| </widget> | |||||
| </item> | |||||
| <item row="2" column="0" colspan="4"> | <item row="2" column="0" colspan="4"> | ||||
| <layout class="QHBoxLayout" name="horizontalLayout_24"> | <layout class="QHBoxLayout" name="horizontalLayout_24"> | ||||
| <item> | <item> | ||||
| @@ -1295,7 +1249,7 @@ | |||||
| <item> | <item> | ||||
| <widget class="QLabel" name="label_40"> | <widget class="QLabel" name="label_40"> | ||||
| <property name="text"> | <property name="text"> | ||||
| <string>Can also use CARLA_OSC_TCP_PORT env var</string> | |||||
| <string>Overridden by CARLA_OSC_TCP_PORT env var</string> | |||||
| </property> | </property> | ||||
| <property name="textInteractionFlags"> | <property name="textInteractionFlags"> | ||||
| <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set> | <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set> | ||||
| @@ -1317,11 +1271,63 @@ | |||||
| </item> | </item> | ||||
| </layout> | </layout> | ||||
| </item> | </item> | ||||
| <item row="0" column="0" rowspan="2"> | |||||
| <spacer name="horizontalSpacer_41"> | |||||
| <property name="orientation"> | |||||
| <enum>Qt::Horizontal</enum> | |||||
| </property> | |||||
| <property name="sizeHint" stdset="0"> | |||||
| <size> | |||||
| <width>40</width> | |||||
| <height>20</height> | |||||
| </size> | |||||
| </property> | |||||
| </spacer> | |||||
| </item> | |||||
| <item row="0" column="3" rowspan="2"> | |||||
| <spacer name="horizontalSpacer_42"> | |||||
| <property name="orientation"> | |||||
| <enum>Qt::Horizontal</enum> | |||||
| </property> | |||||
| <property name="sizeHint" stdset="0"> | |||||
| <size> | |||||
| <width>40</width> | |||||
| <height>20</height> | |||||
| </size> | |||||
| </property> | |||||
| </spacer> | |||||
| </item> | |||||
| <item row="1" column="2"> | |||||
| <widget class="QSpinBox" name="sb_osc_tcp_port_number"> | |||||
| <property name="enabled"> | |||||
| <bool>false</bool> | |||||
| </property> | |||||
| <property name="toolTip"> | |||||
| <string>Maximum number of parameters to allow in the built-in 'Edit' dialog</string> | |||||
| </property> | |||||
| <property name="minimum"> | |||||
| <number>1024</number> | |||||
| </property> | |||||
| <property name="maximum"> | |||||
| <number>32767</number> | |||||
| </property> | |||||
| </widget> | |||||
| </item> | |||||
| <item row="0" column="1" colspan="2"> | |||||
| <widget class="QRadioButton" name="rb_osc_tcp_port_random"> | |||||
| <property name="text"> | |||||
| <string>Use randomly assigned port</string> | |||||
| </property> | |||||
| <property name="checked"> | |||||
| <bool>true</bool> | |||||
| </property> | |||||
| </widget> | |||||
| </item> | |||||
| </layout> | </layout> | ||||
| </widget> | </widget> | ||||
| </item> | </item> | ||||
| <item> | <item> | ||||
| <widget class="QGroupBox" name="groupBox_3"> | |||||
| <widget class="QGroupBox" name="group_osc_udp_port"> | |||||
| <property name="title"> | <property name="title"> | ||||
| <string>Enable UDP port</string> | <string>Enable UDP port</string> | ||||
| </property> | </property> | ||||
| @@ -1330,7 +1336,7 @@ | |||||
| </property> | </property> | ||||
| <layout class="QGridLayout" name="gridLayout_11"> | <layout class="QGridLayout" name="gridLayout_11"> | ||||
| <item row="1" column="1"> | <item row="1" column="1"> | ||||
| <widget class="QRadioButton" name="radioButton_4"> | |||||
| <widget class="QRadioButton" name="rb_osc_udp_port_specific"> | |||||
| <property name="text"> | <property name="text"> | ||||
| <string>Use specific port:</string> | <string>Use specific port:</string> | ||||
| </property> | </property> | ||||
| @@ -1363,7 +1369,10 @@ | |||||
| </spacer> | </spacer> | ||||
| </item> | </item> | ||||
| <item row="1" column="2"> | <item row="1" column="2"> | ||||
| <widget class="QSpinBox" name="sb_engine_max_params_4"> | |||||
| <widget class="QSpinBox" name="sb_osc_udp_port_number"> | |||||
| <property name="enabled"> | |||||
| <bool>false</bool> | |||||
| </property> | |||||
| <property name="toolTip"> | <property name="toolTip"> | ||||
| <string>Maximum number of parameters to allow in the built-in 'Edit' dialog</string> | <string>Maximum number of parameters to allow in the built-in 'Edit' dialog</string> | ||||
| </property> | </property> | ||||
| @@ -1376,10 +1385,13 @@ | |||||
| </widget> | </widget> | ||||
| </item> | </item> | ||||
| <item row="0" column="1" colspan="2"> | <item row="0" column="1" colspan="2"> | ||||
| <widget class="QRadioButton" name="radioButton_3"> | |||||
| <widget class="QRadioButton" name="rb_osc_udp_port_random"> | |||||
| <property name="text"> | <property name="text"> | ||||
| <string>Use randomly assigned port</string> | <string>Use randomly assigned port</string> | ||||
| </property> | </property> | ||||
| <property name="checked"> | |||||
| <bool>true</bool> | |||||
| </property> | |||||
| </widget> | </widget> | ||||
| </item> | </item> | ||||
| <item row="2" column="0" colspan="4"> | <item row="2" column="0" colspan="4"> | ||||
| @@ -1419,7 +1431,7 @@ | |||||
| <item> | <item> | ||||
| <widget class="QLabel" name="label_42"> | <widget class="QLabel" name="label_42"> | ||||
| <property name="text"> | <property name="text"> | ||||
| <string>Can also use CARLA_OSC_UDP_PORT env var</string> | |||||
| <string>Overridden by CARLA_OSC_UDP_PORT env var</string> | |||||
| </property> | </property> | ||||
| <property name="textInteractionFlags"> | <property name="textInteractionFlags"> | ||||
| <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set> | <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set> | ||||
| @@ -1584,15 +1596,10 @@ | |||||
| </item> | </item> | ||||
| </layout> | </layout> | ||||
| <zorder>verticalSpacer_10</zorder> | <zorder>verticalSpacer_10</zorder> | ||||
| <zorder>layoutWidget</zorder> | |||||
| <zorder>label_36</zorder> | <zorder>label_36</zorder> | ||||
| <zorder>layoutWidget_2</zorder> | |||||
| <zorder>groupBox_2</zorder> | |||||
| <zorder>label_35</zorder> | |||||
| <zorder>label_35</zorder> | |||||
| <zorder>groupBox_3</zorder> | |||||
| <zorder>groupBox_4</zorder> | |||||
| <zorder>layoutWidget_3</zorder> | |||||
| <zorder>group_osc_tcp_port</zorder> | |||||
| <zorder>group_osc_udp_port</zorder> | |||||
| <zorder>group_osc_core</zorder> | |||||
| </widget> | </widget> | ||||
| <widget class="QWidget" name="page_paths"> | <widget class="QWidget" name="page_paths"> | ||||
| <layout class="QVBoxLayout" name="verticalLayout_19"> | <layout class="QVBoxLayout" name="verticalLayout_19"> | ||||
| @@ -2615,5 +2622,37 @@ This mode is not available for VST plugins.</string> | |||||
| </hint> | </hint> | ||||
| </hints> | </hints> | ||||
| </connection> | </connection> | ||||
| <connection> | |||||
| <sender>rb_osc_tcp_port_specific</sender> | |||||
| <signal>toggled(bool)</signal> | |||||
| <receiver>sb_osc_tcp_port_number</receiver> | |||||
| <slot>setEnabled(bool)</slot> | |||||
| <hints> | |||||
| <hint type="sourcelabel"> | |||||
| <x>368</x> | |||||
| <y>174</y> | |||||
| </hint> | |||||
| <hint type="destinationlabel"> | |||||
| <x>467</x> | |||||
| <y>174</y> | |||||
| </hint> | |||||
| </hints> | |||||
| </connection> | |||||
| <connection> | |||||
| <sender>rb_osc_udp_port_specific</sender> | |||||
| <signal>toggled(bool)</signal> | |||||
| <receiver>sb_osc_udp_port_number</receiver> | |||||
| <slot>setEnabled(bool)</slot> | |||||
| <hints> | |||||
| <hint type="sourcelabel"> | |||||
| <x>368</x> | |||||
| <y>282</y> | |||||
| </hint> | |||||
| <hint type="destinationlabel"> | |||||
| <x>467</x> | |||||
| <y>282</y> | |||||
| </hint> | |||||
| </hints> | |||||
| </connection> | |||||
| </connections> | </connections> | ||||
| </ui> | </ui> | ||||
| @@ -1139,12 +1139,13 @@ typedef enum { | |||||
| /*! | /*! | ||||
| * Wherever to enable OSC support in the engine. | * Wherever to enable OSC support in the engine. | ||||
| */ | */ | ||||
| ENGINE_OPTION_OSC_ENABLE = 13, | |||||
| ENGINE_OPTION_OSC_ENABLED = 13, | |||||
| /*! | /*! | ||||
| * The network TCP port to use for OSC. | * The network TCP port to use for OSC. | ||||
| * A value of 0 means use a random port. | * A value of 0 means use a random port. | ||||
| * A value of < 0 means to not enable the TCP port for OSC. | * A value of < 0 means to not enable the TCP port for OSC. | ||||
| * @note Valid ports begin at 1024 | |||||
| */ | */ | ||||
| ENGINE_OPTION_OSC_PORT_TCP = 14, | ENGINE_OPTION_OSC_PORT_TCP = 14, | ||||
| @@ -1153,6 +1154,7 @@ typedef enum { | |||||
| * A value of 0 means use a random port. | * A value of 0 means use a random port. | ||||
| * A value of < 0 means to not enable the UDP port for OSC. | * A value of < 0 means to not enable the UDP port for OSC. | ||||
| * @note Disabling this option prevents DSSI UIs from working! | * @note Disabling this option prevents DSSI UIs from working! | ||||
| * @note Valid ports begin at 1024 | |||||
| */ | */ | ||||
| ENGINE_OPTION_OSC_PORT_UDP = 15, | ENGINE_OPTION_OSC_PORT_UDP = 15, | ||||
| @@ -352,7 +352,7 @@ static void carla_engine_init_common(CarlaEngine* const engine) | |||||
| if (gStandalone.engineOptions.audioDevice != nullptr) | if (gStandalone.engineOptions.audioDevice != nullptr) | ||||
| engine->setOption(CB::ENGINE_OPTION_AUDIO_DEVICE, 0, gStandalone.engineOptions.audioDevice); | engine->setOption(CB::ENGINE_OPTION_AUDIO_DEVICE, 0, gStandalone.engineOptions.audioDevice); | ||||
| engine->setOption(CB::ENGINE_OPTION_OSC_ENABLE, gStandalone.engineOptions.oscEnabled, nullptr); | |||||
| engine->setOption(CB::ENGINE_OPTION_OSC_ENABLED, gStandalone.engineOptions.oscEnabled, nullptr); | |||||
| engine->setOption(CB::ENGINE_OPTION_OSC_PORT_TCP, gStandalone.engineOptions.oscPortTCP, nullptr); | engine->setOption(CB::ENGINE_OPTION_OSC_PORT_TCP, gStandalone.engineOptions.oscPortTCP, nullptr); | ||||
| engine->setOption(CB::ENGINE_OPTION_OSC_PORT_UDP, gStandalone.engineOptions.oscPortUDP, nullptr); | engine->setOption(CB::ENGINE_OPTION_OSC_PORT_UDP, gStandalone.engineOptions.oscPortUDP, nullptr); | ||||
| @@ -704,7 +704,7 @@ void carla_set_engine_option(EngineOption option, int value, const char* valueSt | |||||
| gStandalone.engineOptions.audioDevice = carla_strdup_safe(valueStr); | gStandalone.engineOptions.audioDevice = carla_strdup_safe(valueStr); | ||||
| break; | break; | ||||
| case CB::ENGINE_OPTION_OSC_ENABLE: | |||||
| case CB::ENGINE_OPTION_OSC_ENABLED: | |||||
| CARLA_SAFE_ASSERT_RETURN(value == 0 || value == 1,); | CARLA_SAFE_ASSERT_RETURN(value == 0 || value == 1,); | ||||
| gStandalone.engineOptions.oscEnabled = (value != 0); | gStandalone.engineOptions.oscEnabled = (value != 0); | ||||
| break; | break; | ||||
| @@ -1574,7 +1574,7 @@ void CarlaEngine::setOption(const EngineOption option, const int value, const ch | |||||
| pData->options.audioDevice = carla_strdup_safe(valueStr); | pData->options.audioDevice = carla_strdup_safe(valueStr); | ||||
| break; | break; | ||||
| case ENGINE_OPTION_OSC_ENABLE: | |||||
| case ENGINE_OPTION_OSC_ENABLED: | |||||
| CARLA_SAFE_ASSERT_RETURN(value == 0 || value == 1,); | CARLA_SAFE_ASSERT_RETURN(value == 0 || value == 1,); | ||||
| #ifndef BUILD_BRIDGE | #ifndef BUILD_BRIDGE | ||||
| pData->options.oscEnabled = (value != 0); | pData->options.oscEnabled = (value != 0); | ||||
| @@ -1,6 +1,6 @@ | |||||
| /* | /* | ||||
| * Carla Plugin Host | * Carla Plugin Host | ||||
| * Copyright (C) 2011-2018 Filipe Coelho <falktx@falktx.com> | |||||
| * Copyright (C) 2011-2019 Filipe Coelho <falktx@falktx.com> | |||||
| * | * | ||||
| * This program is free software; you can redistribute it and/or | * This program is free software; you can redistribute it and/or | ||||
| * modify it under the terms of the GNU General Public License as | * modify it under the terms of the GNU General Public License as | ||||
| @@ -203,8 +203,8 @@ EngineOptions::EngineOptions() noexcept | |||||
| # else | # else | ||||
| oscEnabled(true), | oscEnabled(true), | ||||
| # endif | # endif | ||||
| oscPortTCP(0), | |||||
| oscPortUDP(0), | |||||
| oscPortTCP(22752), | |||||
| oscPortUDP(22752), | |||||
| #endif | #endif | ||||
| pathLADSPA(nullptr), | pathLADSPA(nullptr), | ||||
| pathDSSI(nullptr), | pathDSSI(nullptr), | ||||
| @@ -695,6 +695,13 @@ public: | |||||
| pData->sampleRate = pHost->get_sample_rate(pHost->handle); | pData->sampleRate = pHost->get_sample_rate(pHost->handle); | ||||
| pData->initTime(nullptr); | pData->initTime(nullptr); | ||||
| #ifndef BUILD_BRIDGE | |||||
| // Forced OSC setup when running as plugin | |||||
| pData->options.oscEnabled = true; | |||||
| pData->options.oscPortTCP = -1; | |||||
| pData->options.oscPortUDP = 0; | |||||
| #endif | |||||
| if (outChan == 0) | if (outChan == 0) | ||||
| outChan = inChan; | outChan = inChan; | ||||
| @@ -821,17 +821,19 @@ ENGINE_OPTION_AUDIO_TRIPLE_BUFFER = 11 | |||||
| ENGINE_OPTION_AUDIO_DEVICE = 12 | ENGINE_OPTION_AUDIO_DEVICE = 12 | ||||
| # Wherever to enable OSC support in the engine. | # Wherever to enable OSC support in the engine. | ||||
| ENGINE_OPTION_OSC_ENABLE = 13 | |||||
| ENGINE_OPTION_OSC_ENABLED = 13 | |||||
| # The network TCP port to use for OSC. | # The network TCP port to use for OSC. | ||||
| # A value of 0 means use a random port. | # A value of 0 means use a random port. | ||||
| # A value of < 0 means to not enable the TCP port for OSC. | # A value of < 0 means to not enable the TCP port for OSC. | ||||
| # @note Valid ports begin at 1024 | |||||
| ENGINE_OPTION_OSC_PORT_TCP = 14 | ENGINE_OPTION_OSC_PORT_TCP = 14 | ||||
| # The network UDP port to use for OSC. | # The network UDP port to use for OSC. | ||||
| # A value of 0 means use a random port. | # A value of 0 means use a random port. | ||||
| # A value of < 0 means to not enable the UDP port for OSC. | # A value of < 0 means to not enable the UDP port for OSC. | ||||
| # @note Disabling this option prevents DSSI UIs from working! | # @note Disabling this option prevents DSSI UIs from working! | ||||
| # @note Valid ports begin at 1024 | |||||
| ENGINE_OPTION_OSC_PORT_UDP = 15 | ENGINE_OPTION_OSC_PORT_UDP = 15 | ||||
| # Set path used for a specific plugin type. | # Set path used for a specific plugin type. | ||||
| @@ -2979,6 +2979,29 @@ def setEngineSettings(host): | |||||
| if host.isPlugin: | if host.isPlugin: | ||||
| return "Plugin" | return "Plugin" | ||||
| # -------------------------------------------------------------------------------------------------------- | |||||
| # osc settings | |||||
| oscEnabled = settings.value(CARLA_KEY_OSC_ENABLED, CARLA_DEFAULT_OSC_ENABLED, type=bool) | |||||
| if not settings.value(CARLA_KEY_OSC_TCP_PORT_ENABLED, CARLA_DEFAULT_OSC_TCP_PORT_ENABLED, type=bool): | |||||
| portNumTCP = -1 | |||||
| elif settings.value(CARLA_KEY_OSC_TCP_PORT_RANDOM, CARLA_DEFAULT_OSC_TCP_PORT_RANDOM, type=bool): | |||||
| portNumTCP = 0 | |||||
| else: | |||||
| portNumTCP = settings.value(CARLA_KEY_OSC_TCP_PORT_NUMBER, CARLA_DEFAULT_OSC_TCP_PORT_NUMBER, type=int) | |||||
| if not settings.value(CARLA_KEY_OSC_UDP_PORT_ENABLED, CARLA_DEFAULT_OSC_UDP_PORT_ENABLED, type=bool): | |||||
| portNumUDP = -1 | |||||
| elif settings.value(CARLA_KEY_OSC_UDP_PORT_RANDOM, CARLA_DEFAULT_OSC_UDP_PORT_RANDOM, type=bool): | |||||
| portNumUDP = 0 | |||||
| else: | |||||
| portNumUDP = settings.value(CARLA_KEY_OSC_UDP_PORT_NUMBER, CARLA_DEFAULT_OSC_UDP_PORT_NUMBER, type=int) | |||||
| host.set_engine_option(ENGINE_OPTION_OSC_ENABLED, 1 if oscEnabled else 0, "") | |||||
| host.set_engine_option(ENGINE_OPTION_OSC_PORT_TCP, portNumTCP, "") | |||||
| host.set_engine_option(ENGINE_OPTION_OSC_PORT_UDP, portNumUDP, "") | |||||
| # -------------------------------------------------------------------------------------------------------- | # -------------------------------------------------------------------------------------------------------- | ||||
| # wine settings | # wine settings | ||||
| @@ -197,10 +197,11 @@ class CarlaSettingsW(QDialog): | |||||
| TAB_INDEX_MAIN = 0 | TAB_INDEX_MAIN = 0 | ||||
| TAB_INDEX_CANVAS = 1 | TAB_INDEX_CANVAS = 1 | ||||
| TAB_INDEX_ENGINE = 2 | TAB_INDEX_ENGINE = 2 | ||||
| TAB_INDEX_PATHS = 3 | |||||
| TAB_INDEX_WINE = 4 | |||||
| TAB_INDEX_EXPERIMENTAL = 5 | |||||
| TAB_INDEX_NONE = 6 | |||||
| TAB_INDEX_OSC = 3 | |||||
| TAB_INDEX_PATHS = 4 | |||||
| TAB_INDEX_WINE = 5 | |||||
| TAB_INDEX_EXPERIMENTAL = 6 | |||||
| TAB_INDEX_NONE = 7 | |||||
| # Path indexes | # Path indexes | ||||
| PATH_INDEX_LADSPA = 0 | PATH_INDEX_LADSPA = 0 | ||||
| @@ -281,6 +282,7 @@ class CarlaSettingsW(QDialog): | |||||
| if host.isControl or host.isPlugin: | if host.isControl or host.isPlugin: | ||||
| self.ui.ch_main_confirm_exit.hide() | self.ui.ch_main_confirm_exit.hide() | ||||
| self.ui.ch_exp_load_lib_global.hide() | self.ui.ch_exp_load_lib_global.hide() | ||||
| self.ui.lw_page.hideRow(self.TAB_INDEX_OSC) | |||||
| self.ui.lw_page.hideRow(self.TAB_INDEX_WINE) | self.ui.lw_page.hideRow(self.TAB_INDEX_WINE) | ||||
| if not LINUX: | if not LINUX: | ||||
| @@ -438,6 +440,43 @@ class CarlaSettingsW(QDialog): | |||||
| self.ui.cb_exp_plugin_bridges.setChecked(self.host.showPluginBridges) | self.ui.cb_exp_plugin_bridges.setChecked(self.host.showPluginBridges) | ||||
| self.ui.ch_exp_wine_bridges.setChecked(self.host.showWineBridges) | self.ui.ch_exp_wine_bridges.setChecked(self.host.showWineBridges) | ||||
| # ---------------------------------------------------------------------------------------------------- | |||||
| # OSC | |||||
| self.ui.ch_osc_enable.setChecked(settings.value(CARLA_KEY_OSC_ENABLED, | |||||
| CARLA_DEFAULT_OSC_ENABLED, | |||||
| type=bool)) | |||||
| self.ui.group_osc_tcp_port.setChecked(settings.value(CARLA_KEY_OSC_TCP_PORT_ENABLED, | |||||
| CARLA_DEFAULT_OSC_TCP_PORT_ENABLED, | |||||
| type=bool)) | |||||
| self.ui.group_osc_udp_port.setChecked(settings.value(CARLA_KEY_OSC_UDP_PORT_ENABLED, | |||||
| CARLA_DEFAULT_OSC_UDP_PORT_ENABLED, | |||||
| type=bool)) | |||||
| self.ui.sb_osc_tcp_port_number.setValue(settings.value(CARLA_KEY_OSC_TCP_PORT_NUMBER, | |||||
| CARLA_DEFAULT_OSC_TCP_PORT_NUMBER, | |||||
| type=int)) | |||||
| self.ui.sb_osc_udp_port_number.setValue(settings.value(CARLA_KEY_OSC_UDP_PORT_NUMBER, | |||||
| CARLA_DEFAULT_OSC_UDP_PORT_NUMBER, | |||||
| type=int)) | |||||
| if settings.value(CARLA_KEY_OSC_TCP_PORT_RANDOM, CARLA_DEFAULT_OSC_TCP_PORT_RANDOM, type=bool): | |||||
| self.ui.rb_osc_tcp_port_specific.setChecked(False) | |||||
| self.ui.rb_osc_tcp_port_random.setChecked(True) | |||||
| else: | |||||
| self.ui.rb_osc_tcp_port_random.setChecked(False) | |||||
| self.ui.rb_osc_tcp_port_specific.setChecked(True) | |||||
| if settings.value(CARLA_KEY_OSC_UDP_PORT_RANDOM, CARLA_DEFAULT_OSC_UDP_PORT_RANDOM, type=bool): | |||||
| self.ui.rb_osc_udp_port_specific.setChecked(False) | |||||
| self.ui.rb_osc_udp_port_random.setChecked(True) | |||||
| else: | |||||
| self.ui.rb_osc_udp_port_random.setChecked(False) | |||||
| self.ui.rb_osc_udp_port_specific.setChecked(True) | |||||
| # ---------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------- | ||||
| # Paths | # Paths | ||||
| @@ -617,6 +656,17 @@ class CarlaSettingsW(QDialog): | |||||
| settings.setValue(CARLA_KEY_EXPERIMENTAL_PLUGIN_BRIDGES, self.host.showPluginBridges) | settings.setValue(CARLA_KEY_EXPERIMENTAL_PLUGIN_BRIDGES, self.host.showPluginBridges) | ||||
| settings.setValue(CARLA_KEY_EXPERIMENTAL_WINE_BRIDGES, self.host.showWineBridges) | settings.setValue(CARLA_KEY_EXPERIMENTAL_WINE_BRIDGES, self.host.showWineBridges) | ||||
| # ---------------------------------------------------------------------------------------------------- | |||||
| # OSC | |||||
| settings.setValue(CARLA_KEY_OSC_ENABLED, self.ui.ch_osc_enable.isChecked()) | |||||
| settings.setValue(CARLA_KEY_OSC_TCP_PORT_ENABLED, self.ui.group_osc_tcp_port.isChecked()) | |||||
| settings.setValue(CARLA_KEY_OSC_UDP_PORT_ENABLED, self.ui.group_osc_udp_port.isChecked()) | |||||
| settings.setValue(CARLA_KEY_OSC_TCP_PORT_RANDOM, self.ui.rb_osc_tcp_port_random.isChecked()) | |||||
| settings.setValue(CARLA_KEY_OSC_UDP_PORT_RANDOM, self.ui.rb_osc_udp_port_random.isChecked()) | |||||
| settings.setValue(CARLA_KEY_OSC_TCP_PORT_NUMBER, self.ui.sb_osc_tcp_port_number.value()) | |||||
| settings.setValue(CARLA_KEY_OSC_UDP_PORT_NUMBER, self.ui.sb_osc_udp_port_number.value()) | |||||
| # ---------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------- | ||||
| # Paths | # Paths | ||||
| @@ -686,10 +736,12 @@ class CarlaSettingsW(QDialog): | |||||
| @pyqtSlot() | @pyqtSlot() | ||||
| def slot_resetSettings(self): | def slot_resetSettings(self): | ||||
| currentRow = self.ui.lw_page.currentRow() | |||||
| # ---------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------- | ||||
| # Main | # Main | ||||
| if self.ui.lw_page.currentRow() == self.TAB_INDEX_MAIN: | |||||
| if currentRow == self.TAB_INDEX_MAIN: | |||||
| self.ui.le_main_proj_folder.setText(CARLA_DEFAULT_MAIN_PROJECT_FOLDER) | self.ui.le_main_proj_folder.setText(CARLA_DEFAULT_MAIN_PROJECT_FOLDER) | ||||
| self.ui.ch_main_theme_pro.setChecked(CARLA_DEFAULT_MAIN_USE_PRO_THEME and self.ui.group_main_theme.isEnabled()) | self.ui.ch_main_theme_pro.setChecked(CARLA_DEFAULT_MAIN_USE_PRO_THEME and self.ui.group_main_theme.isEnabled()) | ||||
| self.ui.cb_main_theme_color.setCurrentIndex(self.ui.cb_main_theme_color.findText(CARLA_DEFAULT_MAIN_PRO_THEME_COLOR)) | self.ui.cb_main_theme_color.setCurrentIndex(self.ui.cb_main_theme_color.findText(CARLA_DEFAULT_MAIN_PRO_THEME_COLOR)) | ||||
| @@ -700,7 +752,7 @@ class CarlaSettingsW(QDialog): | |||||
| # ---------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------- | ||||
| # Canvas | # Canvas | ||||
| elif self.ui.lw_page.currentRow() == self.TAB_INDEX_CANVAS: | |||||
| elif currentRow == self.TAB_INDEX_CANVAS: | |||||
| self.ui.cb_canvas_theme.setCurrentIndex(self.ui.cb_canvas_theme.findText(CARLA_DEFAULT_CANVAS_THEME)) | self.ui.cb_canvas_theme.setCurrentIndex(self.ui.cb_canvas_theme.findText(CARLA_DEFAULT_CANVAS_THEME)) | ||||
| self.ui.cb_canvas_size.setCurrentIndex(self.ui.cb_canvas_size.findText(CARLA_DEFAULT_CANVAS_SIZE)) | self.ui.cb_canvas_size.setCurrentIndex(self.ui.cb_canvas_size.findText(CARLA_DEFAULT_CANVAS_SIZE)) | ||||
| self.ui.cb_canvas_bezier_lines.setChecked(CARLA_DEFAULT_CANVAS_USE_BEZIER_LINES) | self.ui.cb_canvas_bezier_lines.setChecked(CARLA_DEFAULT_CANVAS_USE_BEZIER_LINES) | ||||
| @@ -712,7 +764,7 @@ class CarlaSettingsW(QDialog): | |||||
| # ---------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------- | ||||
| # Engine | # Engine | ||||
| elif self.ui.lw_page.currentRow() == self.TAB_INDEX_ENGINE: | |||||
| elif currentRow == self.TAB_INDEX_ENGINE: | |||||
| if not self.host.isPlugin: | if not self.host.isPlugin: | ||||
| self.ui.cb_engine_audio_driver.setCurrentIndex(0) | self.ui.cb_engine_audio_driver.setCurrentIndex(0) | ||||
| @@ -730,10 +782,34 @@ class CarlaSettingsW(QDialog): | |||||
| self.ui.sb_engine_ui_bridges_timeout.setValue(CARLA_DEFAULT_UI_BRIDGES_TIMEOUT) | self.ui.sb_engine_ui_bridges_timeout.setValue(CARLA_DEFAULT_UI_BRIDGES_TIMEOUT) | ||||
| self.ui.ch_engine_manage_uis.setChecked(CARLA_DEFAULT_MANAGE_UIS) | self.ui.ch_engine_manage_uis.setChecked(CARLA_DEFAULT_MANAGE_UIS) | ||||
| # ---------------------------------------------------------------------------------------------------- | |||||
| # OSC | |||||
| elif currentRow == self.TAB_INDEX_OSC: | |||||
| self.ui.ch_osc_enable.setChecked(CARLA_DEFAULT_OSC_ENABLED) | |||||
| self.ui.group_osc_tcp_port.setChecked(CARLA_DEFAULT_OSC_TCP_PORT_ENABLED) | |||||
| self.ui.group_osc_udp_port.setChecked(CARLA_DEFAULT_OSC_UDP_PORT_ENABLED) | |||||
| self.ui.sb_osc_tcp_port_number.setValue(CARLA_DEFAULT_OSC_TCP_PORT_NUMBER) | |||||
| self.ui.sb_osc_udp_port_number.setValue(CARLA_DEFAULT_OSC_UDP_PORT_NUMBER) | |||||
| if CARLA_DEFAULT_OSC_TCP_PORT_RANDOM: | |||||
| self.ui.rb_osc_tcp_port_specific.setChecked(False) | |||||
| self.ui.rb_osc_tcp_port_random.setChecked(True) | |||||
| else: | |||||
| self.ui.rb_osc_tcp_port_random.setChecked(False) | |||||
| self.ui.rb_osc_tcp_port_specific.setChecked(True) | |||||
| if CARLA_DEFAULT_OSC_UDP_PORT_RANDOM: | |||||
| self.ui.rb_osc_udp_port_specific.setChecked(False) | |||||
| self.ui.rb_osc_udp_port_random.setChecked(True) | |||||
| else: | |||||
| self.ui.rb_osc_udp_port_random.setChecked(False) | |||||
| self.ui.rb_osc_udp_port_specific.setChecked(True) | |||||
| # ---------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------- | ||||
| # Paths | # Paths | ||||
| elif self.ui.lw_page.currentRow() == self.TAB_INDEX_PATHS: | |||||
| elif currentRow == self.TAB_INDEX_PATHS: | |||||
| curIndex = self.ui.tw_paths.currentIndex() | curIndex = self.ui.tw_paths.currentIndex() | ||||
| if curIndex == self.PATH_INDEX_LADSPA: | if curIndex == self.PATH_INDEX_LADSPA: | ||||
| @@ -802,7 +878,7 @@ class CarlaSettingsW(QDialog): | |||||
| # ---------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------- | ||||
| # Wine | # Wine | ||||
| elif self.ui.lw_page.currentRow() == self.TAB_INDEX_WINE: | |||||
| elif currentRow == self.TAB_INDEX_WINE: | |||||
| self.ui.le_wine_exec.setText(CARLA_DEFAULT_WINE_EXECUTABLE) | self.ui.le_wine_exec.setText(CARLA_DEFAULT_WINE_EXECUTABLE) | ||||
| self.ui.cb_wine_prefix_detect.setChecked(CARLA_DEFAULT_WINE_AUTO_PREFIX) | self.ui.cb_wine_prefix_detect.setChecked(CARLA_DEFAULT_WINE_AUTO_PREFIX) | ||||
| self.ui.le_wine_prefix_fallback.setText(CARLA_DEFAULT_WINE_FALLBACK_PREFIX) | self.ui.le_wine_prefix_fallback.setText(CARLA_DEFAULT_WINE_FALLBACK_PREFIX) | ||||
| @@ -813,7 +889,7 @@ class CarlaSettingsW(QDialog): | |||||
| # ---------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------- | ||||
| # Experimental | # Experimental | ||||
| elif self.ui.lw_page.currentRow() == self.TAB_INDEX_EXPERIMENTAL: | |||||
| elif currentRow == self.TAB_INDEX_EXPERIMENTAL: | |||||
| self.resetExperimentalSettings() | self.resetExperimentalSettings() | ||||
| def resetExperimentalSettings(self): | def resetExperimentalSettings(self): | ||||
| @@ -212,6 +212,14 @@ CARLA_KEY_ENGINE_UIS_ALWAYS_ON_TOP = "Engine/UIsAlwaysOnTop" # bool | |||||
| CARLA_KEY_ENGINE_MAX_PARAMETERS = "Engine/MaxParameters" # int | CARLA_KEY_ENGINE_MAX_PARAMETERS = "Engine/MaxParameters" # int | ||||
| CARLA_KEY_ENGINE_UI_BRIDGES_TIMEOUT = "Engine/UiBridgesTimeout" # int | CARLA_KEY_ENGINE_UI_BRIDGES_TIMEOUT = "Engine/UiBridgesTimeout" # int | ||||
| CARLA_KEY_OSC_ENABLED = "OSC/Enabled" | |||||
| CARLA_KEY_OSC_TCP_PORT_ENABLED = "OSC/TCPEnabled" | |||||
| CARLA_KEY_OSC_TCP_PORT_NUMBER = "OSC/TCPNumber" | |||||
| CARLA_KEY_OSC_TCP_PORT_RANDOM = "OSC/TCPRandom" | |||||
| CARLA_KEY_OSC_UDP_PORT_ENABLED = "OSC/UDPEnabled" | |||||
| CARLA_KEY_OSC_UDP_PORT_NUMBER = "OSC/UDPNumber" | |||||
| CARLA_KEY_OSC_UDP_PORT_RANDOM = "OSC/UDPRandom" | |||||
| CARLA_KEY_PATHS_LADSPA = "Paths/LADSPA" | CARLA_KEY_PATHS_LADSPA = "Paths/LADSPA" | ||||
| CARLA_KEY_PATHS_DSSI = "Paths/DSSI" | CARLA_KEY_PATHS_DSSI = "Paths/DSSI" | ||||
| CARLA_KEY_PATHS_LV2 = "Paths/LV2" | CARLA_KEY_PATHS_LV2 = "Paths/LV2" | ||||
| @@ -290,6 +298,15 @@ else: | |||||
| CARLA_DEFAULT_PROCESS_MODE = ENGINE_PROCESS_MODE_PATCHBAY | CARLA_DEFAULT_PROCESS_MODE = ENGINE_PROCESS_MODE_PATCHBAY | ||||
| CARLA_DEFAULT_TRANSPORT_MODE = ENGINE_TRANSPORT_MODE_INTERNAL | CARLA_DEFAULT_TRANSPORT_MODE = ENGINE_TRANSPORT_MODE_INTERNAL | ||||
| # OSC | |||||
| CARLA_DEFAULT_OSC_ENABLED = not WINDOWS | |||||
| CARLA_DEFAULT_OSC_TCP_PORT_ENABLED = True | |||||
| CARLA_DEFAULT_OSC_TCP_PORT_NUMBER = 22752 | |||||
| CARLA_DEFAULT_OSC_TCP_PORT_RANDOM = False | |||||
| CARLA_DEFAULT_OSC_UDP_PORT_ENABLED = True | |||||
| CARLA_DEFAULT_OSC_UDP_PORT_NUMBER = 22752 | |||||
| CARLA_DEFAULT_OSC_UDP_PORT_RANDOM = False | |||||
| # Wine | # Wine | ||||
| CARLA_DEFAULT_WINE_EXECUTABLE = "wine" | CARLA_DEFAULT_WINE_EXECUTABLE = "wine" | ||||
| CARLA_DEFAULT_WINE_AUTO_PREFIX = True | CARLA_DEFAULT_WINE_AUTO_PREFIX = True | ||||
| @@ -1,6 +1,6 @@ | |||||
| /* | /* | ||||
| * Carla Backend utils | * Carla Backend utils | ||||
| * Copyright (C) 2011-2018 Filipe Coelho <falktx@falktx.com> | |||||
| * Copyright (C) 2011-2019 Filipe Coelho <falktx@falktx.com> | |||||
| * | * | ||||
| * This program is free software; you can redistribute it and/or | * This program is free software; you can redistribute it and/or | ||||
| * modify it under the terms of the GNU General Public License as | * modify it under the terms of the GNU General Public License as | ||||
| @@ -321,8 +321,8 @@ const char* EngineOption2Str(const EngineOption option) noexcept | |||||
| return "ENGINE_OPTION_AUDIO_TRIPLE_BUFFER"; | return "ENGINE_OPTION_AUDIO_TRIPLE_BUFFER"; | ||||
| case ENGINE_OPTION_AUDIO_DEVICE: | case ENGINE_OPTION_AUDIO_DEVICE: | ||||
| return "ENGINE_OPTION_AUDIO_DEVICE"; | return "ENGINE_OPTION_AUDIO_DEVICE"; | ||||
| case ENGINE_OPTION_OSC_ENABLE: | |||||
| return "ENGINE_OPTION_OSC_ENABLE"; | |||||
| case ENGINE_OPTION_OSC_ENABLED: | |||||
| return "ENGINE_OPTION_OSC_ENABLED"; | |||||
| case ENGINE_OPTION_OSC_PORT_UDP: | case ENGINE_OPTION_OSC_PORT_UDP: | ||||
| return "ENGINE_OPTION_OSC_PORT_UDP"; | return "ENGINE_OPTION_OSC_PORT_UDP"; | ||||
| case ENGINE_OPTION_OSC_PORT_TCP: | case ENGINE_OPTION_OSC_PORT_TCP: | ||||