@@ -282,6 +282,7 @@ RES = \ | |||||
bin/resources/ui_carla_plugin_basic_fx.py \ | bin/resources/ui_carla_plugin_basic_fx.py \ | ||||
bin/resources/ui_carla_plugin_calf.py \ | bin/resources/ui_carla_plugin_calf.py \ | ||||
bin/resources/ui_carla_plugin_default.py \ | bin/resources/ui_carla_plugin_default.py \ | ||||
bin/resources/ui_carla_plugin_sf2.py \ | |||||
bin/resources/ui_carla_plugin_zita.py \ | bin/resources/ui_carla_plugin_zita.py \ | ||||
bin/resources/ui_carla_plugin_zynfx.py \ | bin/resources/ui_carla_plugin_zynfx.py \ | ||||
bin/resources/ui_carla_refresh.py \ | bin/resources/ui_carla_refresh.py \ | ||||
@@ -319,8 +320,9 @@ UIs = \ | |||||
source/ui_carla_host.py \ | source/ui_carla_host.py \ | ||||
source/ui_carla_parameter.py \ | source/ui_carla_parameter.py \ | ||||
source/ui_carla_plugin_basic_fx.py \ | source/ui_carla_plugin_basic_fx.py \ | ||||
source/ui_carla_plugin_default.py \ | |||||
source/ui_carla_plugin_calf.py \ | source/ui_carla_plugin_calf.py \ | ||||
source/ui_carla_plugin_default.py \ | |||||
source/ui_carla_plugin_sf2.py \ | |||||
source/ui_carla_plugin_zita.py \ | source/ui_carla_plugin_zita.py \ | ||||
source/ui_carla_plugin_zynfx.py \ | source/ui_carla_plugin_zynfx.py \ | ||||
source/ui_carla_refresh.py \ | source/ui_carla_refresh.py \ | ||||
@@ -532,6 +534,7 @@ install: | |||||
$(LINK) $(PREFIX)/share/carla/ui_carla_plugin_basic_fx.py $(DESTDIR)$(PREFIX)/share/carla/resources/ | $(LINK) $(PREFIX)/share/carla/ui_carla_plugin_basic_fx.py $(DESTDIR)$(PREFIX)/share/carla/resources/ | ||||
$(LINK) $(PREFIX)/share/carla/ui_carla_plugin_calf.py $(DESTDIR)$(PREFIX)/share/carla/resources/ | $(LINK) $(PREFIX)/share/carla/ui_carla_plugin_calf.py $(DESTDIR)$(PREFIX)/share/carla/resources/ | ||||
$(LINK) $(PREFIX)/share/carla/ui_carla_plugin_default.py $(DESTDIR)$(PREFIX)/share/carla/resources/ | $(LINK) $(PREFIX)/share/carla/ui_carla_plugin_default.py $(DESTDIR)$(PREFIX)/share/carla/resources/ | ||||
$(LINK) $(PREFIX)/share/carla/ui_carla_plugin_sf2.py $(DESTDIR)$(PREFIX)/share/carla/resources/ | |||||
$(LINK) $(PREFIX)/share/carla/ui_carla_plugin_zita.py $(DESTDIR)$(PREFIX)/share/carla/resources/ | $(LINK) $(PREFIX)/share/carla/ui_carla_plugin_zita.py $(DESTDIR)$(PREFIX)/share/carla/resources/ | ||||
$(LINK) $(PREFIX)/share/carla/ui_carla_plugin_zynfx.py $(DESTDIR)$(PREFIX)/share/carla/resources/ | $(LINK) $(PREFIX)/share/carla/ui_carla_plugin_zynfx.py $(DESTDIR)$(PREFIX)/share/carla/resources/ | ||||
$(LINK) $(PREFIX)/share/carla/ui_carla_refresh.py $(DESTDIR)$(PREFIX)/share/carla/resources/ | $(LINK) $(PREFIX)/share/carla/ui_carla_refresh.py $(DESTDIR)$(PREFIX)/share/carla/resources/ | ||||
@@ -0,0 +1,399 @@ | |||||
<?xml version="1.0" encoding="UTF-8"?> | |||||
<ui version="4.0"> | |||||
<class>PluginWidget</class> | |||||
<widget class="QFrame" name="PluginWidget"> | |||||
<property name="geometry"> | |||||
<rect> | |||||
<x>0</x> | |||||
<y>0</y> | |||||
<width>374</width> | |||||
<height>71</height> | |||||
</rect> | |||||
</property> | |||||
<property name="contextMenuPolicy"> | |||||
<enum>Qt::CustomContextMenu</enum> | |||||
</property> | |||||
<property name="windowTitle"> | |||||
<string>Frame</string> | |||||
</property> | |||||
<layout class="QVBoxLayout" name="verticalLayout"> | |||||
<property name="spacing"> | |||||
<number>1</number> | |||||
</property> | |||||
<property name="leftMargin"> | |||||
<number>2</number> | |||||
</property> | |||||
<property name="topMargin"> | |||||
<number>3</number> | |||||
</property> | |||||
<property name="rightMargin"> | |||||
<number>2</number> | |||||
</property> | |||||
<property name="bottomMargin"> | |||||
<number>0</number> | |||||
</property> | |||||
<item> | |||||
<layout class="QHBoxLayout" name="horizontalLayout"> | |||||
<property name="spacing"> | |||||
<number>1</number> | |||||
</property> | |||||
<item> | |||||
<spacer name="horizontalSpacer_4"> | |||||
<property name="orientation"> | |||||
<enum>Qt::Horizontal</enum> | |||||
</property> | |||||
<property name="sizeType"> | |||||
<enum>QSizePolicy::Fixed</enum> | |||||
</property> | |||||
<property name="sizeHint" stdset="0"> | |||||
<size> | |||||
<width>20</width> | |||||
<height>1</height> | |||||
</size> | |||||
</property> | |||||
</spacer> | |||||
</item> | |||||
<item> | |||||
<widget class="PixmapButton" name="b_enable"> | |||||
<property name="minimumSize"> | |||||
<size> | |||||
<width>24</width> | |||||
<height>24</height> | |||||
</size> | |||||
</property> | |||||
<property name="maximumSize"> | |||||
<size> | |||||
<width>24</width> | |||||
<height>24</height> | |||||
</size> | |||||
</property> | |||||
<property name="text"> | |||||
<string/> | |||||
</property> | |||||
<property name="icon"> | |||||
<iconset resource="../resources.qrc"> | |||||
<normaloff>:/bitmaps/button_off.png</normaloff>:/bitmaps/button_off.png</iconset> | |||||
</property> | |||||
<property name="iconSize"> | |||||
<size> | |||||
<width>24</width> | |||||
<height>24</height> | |||||
</size> | |||||
</property> | |||||
<property name="checkable"> | |||||
<bool>true</bool> | |||||
</property> | |||||
<property name="flat"> | |||||
<bool>true</bool> | |||||
</property> | |||||
</widget> | |||||
</item> | |||||
<item> | |||||
<widget class="PixmapButton" name="b_edit"> | |||||
<property name="minimumSize"> | |||||
<size> | |||||
<width>24</width> | |||||
<height>24</height> | |||||
</size> | |||||
</property> | |||||
<property name="maximumSize"> | |||||
<size> | |||||
<width>24</width> | |||||
<height>24</height> | |||||
</size> | |||||
</property> | |||||
<property name="text"> | |||||
<string/> | |||||
</property> | |||||
<property name="icon"> | |||||
<iconset resource="../resources.qrc"> | |||||
<normaloff>:/bitmaps/button_edit.png</normaloff>:/bitmaps/button_edit.png</iconset> | |||||
</property> | |||||
<property name="iconSize"> | |||||
<size> | |||||
<width>24</width> | |||||
<height>24</height> | |||||
</size> | |||||
</property> | |||||
<property name="checkable"> | |||||
<bool>true</bool> | |||||
</property> | |||||
<property name="flat"> | |||||
<bool>true</bool> | |||||
</property> | |||||
</widget> | |||||
</item> | |||||
<item> | |||||
<spacer name="horizontalSpacer"> | |||||
<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_name"> | |||||
<property name="text"> | |||||
<string>PluginName</string> | |||||
</property> | |||||
<property name="alignment"> | |||||
<set>Qt::AlignCenter</set> | |||||
</property> | |||||
</widget> | |||||
</item> | |||||
<item> | |||||
<spacer name="horizontalSpacer_2"> | |||||
<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="LEDButton" name="led_control"> | |||||
<property name="minimumSize"> | |||||
<size> | |||||
<width>14</width> | |||||
<height>14</height> | |||||
</size> | |||||
</property> | |||||
<property name="maximumSize"> | |||||
<size> | |||||
<width>14</width> | |||||
<height>14</height> | |||||
</size> | |||||
</property> | |||||
<property name="text"> | |||||
<string/> | |||||
</property> | |||||
<property name="checkable"> | |||||
<bool>true</bool> | |||||
</property> | |||||
</widget> | |||||
</item> | |||||
<item> | |||||
<widget class="LEDButton" name="led_midi"> | |||||
<property name="minimumSize"> | |||||
<size> | |||||
<width>14</width> | |||||
<height>14</height> | |||||
</size> | |||||
</property> | |||||
<property name="maximumSize"> | |||||
<size> | |||||
<width>14</width> | |||||
<height>14</height> | |||||
</size> | |||||
</property> | |||||
<property name="text"> | |||||
<string/> | |||||
</property> | |||||
<property name="checkable"> | |||||
<bool>true</bool> | |||||
</property> | |||||
</widget> | |||||
</item> | |||||
<item> | |||||
<widget class="LEDButton" name="led_audio_out"> | |||||
<property name="minimumSize"> | |||||
<size> | |||||
<width>14</width> | |||||
<height>14</height> | |||||
</size> | |||||
</property> | |||||
<property name="maximumSize"> | |||||
<size> | |||||
<width>14</width> | |||||
<height>14</height> | |||||
</size> | |||||
</property> | |||||
<property name="text"> | |||||
<string/> | |||||
</property> | |||||
<property name="checkable"> | |||||
<bool>true</bool> | |||||
</property> | |||||
</widget> | |||||
</item> | |||||
<item> | |||||
<spacer name="horizontalSpacer_5"> | |||||
<property name="orientation"> | |||||
<enum>Qt::Horizontal</enum> | |||||
</property> | |||||
<property name="sizeType"> | |||||
<enum>QSizePolicy::Fixed</enum> | |||||
</property> | |||||
<property name="sizeHint" stdset="0"> | |||||
<size> | |||||
<width>20</width> | |||||
<height>1</height> | |||||
</size> | |||||
</property> | |||||
</spacer> | |||||
</item> | |||||
</layout> | |||||
</item> | |||||
<item> | |||||
<widget class="Line" name="line"> | |||||
<property name="lineWidth"> | |||||
<number>0</number> | |||||
</property> | |||||
<property name="midLineWidth"> | |||||
<number>1</number> | |||||
</property> | |||||
<property name="orientation"> | |||||
<enum>Qt::Horizontal</enum> | |||||
</property> | |||||
</widget> | |||||
</item> | |||||
<item> | |||||
<layout class="QHBoxLayout" name="horizontalLayout_2"> | |||||
<property name="spacing"> | |||||
<number>10</number> | |||||
</property> | |||||
<property name="topMargin"> | |||||
<number>2</number> | |||||
</property> | |||||
<item> | |||||
<widget class="QWidget" name="w_screws_left" native="true"> | |||||
<property name="minimumSize"> | |||||
<size> | |||||
<width>20</width> | |||||
<height>0</height> | |||||
</size> | |||||
</property> | |||||
<property name="maximumSize"> | |||||
<size> | |||||
<width>20</width> | |||||
<height>16777215</height> | |||||
</size> | |||||
</property> | |||||
</widget> | |||||
</item> | |||||
<item> | |||||
<widget class="QWidget" name="w_knobs" native="true"> | |||||
<layout class="QHBoxLayout" name="horizontalLayout_3"/> | |||||
</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="PixmapDial" name="dial_vol"> | |||||
<property name="minimumSize"> | |||||
<size> | |||||
<width>34</width> | |||||
<height>34</height> | |||||
</size> | |||||
</property> | |||||
<property name="maximumSize"> | |||||
<size> | |||||
<width>34</width> | |||||
<height>34</height> | |||||
</size> | |||||
</property> | |||||
</widget> | |||||
</item> | |||||
<item> | |||||
<layout class="QVBoxLayout" name="verticalLayout_2"> | |||||
<property name="spacing"> | |||||
<number>1</number> | |||||
</property> | |||||
<property name="leftMargin"> | |||||
<number>0</number> | |||||
</property> | |||||
<property name="topMargin"> | |||||
<number>0</number> | |||||
</property> | |||||
<property name="rightMargin"> | |||||
<number>0</number> | |||||
</property> | |||||
<property name="bottomMargin"> | |||||
<number>4</number> | |||||
</property> | |||||
<item> | |||||
<widget class="DigitalPeakMeter" name="peak_out" native="true"> | |||||
<property name="minimumSize"> | |||||
<size> | |||||
<width>150</width> | |||||
<height>0</height> | |||||
</size> | |||||
</property> | |||||
<property name="maximumSize"> | |||||
<size> | |||||
<width>150</width> | |||||
<height>16777215</height> | |||||
</size> | |||||
</property> | |||||
</widget> | |||||
</item> | |||||
</layout> | |||||
</item> | |||||
<item> | |||||
<widget class="QWidget" name="w_screws_right" native="true"> | |||||
<property name="minimumSize"> | |||||
<size> | |||||
<width>20</width> | |||||
<height>0</height> | |||||
</size> | |||||
</property> | |||||
<property name="maximumSize"> | |||||
<size> | |||||
<width>20</width> | |||||
<height>16777215</height> | |||||
</size> | |||||
</property> | |||||
</widget> | |||||
</item> | |||||
</layout> | |||||
</item> | |||||
</layout> | |||||
</widget> | |||||
<customwidgets> | |||||
<customwidget> | |||||
<class>PixmapDial</class> | |||||
<extends>QDial</extends> | |||||
<header>pixmapdial.h</header> | |||||
</customwidget> | |||||
<customwidget> | |||||
<class>DigitalPeakMeter</class> | |||||
<extends>QWidget</extends> | |||||
<header>digitalpeakmeter.h</header> | |||||
<container>1</container> | |||||
</customwidget> | |||||
<customwidget> | |||||
<class>LEDButton</class> | |||||
<extends>QPushButton</extends> | |||||
<header>ledbutton.h</header> | |||||
</customwidget> | |||||
<customwidget> | |||||
<class>PixmapButton</class> | |||||
<extends>QPushButton</extends> | |||||
<header>pixmapbutton.h</header> | |||||
</customwidget> | |||||
</customwidgets> | |||||
<resources> | |||||
<include location="../resources.qrc"/> | |||||
</resources> | |||||
<connections/> | |||||
</ui> |
@@ -38,6 +38,7 @@ else: | |||||
import ui_carla_plugin_default | import ui_carla_plugin_default | ||||
import ui_carla_plugin_basic_fx | import ui_carla_plugin_basic_fx | ||||
import ui_carla_plugin_calf | import ui_carla_plugin_calf | ||||
import ui_carla_plugin_sf2 | |||||
import ui_carla_plugin_zita | import ui_carla_plugin_zita | ||||
import ui_carla_plugin_zynfx | import ui_carla_plugin_zynfx | ||||
@@ -283,14 +284,14 @@ class AbstractPluginSlot(QFrame, PluginEditParentMeta): | |||||
self.led_audio_out.setEnabled(False) | self.led_audio_out.setEnabled(False) | ||||
if self.peak_in is not None: | if self.peak_in is not None: | ||||
self.peak_in.setColor(self.peak_in.GREEN) | |||||
self.peak_in.setColor(DigitalPeakMeter.GREEN) | |||||
self.peak_in.setChannels(self.fPeaksInputCount) | self.peak_in.setChannels(self.fPeaksInputCount) | ||||
self.peak_in.setOrientation(self.peak_in.HORIZONTAL) | |||||
self.peak_in.setOrientation(DigitalPeakMeter.HORIZONTAL) | |||||
if self.peak_out is not None: | if self.peak_out is not None: | ||||
self.peak_out.setColor(self.peak_in.BLUE) | |||||
self.peak_out.setColor(DigitalPeakMeter.BLUE) | |||||
self.peak_out.setChannels(self.fPeaksOutputCount) | self.peak_out.setChannels(self.fPeaksOutputCount) | ||||
self.peak_out.setOrientation(self.peak_out.HORIZONTAL) | |||||
self.peak_out.setOrientation(DigitalPeakMeter.HORIZONTAL) | |||||
for paramIndex, paramWidget in self.fParameterList: | for paramIndex, paramWidget in self.fParameterList: | ||||
paramWidget.setContextMenuPolicy(Qt.CustomContextMenu) | paramWidget.setContextMenuPolicy(Qt.CustomContextMenu) | ||||
@@ -1440,6 +1441,119 @@ class PluginSlot_Nekobi(AbstractPluginSlot): | |||||
# ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
class PluginSlot_SF2(AbstractPluginSlot): | |||||
def __init__(self, parent, host, pluginId): | |||||
AbstractPluginSlot.__init__(self, parent, host, pluginId) | |||||
self.ui = ui_carla_plugin_sf2.Ui_PluginWidget() | |||||
self.ui.setupUi(self) | |||||
# ------------------------------------------------------------- | |||||
# Set-up GUI | |||||
#labelFont = self.ui.label_name.font() | |||||
#labelFont.setBold(True) | |||||
#labelFont.setPointSize(9) | |||||
#self.ui.label_name.setFont(labelFont) | |||||
self.setStyleSheet(""" | |||||
PluginSlot_SF2#PluginWidget { | |||||
background-image: url(:/bitmaps/background_3bandeq.png); | |||||
background-repeat: repeat-xy; | |||||
} | |||||
QLabel#label_name { | |||||
color: #BBB; | |||||
} | |||||
""") | |||||
self.ui.b_enable.setPixmaps(":/bitmaps/button_off.png", ":/bitmaps/button_on.png", ":/bitmaps/button_off.png") | |||||
self.ui.b_edit.setPixmaps(":/bitmaps/button_edit.png", ":/bitmaps/button_edit_down.png", ":/bitmaps/button_edit_hover.png") | |||||
# ------------------------------------------------------------- | |||||
# Set-up parameters | |||||
parameterCount = self.host.get_parameter_count(self.fPluginId) | |||||
index = 0 | |||||
for i in range(parameterCount): | |||||
if index >= 8: | |||||
break | |||||
paramInfo = self.host.get_parameter_info(self.fPluginId, i) | |||||
paramData = self.host.get_parameter_data(self.fPluginId, i) | |||||
paramRanges = self.host.get_parameter_ranges(self.fPluginId, i) | |||||
if paramData['type'] != PARAMETER_INPUT: | |||||
continue | |||||
if paramData['hints'] & PARAMETER_IS_BOOLEAN: | |||||
continue | |||||
if (paramData['hints'] & PARAMETER_IS_ENABLED) == 0: | |||||
continue | |||||
paramName = getParameterShortName(paramInfo['name']) | |||||
widget = PixmapDial(self, i) | |||||
widget.setPixmap(3) | |||||
widget.setLabel(paramName) | |||||
widget.setMinimum(paramRanges['min']) | |||||
widget.setMaximum(paramRanges['max']) | |||||
if (paramData['hints'] & PARAMETER_IS_ENABLED) == 0: | |||||
widget.setEnabled(False) | |||||
self.ui.w_knobs.layout().insertWidget(index, widget) | |||||
index += 1 | |||||
self.fParameterList.append([i, widget]) | |||||
self.ui.dial_vol.setIndex(PARAMETER_VOLUME) | |||||
self.ui.dial_vol.setPixmap(3) | |||||
self.ui.dial_vol.setLabel("Volume") | |||||
self.ui.dial_vol.setCustomPaintMode(PixmapDial.CUSTOM_PAINT_MODE_CARLA_VOL) | |||||
self.ui.dial_vol.setMinimum(0.0) | |||||
self.ui.dial_vol.setMaximum(1.27) | |||||
self.ui.dial_vol.forceWhiteLabelGradientText() | |||||
self.ui.dial_vol.setVisible(self.fPluginInfo['hints'] & PLUGIN_CAN_VOLUME) | |||||
self.fParameterList.append([PARAMETER_VOLUME, self.ui.dial_vol]) | |||||
# ------------------------------------------------------------- | |||||
self.b_enable = self.ui.b_enable | |||||
self.b_edit = self.ui.b_edit | |||||
self.label_name = self.ui.label_name | |||||
self.led_control = self.ui.led_control | |||||
self.led_midi = self.ui.led_midi | |||||
self.led_audio_out = self.ui.led_audio_out | |||||
self.peak_out = self.ui.peak_out | |||||
self.ready() | |||||
self.customContextMenuRequested.connect(self.slot_showDefaultCustomMenu) | |||||
#------------------------------------------------------------------ | |||||
def getFixedHeight(self): | |||||
return 79 | |||||
#------------------------------------------------------------------ | |||||
def paintEvent(self, event): | |||||
painter = QPainter(self) | |||||
painter.setBrush(Qt.transparent) | |||||
painter.setPen(QPen(QColor(42, 42, 42), 1)) | |||||
painter.drawRect(0, 1, self.width()-1, 79-3) | |||||
painter.setPen(QPen(QColor(60, 60, 60), 1)) | |||||
painter.drawLine(0, 0, self.width(), 0) | |||||
AbstractPluginSlot.paintEvent(self, event) | |||||
# ------------------------------------------------------------------------------------------------------------ | |||||
class PluginSlot_ZitaRev(AbstractPluginSlot): | class PluginSlot_ZitaRev(AbstractPluginSlot): | ||||
def __init__(self, parent, host, pluginId): | def __init__(self, parent, host, pluginId): | ||||
AbstractPluginSlot.__init__(self, parent, host, pluginId) | AbstractPluginSlot.__init__(self, parent, host, pluginId) | ||||
@@ -1819,6 +1933,9 @@ def createPluginSlot(parent, host, pluginId, useSkins): | |||||
#pluginIcon = pluginInfo['iconName'] | #pluginIcon = pluginInfo['iconName'] | ||||
if pluginInfo['type'] == PLUGIN_SF2: | |||||
return PluginSlot_SF2(parent, host, pluginId) | |||||
if pluginMaker == "OpenAV Productions": | if pluginMaker == "OpenAV Productions": | ||||
return PluginSlot_OpenAV(parent, host, pluginId) | return PluginSlot_OpenAV(parent, host, pluginId) | ||||