Add peak indicators (#7295)
Add peak indicators to the mixer strips. They show the maximum peak value that was observed and can be reset by clicking on them. ## Implementation details The implementation works via a signal/slot mechanism. The `Fader` class has a new signal `peakChanged` which reports peak values as amplifications. A new class `PeakIndicator` is added which has a slot `updatePeak` which is connected to the new signal in `Fader`. The `PeakIndicator` inherits from `QLabel` and mainly deals with updating the label text from the current peak value. Add a `PeakIndicator` instance to `MixerChannelView`. Add a `reset` method to `MixerChannelView` so that the mixer channel can be reset on the loading of new projects, etc. The current implementation resets the peak indicator back to -inf dbFS. The `reset` method is called in `MixerView::clear`. Remove the clamping in `Fader::setPeak` so that all peaks are reported. Emit the new signal if the peak changes.
This commit is contained in:
committed by
GitHub
parent
4e93f51b75
commit
042f8ac325
@@ -661,6 +661,11 @@ lmms--gui--MixerChannelView QGraphicsView {
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
lmms--gui--PeakIndicator {
|
||||
background-color: #111811;
|
||||
font-size: 7pt;
|
||||
}
|
||||
|
||||
/* persistent peak markers for fx peak meters */
|
||||
lmms--gui--Fader {
|
||||
qproperty-peakOk: rgb( 74, 253, 133);
|
||||
|
||||
@@ -710,6 +710,11 @@ lmms--gui--MixerChannelView QGraphicsView {
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
lmms--gui--PeakIndicator {
|
||||
background-color: #111811;
|
||||
font-size: 7pt;
|
||||
}
|
||||
|
||||
/* persistent peak markers for fx peak meters */
|
||||
lmms--gui--Fader {
|
||||
qproperty-peakOk: #0ad45c;
|
||||
|
||||
Reference in New Issue
Block a user