Browse Source

Add Plugin menu group with some useful macros (closes #42)

tags/1.9.4
falkTX 11 years ago
parent
commit
d59428c81d
4 changed files with 164 additions and 2 deletions
  1. +50
    -1
      resources/ui/carla.ui
  2. +111
    -0
      source/carla.py
  3. +1
    -1
      source/carla_shared.py
  4. +2
    -0
      source/theme/CarlaStyle.cpp

+ 50
- 1
resources/ui/carla.ui View File

@@ -297,9 +297,23 @@
<property name="title">
<string>&amp;Plugin</string>
</property>
<widget class="QMenu" name="menu_PluginMacros">
<property name="title">
<string>Macros (all plugins)</string>
</property>
<addaction name="act_plugins_enable"/>
<addaction name="act_plugins_volume100"/>
<addaction name="act_plugins_wet100"/>
<addaction name="act_plugins_center"/>
<addaction name="separator"/>
<addaction name="act_plugins_disable"/>
<addaction name="act_plugins_mute"/>
<addaction name="act_plugins_bypass"/>
</widget>
<addaction name="act_plugin_add"/>
<addaction name="separator"/>
<addaction name="act_plugin_remove_all"/>
<addaction name="separator"/>
<addaction name="menu_PluginMacros"/>
</widget>
<widget class="QMenu" name="menu_Help">
<property name="title">
@@ -674,6 +688,41 @@
<string>Ctrl+Shift+F</string>
</property>
</action>
<action name="act_plugins_enable">
<property name="text">
<string>Enable</string>
</property>
</action>
<action name="act_plugins_disable">
<property name="text">
<string>Disable</string>
</property>
</action>
<action name="act_plugins_bypass">
<property name="text">
<string>Bypass</string>
</property>
</action>
<action name="act_plugins_wet100">
<property name="text">
<string>100% Wet</string>
</property>
</action>
<action name="act_plugins_mute">
<property name="text">
<string>Mute</string>
</property>
</action>
<action name="act_plugins_volume100">
<property name="text">
<string>100% Volume</string>
</property>
</action>
<action name="act_plugins_center">
<property name="text">
<string>Center Balance</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>


+ 111
- 0
source/carla.py View File

@@ -765,6 +765,14 @@ class CarlaMainW(QMainWindow):
#self.connect(self.ui.act_plugin_refresh, SIGNAL("triggered()"), SLOT("slot_pluginRefresh()"))
self.connect(self.ui.act_plugin_remove_all, SIGNAL("triggered()"), SLOT("slot_pluginRemoveAll()"))

self.connect(self.ui.act_plugins_enable, SIGNAL("triggered()"), SLOT("slot_pluginsEnable()"))
self.connect(self.ui.act_plugins_volume100, SIGNAL("triggered()"), SLOT("slot_pluginsVolume100()"))
self.connect(self.ui.act_plugins_wet100, SIGNAL("triggered()"), SLOT("slot_pluginsWet100()"))
self.connect(self.ui.act_plugins_center, SIGNAL("triggered()"), SLOT("slot_pluginsCenter()"))
self.connect(self.ui.act_plugins_disable, SIGNAL("triggered()"), SLOT("slot_pluginsDisable()"))
self.connect(self.ui.act_plugins_mute, SIGNAL("triggered()"), SLOT("slot_pluginsMute()"))
self.connect(self.ui.act_plugins_bypass, SIGNAL("triggered()"), SLOT("slot_pluginsBypass()"))

self.connect(self.ui.act_transport_play, SIGNAL("triggered(bool)"), SLOT("slot_transportPlayPause(bool)"))
self.connect(self.ui.act_transport_stop, SIGNAL("triggered()"), SLOT("slot_transportStop()"))
self.connect(self.ui.act_transport_backwards, SIGNAL("triggered()"), SLOT("slot_transportBackwards()"))
@@ -845,6 +853,109 @@ class CarlaMainW(QMainWindow):
else:
QTimer.singleShot(0, self, SLOT("slot_engineStart()"))

@pyqtSlot()
def slot_pluginsEnable(self):
if not self.fEngineStarted:
return

for i in range(self.fPluginCount):
pwidget = self.fPluginList[i]

if pwidget is None:
break

pwidget.setActive(True, True, True)

@pyqtSlot()
def slot_pluginsVolume100(self):
if not self.fEngineStarted:
return

for i in range(self.fPluginCount):
pwidget = self.fPluginList[i]

if pwidget is None:
break

if pwidget.fPluginInfo["hints"] & PLUGIN_CAN_VOLUME:
pwidget.ui.edit_dialog.setParameterValue(PARAMETER_VOLUME, 1.0)
Carla.host.set_volume(i, 1.0)

@pyqtSlot()
def slot_pluginsWet100(self):
if not self.fEngineStarted:
return

for i in range(self.fPluginCount):
pwidget = self.fPluginList[i]

if pwidget is None:
break

if pwidget.fPluginInfo["hints"] & PLUGIN_CAN_DRYWET:
pwidget.ui.edit_dialog.setParameterValue(PARAMETER_DRYWET, 1.0)
Carla.host.set_drywet(i, 1.0)

@pyqtSlot()
def slot_pluginsCenter(self):
if not self.fEngineStarted:
return

for i in range(self.fPluginCount):
pwidget = self.fPluginList[i]

if pwidget is None:
break

if pwidget.fPluginInfo["hints"] & PLUGIN_CAN_BALANCE:
pwidget.ui.edit_dialog.setParameterValue(PARAMETER_BALANCE_LEFT, -1.0)
pwidget.ui.edit_dialog.setParameterValue(PARAMETER_BALANCE_RIGHT, 1.0)
Carla.host.set_balance_left(i, -1.0)
Carla.host.set_balance_right(i, 1.0)

@pyqtSlot()
def slot_pluginsDisable(self):
if not self.fEngineStarted:
return

for i in range(self.fPluginCount):
pwidget = self.fPluginList[i]

if pwidget is None:
break

pwidget.setActive(False, True, True)

@pyqtSlot()
def slot_pluginsMute(self):
if not self.fEngineStarted:
return

for i in range(self.fPluginCount):
pwidget = self.fPluginList[i]

if pwidget is None:
break

if pwidget.fPluginInfo["hints"] & PLUGIN_CAN_VOLUME:
pwidget.ui.edit_dialog.setParameterValue(PARAMETER_VOLUME, 0.0)
Carla.host.set_volume(i, 0.0)

@pyqtSlot()
def slot_pluginsBypass(self):
if not self.fEngineStarted:
return

for i in range(self.fPluginCount):
pwidget = self.fPluginList[i]

if pwidget is None:
break

if pwidget.fPluginInfo["hints"] & PLUGIN_CAN_DRYWET:
pwidget.ui.edit_dialog.setParameterValue(PARAMETER_DRYWET, 0.0)
Carla.host.set_drywet(i, 0.0)

@pyqtSlot(int)
def slot_diskFolderChanged(self, index):
if index < 0:


+ 1
- 1
source/carla_shared.py View File

@@ -2070,7 +2070,7 @@ class PluginWidget(QFrame):
self.ui.b_edit.setChecked(False)

def recheckPluginHints(self, hints):
self.fPluginInfo['hints'] = hints
self.fPluginInfo["hints"] = hints
self.ui.b_gui.setEnabled(hints & PLUGIN_HAS_GUI)

def setActive(self, active, sendGui=False, sendCallback=True):


+ 2
- 0
source/theme/CarlaStyle.cpp View File

@@ -2165,6 +2165,8 @@ void CarlaStyle::drawControl(ControlElement element, const QStyleOption *option,
x2 = y2;
y2 = temp;
}
#else
Q_UNUSED(flip);
#endif

painter->setRenderHint(QPainter::Antialiasing, true);


Loading…
Cancel
Save