Prechádzať zdrojové kódy

Record checkpoint B results

All five round-trip projects worked on the device. Notes past a
shortened end are kept and come back when lengthened, so the shorten
dialog says so. currentSequence slot vs list position is still open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude 1 deň pred
rodič
commit
ebea15f1a0

+ 3 - 1
docs/build-plan.md

@@ -253,6 +253,8 @@ Not yet tested: sample rates above 96 kHz or below 22.05 kHz; 64-bit float (refu
 4. Remove a sequence; add one in a different bank.
 4. Remove a sequence; add one in a different bank.
 5. Shorten a sequence that has notes: note what the device does with notes past the end.
 5. Shorten a sequence that has notes: note what the device does with notes past the end.
 
 
+Results (2026-11-11, on the device): all five passed. Notes past a shortened end are kept and play again when the sequence is lengthened. B4 worked but did not settle whether `currentSequence` is a slot or a list position (format doc, open question 7). Details in `docs/checkpoint-b.md`. M8 is done.
+
 ## 8. Builds
 ## 8. Builds
 
 
 - Wails apps are built on each target system. Use one machine or CI runner per system; the Linux VPS alone cannot produce the Mac build.
 - Wails apps are built on each target system. Use one machine or CI runner per system; the Linux VPS alone cannot produce the Mac build.
@@ -267,7 +269,7 @@ Not yet tested: sample rates above 96 kHz or below 22.05 kHz; 64-bit float (refu
 | WAV variants the device rejects or plays wrongly | Largely retired by the WAV test pack (section 7): all eleven formats played correctly. Remaining unknowns are listed there. Akai's spec caps a sample at 20 minutes; refuse longer files. |
 | WAV variants the device rejects or plays wrongly | Largely retired by the WAV test pack (section 7): all eleven formats played correctly. Remaining unknowns are listed there. Akai's spec caps a sample at 20 minutes; refuse longer files. |
 | The app's preview cannot decode a WAV the device accepts | Each system's webview has its own audio decoder, and 8-bit, 32-bit integer or extensible files may fail in some. Try the webview's decoder first; if it fails, fall back to a Go route that decodes the PCM itself and returns 32-bit float samples for the frontend to play. `internal/wav` therefore needs a small decoder as well as the header reader. |
 | The app's preview cannot decode a WAV the device accepts | Each system's webview has its own audio decoder, and 8-bit, 32-bit integer or extensible files may fail in some. Try the webview's decoder first; if it fails, fall back to a Go route that decodes the PCM itself and returns 32-bit float samples for the frontend to play. `internal/wav` therefore needs a small decoder as well as the header reader. |
 | Mute group count | Resolved (checkpoint A): none and 1-16. The UI list offers Off, 1-16. |
 | Mute group count | Resolved (checkpoint A): none and 1-16. The UI list offers Off, 1-16. |
-| Shortening sequences with notes | Checkpoint B5; until then warn and leave notes untouched. |
+| Shortening sequences with notes | Resolved (checkpoint B5): the device keeps notes past the end and plays them again when the sequence is lengthened. The app still asks before shortening and leaves the notes in the file. |
 | Tuning limits taken from a community toolkit | Resolved (checkpoint A): ±24 semitones and ±90 cents confirmed on the device. |
 | Tuning limits taken from a community toolkit | Resolved (checkpoint A): ±24 semitones and ±90 cents confirmed on the device. |
 | Very long or unusual file names | Keep names as they are; reject only characters illegal on Windows/FAT. Revisit if the device truncates. |
 | Very long or unusual file names | Keep names as they are; reject only characters illegal on Windows/FAT. Revisit if the device truncates. |
 | File drop quirks per system | Dialog-based assign is always available as the fallback. |
 | File drop quirks per system | Dialog-based assign is always available as the fallback. |

+ 9 - 5
docs/checkpoint-b.md

@@ -51,10 +51,14 @@ On the device:
 
 
 ## Results
 ## Results
 
 
+Run on the MPC Sample on 2026-11-11 by bajdev. All five loaded and passed.
+
 | Project | Loads | Result |
 | Project | Loads | Result |
 |---|---|---|
 |---|---|---|
-| MpckitB1 | | |
-| MpckitB2 | | |
-| MpckitB3 | | |
-| MpckitB4 | | Sequence selected on open: |
-| MpckitB5 | | Notes past the new end: |
+| MpckitB1 | yes | Worked: plays as DemoFile. |
+| MpckitB2 | yes | Worked: A05 plays the kick; the notes stayed on A01. |
+| MpckitB3 | yes | Worked: the copy in bank C plays; the swapped pads changed places in the sequences. |
+| MpckitB4 | yes | Worked. Sequence 02 (A02) was selected on open. |
+| MpckitB5 | yes | Sequence 02 plays its 2 bars correctly. Lengthened back to 4 bars on the device, the notes in bars 3 and 4 are still there and play. |
+
+B4 does not settle open question 7. In MpckitB4 the stored list is [Bridge (slot 17), Sequence 02 (slot 2)] and `currentSequence` is 1, so "slot 1" and "position 1 in the list" both mean Sequence 02.

+ 12 - 2
docs/xpj-format-and-scope.md

@@ -249,13 +249,23 @@ Four projects written by the Go writer (`tools/checkpoint-a`, built from commit
 
 
 Every item on the original 0.5.0 list (project name, pad sample assignment, sequence name, BPM, bar length, adding a sequence) plus pad tuning has now been written by these recipes and accepted by the device.
 Every item on the original 0.5.0 list (project name, pad sample assignment, sequence name, BPM, bar length, adding a sequence) plus pad tuning has now been written by these recipes and accepted by the device.
 
 
+### Checkpoint B (2026-11-11)
+
+Five projects made from DemoFile in the app, exported, and loaded on the device (details and results in `docs/checkpoint-b.md`). All loaded and worked:
+
+- **Unchanged round trip** (B1): plays as DemoFile.
+- **Moving a pad with notes** (B2): the sample plays from its new pad; the notes stay on the old slot, as expected.
+- **Copy across banks, swap pads with notes** (B3): as expected.
+- **Remove the current sequence, add one in bank B** (B4): works; Sequence 02 is selected on open (see open question 7).
+- **Shorten a sequence with notes** (B5): the notes past the new end are kept and play again once the sequence is lengthened (open question 4).
+
 ## 8. Open questions
 ## 8. Open questions
 
 
 1. Device-test a moved and a copied pad.
 1. Device-test a moved and a copied pad.
 1a. ~~Confirm the tuning limits on the device.~~ Confirmed 2026-11-10 (checkpoint A): -24 to +24 semitones and -90 to +90 cents.
 1a. ~~Confirm the tuning limits on the device.~~ Confirmed 2026-11-10 (checkpoint A): -24 to +24 semitones and -90 to +90 cents.
 2. Level and pan have not been seen changed; confirm they are written to `pad[n].mixable`.
 2. Level and pan have not been seen changed; confirm they are written to `pad[n].mixable`.
 3. `triggerMode` values (0 and 3 seen) and how they pair with `loopMode`.
 3. `triggerMode` values (0 and 3 seen) and how they pair with `loopMode`.
-4. When a sequence with notes is shortened, are notes past the new end kept or removed?
+4. ~~When a sequence with notes is shortened, are notes past the new end kept or removed?~~ Answered 2026-11-11 (checkpoint B5): kept. They don't play while the sequence is shorter, and play again when it is lengthened on the device.
 5. Sample rates outside 22.05-96 kHz and 64-bit float are untested. (The extensible header was confirmed in checkpoint A; other WAV bit depths and sample rates are confirmed; non-WAV formats are out of 0.5.0.)
 5. Sample rates outside 22.05-96 kHz and 64-bit float are untested. (The extensible header was confirmed in checkpoint A; other WAV bit depths and sample rates are confirmed; non-WAV formats are out of 0.5.0.)
 6. What key and tempo to write for a sample mpckit imports (the device detects them; mpckit cannot yet).
 6. What key and tempo to write for a sample mpckit imports (the device detects them; mpckit cannot yet).
-7. Is `currentSequence` a slot number or an index into `sequences[]`? Every file seen has 0, and slot 0 is stored second, so the files cannot tell. mpckit treats it as a slot (build plan 4.3); checkpoint B4 should remove the current sequence and check which one the device opens.
+7. Is `currentSequence` a slot number or an index into `sequences[]`? Every file seen has 0, and slot 0 is stored second, so the files cannot tell. mpckit treats it as a slot (build plan 4.3). Checkpoint B4 (removing the current sequence) worked, with Sequence 02 selected on open, but in that file slot 1 and list position 1 are the same sequence, so it does not tell them apart. Still open.

+ 1 - 1
frontend/src/lib/SequencePanel.svelte

@@ -25,7 +25,7 @@
     if (seq.hasNotes && l < seq.bars) {
     if (seq.hasNotes && l < seq.bars) {
       const ok = await confirm({
       const ok = await confirm({
         title: "Shorten a sequence with notes?",
         title: "Shorten a sequence with notes?",
-        message: `${seq.name} has recorded notes. Notes after bar ${l} stay in the file; what the device does with them is not yet known.`,
+        message: `${seq.name} has recorded notes. Notes after bar ${l} will not play, but they are kept: lengthening the sequence again brings them back.`,
         items: [],
         items: [],
         action: "Shorten",
         action: "Shorten",
       });
       });

+ 4 - 0
pull-requests/m8-load-guard-rails/m8-load-and-guard-rails.md

@@ -18,6 +18,10 @@ Load itself, the unsaved-changes prompt on New and Load, the overwrite confirmat
 
 
 **Change after the first laptop run** (bajdev, 2026-11-11: checks 1–3 passed): disable the export buttons while a sample is missing. Before, a user could choose a folder and miss the error text.
 **Change after the first laptop run** (bajdev, 2026-11-11: checks 1–3 passed): disable the export buttons while a sample is missing. Before, a user could choose a folder and miss the error text.
 
 
+**Checkpoint B results** (bajdev, 2026-11-11): all five projects loaded and worked on the device, so M8's done-when is met. Recorded in `docs/checkpoint-b.md`, the format doc (section 7, open questions 4 and 7) and the build plan (checkpoint B, risk table).
+- Open question 4 is answered (B5): notes past a shortened end are kept, and play again when the sequence is lengthened. The shorten dialog now says so, instead of "not yet known".
+- Open question 7 (`currentSequence` slot or list position) is still open: in MpckitB4 both readings point at Sequence 02.
+
 ## Testing
 ## Testing
 
 
 On the server: `go vet` and `go test ./...` pass. New tests:
 On the server: `go vet` and `go test ./...` pass. New tests: