From a320ada100a334b6dc4ea1873ae5a206aa55f4fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Sat, 12 Aug 2023 23:44:57 +0200 Subject: [PATCH 1/9] Expose [BPM],sync_lock_algorithm option in deck preferences. Unfortunately this is still required to have a reliable transition with non const beat-grids like in 2.3. --- src/engine/sync/enginesync.cpp | 2 +- src/engine/sync/enginesync.h | 24 +++---- src/preferences/dialog/dlgprefdeck.cpp | 21 ++++++ src/preferences/dialog/dlgprefdeckdlg.ui | 81 +++++++++++++++++------- 4 files changed, 93 insertions(+), 35 deletions(-) diff --git a/src/engine/sync/enginesync.cpp b/src/engine/sync/enginesync.cpp index 7049c35499f..cd486c34680 100644 --- a/src/engine/sync/enginesync.cpp +++ b/src/engine/sync/enginesync.cpp @@ -254,7 +254,7 @@ Syncable* EngineSync::pickLeader(Syncable* enabling_syncable) { } const SyncLockAlgorithm picker = static_cast( - m_pConfig->getValue(ConfigKey("[BPM]", "sync_lock_algorithm"), + m_pConfig->getValue(ConfigKey(BPM_CONFIG_GROUP, SYNC_LOCK_ALGORITHM_CONFIG_KEY), PREFER_IMPLICIT_LEADER)); switch (picker) { case PREFER_IMPLICIT_LEADER: diff --git a/src/engine/sync/enginesync.h b/src/engine/sync/enginesync.h index d072d80acb6..19cabda99d6 100644 --- a/src/engine/sync/enginesync.h +++ b/src/engine/sync/enginesync.h @@ -9,12 +9,25 @@ class InternalClock; class EngineChannel; +#define BPM_CONFIG_GROUP "[BPM]" +#define SYNC_LOCK_ALGORITHM_CONFIG_KEY "sync_lock_algorithm" + /// EngineSync is the heart of the Mixxx Sync Lock engine. It knows which objects /// (Decks, Internal Clock, etc) are participating in Sync and what their statuses /// are. It also orchestrates sync handoffs between different decks as they play, /// stop, or request their status to change. class EngineSync : public SyncableListener { public: + // Remove pick SyncLockAlgorithm when new beatgrid detection + // and editing code is committed and we no longer need the lock bpm fallback option. + enum SyncLockAlgorithm { + // New behavior, which should work if beatgrids are reliable. + PREFER_IMPLICIT_LEADER, + // Old 2.3 behavior, which works around some issues with bad beatgrid detection, mostly + // for auto DJ mode. + PREFER_LOCK_BPM + }; + explicit EngineSync(UserSettingsPointer pConfig); ~EngineSync() override; @@ -140,17 +153,6 @@ class EngineSync : public SyncableListener { return false; } - // TODO: Remove pick algorithms during 2.4 development phase when new beatgrid detection - // and editing code is committed and we no longer need the lock bpm fallback option. - // If this code makes it to release we will all be very sad. - enum SyncLockAlgorithm { - // New behavior, which should work if beatgrids are reliable. - PREFER_IMPLICIT_LEADER, - // Old 2.3 behavior, which works around some issues with bad beatgrid detection, mostly - // for auto DJ mode. - PREFER_LOCK_BPM - }; - FRIEND_TEST(EngineSyncTest, EnableOneDeckInitsLeader); FRIEND_TEST(EngineSyncTest, EnableOneDeckInitializesLeader); FRIEND_TEST(EngineSyncTest, SyncToNonSyncDeck); diff --git a/src/preferences/dialog/dlgprefdeck.cpp b/src/preferences/dialog/dlgprefdeck.cpp index f94174115a9..684193f0479 100644 --- a/src/preferences/dialog/dlgprefdeck.cpp +++ b/src/preferences/dialog/dlgprefdeck.cpp @@ -12,6 +12,7 @@ #include "defs_urls.h" #include "engine/controls/ratecontrol.h" #include "engine/enginebuffer.h" +#include "engine/sync/enginesync.h" #include "mixer/basetrackplayer.h" #include "mixer/playerinfo.h" #include "mixer/playermanager.h" @@ -465,6 +466,16 @@ void DlgPrefDeck::slotUpdate() { index = ComboBoxCueMode->findData(static_cast(cueMode)); ComboBoxCueMode->setCurrentIndex(index); + const EngineSync::SyncLockAlgorithm syncLockAlgorithm = + static_cast(m_pConfig->getValue( + ConfigKey(BPM_CONFIG_GROUP, SYNC_LOCK_ALGORITHM_CONFIG_KEY), + EngineSync::SyncLockAlgorithm::PREFER_IMPLICIT_LEADER)); + if (syncLockAlgorithm == EngineSync::SyncLockAlgorithm::PREFER_IMPLICIT_LEADER) { + radioButtonImplicitLeader->setChecked(true); + } else { + radioButtonLockBpm->setChecked(true); + } + KeylockMode keylockMode = static_cast(static_cast(m_keylockModeControls[0]->get())); if (keylockMode == KeylockMode::LockCurrentKey) { @@ -550,6 +561,8 @@ void DlgPrefDeck::slotResetToDefaults() { checkBoxResetSpeed->setChecked(false); checkBoxResetPitch->setChecked(true); + radioButtonImplicitLeader->setChecked(true); + radioButtonOriginalKey->setChecked(true); radioButtonResetUnlockedKey->setChecked(true); } @@ -729,6 +742,14 @@ void DlgPrefDeck::slotApply() { m_pConfig->set(ConfigKey("[Controls]", "SpeedAutoReset"), ConfigValue(configSPAutoReset)); + if (radioButtonImplicitLeader->isChecked()) { + m_pConfig->setValue(ConfigKey(BPM_CONFIG_GROUP, SYNC_LOCK_ALGORITHM_CONFIG_KEY), + static_cast(EngineSync::SyncLockAlgorithm::PREFER_IMPLICIT_LEADER)); + } else { + m_pConfig->setValue(ConfigKey(BPM_CONFIG_GROUP, SYNC_LOCK_ALGORITHM_CONFIG_KEY), + static_cast(EngineSync::SyncLockAlgorithm::PREFER_LOCK_BPM)); + } + m_pConfig->setValue(ConfigKey("[Controls]", "keylockMode"), static_cast(m_keylockMode)); // Set key lock behavior for every group diff --git a/src/preferences/dialog/dlgprefdeckdlg.ui b/src/preferences/dialog/dlgprefdeckdlg.ui index 1dd6d2de1ac..6abc6180bc1 100644 --- a/src/preferences/dialog/dlgprefdeckdlg.ui +++ b/src/preferences/dialog/dlgprefdeckdlg.ui @@ -203,7 +203,7 @@ You can always drag-and-drop tracks on screen to clone a deck. - + Permanent rate change when left-clicking @@ -231,7 +231,7 @@ You can always drag-and-drop tracks on screen to clone a deck. - + Permanent rate change when right-clicking @@ -269,7 +269,7 @@ You can always drag-and-drop tracks on screen to clone a deck. - + Current key @@ -279,7 +279,7 @@ You can always drag-and-drop tracks on screen to clone a deck. - + false @@ -310,7 +310,7 @@ You can always drag-and-drop tracks on screen to clone a deck. - + Permanent @@ -320,7 +320,7 @@ You can always drag-and-drop tracks on screen to clone a deck. - + @@ -368,7 +368,7 @@ You can always drag-and-drop tracks on screen to clone a deck. - + false @@ -382,6 +382,13 @@ You can always drag-and-drop tracks on screen to clone a deck. + + + Sync mode (Dynamic tempo tracks) + + + + Keylock mode @@ -391,7 +398,7 @@ You can always drag-and-drop tracks on screen to clone a deck. - + false @@ -404,7 +411,7 @@ You can always drag-and-drop tracks on screen to clone a deck. - + Pitch bend behavior @@ -414,7 +421,7 @@ You can always drag-and-drop tracks on screen to clone a deck. - + Original key @@ -424,7 +431,7 @@ You can always drag-and-drop tracks on screen to clone a deck. - + false @@ -469,14 +476,27 @@ You can always drag-and-drop tracks on screen to clone a deck. - + Adjustment buttons: - + + + + Apply tempo changes from the implicit leader track (normally the previous track in a transition) to the follower tracks. After the transition, the follower track will continue with the previous leader's very last tempo. + + + Follow implicit leader's tempo + + + buttonGroupSyncMode + + + + true @@ -501,7 +521,7 @@ You can always drag-and-drop tracks on screen to clone a deck. - + true @@ -565,7 +585,7 @@ You can always drag-and-drop tracks on screen to clone a deck. - + Abrupt jump @@ -575,7 +595,7 @@ You can always drag-and-drop tracks on screen to clone a deck. - + Smoothly adjusts deck speed when temporary change buttons are held down @@ -588,14 +608,14 @@ You can always drag-and-drop tracks on screen to clone a deck. - + Keyunlock mode - + Reset key @@ -605,7 +625,7 @@ You can always drag-and-drop tracks on screen to clone a deck. - + Keep key @@ -615,7 +635,20 @@ You can always drag-and-drop tracks on screen to clone a deck. - + + + + During a transition, the tempo of an implicit leader track at the beginning of the transition is kept static. After the transition, the follower track will maintain this original tempo. This technique serves as a workaround to avoid dynamic tempo changes, as seen in rubato-style tracks, during the outro. For instance it prevents the follower track from continuing with a slowed-down tempo of the implicit leader. This corresponds to the behavior before Mixxx 2.4. + + + Use stady tempo + + + buttonGroupSyncMode + + + + Qt::Vertical @@ -663,6 +696,7 @@ You can always drag-and-drop tracks on screen to clone a deck. checkBoxInvertSpeedSlider checkBoxResetPitch checkBoxResetSpeed + radioButtonImplicitLeader radioButtonOriginalKey radioButtonCurrentKey radioButtonResetUnlockedKey @@ -671,10 +705,10 @@ You can always drag-and-drop tracks on screen to clone a deck. radioButtonRateRampModeStepping SliderRateRampSensitivity SpinBoxRateRampSensitivity - spinBoxPermanentRateCoarse - spinBoxPermanentRateFine - spinBoxTemporaryRateCoarse spinBoxTemporaryRateFine + spinBoxTemporaryRateCoarse + spinBoxPermanentRateFine + spinBoxPermanentRateCoarse @@ -682,5 +716,6 @@ You can always drag-and-drop tracks on screen to clone a deck. + From 92bdfa131430b849ef2c8f72d7cb0e17d82f681b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Mon, 14 Aug 2023 12:22:25 +0200 Subject: [PATCH 2/9] Use Term Soft Leader to match other parts in the code --- src/engine/sync/enginesync.cpp | 4 ++-- src/engine/sync/enginesync.h | 2 +- src/preferences/dialog/dlgprefdeck.cpp | 12 ++++++------ src/preferences/dialog/dlgprefdeckdlg.ui | 12 ++++++------ 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/engine/sync/enginesync.cpp b/src/engine/sync/enginesync.cpp index cd486c34680..5b1114e1807 100644 --- a/src/engine/sync/enginesync.cpp +++ b/src/engine/sync/enginesync.cpp @@ -255,9 +255,9 @@ Syncable* EngineSync::pickLeader(Syncable* enabling_syncable) { const SyncLockAlgorithm picker = static_cast( m_pConfig->getValue(ConfigKey(BPM_CONFIG_GROUP, SYNC_LOCK_ALGORITHM_CONFIG_KEY), - PREFER_IMPLICIT_LEADER)); + PREFER_SOFT_LEADER)); switch (picker) { - case PREFER_IMPLICIT_LEADER: + case PREFER_SOFT_LEADER: // Always pick a deck for a new leader. if (playing_deck_count == 1) { return first_playing_deck; diff --git a/src/engine/sync/enginesync.h b/src/engine/sync/enginesync.h index 19cabda99d6..43c7b5da7fa 100644 --- a/src/engine/sync/enginesync.h +++ b/src/engine/sync/enginesync.h @@ -22,7 +22,7 @@ class EngineSync : public SyncableListener { // and editing code is committed and we no longer need the lock bpm fallback option. enum SyncLockAlgorithm { // New behavior, which should work if beatgrids are reliable. - PREFER_IMPLICIT_LEADER, + PREFER_SOFT_LEADER, // Old 2.3 behavior, which works around some issues with bad beatgrid detection, mostly // for auto DJ mode. PREFER_LOCK_BPM diff --git a/src/preferences/dialog/dlgprefdeck.cpp b/src/preferences/dialog/dlgprefdeck.cpp index 684193f0479..c7245942bfb 100644 --- a/src/preferences/dialog/dlgprefdeck.cpp +++ b/src/preferences/dialog/dlgprefdeck.cpp @@ -469,9 +469,9 @@ void DlgPrefDeck::slotUpdate() { const EngineSync::SyncLockAlgorithm syncLockAlgorithm = static_cast(m_pConfig->getValue( ConfigKey(BPM_CONFIG_GROUP, SYNC_LOCK_ALGORITHM_CONFIG_KEY), - EngineSync::SyncLockAlgorithm::PREFER_IMPLICIT_LEADER)); - if (syncLockAlgorithm == EngineSync::SyncLockAlgorithm::PREFER_IMPLICIT_LEADER) { - radioButtonImplicitLeader->setChecked(true); + EngineSync::SyncLockAlgorithm::PREFER_SOFT_LEADER)); + if (syncLockAlgorithm == EngineSync::SyncLockAlgorithm::PREFER_SOFT_LEADER) { + radioButtonSoftLeader->setChecked(true); } else { radioButtonLockBpm->setChecked(true); } @@ -561,7 +561,7 @@ void DlgPrefDeck::slotResetToDefaults() { checkBoxResetSpeed->setChecked(false); checkBoxResetPitch->setChecked(true); - radioButtonImplicitLeader->setChecked(true); + radioButtonSoftLeader->setChecked(true); radioButtonOriginalKey->setChecked(true); radioButtonResetUnlockedKey->setChecked(true); @@ -742,9 +742,9 @@ void DlgPrefDeck::slotApply() { m_pConfig->set(ConfigKey("[Controls]", "SpeedAutoReset"), ConfigValue(configSPAutoReset)); - if (radioButtonImplicitLeader->isChecked()) { + if (radioButtonSoftLeader->isChecked()) { m_pConfig->setValue(ConfigKey(BPM_CONFIG_GROUP, SYNC_LOCK_ALGORITHM_CONFIG_KEY), - static_cast(EngineSync::SyncLockAlgorithm::PREFER_IMPLICIT_LEADER)); + static_cast(EngineSync::SyncLockAlgorithm::PREFER_SOFT_LEADER)); } else { m_pConfig->setValue(ConfigKey(BPM_CONFIG_GROUP, SYNC_LOCK_ALGORITHM_CONFIG_KEY), static_cast(EngineSync::SyncLockAlgorithm::PREFER_LOCK_BPM)); diff --git a/src/preferences/dialog/dlgprefdeckdlg.ui b/src/preferences/dialog/dlgprefdeckdlg.ui index 6abc6180bc1..8b90bc7902f 100644 --- a/src/preferences/dialog/dlgprefdeckdlg.ui +++ b/src/preferences/dialog/dlgprefdeckdlg.ui @@ -484,12 +484,12 @@ You can always drag-and-drop tracks on screen to clone a deck. - + - Apply tempo changes from the implicit leader track (normally the previous track in a transition) to the follower tracks. After the transition, the follower track will continue with the previous leader's very last tempo. + Apply tempo changes from a soft leading track (normally the previous track in a transition) to the follower tracks. After the transition, the follower track will continue with the previous leader's very last tempo. - Follow implicit leader's tempo + Follow soft leader's tempo buttonGroupSyncMode @@ -638,10 +638,10 @@ You can always drag-and-drop tracks on screen to clone a deck. - During a transition, the tempo of an implicit leader track at the beginning of the transition is kept static. After the transition, the follower track will maintain this original tempo. This technique serves as a workaround to avoid dynamic tempo changes, as seen in rubato-style tracks, during the outro. For instance it prevents the follower track from continuing with a slowed-down tempo of the implicit leader. This corresponds to the behavior before Mixxx 2.4. + The tempo of a previous soft leader track at the beginning of the transition is kept steady. After the transition, the follower track will maintain this original tempo. This technique serves as a workaround to avoid dynamic tempo changes, as seen in rubato-style tracks, during the outro. For instance it prevents the follower track from continuing with a slowed-down tempo of the soft leader. This corresponds to the behavior before Mixxx 2.4. - Use stady tempo + Use steady tempo buttonGroupSyncMode @@ -696,7 +696,7 @@ You can always drag-and-drop tracks on screen to clone a deck. checkBoxInvertSpeedSlider checkBoxResetPitch checkBoxResetSpeed - radioButtonImplicitLeader + radioButtonSoftLeader radioButtonOriginalKey radioButtonCurrentKey radioButtonResetUnlockedKey From 636434bc6fa801e49e8e51406a93d1c0546d8d03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Tue, 15 Aug 2023 07:39:31 +0200 Subject: [PATCH 3/9] Extend tooltips --- src/preferences/dialog/dlgprefdeckdlg.ui | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/preferences/dialog/dlgprefdeckdlg.ui b/src/preferences/dialog/dlgprefdeckdlg.ui index 8b90bc7902f..3d7bf59867f 100644 --- a/src/preferences/dialog/dlgprefdeckdlg.ui +++ b/src/preferences/dialog/dlgprefdeckdlg.ui @@ -486,7 +486,7 @@ You can always drag-and-drop tracks on screen to clone a deck. - Apply tempo changes from a soft leading track (normally the previous track in a transition) to the follower tracks. After the transition, the follower track will continue with the previous leader's very last tempo. + Apply tempo changes from a soft leading track (normally the previous track in a transition) to the follower tracks. After the transition, the follower track will continue with the previous leader's very last tempo. Changes from explicit selected leaders are always applied. Follow soft leader's tempo @@ -638,7 +638,7 @@ You can always drag-and-drop tracks on screen to clone a deck. - The tempo of a previous soft leader track at the beginning of the transition is kept steady. After the transition, the follower track will maintain this original tempo. This technique serves as a workaround to avoid dynamic tempo changes, as seen in rubato-style tracks, during the outro. For instance it prevents the follower track from continuing with a slowed-down tempo of the soft leader. This corresponds to the behavior before Mixxx 2.4. + The tempo of a previous soft leader track at the beginning of the transition is kept steady. After the transition, the follower track will maintain this original tempo. This technique serves as a workaround to avoid dynamic tempo changes, as seen in rubato-style tracks, during the outro. For instance it prevents the follower track from continuing with a slowed-down tempo of the soft leader. This corresponds to the behavior before Mixxx 2.4. Changes from explicit selected leaders are always applied. Use steady tempo From 5ee1c710ce92bcefd862cd63caccb0f45124c722 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Tue, 22 Aug 2023 00:49:57 +0200 Subject: [PATCH 4/9] Improve tooltips Co-authored-by: ronso0 --- src/preferences/dialog/dlgprefdeckdlg.ui | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/preferences/dialog/dlgprefdeckdlg.ui b/src/preferences/dialog/dlgprefdeckdlg.ui index 3d7bf59867f..c5fbeda455f 100644 --- a/src/preferences/dialog/dlgprefdeckdlg.ui +++ b/src/preferences/dialog/dlgprefdeckdlg.ui @@ -486,7 +486,7 @@ You can always drag-and-drop tracks on screen to clone a deck. - Apply tempo changes from a soft leading track (normally the previous track in a transition) to the follower tracks. After the transition, the follower track will continue with the previous leader's very last tempo. Changes from explicit selected leaders are always applied. + Apply tempo changes from a soft-leading track (usually the leaving track in a transition) to the follower tracks. After the transition, the follower track will continue with the previous leader's very last tempo. Changes from explicit selected leaders are always applied. Follow soft leader's tempo @@ -638,7 +638,7 @@ You can always drag-and-drop tracks on screen to clone a deck. - The tempo of a previous soft leader track at the beginning of the transition is kept steady. After the transition, the follower track will maintain this original tempo. This technique serves as a workaround to avoid dynamic tempo changes, as seen in rubato-style tracks, during the outro. For instance it prevents the follower track from continuing with a slowed-down tempo of the soft leader. This corresponds to the behavior before Mixxx 2.4. Changes from explicit selected leaders are always applied. + The tempo of a previous soft leader track at the beginning of the transition is kept steady. After the transition, the follower track will maintain this original tempo. This technique serves as a workaround to avoid dynamic tempo changes, as seen during the outro of rubato-style tracks. For instance, it prevents the follower track from continuing with a slowed-down tempo of the soft leader. This corresponds to the behavior before Mixxx 2.4. Changes from explicit selected leaders are always applied. Use steady tempo From edc5d01f0d2abba3e1feddc8a6c756ff864100ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Sun, 10 Sep 2023 00:16:43 +0200 Subject: [PATCH 5/9] Add manual link to Sync mode label in prefrences --- src/defs_urls.h | 2 ++ src/preferences/dialog/dlgprefdeck.cpp | 20 +++++++++----------- src/preferences/dialog/dlgprefdeckdlg.ui | 5 ++++- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/defs_urls.h b/src/defs_urls.h index f61dcd0ac75..e8c14799c3d 100644 --- a/src/defs_urls.h +++ b/src/defs_urls.h @@ -53,6 +53,8 @@ MIXXX_MANUAL_URL "/chapters/preferences.html#library" #define MIXXX_MANUAL_CUE_MODES_URL \ MIXXX_MANUAL_URL "/chapters/user_interface.html#using-cue-modes" +#define MIXXX_MANUAL_SYNC_MODES_URL \ + MIXXX_MANUAL_URL "/chapters/user_interface.html#sync-and-rate-controls" #define MIXXX_MANUAL_BEATS_URL \ MIXXX_MANUAL_URL "/chapters/preferences.html#beat-detection" #define MIXXX_MANUAL_KEY_URL \ diff --git a/src/preferences/dialog/dlgprefdeck.cpp b/src/preferences/dialog/dlgprefdeck.cpp index c7245942bfb..a55a661c598 100644 --- a/src/preferences/dialog/dlgprefdeck.cpp +++ b/src/preferences/dialog/dlgprefdeck.cpp @@ -268,9 +268,7 @@ DlgPrefDeck::DlgPrefDeck(QWidget* parent, } setRateRangeForAllDecks(m_iRateRangePercent); - // // Key lock mode - // connect(buttonGroupKeyLockMode, QOverload::of(&QButtonGroup::buttonClicked), this, @@ -283,9 +281,7 @@ DlgPrefDeck::DlgPrefDeck(QWidget* parent, pControl->set(static_cast(m_keylockMode)); } - // // Key unlock mode - // connect(buttonGroupKeyUnlockMode, QOverload::of(&QButtonGroup::buttonClicked), this, @@ -298,21 +294,23 @@ DlgPrefDeck::DlgPrefDeck(QWidget* parent, pControl->set(static_cast(m_keyunlockMode)); } - // // Cue Mode - // - // Add "(?)" with a manual link to the label - labelCueMode->setText(labelCueMode->text() + QStringLiteral(" ") + + labelCueMode->setText(labelCueMode->text() + QChar(' ') + coloredLinkString( m_pLinkColor, QStringLiteral("(?)"), MIXXX_MANUAL_CUE_MODES_URL)); - // - // Speed / Pitch reset configuration - // + // Sync Mode + // Add "(?)" with a manual link to the label + labelSyncMode->setText(labelSyncMode->text() + QChar(' ') + + coloredLinkString( + m_pLinkColor, + QStringLiteral("(?)"), + MIXXX_MANUAL_SYNC_MODES_URL)); + // Speed / Pitch reset configuration // Update "reset speed" and "reset pitch" check boxes // TODO: All defaults should only be set in slotResetToDefaults. int configSPAutoReset = m_pConfig->getValue( diff --git a/src/preferences/dialog/dlgprefdeckdlg.ui b/src/preferences/dialog/dlgprefdeckdlg.ui index c5fbeda455f..7e884e4b982 100644 --- a/src/preferences/dialog/dlgprefdeckdlg.ui +++ b/src/preferences/dialog/dlgprefdeckdlg.ui @@ -382,10 +382,13 @@ You can always drag-and-drop tracks on screen to clone a deck. - + Sync mode (Dynamic tempo tracks) + + true + From 4b6e4be673f0b6fed8d2a67d3710244d9e3d0980 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Sun, 10 Sep 2023 00:40:57 +0200 Subject: [PATCH 6/9] Extend the sync_leader tooltip --- src/skin/legacy/tooltips.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/skin/legacy/tooltips.cpp b/src/skin/legacy/tooltips.cpp index e199a87d6c8..115ae9bcc2a 100644 --- a/src/skin/legacy/tooltips.cpp +++ b/src/skin/legacy/tooltips.cpp @@ -578,7 +578,9 @@ void Tooltips::addStandardTooltips() { add("sync_leader") << tr("Enable Sync Leader") - << tr("When enabled, this device will serve as the sync leader for all other decks."); + << tr("When enabled, this device will serve as the sync leader for all other decks.") + << tr("This is relevant when a dynamic tempo track is loaded to a sync leader." + "In that case, other synced devices will adopt the changing tempo."); add("rate") << tr("Speed Control") From 783c041b3327891c74332b611d677ee58bcb9b33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Wed, 11 Oct 2023 00:08:27 +0200 Subject: [PATCH 7/9] Use constants instead of macros --- src/engine/sync/enginesync.cpp | 2 +- src/engine/sync/enginesync.h | 6 ++++-- src/preferences/dialog/dlgprefdeck.cpp | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/engine/sync/enginesync.cpp b/src/engine/sync/enginesync.cpp index 5b1114e1807..d8809338101 100644 --- a/src/engine/sync/enginesync.cpp +++ b/src/engine/sync/enginesync.cpp @@ -254,7 +254,7 @@ Syncable* EngineSync::pickLeader(Syncable* enabling_syncable) { } const SyncLockAlgorithm picker = static_cast( - m_pConfig->getValue(ConfigKey(BPM_CONFIG_GROUP, SYNC_LOCK_ALGORITHM_CONFIG_KEY), + m_pConfig->getValue(ConfigKey(kBpmConfigGroup, kSyncLockAlgorithmConfigKey), PREFER_SOFT_LEADER)); switch (picker) { case PREFER_SOFT_LEADER: diff --git a/src/engine/sync/enginesync.h b/src/engine/sync/enginesync.h index 43c7b5da7fa..a936f9e552d 100644 --- a/src/engine/sync/enginesync.h +++ b/src/engine/sync/enginesync.h @@ -2,6 +2,8 @@ #include +#include + #include "audio/types.h" #include "engine/sync/syncable.h" #include "preferences/usersettings.h" @@ -9,8 +11,8 @@ class InternalClock; class EngineChannel; -#define BPM_CONFIG_GROUP "[BPM]" -#define SYNC_LOCK_ALGORITHM_CONFIG_KEY "sync_lock_algorithm" +const QString kBpmConfigGroup = QStringLiteral("[BPM]"); +const QString kSyncLockAlgorithmConfigKey = QStringLiteral("sync_lock_algorithm"); /// EngineSync is the heart of the Mixxx Sync Lock engine. It knows which objects /// (Decks, Internal Clock, etc) are participating in Sync and what their statuses diff --git a/src/preferences/dialog/dlgprefdeck.cpp b/src/preferences/dialog/dlgprefdeck.cpp index a55a661c598..cf0a4224d9d 100644 --- a/src/preferences/dialog/dlgprefdeck.cpp +++ b/src/preferences/dialog/dlgprefdeck.cpp @@ -466,7 +466,7 @@ void DlgPrefDeck::slotUpdate() { const EngineSync::SyncLockAlgorithm syncLockAlgorithm = static_cast(m_pConfig->getValue( - ConfigKey(BPM_CONFIG_GROUP, SYNC_LOCK_ALGORITHM_CONFIG_KEY), + ConfigKey(kBpmConfigGroup, kSyncLockAlgorithmConfigKey), EngineSync::SyncLockAlgorithm::PREFER_SOFT_LEADER)); if (syncLockAlgorithm == EngineSync::SyncLockAlgorithm::PREFER_SOFT_LEADER) { radioButtonSoftLeader->setChecked(true); @@ -741,10 +741,10 @@ void DlgPrefDeck::slotApply() { ConfigValue(configSPAutoReset)); if (radioButtonSoftLeader->isChecked()) { - m_pConfig->setValue(ConfigKey(BPM_CONFIG_GROUP, SYNC_LOCK_ALGORITHM_CONFIG_KEY), + m_pConfig->setValue(ConfigKey(kBpmConfigGroup, kSyncLockAlgorithmConfigKey), static_cast(EngineSync::SyncLockAlgorithm::PREFER_SOFT_LEADER)); } else { - m_pConfig->setValue(ConfigKey(BPM_CONFIG_GROUP, SYNC_LOCK_ALGORITHM_CONFIG_KEY), + m_pConfig->setValue(ConfigKey(kBpmConfigGroup, kSyncLockAlgorithmConfigKey), static_cast(EngineSync::SyncLockAlgorithm::PREFER_LOCK_BPM)); } From 51af7c4fad3b80dd42b4cb68afc27ad9c19d1be3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Mon, 16 Oct 2023 23:28:45 +0200 Subject: [PATCH 8/9] Improve tooltips Co-authored-by: ronso0 --- src/skin/legacy/tooltips.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/skin/legacy/tooltips.cpp b/src/skin/legacy/tooltips.cpp index 115ae9bcc2a..0542ea22bd2 100644 --- a/src/skin/legacy/tooltips.cpp +++ b/src/skin/legacy/tooltips.cpp @@ -579,7 +579,7 @@ void Tooltips::addStandardTooltips() { add("sync_leader") << tr("Enable Sync Leader") << tr("When enabled, this device will serve as the sync leader for all other decks.") - << tr("This is relevant when a dynamic tempo track is loaded to a sync leader." + << tr("This is relevant when a dynamic tempo track is loaded to a sync leader deck." "In that case, other synced devices will adopt the changing tempo."); add("rate") From 72d5d8460dcb127e7e354d5b5501db6ff11be4ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Thu, 16 Nov 2023 08:07:28 +0100 Subject: [PATCH 9/9] Adjust link to the manual --- src/defs_urls.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/defs_urls.h b/src/defs_urls.h index e8c14799c3d..b9997f27b03 100644 --- a/src/defs_urls.h +++ b/src/defs_urls.h @@ -54,7 +54,7 @@ #define MIXXX_MANUAL_CUE_MODES_URL \ MIXXX_MANUAL_URL "/chapters/user_interface.html#using-cue-modes" #define MIXXX_MANUAL_SYNC_MODES_URL \ - MIXXX_MANUAL_URL "/chapters/user_interface.html#sync-and-rate-controls" + MIXXX_MANUAL_URL "/chapters/djing_with_mixxx#sync-lock-with-dynamic-tempo" #define MIXXX_MANUAL_BEATS_URL \ MIXXX_MANUAL_URL "/chapters/preferences.html#beat-detection" #define MIXXX_MANUAL_KEY_URL \