Browse Source

Same

tags/1.9.4
falkTX 11 years ago
parent
commit
ed83b0ca98
7 changed files with 65 additions and 88 deletions
  1. +8
    -7
      source/carla.py
  2. +32
    -49
      source/carla_control.py
  3. +1
    -1
      source/carla_shared.py
  4. +4
    -2
      source/modules/widgets/canvaspreviewframe.py
  5. +9
    -19
      source/modules/widgets/paramspinbox.py
  6. +9
    -8
      source/patchcanvas.py
  7. +2
    -2
      source/patchcanvas_theme.py

+ 8
- 7
source/carla.py View File

@@ -20,9 +20,10 @@
# Imports (Global)

from time import sleep
from PyQt4.QtCore import Qt, QModelIndex, QPointF, QSize
from PyQt4.QtGui import QApplication, QDialogButtonBox, QFileSystemModel, QLabel, QMainWindow, QResizeEvent
from PyQt4.QtGui import QImage, QPalette, QPrinter, QPrintDialog, QSyntaxHighlighter
from PyQt5.QtCore import Qt, QModelIndex, QPointF, QSize
from PyQt5.QtGui import QImage, QPalette, QResizeEvent, QSyntaxHighlighter
from PyQt5.QtPrintSupport import QPrinter, QPrintDialog
from PyQt5.QtWidgets import QApplication, QDialogButtonBox, QFileSystemModel, QLabel, QMainWindow

# ------------------------------------------------------------------------------------------------------------
# Imports (Custom Stuff)
@@ -2351,8 +2352,8 @@ if __name__ == '__main__':
libPath = os.path.join(libPrefix, "lib", "carla")
libName = os.path.join(libPath, carla_libname)
else:
libPath = carla_library_path.replace(carla_libname, "")
libName = carla_library_path
libPath = carla_library_filename.replace(carla_libname, "")
libName = carla_library_filename

# Init backend
Carla.host = Host(libName)
@@ -2391,8 +2392,8 @@ if __name__ == '__main__':
if carla_bridge_lv2_cocoa:
Carla.host.set_engine_option(OPTION_PATH_BRIDGE_LV2_COCOA, 0, carla_bridge_lv2_cocoa)

if carla_bridge_vst_cocoa:
Carla.host.set_engine_option(OPTION_PATH_BRIDGE_VST_COCOA, 0, carla_bridge_vst_cocoa)
if carla_bridge_vst_mac:
Carla.host.set_engine_option(OPTION_PATH_BRIDGE_VST_MAC, 0, carla_bridge_vst_mac)

else:
if carla_bridge_lv2_gtk2:


+ 32
- 49
source/carla_control.py View File

@@ -19,8 +19,8 @@
# ------------------------------------------------------------------------------------------------------------
# Imports (Global)

from PyQt4.QtCore import QLibrary
from PyQt4.QtGui import QApplication, QInputDialog, QMainWindow
from PyQt5.QtCore import QLibrary
from PyQt5.QtWidgets import QApplication, QInputDialog, QMainWindow
from liblo import make_method, Address, ServerError, ServerThread
from liblo import send as lo_send
from liblo import TCP as LO_TCP
@@ -642,8 +642,8 @@ class CarlaControlW(QMainWindow):
# -------------------------------------------------------------
# Connect actions to functions

self.connect(self.ui.act_file_connect, SIGNAL("triggered()"), SLOT("slot_fileConnect()"))
self.connect(self.ui.act_file_refresh, SIGNAL("triggered()"), SLOT("slot_fileRefresh()"))
#self.connect(self.ui.act_file_connect, SIGNAL("triggered()"), SLOT("slot_fileConnect()"))
#self.connect(self.ui.act_file_refresh, SIGNAL("triggered()"), SLOT("slot_fileRefresh()"))

