Browse Source

Misc

tags/1.9.4
falkTX 11 years ago
parent
commit
000aca880f
3 changed files with 12 additions and 14 deletions
  1. +6
    -3
      source/carla
  2. +1
    -1
      source/carla_host.py
  3. +5
    -10
      source/carla_patchbay.py

+ 6
- 3
source/carla View File

@@ -74,9 +74,9 @@ class CarlaMultiW(QTabWidget):
parent.ParameterMidiCcChangedCallback.connect(self.fRack.slot_handleParameterMidiCcChangedCallback) parent.ParameterMidiCcChangedCallback.connect(self.fRack.slot_handleParameterMidiCcChangedCallback)
parent.ProgramChangedCallback.connect(self.fRack.slot_handleProgramChangedCallback) parent.ProgramChangedCallback.connect(self.fRack.slot_handleProgramChangedCallback)
parent.MidiProgramChangedCallback.connect(self.fRack.slot_handleMidiProgramChangedCallback) parent.MidiProgramChangedCallback.connect(self.fRack.slot_handleMidiProgramChangedCallback)
parent.UiStateChangedCallback.connect(self.fRack.slot_handleUiStateChangedCallback)
parent.NoteOnCallback.connect(self.fRack.slot_handleNoteOnCallback) parent.NoteOnCallback.connect(self.fRack.slot_handleNoteOnCallback)
parent.NoteOffCallback.connect(self.fRack.slot_handleNoteOffCallback) parent.NoteOffCallback.connect(self.fRack.slot_handleNoteOffCallback)
parent.UiStateChangedCallback.connect(self.fRack.slot_handleUiStateChangedCallback)
parent.UpdateCallback.connect(self.fRack.slot_handleUpdateCallback) parent.UpdateCallback.connect(self.fRack.slot_handleUpdateCallback)
parent.ReloadInfoCallback.connect(self.fRack.slot_handleReloadInfoCallback) parent.ReloadInfoCallback.connect(self.fRack.slot_handleReloadInfoCallback)
parent.ReloadParametersCallback.connect(self.fRack.slot_handleReloadParametersCallback) parent.ReloadParametersCallback.connect(self.fRack.slot_handleReloadParametersCallback)
@@ -85,12 +85,12 @@ class CarlaMultiW(QTabWidget):
parent.PatchbayClientAddedCallback.connect(self.fPatchbay.slot_handlePatchbayClientAddedCallback) parent.PatchbayClientAddedCallback.connect(self.fPatchbay.slot_handlePatchbayClientAddedCallback)
parent.PatchbayClientRemovedCallback.connect(self.fPatchbay.slot_handlePatchbayClientRemovedCallback) parent.PatchbayClientRemovedCallback.connect(self.fPatchbay.slot_handlePatchbayClientRemovedCallback)
parent.PatchbayClientRenamedCallback.connect(self.fPatchbay.slot_handlePatchbayClientRenamedCallback) parent.PatchbayClientRenamedCallback.connect(self.fPatchbay.slot_handlePatchbayClientRenamedCallback)
#parent.PatchbayIconChangedCallback.connect(self.fPatchbay.slot_handlePatchbayIconChangedCallback)
parent.PatchbayPortAddedCallback.connect(self.fPatchbay.slot_handlePatchbayPortAddedCallback) parent.PatchbayPortAddedCallback.connect(self.fPatchbay.slot_handlePatchbayPortAddedCallback)
parent.PatchbayPortRemovedCallback.connect(self.fPatchbay.slot_handlePatchbayPortRemovedCallback) parent.PatchbayPortRemovedCallback.connect(self.fPatchbay.slot_handlePatchbayPortRemovedCallback)
parent.PatchbayPortRenamedCallback.connect(self.fPatchbay.slot_handlePatchbayPortRenamedCallback) parent.PatchbayPortRenamedCallback.connect(self.fPatchbay.slot_handlePatchbayPortRenamedCallback)
parent.PatchbayConnectionAddedCallback.connect(self.fPatchbay.slot_handlePatchbayConnectionAddedCallback) parent.PatchbayConnectionAddedCallback.connect(self.fPatchbay.slot_handlePatchbayConnectionAddedCallback)
parent.PatchbayConnectionRemovedCallback.connect(self.fPatchbay.slot_handlePatchbayConnectionRemovedCallback) parent.PatchbayConnectionRemovedCallback.connect(self.fPatchbay.slot_handlePatchbayConnectionRemovedCallback)
#parent.PatchbayIconChangedCallback.connect(self.fPatchbay.slot_handlePatchbayIconChangedCallback)


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


@@ -109,6 +109,9 @@ class CarlaMultiW(QTabWidget):
self.fRack.renamePlugin(pluginId, newName) self.fRack.renamePlugin(pluginId, newName)
self.fPatchbay.renamePlugin(pluginId, newName) self.fPatchbay.renamePlugin(pluginId, newName)


