Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions src/engine/controls/keycontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,18 +234,12 @@ void KeyControl::updateRate() {
m_pPitchAdjust->set(
KeyUtils::powerOf2ToSemitoneChange(m_pitchRateInfo.pitchTweakRatio));
} else { // Unlock and reset to linear pitch (orig. key + pitch fader offset)
// If 'current' aka 'not original' key was locked
// TODO(ronso0) Why does it depend on keylock mode?
if (m_keylockMode->get() == kLockCurrentKey) {
// reset to linear pitch
m_pitchRateInfo.pitchTweakRatio = 1.0;
// was missing?
// m_pPitchAdjust->set(
// KeyUtils::powerOf2ToSemitoneChange(m_pitchRateInfo.pitchTweakRatio));
}
m_pitchRateInfo.pitchTweakRatio = 1.0;
m_pPitchAdjust->set(
KeyUtils::powerOf2ToSemitoneChange(m_pitchRateInfo.pitchTweakRatio));
if constexpr (kEnableDebugOutput) {
qDebug() << " UNLOCKING reset to linear pitch";
qDebug() << " : pitchTweakRatio = 1.0";
qDebug() << " : pitchTweakRatio =" << m_pitchRateInfo.pitchTweakRatio;
qDebug() << " |";
}
}
Expand Down