#self.connect(self.ui.act_plugin_add, SIGNAL("triggered()"), SLOT("slot_pluginAdd()"))
#self.connect(self.ui.act_plugin_add2, SIGNAL("triggered()"), SLOT("slot_pluginAdd()"))
@@ -653,32 +653,32 @@ class CarlaControlW(QMainWindow):
#self.connect(self.ui.act_settings_show_toolbar, SIGNAL("triggered(bool)"), SLOT("slot_toolbarShown()"))
#self.connect(self.ui.act_settings_configure, SIGNAL("triggered()"), SLOT("slot_configureCarla()"))

self.connect(self.ui.act_help_about, SIGNAL("triggered()"), SLOT("slot_aboutCarlaControl()"))
self.connect(self.ui.act_help_about_qt, SIGNAL("triggered()"), app, SLOT("aboutQt()"))
self.connect(self, SIGNAL("SIGTERM()"), SLOT("slot_handleSIGTERM()"))
self.connect(self, SIGNAL("AddPluginStart(int, QString)"), SLOT("slot_handleAddPluginStart(int, QString)"))
self.connect(self, SIGNAL("AddPluginEnd(int)"), SLOT("slot_handleAddPluginEnd(int)"))
self.connect(self, SIGNAL("RemovePlugin(int)"), SLOT("slot_handleRemovePlugin(int)"))
self.connect(self, SIGNAL("SetPluginData(int, int, int, int, QString, QString, QString, QString, int)"), SLOT("slot_handleSetPluginData(int, int, int, int, QString, QString, QString, QString, int)"))
self.connect(self, SIGNAL("SetPluginPorts(int, int, int, int, int, int, int, int)"), SLOT("slot_handleSetPluginPorts(int, int, int, int, int, int, int, int)"))
self.connect(self, SIGNAL("SetParameterData(int, int, int, int, QString, QString, double)"), SLOT("slot_handleSetParameterData(int, int, int, int, QString, QString, double)"))
self.connect(self, SIGNAL("SetParameterRanges(int, int, double, double, double, double, double, double)"), SLOT("slot_handleSetParameterRanges(int, int, double, double, double, double, double, double)"))
self.connect(self, SIGNAL("SetParameterMidiCC(int, int, int)"), SLOT("slot_handleSetParameterMidiCC(int, int, int)"))
self.connect(self, SIGNAL("SetParameterMidiChannel(int, int, int)"), SLOT("slot_handleSetParameterMidiChannel(int, int, int)"))
self.connect(self, SIGNAL("SetParameterValue(int, int, double)"), SLOT("slot_handleSetParameterValue(int, int, double)"))
self.connect(self, SIGNAL("SetDefaultValue(int, int, double)"), SLOT("slot_handleSetDefaultValue(int, int, double)"))
self.connect(self, SIGNAL("SetProgram(int, int)"), SLOT("slot_handleSetProgram(int, int)"))
self.connect(self, SIGNAL("SetProgramCount(int, int)"), SLOT("slot_handleSetProgramCount(int, int)"))
self.connect(self, SIGNAL("SetProgramName(int, int, QString)"), SLOT("slot_handleSetProgramName(int, int, QString)"))
self.connect(self, SIGNAL("SetMidiProgram(int, int)"), SLOT("slot_handleSetMidiProgram(int, int)"))
self.connect(self, SIGNAL("SetMidiProgramCount(int, int)"), SLOT("slot_handleSetMidiProgramCount(int, int)"))
self.connect(self, SIGNAL("SetMidiProgramData(int, int, int, int, QString)"), SLOT("slot_handleSetMidiProgramData(int, int, int, int, QString)"))
self.connect(self, SIGNAL("NoteOn(int, int, int, int)"), SLOT("slot_handleNoteOn(int, int, int, int)"))
self.connect(self, SIGNAL("NoteOff(int, int, int)"), SLOT("slot_handleNoteOff(int, int, int)"))
self.connect(self, SIGNAL("SetPeaks(int, double, double, double, double)"), SLOT("slot_handleSetPeaks(int, double, double, double, double)"))
self.connect(self, SIGNAL("Exit()"), SLOT("slot_handleExit()"))
#self.connect(self.ui.act_help_about, SIGNAL("triggered()"), SLOT("slot_aboutCarlaControl()"))
#self.connect(self.ui.act_help_about_qt, SIGNAL("triggered()"), app, SLOT("aboutQt()"))
#self.connect(self, SIGNAL("SIGTERM()"), SLOT("slot_handleSIGTERM()"))
#self.connect(self, SIGNAL("AddPluginStart(int, QString)"), SLOT("slot_handleAddPluginStart(int, QString)"))
#self.connect(self, SIGNAL("AddPluginEnd(int)"), SLOT("slot_handleAddPluginEnd(int)"))
#self.connect(self, SIGNAL("RemovePlugin(int)"), SLOT("slot_handleRemovePlugin(int)"))
#self.connect(self, SIGNAL("SetPluginData(int, int, int, int, QString, QString, QString, QString, int)"), SLOT("slot_handleSetPluginData(int, int, int, int, QString, QString, QString, QString, int)"))
#self.connect(self, SIGNAL("SetPluginPorts(int, int, int, int, int, int, int, int)"), SLOT("slot_handleSetPluginPorts(int, int, int, int, int, int, int, int)"))
#self.connect(self, SIGNAL("SetParameterData(int, int, int, int, QString, QString, double)"), SLOT("slot_handleSetParameterData(int, int, int, int, QString, QString, double)"))
#self.connect(self, SIGNAL("SetParameterRanges(int, int, double, double, double, double, double, double)"), SLOT("slot_handleSetParameterRanges(int, int, double, double, double, double, double, double)"))
#self.connect(self, SIGNAL("SetParameterMidiCC(int, int, int)"), SLOT("slot_handleSetParameterMidiCC(int, int, int)"))
#self.connect(self, SIGNAL("SetParameterMidiChannel(int, int, int)"), SLOT("slot_handleSetParameterMidiChannel(int, int, int)"))
#self.connect(self, SIGNAL("SetParameterValue(int, int, double)"), SLOT("slot_handleSetParameterValue(int, int, double)"))
#self.connect(self, SIGNAL("SetDefaultValue(int, int, double)"), SLOT("slot_handleSetDefaultValue(int, int, double)"))
#self.connect(self, SIGNAL("SetProgram(int, int)"), SLOT("slot_handleSetProgram(int, int)"))
#self.connect(self, SIGNAL("SetProgramCount(int, int)"), SLOT("slot_handleSetProgramCount(int, int)"))
#self.connect(self, SIGNAL("SetProgramName(int, int, QString)"), SLOT("slot_handleSetProgramName(int, int, QString)"))
#self.connect(self, SIGNAL("SetMidiProgram(int, int)"), SLOT("slot_handleSetMidiProgram(int, int)"))
#self.connect(self, SIGNAL("SetMidiProgramCount(int, int)"), SLOT("slot_handleSetMidiProgramCount(int, int)"))
#self.connect(self, SIGNAL("SetMidiProgramData(int, int, int, int, QString)"), SLOT("slot_handleSetMidiProgramData(int, int, int, int, QString)"))
#self.connect(self, SIGNAL("NoteOn(int, int, int, int)"), SLOT("slot_handleNoteOn(int, int, int, int)"))
#self.connect(self, SIGNAL("NoteOff(int, int, int)"), SLOT("slot_handleNoteOff(int, int, int)"))
#self.connect(self, SIGNAL("SetPeaks(int, double, double, double, double)"), SLOT("slot_handleSetPeaks(int, double, double, double, double)"))
#self.connect(self, SIGNAL("Exit()"), SLOT("slot_handleExit()"))

