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:
@@ -173,6 +173,27 @@ struct LooperPedalTests {
|
||||
#expect(LooperPedal.trackCount == 4)
|
||||
}
|
||||
|
||||
@Test func looperHidesMixControl() throws {
|
||||
// The looper always passes the clean signal through and adds the loop on top, so the
|
||||
// wet/dry Mix knob is hidden; a plain pedal keeps it.
|
||||
#expect(LooperPedal().showsMixControl == false)
|
||||
}
|
||||
|
||||
@Test func cleanSignalPassesThroughWhilePlaying() throws {
|
||||
// With the loop muted (loopOn = 0) but a loop recorded and a live tone present, the
|
||||
// output must still carry the clean signal at full level — it is never gated by the loop.
|
||||
let recordDuration: Double = 0.1
|
||||
let samples: [Float] = try render(totalDuration: 0.5) { _, _, pedal, scheduleAction in
|
||||
pedal.pressLoop()
|
||||
try scheduleAction(recordDuration) { pedal.pressLoop() } // play + overdub A
|
||||
try scheduleAction(recordDuration + 0.02) { pedal.pressLoop() } // end overdub
|
||||
try scheduleAction(0.2) { pedal.loopOn = 0.0 } // mute the loop, keep live tone
|
||||
}
|
||||
let tailStart: Int = Int(Double(samples.count) * 0.9)
|
||||
let tail: [Float] = Array(samples[tailStart...])
|
||||
#expect(hasNonSilentOutput(tail), "Clean signal must pass through even with the loop muted")
|
||||
}
|
||||
|
||||
// MARK: - Audio behaviour (immediate / un-quantized)
|
||||
|
||||
@Test func clearStatePassesDryThrough() throws {
|
||||
|
||||
Reference in New Issue
Block a user