Add control for playback marker horizontal position - #15617
Conversation
a86c404 to
9abc3ea
Compare
49bc629 to
5848e15
Compare
6a31d1f to
e05b2e6
Compare
|
This feature already exists. See "Play marker position" in the waveforms preferences. |
|
grand, thanks, branch retired |
|
I thought this is about changing the marker pos on the fly. If yes, the pref option has no CO, or does it? |
|
oh I just went by "this feature already exists". I'll reopen as there isn't a CO, I've been more focusing on a CI process the last few days than any testing, verification |
e05b2e6 to
1571dcc
Compare
1571dcc to
8882d97
Compare
846ee06 to
b9e0e34
Compare
| addControl("[Waveform]", | ||
| "play_marker_position", | ||
| tr("Playback Marker Position"), | ||
| tr("Adjust the horizontal position of the playback marker on the waveforms"), |
There was a problem hiding this comment.
Waveforms are horizontal in offcial skins, though vertical waveforms are also supported
| tr("Adjust the horizontal position of the playback marker on the waveforms"), | |
| tr("Adjust the position of the playback marker on the waveforms"), |
|
|
||
| add("[Waveform],play_marker_position") | ||
| << tr("Playback Marker Position") | ||
| << tr("Adjust the horizontal position of the playback marker on the waveforms."); |
| if (!m_pPlayMarkerPositionCO) { | ||
| m_pPlayMarkerPositionCO = std::make_unique<ControlPotmeter>( | ||
| ConfigKey(kWaveformGroup, QStringLiteral("play_marker_position")), | ||
| 0.0, | ||
| 1.0); | ||
| m_pPlayMarkerPositionCO->set(m_playMarkerPosition); | ||
| connect(m_pPlayMarkerPositionCO.get(), | ||
| &ControlObject::valueChanged, | ||
| this, | ||
| [this](double value) { | ||
| setPlayMarkerPosition(value); | ||
| }); | ||
| } else { | ||
| m_pPlayMarkerPositionCO->set(m_playMarkerPosition); | ||
| } |
There was a problem hiding this comment.
| if (!m_pPlayMarkerPositionCO) { | |
| m_pPlayMarkerPositionCO = std::make_unique<ControlPotmeter>( | |
| ConfigKey(kWaveformGroup, QStringLiteral("play_marker_position")), | |
| 0.0, | |
| 1.0); | |
| m_pPlayMarkerPositionCO->set(m_playMarkerPosition); | |
| connect(m_pPlayMarkerPositionCO.get(), | |
| &ControlObject::valueChanged, | |
| this, | |
| [this](double value) { | |
| setPlayMarkerPosition(value); | |
| }); | |
| } else { | |
| m_pPlayMarkerPositionCO->set(m_playMarkerPosition); | |
| } | |
| if (!m_pPlayMarkerPositionCO) { | |
| m_pPlayMarkerPositionCO = std::make_unique<ControlPotmeter>( | |
| ConfigKey(kWaveformGroup, QStringLiteral("play_marker_position")), | |
| 0.0, | |
| 1.0); | |
| m_pPlayMarkerPositionCO->set(m_playMarkerPosition); | |
| connect(m_pPlayMarkerPositionCO.get(), | |
| &ControlObject::valueChanged, | |
| this, | |
| [this](double value) { | |
| setPlayMarkerPosition(value); | |
| }); | |
| } | |
| m_pPlayMarkerPositionCO->set(m_playMarkerPosition); |
Why do we need a lambda here? The signal and slot signature match, no?
There was a problem hiding this comment.
Setting the position in preferences should also update the CO, right?
| #include <memory> | ||
| #include <vector> | ||
|
|
||
| #include "control/controlpotmeter.h" |
There was a problem hiding this comment.
move this to the cpp and use forward-declaration here
b9e0e34 to
ceef34b
Compare
403ca04 to
956a435
Compare
Implements control for adjusting the horizontal position of the playback marker/line over waveforms. - Adds [Waveform],PlayMarkerPosition control (0.0 = left, 1.0 = right) - Creates ControlPotmeter for smooth value adjustment - Exposes control in controller picker menu for MIDI/HID mapping - Adds tooltip for the control - Preserves existing playback marker position functionality Fixes mixxxdj#14288
956a435 to
08010eb
Compare
Description
Adds a controllable parameter for adjusting the horizontal position of the playback marker/line on waveforms, allowing users to customize where the playback position indicator appears.
Motivation
Users may prefer different playback marker positions for various workflows:
This addresses feature request #14288.
Changes
[Waveform],play_marker_positioncontrol (range: 0.0 = left, 1.0 = right)ControlPotmeterinWaveformWidgetFactoryfor smooth value adjustmentTechnical Implementation
The control is implemented as a global waveform setting that:
WaveformWidgetRendererTesting
Related Issue
Fixes #14288