Looper: MIDI-mappable transport; clean-through + Playback balance
MIDI: add looperStop / looperCueStop / looperReverse PedalActionKind cases and dispatch them (stopPlayback / toggleStopAtLoopEnd / toggleReverse). The MIDI mapping sheet now lists Record / Stop / Cue Stop / Reverse / Reset as Program-Change-mappable switch actions for each looper pedal (previously only Bypass was surfaced). Mix: the clean guitar now always passes through at full level and the loop bank is summed on top (dry + loop·gate) instead of crossfading dry against the loop. The Playback knob therefore sets the looped-vs-live balance. Hide the confusing wet/dry Mix knob for the looper via a new Pedal.showsMixControl (mix stays fully wet); other pedals are unaffected. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -43,6 +43,10 @@ public final class LooperPedal: Pedal {
|
||||
/// Double-width card: the looper carries a full transport plus a track strip and timeline.
|
||||
public override var widthUnits: Int { 2 }
|
||||
|
||||
/// The looper always passes the clean signal through and adds the loop on top (see `effect`),
|
||||
/// so the wet/dry Mix knob is meaningless — hide it and keep `mix` fully wet.
|
||||
public override var showsMixControl: Bool { false }
|
||||
|
||||
// MARK: - Knobs
|
||||
|
||||
/// Fade time constant, in seconds, for the loop on/off mute and the record→play handoff.
|
||||
@@ -353,15 +357,18 @@ public final class LooperPedal: Pedal {
|
||||
// Loop bank audible only while playing and not muted; smoothed to avoid clicks.
|
||||
let combinedGate: any ValidGeneratorInput = $isPlaying * $loopOn
|
||||
let smoothedGate: Lag.Control = Lag.Control(input: combinedGate, time: $crossfadeTime)
|
||||
let dryGate: any ValidGeneratorInput = unity - smoothedGate
|
||||
|
||||
// Sum all track players. Empty buffers contribute silence.
|
||||
// Sum all track players. Empty buffers contribute silence. Each player is already
|
||||
// scaled by the `Playback` level, so `Playback` sets the loop amount against the live
|
||||
// signal below.
|
||||
var loopSum: any ValidGeneratorInput = players[0]
|
||||
for i: Int in 1 ..< players.count {
|
||||
loopSum = loopSum + players[i]
|
||||
}
|
||||
|
||||
return (dry * dryGate) + (loopSum * smoothedGate)
|
||||
// The clean (dry) signal always passes through at full level; the loop bank is added on
|
||||
// top, gated by play/mute. `Playback` controls the looped-vs-live balance.
|
||||
return dry + (loopSum * smoothedGate)
|
||||
}
|
||||
|
||||
// MARK: - Loop footswitch
|
||||
|
||||
Reference in New Issue
Block a user