Browse Source

Remove Carla stuff from settings

tags/v0.9.0
falkTX 12 years ago
parent
commit
780255fed6
2 changed files with 1 additions and 1021 deletions
  1. +0
    -630
      resources/ui/settings_app.ui
  2. +1
    -391
      src/shared_settings.py

+ 0
- 630
resources/ui/settings_app.ui View File

@@ -87,16 +87,6 @@
<string>ladish</string>
</property>
</row>
<row>
<property name="text">
<string>engine</string>
</property>
</row>
<row>
<property name="text">
<string>paths</string>
</property>
</row>
<column>
<property name="text">
<string>Widget</string>
@@ -159,42 +149,6 @@
<set>ItemIsSelectable|ItemIsEnabled</set>
</property>
</item>
<item row="3" column="0">
<property name="text">
<string>Engine</string>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/48x48/jack.png</normaloff>:/48x48/jack.png</iconset>
</property>
<property name="flags">
<set>ItemIsSelectable|ItemIsEnabled</set>
</property>
</item>
<item row="4" column="0">
<property name="text">
<string>Paths</string>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/48x48/folder.png</normaloff>:/48x48/folder.png</iconset>
</property>
<property name="flags">
<set>ItemIsSelectable|ItemIsEnabled</set>
</property>
</item>
</widget>
</item>
<item>
@@ -737,590 +691,6 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="page_engine">
<layout class="QVBoxLayout" name="verticalLayout_18">
<property name="margin">
<number>2</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QLabel" name="label_6">
<property name="text">
<string>&lt;b&gt;Engine&lt;/b&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<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>
<widget class="QLabel" name="label_icon_engine">
<property name="text">
<string notr="true"/>
</property>
<property name="pixmap">
<pixmap resource="../resources.qrc">:/48x48/exec.png</pixmap>
</property>
<property name="alignment">
<set>Qt::AlignHCenter|Qt::AlignTop</set>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Core</string>
</property>
<layout class="QGridLayout" name="gridLayout_7">
<item row="1" column="2">
<widget class="QStackedWidget" name="sw_engine_process_mode">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="currentIndex">
<number>1</number>
</property>
<widget class="QWidget" name="page_engine_process_mode_jack">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<property name="sizeConstraint">
<enum>QLayout::SetMinimumSize</enum>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QComboBox" name="cb_engine_process_mode_jack">
<property name="currentIndex">
<number>1</number>
</property>
<item>
<property name="text">
<string>Single Client</string>
</property>
</item>
<item>
<property name="text">
<string>Multiple Clients</string>
</property>
</item>
<item>
<property name="text">
<string>Continuous Rack (EXPERIMENTAL)</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="page_engine_process_mode_other">
<layout class="QHBoxLayout" name="horizontalLayout_7">
<property name="sizeConstraint">
<enum>QLayout::SetMinimumSize</enum>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QComboBox" name="cb_engine_process_mode_other">
<item>
<property name="text">
<string>Continuous Rack (EXPERIMENTAL)</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item row="1" column="0">
<spacer name="horizontalSpacer_11">
<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">
<widget class="QLabel" name="label_21">
<property name="text">
<string>Audio driver:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_20">
<property name="text">
<string>Process mode:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="label_7">
<property name="toolTip">
<string>Maximum number of parameters to allow in the built-in 'Edit' dialog</string>
</property>
<property name="text">
<string>Max Parameters:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="2" column="3">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="2">
<widget class="QSpinBox" name="sb_engine_max_params">
<property name="toolTip">
<string>Maximum number of parameters to allow in the built-in 'Edit' dialog</string>
</property>
<property name="maximum">
<number>1000</number>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QToolButton" name="tb_engine_driver_config">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>...</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QComboBox" name="cb_engine_audio_driver"/>
</item>
<item row="1" column="4">
<spacer name="horizontalSpacer_14">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_8">
<property name="title">
<string>GUIs</string>
</property>
<layout class="QGridLayout" name="gridLayout_8">
<item row="1" column="0">
<widget class="QLabel" name="label_12">
<property name="toolTip">
<string>How much time to wait for OSC GUIs to ping back the host</string>
</property>
<property name="text">
<string>OSC UI Timeout:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="sb_engine_oscgui_timeout">
<property name="toolTip">
<string>How much time to wait for OSC GUIs to ping back the host</string>
</property>
<property name="suffix">
<string> ms</string>
</property>
<property name="maximum">
<number>10000</number>
</property>
</widget>
</item>
<item row="1" column="2">
<spacer name="horizontalSpacer_9">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0" colspan="3">
<widget class="QCheckBox" name="ch_engine_prefer_ui_bridges">
<property name="toolTip">
<string>Use OSC-GUI bridges when possible, this way separating the UI from DSP code</string>
</property>
<property name="text">
<string>Use UI bridges instead of direct handling when possible</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Advanced</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_17">
<item>
<widget class="QCheckBox" name="ch_engine_disable_checks">
<property name="toolTip">
<string>Carla will run small processing checks when scanning the plugins (to make sure they won't crash).
You can disable these checks to get a faster scanning time (at your own risk).</string>
</property>
<property name="text">
<string>Disable processing checks while scanning</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="ch_engine_dssi_chunks">
<property name="text">
<string>Enable chunk data for dssi-vst (EXPERIMENTAL)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="ch_engine_prefer_plugin_bridges">
<property name="toolTip">
<string>Whenever possible, run the plugins in bridge mode.</string>
</property>
<property name="text">
<string>Run plugins in bridge mode when possible (EXPERIMENTAL)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="ch_engine_force_stereo">
<property name="toolTip">
<string>Force mono plugins as stereo by running 2 instances at the same time.
This mode is not available for VST plugins.</string>
</property>
<property name="text">
<string>Force mono plugins as stereo (EXPERIMENTAL)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="ch_engine_process_hp">
<property name="toolTip">
<string>Process audio in blocks of 8 samples, allowing a higher precision automation.
Recommended to use when 'rendering' a project.
Some plugins might not work properly under this mode.</string>
</property>
<property name="text">
<string>High-Precision processing (EXPERIMENTAL)</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_9">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>225</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="page_paths">
<layout class="QGridLayout" name="gridLayout">
<property name="margin">
<number>2</number>
</property>
<item row="0" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QLabel" name="label_18">
<property name="text">
<string>&lt;b&gt;Paths&lt;/b&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_4">
<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>
<widget class="QLabel" name="label_19">
<property name="text">
<string notr="true"/>
</property>
<property name="pixmap">
<pixmap resource="../resources.qrc">:/48x48/folder.png</pixmap>
</property>
<property name="alignment">
<set>Qt::AlignHCenter|Qt::AlignTop</set>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QTabWidget" name="tw_paths">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="ladspa">
<attribute name="title">
<string>LADSPA</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_11">
<item>
<widget class="QListWidget" name="lw_ladspa"/>
</item>
</layout>
</widget>
<widget class="QWidget" name="dssi">
<attribute name="title">
<string>DSSI</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_12">
<item>
<widget class="QListWidget" name="lw_dssi"/>
</item>
</layout>
</widget>
<widget class="QWidget" name="lv2">
<attribute name="title">
<string>LV2</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_6">
<item row="0" column="0" colspan="2">
<widget class="QListWidget" name="lw_lv2"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_4">
<property name="maximumSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../resources.qrc">:/16x16/dialog-information.png</pixmap>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Restart Carla to be able to load new found plugins</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="vst">
<attribute name="title">
<string>VST</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_13">
<item>
<widget class="QListWidget" name="lw_vst"/>
</item>
</layout>
</widget>
<widget class="QWidget" name="gig">
<attribute name="title">
<string>GIG</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_15">
<item>
<widget class="QListWidget" name="lw_gig"/>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_sf2">
<attribute name="title">
<string>SF2</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QListWidget" name="lw_sf2"/>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_sfz">
<attribute name="title">
<string>SFZ</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_14">
<item>
<widget class="QListWidget" name="lw_sfz"/>
</item>
</layout>
</widget>
</widget>
</item>
<item row="1" column="1">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<spacer name="verticalSpacer_8">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="b_paths_add">
<property name="text">
<string>Add...</string>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/16x16/list-add.png</normaloff>:/16x16/list-add.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="b_paths_remove">
<property name="text">
<string>Remove</string>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/16x16/list-remove.png</normaloff>:/16x16/list-remove.png</iconset>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="b_paths_change">
<property name="text">
<string>Change...</string>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/16x16/edit-rename.png</normaloff>:/16x16/edit-rename.png</iconset>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_7">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="page"/>
</widget>
</item>


+ 1
- 391
src/shared_settings.py View File

@@ -36,29 +36,7 @@ from patchcanvas_theme import *
TAB_INDEX_MAIN = 0
TAB_INDEX_CANVAS = 1
TAB_INDEX_LADISH = 2
TAB_INDEX_CARLA_ENGINE = 3
TAB_INDEX_CARLA_PATHS = 4
TAB_INDEX_NONE = 5

# Carla defines
PROCESS_MODE_SINGLE_CLIENT = 0
PROCESS_MODE_MULTIPLE_CLIENTS = 1
PROCESS_MODE_CONTINUOUS_RACK = 2

# Single and Multiple client mode is only for JACK,
# but we still want to match QComboBox index to defines,
# so add +2 pos padding if driverName != "JACK".
PROCESS_MODE_NON_JACK_PADDING = 2

# Carla defaults
CARLA_DEFAULT_PROCESS_HIGH_PRECISION = False
CARLA_DEFAULT_MAX_PARAMETERS = 200
CARLA_DEFAULT_FORCE_STEREO = False
CARLA_DEFAULT_USE_DSSI_VST_CHUNKS = False
CARLA_DEFAULT_PREFER_PLUGIN_BRIDGES = False
CARLA_DEFAULT_PREFER_UI_BRIDGES = True
CARLA_DEFAULT_OSC_UI_TIMEOUT = 4000
CARLA_DEFAULT_DISABLE_CHECKS = False
TAB_INDEX_NONE = 3

# PatchCanvas defines
CANVAS_ANTIALIASING_SMALL = 1
@@ -80,11 +58,7 @@ LADISH_CONF_KEY_DAEMON_JS_SAVE_DELAY_DEFAULT = 0

# Internal defines and defaults
global SETTINGS_DEFAULT_PROJECT_FOLDER
global SETTINGS_DEFAULT_PLUGINS_PATHS
global SETTINGS_AVAILABLE_ENGINE_DRIVERS
SETTINGS_DEFAULT_PROJECT_FOLDER = HOME
SETTINGS_DEFAULT_PLUGINS_PATHS = [[], [], [], [], [], [], []]
SETTINGS_AVAILABLE_ENGINE_DRIVERS = ["JACK"]

# ------------------------------------------------------------------------------------------------------------
# Change internal defines and defaults
@@ -93,14 +67,6 @@ def setDefaultProjectFolder(folder):
global SETTINGS_DEFAULT_PROJECT_FOLDER
SETTINGS_DEFAULT_PROJECT_FOLDER = folder

def setDefaultPluginsPaths(ladspa, dssi, lv2, vst, gig, sf2, sfz):
global SETTINGS_DEFAULT_PLUGINS_PATHS
SETTINGS_DEFAULT_PLUGINS_PATHS = [ladspa, dssi, lv2, vst, gig, sf2, sfz]

def setAvailableEngineDrivers(drivers):
global SETTINGS_AVAILABLE_ENGINE_DRIVERS
SETTINGS_AVAILABLE_ENGINE_DRIVERS = drivers

# ------------------------------------------------------------------------------------------------------------
# Settings Dialog

@@ -124,8 +90,6 @@ class SettingsW(QDialog, ui_settings_app.Ui_SettingsW):
self.m_autoHideGroups = False
self.lw_page.hideRow(TAB_INDEX_MAIN)
self.lw_page.hideRow(TAB_INDEX_LADISH)
self.lw_page.hideRow(TAB_INDEX_CARLA_ENGINE)
self.lw_page.hideRow(TAB_INDEX_CARLA_PATHS)
self.lw_page.setCurrentCell(TAB_INDEX_CANVAS, 0)

elif appName == "catia":
@@ -135,8 +99,6 @@ class SettingsW(QDialog, ui_settings_app.Ui_SettingsW):
self.group_tray.setEnabled(False)
self.group_tray.setVisible(False)
self.lw_page.hideRow(TAB_INDEX_LADISH)
self.lw_page.hideRow(TAB_INDEX_CARLA_ENGINE)
self.lw_page.hideRow(TAB_INDEX_CARLA_PATHS)
self.lw_page.setCurrentCell(TAB_INDEX_MAIN, 0)

elif appName == "claudia":
@@ -144,32 +106,12 @@ class SettingsW(QDialog, ui_settings_app.Ui_SettingsW):
self.cb_jack_port_alias.setVisible(False)
self.label_jack_port_alias.setEnabled(False)
self.label_jack_port_alias.setVisible(False)
self.lw_page.hideRow(TAB_INDEX_CARLA_ENGINE)
self.lw_page.hideRow(TAB_INDEX_CARLA_PATHS)
self.lw_page.setCurrentCell(TAB_INDEX_MAIN, 0)

elif appName == "carla":
self.m_refreshInterval = 60
self.cb_jack_port_alias.setEnabled(False)
self.cb_jack_port_alias.setVisible(False)
self.label_jack_port_alias.setEnabled(False)
self.label_jack_port_alias.setVisible(False)
self.group_tray.setEnabled(False)
self.group_tray.setVisible(False)
self.lw_page.hideRow(TAB_INDEX_CANVAS)
self.lw_page.hideRow(TAB_INDEX_LADISH)
self.lw_page.setCurrentCell(TAB_INDEX_MAIN, 0)

global SETTINGS_AVAILABLE_ENGINE_DRIVERS
for driver in SETTINGS_AVAILABLE_ENGINE_DRIVERS:
self.cb_engine_audio_driver.addItem(driver)

else:
self.lw_page.hideRow(TAB_INDEX_MAIN)
self.lw_page.hideRow(TAB_INDEX_CANVAS)
self.lw_page.hideRow(TAB_INDEX_LADISH)
self.lw_page.hideRow(TAB_INDEX_CARLA_ENGINE)
self.lw_page.hideRow(TAB_INDEX_CARLA_PATHS)
self.stackedWidget.setCurrentIndex(TAB_INDEX_NONE)
return

@@ -189,7 +131,6 @@ class SettingsW(QDialog, ui_settings_app.Ui_SettingsW):
self.lw_page.item(0, 0).setIcon(getIcon(appName, 48))
self.lw_page.item(3, 0).setIcon(getIcon("jack", 48))
self.label_icon_main.setPixmap(getIcon(appName, 48).pixmap(48, 48))
self.label_icon_engine.setPixmap(getIcon("jack", 48).pixmap(48, 48))

# -------------------------------------------------------------
# Set-up connections
@@ -198,28 +139,6 @@ class SettingsW(QDialog, ui_settings_app.Ui_SettingsW):
self.connect(self.buttonBox.button(QDialogButtonBox.Reset), SIGNAL("clicked()"), SLOT("slot_resetSettings()"))

self.connect(self.b_main_def_folder_open, SIGNAL("clicked()"), SLOT("slot_getAndSetProjectPath()"))
self.connect(self.cb_engine_audio_driver, SIGNAL("currentIndexChanged(int)"), SLOT("slot_engineAudioDriverChanged()"))
self.connect(self.b_paths_add, SIGNAL("clicked()"), SLOT("slot_addPluginPath()"))
self.connect(self.b_paths_remove, SIGNAL("clicked()"), SLOT("slot_removePluginPath()"))
self.connect(self.b_paths_change, SIGNAL("clicked()"), SLOT("slot_changePluginPath()"))
self.connect(self.tw_paths, SIGNAL("currentChanged(int)"), SLOT("slot_pluginPathTabChanged(int)"))
self.connect(self.lw_ladspa, SIGNAL("currentRowChanged(int)"), SLOT("slot_pluginPathRowChanged(int)"))
self.connect(self.lw_dssi, SIGNAL("currentRowChanged(int)"), SLOT("slot_pluginPathRowChanged(int)"))
self.connect(self.lw_lv2, SIGNAL("currentRowChanged(int)"), SLOT("slot_pluginPathRowChanged(int)"))
self.connect(self.lw_vst, SIGNAL("currentRowChanged(int)"), SLOT("slot_pluginPathRowChanged(int)"))
self.connect(self.lw_sf2, SIGNAL("currentRowChanged(int)"), SLOT("slot_pluginPathRowChanged(int)"))

# -------------------------------------------------------------
# Post-connect setup

self.lw_ladspa.setCurrentRow(0)
self.lw_dssi.setCurrentRow(0)
self.lw_lv2.setCurrentRow(0)
self.lw_vst.setCurrentRow(0)
self.lw_gig.setCurrentRow(0)
self.lw_sf2.setCurrentRow(0)
self.lw_sfz.setCurrentRow(0)
self.slot_pluginPathTabChanged(self.tw_paths.currentIndex())

def loadSettings(self):
if not self.lw_page.isRowHidden(TAB_INDEX_MAIN):
@@ -256,76 +175,6 @@ class SettingsW(QDialog, ui_settings_app.Ui_SettingsW):
self.cb_ladish_studio_autostart.setChecked(self.settings.value(LADISH_CONF_KEY_DAEMON_STUDIO_AUTOSTART, LADISH_CONF_KEY_DAEMON_STUDIO_AUTOSTART_DEFAULT, type=bool))
self.sb_ladish_jsdelay.setValue(self.settings.value(LADISH_CONF_KEY_DAEMON_JS_SAVE_DELAY, LADISH_CONF_KEY_DAEMON_JS_SAVE_DELAY_DEFAULT, type=int))

# --------------------------------------------

if not self.lw_page.isRowHidden(TAB_INDEX_CARLA_ENGINE):
audioDriver = self.settings.value("Engine/AudioDriver", "JACK", type=str)
for i in range(self.cb_engine_audio_driver.count()):
if self.cb_engine_audio_driver.itemText(i) == audioDriver:
self.cb_engine_audio_driver.setCurrentIndex(i)
break
else:
self.cb_engine_audio_driver.setCurrentIndex(-1)

if audioDriver == "JACK":
processModeIndex = self.settings.value("Engine/ProcessMode", PROCESS_MODE_MULTIPLE_CLIENTS, type=int)
self.cb_engine_process_mode_jack.setCurrentIndex(processModeIndex)
self.sw_engine_process_mode.setCurrentIndex(0)
else:
processModeIndex = self.settings.value("Engine/ProcessMode", PROCESS_MODE_CONTINUOUS_RACK, type=int)
processModeIndex -= PROCESS_MODE_NON_JACK_PADDING
self.cb_engine_process_mode_other.setCurrentIndex(processModeIndex)
self.sw_engine_process_mode.setCurrentIndex(1)

self.sb_engine_max_params.setValue(self.settings.value("Engine/MaxParameters", CARLA_DEFAULT_MAX_PARAMETERS, type=int))
self.ch_engine_prefer_ui_bridges.setChecked(self.settings.value("Engine/PreferUiBridges", CARLA_DEFAULT_PREFER_UI_BRIDGES, type=bool))
self.sb_engine_oscgui_timeout.setValue(self.settings.value("Engine/OscUiTimeout", CARLA_DEFAULT_OSC_UI_TIMEOUT, type=int))
self.ch_engine_disable_checks.setChecked(self.settings.value("Engine/DisableChecks", CARLA_DEFAULT_DISABLE_CHECKS, type=bool))
self.ch_engine_dssi_chunks.setChecked(self.settings.value("Engine/UseDssiVstChunks", CARLA_DEFAULT_USE_DSSI_VST_CHUNKS, type=bool))
self.ch_engine_prefer_plugin_bridges.setChecked(self.settings.value("Engine/PreferPluginBridges", CARLA_DEFAULT_PREFER_PLUGIN_BRIDGES, type=bool))
self.ch_engine_force_stereo.setChecked(self.settings.value("Engine/ForceStereo", CARLA_DEFAULT_FORCE_STEREO, type=bool))
self.ch_engine_process_hp.setChecked(self.settings.value("Engine/ProcessHighPrecision", CARLA_DEFAULT_PROCESS_HIGH_PRECISION, type=bool))

# --------------------------------------------

if not self.lw_page.isRowHidden(TAB_INDEX_CARLA_PATHS):
ladspas = toList(self.settings.value("Paths/LADSPA", SETTINGS_DEFAULT_PLUGINS_PATHS[0]))
dssis = toList(self.settings.value("Paths/DSSI", SETTINGS_DEFAULT_PLUGINS_PATHS[1]))
lv2s = toList(self.settings.value("Paths/LV2", SETTINGS_DEFAULT_PLUGINS_PATHS[2]))
vsts = toList(self.settings.value("Paths/VST", SETTINGS_DEFAULT_PLUGINS_PATHS[3]))
gigs = toList(self.settings.value("Paths/GIG", SETTINGS_DEFAULT_PLUGINS_PATHS[4]))
sf2s = toList(self.settings.value("Paths/SF2", SETTINGS_DEFAULT_PLUGINS_PATHS[5]))
sfzs = toList(self.settings.value("Paths/SFZ", SETTINGS_DEFAULT_PLUGINS_PATHS[6]))

ladspas.sort()
dssis.sort()
lv2s.sort()
vsts.sort()
gigs.sort()
sf2s.sort()
sfzs.sort()

for ladspa in ladspas:
self.lw_ladspa.addItem(ladspa)

for dssi in dssis:
self.lw_dssi.addItem(dssi)

for lv2 in lv2s:
self.lw_lv2.addItem(lv2)

for vst in vsts:
self.lw_vst.addItem(vst)

for gig in gigs:
self.lw_gig.addItem(gig)

for sf2 in sf2s:
self.lw_sf2.addItem(sf2)

for sfz in sfzs:
self.lw_sfz.addItem(sfz)

@pyqtSlot()
def slot_saveSettings(self):
if not self.lw_page.isRowHidden(TAB_INDEX_MAIN):
@@ -363,67 +212,6 @@ class SettingsW(QDialog, ui_settings_app.Ui_SettingsW):
self.settings.setValue(LADISH_CONF_KEY_DAEMON_STUDIO_AUTOSTART, self.cb_ladish_studio_autostart.isChecked())
self.settings.setValue(LADISH_CONF_KEY_DAEMON_JS_SAVE_DELAY, self.sb_ladish_jsdelay.value())

# --------------------------------------------

if not self.lw_page.isRowHidden(TAB_INDEX_CARLA_ENGINE):
audioDriver = self.cb_engine_audio_driver.currentText()
self.settings.setValue("Engine/AudioDriver", audioDriver)

if audioDriver == "JACK":
self.settings.setValue("Engine/ProcessMode", self.cb_engine_process_mode_jack.currentIndex())
else:
self.settings.setValue("Engine/ProcessMode", self.cb_engine_process_mode_other.currentIndex()+PROCESS_MODE_NON_JACK_PADDING)

self.settings.setValue("Engine/MaxParameters", self.sb_engine_max_params.value())
self.settings.setValue("Engine/PreferUiBridges", self.ch_engine_prefer_ui_bridges.isChecked())
self.settings.setValue("Engine/OscUiTimeout", self.sb_engine_oscgui_timeout.value())
self.settings.setValue("Engine/DisableChecks", self.ch_engine_disable_checks.isChecked())
self.settings.setValue("Engine/UseDssiVstChunks", self.ch_engine_dssi_chunks.isChecked())
self.settings.setValue("Engine/PreferPluginBridges", self.ch_engine_prefer_plugin_bridges.isChecked())
self.settings.setValue("Engine/ForceStereo", self.ch_engine_force_stereo.isChecked())
self.settings.setValue("Engine/ProcessHighPrecision", self.ch_engine_process_hp.isChecked())

# --------------------------------------------

if not self.lw_page.isRowHidden(TAB_INDEX_CARLA_PATHS):
# FIXME - find a cleaner way to do this, *.items() ?
ladspas = []
dssis = []
lv2s = []
vsts = []
gigs = []
sf2s = []
sfzs = []

for i in range(self.lw_ladspa.count()):
ladspas.append(self.lw_ladspa.item(i).text())

for i in range(self.lw_dssi.count()):
dssis.append(self.lw_dssi.item(i).text())

for i in range(self.lw_lv2.count()):
lv2s.append(self.lw_lv2.item(i).text())

for i in range(self.lw_vst.count()):
vsts.append(self.lw_vst.item(i).text())

for i in range(self.lw_gig.count()):
gigs.append(self.lw_gig.item(i).text())

for i in range(self.lw_sf2.count()):
sf2s.append(self.lw_sf2.item(i).text())

for i in range(self.lw_sfz.count()):
sfzs.append(self.lw_sfz.item(i).text())

self.settings.setValue("Paths/LADSPA", ladspas)
self.settings.setValue("Paths/DSSI", dssis)
self.settings.setValue("Paths/LV2", lv2s)
self.settings.setValue("Paths/VST", vsts)
self.settings.setValue("Paths/GIG", gigs)
self.settings.setValue("Paths/SF2", sf2s)
self.settings.setValue("Paths/SFZ", sfzs)

@pyqtSlot()
def slot_resetSettings(self):
if self.lw_page.currentRow() == TAB_INDEX_MAIN:
@@ -448,188 +236,10 @@ class SettingsW(QDialog, ui_settings_app.Ui_SettingsW):
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.currentRow() == TAB_INDEX_CARLA_ENGINE:
self.cb_engine_audio_driver.setCurrentIndex(0)
self.sb_engine_max_params.setValue(CARLA_DEFAULT_MAX_PARAMETERS)
self.ch_engine_prefer_ui_bridges.setChecked(CARLA_DEFAULT_PREFER_UI_BRIDGES)
self.sb_engine_oscgui_timeout.setValue(CARLA_DEFAULT_OSC_UI_TIMEOUT)
self.ch_engine_disable_checks.setChecked(CARLA_DEFAULT_DISABLE_CHECKS)
self.ch_engine_dssi_chunks.setChecked(CARLA_DEFAULT_USE_DSSI_VST_CHUNKS)
self.ch_engine_prefer_plugin_bridges.setChecked(CARLA_DEFAULT_PREFER_PLUGIN_BRIDGES)
self.ch_engine_force_stereo.setChecked(CARLA_DEFAULT_FORCE_STEREO)
self.ch_engine_process_hp.setChecked(CARLA_DEFAULT_PROCESS_HIGH_PRECISION)

if self.cb_engine_audio_driver.currentText() == "JACK":
self.cb_engine_process_mode_jack.setCurrentIndex(PROCESS_MODE_MULTIPLE_CLIENTS)
self.sw_engine_process_mode.setCurrentIndex(0)
else:
self.cb_engine_process_mode_other.setCurrentIndex(PROCESS_MODE_CONTINUOUS_RACK-PROCESS_MODE_NON_JACK_PADDING)
self.sw_engine_process_mode.setCurrentIndex(1)

elif self.lw_page.currentRow() == TAB_INDEX_CARLA_PATHS:
ladspas, dssis, lv2s, vsts, gigs, sf2s, sfzs = SETTINGS_DEFAULT_PLUGINS_PATHS

if self.tw_paths.currentIndex() == 0:
ladspas.sort()
self.lw_ladspa.clear()

for ladspa in ladspas:
self.lw_ladspa.addItem(ladspa)

elif self.tw_paths.currentIndex() == 1:
dssis.sort()
self.lw_dssi.clear()

for dssi in dssis:
self.lw_dssi.addItem(dssi)

elif self.tw_paths.currentIndex() == 2:
lv2s.sort()
self.lw_lv2.clear()

for lv2 in lv2s:
self.lw_lv2.addItem(lv2)

elif self.tw_paths.currentIndex() == 3:
vsts.sort()
self.lw_vst.clear()

for vst in vsts:
self.lw_vst.addItem(vst)

elif self.tw_paths.currentIndex() == 4:
gigs.sort()
self.lw_gig.clear()

for gig in gigs:
self.lw_gig.addItem(gig)

elif self.tw_paths.currentIndex() == 5:
sf2s.sort()
self.lw_sf2.clear()

for sf2 in sf2s:
self.lw_sf2.addItem(sf2)

elif self.tw_paths.currentIndex() == 6:
sfzs.sort()
self.lw_sfz.clear()

for sfz in sfzs:
self.lw_sfz.addItem(sfz)

@pyqtSlot()
def slot_getAndSetProjectPath(self):
getAndSetPath(self, self.le_main_def_folder.text(), self.le_main_def_folder)

@pyqtSlot()
def slot_engineAudioDriverChanged(self):
if self.cb_engine_audio_driver.currentText() == "JACK":
self.sw_engine_process_mode.setCurrentIndex(0)
else:
self.sw_engine_process_mode.setCurrentIndex(1)

@pyqtSlot()
def slot_addPluginPath(self):
newPath = QFileDialog.getExistingDirectory(self, self.tr("Add Path"), "", QFileDialog.ShowDirsOnly)
if newPath:
if self.tw_paths.currentIndex() == 0:
self.lw_ladspa.addItem(newPath)
elif self.tw_paths.currentIndex() == 1:
self.lw_dssi.addItem(newPath)
elif self.tw_paths.currentIndex() == 2:
self.lw_lv2.addItem(newPath)
elif self.tw_paths.currentIndex() == 3:
self.lw_vst.addItem(newPath)
elif self.tw_paths.currentIndex() == 4:
self.lw_gig.addItem(newPath)
elif self.tw_paths.currentIndex() == 5:
self.lw_sf2.addItem(newPath)
elif self.tw_paths.currentIndex() == 6:
self.lw_sfz.addItem(newPath)

@pyqtSlot()
def slot_removePluginPath(self):
if self.tw_paths.currentIndex() == 0:
self.lw_ladspa.takeItem(self.lw_ladspa.currentRow())
elif self.tw_paths.currentIndex() == 1:
self.lw_dssi.takeItem(self.lw_dssi.currentRow())
elif self.tw_paths.currentIndex() == 2:
self.lw_lv2.takeItem(self.lw_lv2.currentRow())
elif self.tw_paths.currentIndex() == 3:
self.lw_vst.takeItem(self.lw_vst.currentRow())
elif self.tw_paths.currentIndex() == 4:
self.lw_gig.takeItem(self.lw_gig.currentRow())
elif self.tw_paths.currentIndex() == 5:
self.lw_sf2.takeItem(self.lw_sf2.currentRow())
elif self.tw_paths.currentIndex() == 6:
self.lw_sfz.takeItem(self.lw_sfz.currentRow())

@pyqtSlot()
def slot_changePluginPath(self):
if self.tw_paths.currentIndex() == 0:
currentPath = self.lw_ladspa.currentItem().text()
elif self.tw_paths.currentIndex() == 1:
currentPath = self.lw_dssi.currentItem().text()
elif self.tw_paths.currentIndex() == 2:
currentPath = self.lw_lv2.currentItem().text()
elif self.tw_paths.currentIndex() == 3:
currentPath = self.lw_vst.currentItem().text()
elif self.tw_paths.currentIndex() == 4:
currentPath = self.lw_gig.currentItem().text()
elif self.tw_paths.currentIndex() == 5:
currentPath = self.lw_sf2.currentItem().text()
elif self.tw_paths.currentIndex() == 6:
currentPath = self.lw_sfz.currentItem().text()
else:
currentPath = ""

newPath = QFileDialog.getExistingDirectory(self, self.tr("Add Path"), currentPath, QFileDialog.ShowDirsOnly)
if newPath:
if self.tw_paths.currentIndex() == 0:
self.lw_ladspa.currentItem().setText(newPath)
elif self.tw_paths.currentIndex() == 1:
self.lw_dssi.currentItem().setText(newPath)
elif self.tw_paths.currentIndex() == 2:
self.lw_lv2.currentItem().setText(newPath)
elif self.tw_paths.currentIndex() == 3:
self.lw_vst.currentItem().setText(newPath)
elif self.tw_paths.currentIndex() == 4:
self.lw_gig.currentItem().setText(newPath)
elif self.tw_paths.currentIndex() == 5:
self.lw_sf2.currentItem().setText(newPath)
elif self.tw_paths.currentIndex() == 6:
self.lw_sfz.currentItem().setText(newPath)

@pyqtSlot(int)
def slot_pluginPathTabChanged(self, index):
if index == 0:
row = self.lw_ladspa.currentRow()
elif index == 1:
row = self.lw_dssi.currentRow()
elif index == 2:
row = self.lw_lv2.currentRow()
elif index == 3:
row = self.lw_vst.currentRow()
elif index == 4:
row = self.lw_gig.currentRow()
elif index == 5:
row = self.lw_sf2.currentRow()
elif index == 6:
row = self.lw_sfz.currentRow()
else:
row = -1

check = bool(row >= 0)
self.b_paths_remove.setEnabled(check)
self.b_paths_change.setEnabled(check)

@pyqtSlot(int)
def slot_pluginPathRowChanged(self, row):
check = bool(row >= 0)
self.b_paths_remove.setEnabled(check)
self.b_paths_change.setEnabled(check)

def done(self, r):
QDialog.done(self, r)
self.close()

Loading…
Cancel
Save