diff --git a/source/carla_host.py b/source/carla_host.py index f0ce5209f..95a9525a6 100644 --- a/source/carla_host.py +++ b/source/carla_host.py @@ -215,7 +215,7 @@ class HostWindow(QMainWindow, PluginEditParentMeta): self.fPanelTime = CarlaPanelTime(host, self) self.fPanelTime.setEnabled(False) - self.fPanelTime.show() + QTimer.singleShot(0, self.fPanelTime.show) # ---------------------------------------------------------------------------------------------------- # Set up GUI (rack) diff --git a/source/carla_skin.py b/source/carla_skin.py index 760fa15fd..08c1ba895 100644 --- a/source/carla_skin.py +++ b/source/carla_skin.py @@ -129,20 +129,16 @@ class AbstractPluginSlot(QFrame, PluginEditParentMeta): self.fParameterIconTimer = ICON_STATE_NULL self.fParameterList = [] # index, widget - if host.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK: - self.fPeaksInputCount = 2 - self.fPeaksOutputCount = 2 - else: - audioCountInfo = host.get_audio_port_count_info(self.fPluginId) + audioCountInfo = host.get_audio_port_count_info(self.fPluginId) - self.fPeaksInputCount = int(audioCountInfo['ins']) - self.fPeaksOutputCount = int(audioCountInfo['outs']) + self.fPeaksInputCount = int(audioCountInfo['ins']) + self.fPeaksOutputCount = int(audioCountInfo['outs']) - if self.fPeaksInputCount > 2: - self.fPeaksInputCount = 2 + if self.fPeaksInputCount > 2: + self.fPeaksInputCount = 2 - if self.fPeaksOutputCount > 2: - self.fPeaksOutputCount = 2 + if self.fPeaksOutputCount > 2: + self.fPeaksOutputCount = 2 # used during testing self.fIdleTimerId = 0 @@ -288,11 +284,15 @@ class AbstractPluginSlot(QFrame, PluginEditParentMeta): self.peak_in.setColor(DigitalPeakMeter.GREEN) self.peak_in.setChannels(self.fPeaksInputCount) self.peak_in.setOrientation(DigitalPeakMeter.HORIZONTAL) + if self.fPeaksInputCount == 0: + self.peak_in.hide() if self.peak_out is not None: self.peak_out.setColor(DigitalPeakMeter.BLUE) self.peak_out.setChannels(self.fPeaksOutputCount) self.peak_out.setOrientation(DigitalPeakMeter.HORIZONTAL) + if self.fPeaksOutputCount == 0: + self.peak_out.hide() for paramIndex, paramWidget in self.fParameterList: paramWidget.setContextMenuPolicy(Qt.CustomContextMenu) diff --git a/source/carla_widgets.py b/source/carla_widgets.py index 256a8ff43..85d63bea2 100755 --- a/source/carla_widgets.py +++ b/source/carla_widgets.py @@ -1107,30 +1107,34 @@ class PluginEdit(QDialog): for paramType, paramId, paramWidget in self.fParameterList: if paramId != index: continue + # FIXME see below + if paramType != PARAMETER_INPUT: + continue + paramWidget.blockSignals(True) paramWidget.setValue(value) + paramWidget.blockSignals(False) - if paramType == PARAMETER_INPUT: - tabIndex = paramWidget.getTabIndex() - - if self.fTabIconTimers[tabIndex-1] == ICON_STATE_NULL: - self.ui.tabWidget.setTabIcon(tabIndex, self.fTabIconOn) + #if paramType == PARAMETER_INPUT: + tabIndex = paramWidget.getTabIndex() - self.fTabIconTimers[tabIndex-1] = ICON_STATE_ON + if self.fTabIconTimers[tabIndex-1] == ICON_STATE_NULL: + self.ui.tabWidget.setTabIcon(tabIndex, self.fTabIconOn) + self.fTabIconTimers[tabIndex-1] = ICON_STATE_ON break # Clear all parameters self.fParametersToUpdate = [] - # Update parameter outputs - #for paramType, paramId, paramWidget in self.fParameterList: - #if paramType != PARAMETER_OUTPUT: - #continue + # Update parameter outputs | FIXME needed? + for paramType, paramId, paramWidget in self.fParameterList: + if paramType != PARAMETER_OUTPUT: + continue - #paramWidget.blockSignals(True) - #paramWidget.setValue(self.host.get_current_parameter_value(self.fPluginId, paramId)) - #paramWidget.blockSignals(False) + paramWidget.blockSignals(True) + paramWidget.setValue(self.host.get_current_parameter_value(self.fPluginId, paramId)) + paramWidget.blockSignals(False) #------------------------------------------------------------------ diff --git a/source/modules/native-plugins/bigmeter.cpp b/source/modules/native-plugins/bigmeter.cpp index f88ac255d..f26913f53 100644 --- a/source/modules/native-plugins/bigmeter.cpp +++ b/source/modules/native-plugins/bigmeter.cpp @@ -143,12 +143,6 @@ protected: case 1: fStyle = int(value); break; - case 2: - fOutLeft = value; - break; - case 3: - fOutRight = value; - break; default: break; } @@ -157,6 +151,12 @@ protected: // ------------------------------------------------------------------- // Plugin process calls + void activate() override + { + fOutLeft = 0.0f; + fOutRight = 0.0f; + } + void process(float** inputs, float**, const uint32_t frames, const NativeMidiEvent* const, const uint32_t) override { Range range; @@ -180,7 +180,7 @@ private: static const NativePluginDescriptor bigmeterDesc = { /* category */ PLUGIN_CATEGORY_UTILITY, - /* hints */ static_cast(PLUGIN_IS_RTSAFE|PLUGIN_HAS_UI), + /* hints */ static_cast(PLUGIN_IS_RTSAFE|PLUGIN_HAS_UI|PLUGIN_NEEDS_FIXED_BUFFERS), /* supports */ static_cast(0x0), /* audioIns */ 2, /* audioOuts */ 0, diff --git a/source/modules/native-plugins/resources/bigmeter-ui b/source/modules/native-plugins/resources/bigmeter-ui index ec42b96f1..9481ee173 100755 --- a/source/modules/native-plugins/resources/bigmeter-ui +++ b/source/modules/native-plugins/resources/bigmeter-ui @@ -39,7 +39,7 @@ class DistrhoUIBigMeter(ExternalUI, DigitalPeakMeter): #self.setSmoothRelease(0) # till 5 - self.resize(30, 400) + self.resize(50, 400) self.setWindowTitle(self.fUiName) self.fIdleTimer = self.startTimer(30)