if oscAddr:
self.connectToAddr(oscAddr)
@@ -1087,16 +1087,7 @@ if __name__ == '__main__':
if libPrefix is not None:
libName = os.path.join(libPrefix, "lib", "carla", carla_libname)
else:
libName = carla_library_path

# Load backend DLL, so it registers the theme
libDLL = QLibrary()
libDLL.setFileName(libName)

try:
libDLL.load()
except:
pass
libName = carla_library_filename

# Init backend (OSC bridge version)
Carla.host = Host()
@@ -1111,12 +1102,4 @@ if __name__ == '__main__':
Carla.gui.show()

# App-Loop
ret = app.exec_()

# Close backend DLL
if libDLL.isLoaded():
# Need to destroy app before theme
del app
libDLL.unload()

sys.exit(ret)
sys.exit(app.exec_())

+ 1
- 1
source/carla_shared.py View File

@@ -147,7 +147,7 @@ class CarlaObject(object):
Carla = CarlaObject()
Carla.host = None
Carla.gui = None
Carla.isControl = True
Carla.isControl = False
Carla.isLocal = False
Carla.processMode = PROCESS_MODE_MULTIPLE_CLIENTS if LINUX else PROCESS_MODE_CONTINUOUS_RACK
Carla.maxParameters = MAX_DEFAULT_PARAMETERS


