Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add peak indicators #7295

Merged

Conversation

michaelgregorius
Copy link
Contributor

Add peak indicators to the mixer strips. They show the maximum peak value that was observed and can be reset by clicking on them.

PeakIndicators

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.

Add peak indicators to the mixer strips. They show the maximum peak value
that was observed and can be reset by clicking on them.

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.
@michaelgregorius michaelgregorius linked an issue May 30, 2024 that may be closed by this pull request
…ixerChannels

Conflicts:
* src/gui/MixerChannelView.cpp
Copy link
Member

@DomClark DomClark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks good.

include/MixerChannelView.h Outdated Show resolved Hide resolved
src/gui/widgets/Fader.cpp Outdated Show resolved Hide resolved
Use `nullptr` instead of `0`. Use `emit` macro.
Copy link
Member

@zonkmachine zonkmachine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests fine. LGTM!

One thought. I'm guessing that there will be some complaints regarding the size of the indicator numbers and now that the mixer can expand, maybe it could be good (in a later PR...) to let it expand a bit sideways too and give room for larger numbers/text.

@michaelgregorius michaelgregorius merged commit 042f8ac into LMMS:master Jun 1, 2024
10 checks passed
@michaelgregorius michaelgregorius deleted the PeakIndicatorsInMixerChannels branch June 1, 2024 10:10
@michaelgregorius
Copy link
Contributor Author

Tests fine. LGTM!

One thought. I'm guessing that there will be some complaints regarding the size of the indicator numbers and now that the mixer can expand, maybe it could be good (in a later PR...) to let it expand a bit sideways too and give room for larger numbers/text.

Yes, for larger fonts the mixer strips would have to be able to expand to the side as well. This is how small values currently look:

PeakIndicatorSmallValue

If the size of the font is increased the labels will clip if they do not expand sideways.

@sakertooth sakertooth mentioned this pull request Jun 15, 2024
Rossmaxx pushed a commit to Rossmaxx/lmms that referenced this pull request Jun 15, 2024
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.
Rossmaxx pushed a commit to Reflexe/lmms that referenced this pull request Jul 16, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mixer peak indicators.
3 participants