instrument: latch the note done at the read-head run-off, fit the migrated fades, and lift the curve dial and overlay selection into pure modules
This commit is contained in:
@@ -191,6 +191,32 @@ bool isLiveDeckParam(DeckParam id) {
|
||||
return false; // unreachable for a valid enumerator; silences a warning.
|
||||
}
|
||||
|
||||
OverlayEnv overlayEnvForRadio(int radioId) {
|
||||
switch (static_cast<DeckParam>(radioId)) {
|
||||
case DeckParam::kAmpEnvSelect: return OverlayEnv::kAmp;
|
||||
case DeckParam::kPitchEnvSelect: return OverlayEnv::kPitch;
|
||||
case DeckParam::kFilterEnvSelect: return OverlayEnv::kFilter;
|
||||
default: return OverlayEnv::kNone;
|
||||
}
|
||||
}
|
||||
|
||||
OverlayEnv nextOverlaySelection(OverlayEnv current, int radioId) {
|
||||
const OverlayEnv picked = overlayEnvForRadio(radioId);
|
||||
if (picked == OverlayEnv::kNone) return current; // not a radio: nothing selects
|
||||
return (current == picked) ? OverlayEnv::kNone : picked;
|
||||
}
|
||||
|
||||
bool overlayEnvInert(OverlayEnv env, bool pitchEnvEnabled, bool filterEnabled) {
|
||||
switch (env) {
|
||||
case OverlayEnv::kPitch: return !pitchEnvEnabled;
|
||||
case OverlayEnv::kFilter: return !filterEnabled;
|
||||
case OverlayEnv::kAmp:
|
||||
case OverlayEnv::kNone:
|
||||
return false;
|
||||
}
|
||||
return false; // unreachable for a valid enumerator; silences a warning.
|
||||
}
|
||||
|
||||
bool liveCommitFor(LiveDragKind kind, int paramId) {
|
||||
switch (kind) {
|
||||
case LiveDragKind::kDeckKnob:
|
||||
|
||||
Reference in New Issue
Block a user