def disablePlugin(self, pluginId, errorMsg):
pass

def removeAllPlugins(self): def removeAllPlugins(self):
self.fRack.removeAllPlugins() self.fRack.removeAllPlugins()


@@ -176,7 +179,7 @@ class CarlaHostW(HostWindow):
self.fInfoLabel.setText("Engine stopped") self.fInfoLabel.setText("Engine stopped")


def engineChanged(self): def engineChanged(self):
self.fInfoText = "Engine running | SampleRate: %g | BufferSize: %i" % (self.fSampleRate, self.fBufferSize)
self.fInfoText = "Engine running | SampleRate: %g | BufferSize: %i" % (Carla.sampleRate, Carla.bufferSize)
self.fInfoLabel.setText("%s | %s" % (self.fInfoText, self.fTextTransport)) self.fInfoLabel.setText("%s | %s" % (self.fInfoText, self.fTextTransport))


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


+ 1
- 1
source/carla_host.py View File

@@ -883,7 +883,7 @@ class HostWindow(QMainWindow):
def slot_fileTreeDoubleClicked(self, modelIndex): def slot_fileTreeDoubleClicked(self, modelIndex):
filename = self.fDirModel.filePath(modelIndex) filename = self.fDirModel.filePath(modelIndex)


if not Carla.host.load_filename(filename):
if not Carla.host.load_file(filename):
CustomMessageBox(self, QMessageBox.Critical, self.tr("Error"), CustomMessageBox(self, QMessageBox.Critical, self.tr("Error"),
self.tr("Failed to load file"), self.tr("Failed to load file"),
Carla.host.get_last_error(), QMessageBox.Ok, QMessageBox.Ok) Carla.host.get_last_error(), QMessageBox.Ok, QMessageBox.Ok)


+ 5
- 10
source/carla_patchbay.py View File

@@ -19,9 +19,6 @@
# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Imports (Global) # Imports (Global)


#try:
#from PyQt5.QtWidgets import QGraphicsView
#except:
from PyQt4.QtGui import QGraphicsView from PyQt4.QtGui import QGraphicsView


#QPrinter, QPrintDialog #QPrinter, QPrintDialog
@@ -38,9 +35,6 @@ from carla_widgets import *
# Try Import OpenGL # Try Import OpenGL


try: try:
#try:
#from PyQt5.QtOpenGL import QGLWidget
#except:
from PyQt4.QtOpenGL import QGLWidget from PyQt4.QtOpenGL import QGLWidget
hasGL = True hasGL = True
except: except:
@@ -353,6 +347,7 @@ class CarlaPatchbayW(QGraphicsView):
return return


self.fParent.loadSettings(False) self.fParent.loadSettings(False)

patchcanvas.clear() patchcanvas.clear()


pOptions = patchcanvas.options_t() pOptions = patchcanvas.options_t()
@@ -371,7 +366,7 @@ class CarlaPatchbayW(QGraphicsView):


patchcanvas.setOptions(pOptions) patchcanvas.setOptions(pOptions)
patchcanvas.setFeatures(pFeatures) patchcanvas.setFeatures(pFeatures)
patchcanvas.init("Carla2", self.scene, CanvasCallback, False)
patchcanvas.init("Carla2", self.scene, canvasCallback, False)


if Carla.host.is_engine_running(): if Carla.host.is_engine_running():
Carla.host.patchbay_refresh() Carla.host.patchbay_refresh()
@@ -668,7 +663,7 @@ class CarlaPatchbayW(QGraphicsView):
# ------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------
# Canvas callback # Canvas callback


def CanvasCallback(action, value1, value2, valueStr):
def canvasCallback(action, value1, value2, valueStr):
if action == patchcanvas.ACTION_GROUP_INFO: if action == patchcanvas.ACTION_GROUP_INFO:
pass pass


@@ -696,10 +691,10 @@ def CanvasCallback(action, value1, value2, valueStr):
portIdB = value2 portIdB = value2


if not Carla.host.patchbay_connect(portIdA, portIdB): if not Carla.host.patchbay_connect(portIdA, portIdB):
print("Connection failed:", cString(Carla.host.get_last_error()))
print("Connection failed:", Carla.host.get_last_error())


elif action == patchcanvas.ACTION_PORTS_DISCONNECT: elif action == patchcanvas.ACTION_PORTS_DISCONNECT:
connectionId = value1 connectionId = value1


if not Carla.host.patchbay_disconnect(connectionId): if not Carla.host.patchbay_disconnect(connectionId):
print("Disconnect failed:", cString(Carla.host.get_last_error()))
print("Disconnect failed:", Carla.host.get_last_error())

Loading…
Cancel
Save