+ 4
- 2
source/modules/widgets/canvaspreviewframe.py View File

@@ -19,8 +19,10 @@
# ------------------------------------------------------------------------------------------------------------
# Imports (Global)

from PyQt4.QtCore import Qt, QRectF, QTimer, SIGNAL, SLOT
from PyQt4.QtGui import QBrush, QColor, QCursor, QFrame, QPainter, QPen
# TODO - SIGNAL, SLOT
from PyQt5.QtCore import Qt, QRectF, QTimer
from PyQt5.QtGui import QBrush, QColor, QCursor, QPainter, QPen
from PyQt5.QtWidgets import QFrame

# ------------------------------------------------------------------------------------------------------------
# Static Variables


+ 9
- 19
source/modules/widgets/paramspinbox.py View File

@@ -71,7 +71,7 @@ class CustomInputDialog(QDialog):

self.fRetValue = current

self.connect(self, SIGNAL("accepted()"), SLOT("slot_setReturnValue()"))
#self.connect(self, SIGNAL("accepted()"), SLOT("slot_setReturnValue()"))

def returnValue(self):
return self.fRetValue
@@ -140,7 +140,7 @@ class ParamProgressBar(QProgressBar):
elif value > self.fMaximum:
value = self.fMaximum

self.emit(SIGNAL("valueChanged(double)"), value)
#self.emit(SIGNAL("valueChanged(double)"), value)

def mousePressEvent(self, event):
if event.button() == Qt.LeftButton:
@@ -194,10 +194,10 @@ class ParamSpinBox(QAbstractSpinBox):

self.lineEdit().setVisible(False)

self.connect(self, SIGNAL("customContextMenuRequested(QPoint)"), SLOT("slot_showCustomMenu()"))
self.connect(self.fBar, SIGNAL("valueChanged(double)"), SLOT("slot_progressBarValueChanged(double)"))
#self.connect(self, SIGNAL("customContextMenuRequested(QPoint)"), SLOT("slot_showCustomMenu()"))
#self.connect(self.fBar, SIGNAL("valueChanged(double)"), SLOT("slot_progressBarValueChanged(double)"))

QTimer.singleShot(0, self, SLOT("slot_updateProgressBarGeometry()"))
#QTimer.singleShot(0, self, SLOT("slot_updateProgressBarGeometry()"))

def setDefault(self, value):
value = fixValue(value, self.fMinimum, self.fMaximum)
@@ -223,8 +223,8 @@ class ParamSpinBox(QAbstractSpinBox):
if self.fHaveScalePoints:
self._setScalePointValue(value)

if send:
self.emit(SIGNAL("valueChanged(double)"), value)
#if send:
#self.emit(SIGNAL("valueChanged(double)"), value)

self.update()

