0.40.0 (75): Sampler One-shot (Android and iOS)

- Sampler parameter oneShot (Off/On): note-offs don't release its pads; they
  play their whole slice. Transport stop/pause still releases (SampleVoice::
  release), panic kills
- Engine in core/ and the Kotlin reference both implement it; the golden
  Sampler "high" scenario covers it; oneshot_test checks MIDI, song, stop, panic
- ONE-SHOT toggle in both apps' Sampler editors; specs and layouts regenerated

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Reactorcoremeltdown
2026-11-16 16:53:13 +01:00
co-authored by Claude Opus 5.5
parent 5240019b47
commit 7041f762e5
17 changed files with 182 additions and 16 deletions
@@ -24,7 +24,17 @@ struct SamplerDetail: View {
var body: some View {
let session = SizzleSession.shared
let assigned = !session.value(ofSlot: slot, key: "pad\(pad)").isEmpty
let oneShot = session.value(ofSlot: slot, key: "oneShot") == "On"
VStack(alignment: .leading, spacing: 8) {
// One-shot (the whole Sampler): note-offs don't cut the pads.
HStack(spacing: 8) {
MixKit.Button(label: "ONE-SHOT", active: oneShot) {
session.setValue(oneShot ? "Off" : "On", ofSlot: slot, key: "oneShot")
}
Text(oneShot ? "Pads play their whole slice; note-offs are ignored."
: "Pads stop on note-off (key release, ===).")
.font(Theme.mono(11)).foregroundColor(Theme.dim).lineLimit(2)
}
Text("Pad \(pad + 1) · \(MixKit.pitchName(SamplerPads.note(pad)))").font(Theme.mono(13)).foregroundColor(Theme.accent)
MixKit.HScroll {
HStack(spacing: 8) {