@@ -320,7 +320,7 @@ class ParamSpinBox(QAbstractSpinBox):
if self.fValue != None:
self._setScalePointValue(self.fValue)

self.connect(self.fBox, SIGNAL("currentIndexChanged(QString)"), SLOT("slot_comboBoxIndexChanged(QString)"))
#self.connect(self.fBox, SIGNAL("currentIndexChanged(QString)"), SLOT("slot_comboBoxIndexChanged(QString)"))

def stepBy(self, steps):
if steps == 0 or self.fValue is None:
@@ -351,7 +351,7 @@ class ParamSpinBox(QAbstractSpinBox):
self.fBox.update()

def resizeEvent(self, event):
QTimer.singleShot(0, self, SLOT("slot_updateProgressBarGeometry()"))
#QTimer.singleShot(0, self, SLOT("slot_updateProgressBarGeometry()"))
QAbstractSpinBox.resizeEvent(self, event)

@pyqtSlot(str)
@@ -454,13 +454,3 @@ class ParamSpinBox(QAbstractSpinBox):
if float(self.fBox.itemText(i).split(" - ", 1)[0]) == value:
self.fBox.setCurrentIndex(i)
break

# ------------------------------------------------------------------------------------------------------------
# TESTING

import sys
from PyQt5.QtWidgets import QApplication
app = QApplication(sys.argv)
gui = ParamSpinBox(None)
gui.show()
app.exec_()

+ 9
- 8
source/patchcanvas.py View File

@@ -16,16 +16,17 @@
#
# For a full copy of the GNU General Public License see the GPL.txt file

# TODO - apply last changes to c++ (2 commits + theme changes)
# TODO - SIGNAL, SLOT

# Imports (Global)
from PyQt4.QtCore import pyqtSlot, qDebug, qCritical, qFatal, qWarning, Qt, QObject, SIGNAL, SLOT
from PyQt4.QtCore import QAbstractAnimation, QLineF, QPointF, QRectF, QSizeF, QSettings, QTimer
from PyQt4.QtGui import QColor, QLinearGradient, QPen, QPolygonF, QPainter, QPainterPath
from PyQt4.QtGui import QCursor, QFont, QFontMetrics, QInputDialog, QLineEdit, QMenu
from PyQt4.QtGui import QGraphicsScene, QGraphicsItem, QGraphicsLineItem, QGraphicsPathItem
from PyQt4.QtGui import QGraphicsColorizeEffect, QGraphicsDropShadowEffect
from PyQt4.QtSvg import QGraphicsSvgItem, QSvgRenderer
from PyQt5.QtCore import pyqtSlot, qDebug, qCritical, qFatal, qWarning, Qt, QObject
from PyQt5.QtCore import QAbstractAnimation, QLineF, QPointF, QRectF, QSizeF, QSettings, QTimer
from PyQt5.QtGui import QColor, QLinearGradient, QPen, QPolygonF, QPainter, QPainterPath
from PyQt5.QtGui import QCursor, QFont, QFontMetrics
from PyQt5.QtSvg import QGraphicsSvgItem, QSvgRenderer
from PyQt5.QtWidgets import QGraphicsScene, QGraphicsItem, QGraphicsLineItem, QGraphicsPathItem
from PyQt5.QtWidgets import QGraphicsColorizeEffect, QGraphicsDropShadowEffect
from PyQt5.QtWidgets import QInputDialog, QLineEdit, QMenu

# Imports (Theme)
from patchcanvas_theme import *


+ 2
- 2
source/patchcanvas_theme.py View File

@@ -19,8 +19,8 @@
# ------------------------------------------------------------------------------------------------------------
# Imports (Global)

from PyQt4.QtCore import Qt
from PyQt4.QtGui import QColor, QFont, QPen, QPixmap
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QColor, QFont, QPen, QPixmap

# ------------------------------------------------------------------------------------------------------------
# patchcanvas-theme.cpp


Loading…
Cancel
Save