diff --git a/sdk/octatrack/modules/clyps/BANKS_COPY_PASTE_REQUIREMENTS.md b/sdk/octatrack/modules/clyps/BANKS_COPY_PASTE_REQUIREMENTS.md new file mode 100644 index 0000000000..f32010c860 --- /dev/null +++ b/sdk/octatrack/modules/clyps/BANKS_COPY_PASTE_REQUIREMENTS.md @@ -0,0 +1,52 @@ +# CLYPS artist requirements · 23 November 2026 + +**Authoritative product decision, Endrew.** A musician must be able to develop alternate arrangements, move between Banks during composition or performance, and return to earlier material. Preserve these acceptance gates in subsequent sprints. Implementation choices below remain subject to qualification. This decision supersedes the pending status of D18 and extends D22. + +## What gets saved or copied + +| Object | Required musical behavior | +|---|---| +| Bank arrangement | Each project owns 16 independent Banks A–P, each with 16 rows of up to eight track-specific references. A switch changes the selected arrangement. Earlier edits survive Bank changes, project save/reload and power cycling after save. | +| Row | A saved combination of references. Copy A/R01 to A/R05 as a snapshot of all eight assignments. Editing R05 leaves R01 intact. Both may still refer to the same native sequences. | +| Cell | One track's source reference. Copy A/R01/T3 to A/R08/T3 and change only that assignment. Editing the shared source would still affect its other users. | +| Native source pattern | Stock sequencer data including trigs, parameter locks, timing, conditions and sequencer metadata. A03 → D07 must create an independently editable destination. Reuse requires explicit overwrite consent. Other references to D07 must be disclosed before replacement. | +| Independent duplication | Use a verified native pattern-copy transaction. Preserve the original, its users, and all Parts, machines, FX, scenes, sample assignments and stock Arranger data. Cross-bank Part slots may resolve to different sounds. Show the destination Part context. Never implicitly clone a Part. Retarget only the intended lane after separate confirmation and qualification of track-local selection. | + +## Panel contract under investigation + +In the stopped ARR matrix, select a row in row focus or a cell in track/row focus. Candidate FUNC+REC snapshots it. At the destination FUNC+STOP requests paste. Show object type, source and destination, confirm replacement and allow NO to cancel. Use a separately named **Duplicate Pattern** command with its own confirmation. Never infer it from a reference paste. + +Elektron documents these chords for stock pattern copy/paste outside Grid Recording. Immediate repeated paste undoes the pattern paste. Cross-bank pattern paste copies trigs and locks and leaves the assigned Part separate. Use the stock operation as the reference oracle for D07. Timing, conditions, metadata coverage and undo ownership in the mod still need independent evidence. [MKII manual §12.9.1](https://www.elektron.se/wp-content/uploads/2024/09/Octatrack-MKII-User-Manual_ENG_OS1.40A_210414.pdf). + +The current modal handler consumes modified transport and rejects non-alone keys. It has no copy/paste route. The proposed contract claims neither stock clipboard action. Before binding gestures, trace both press orders, repeats, releases, early/ordinary dispatch, a modifier held before entry, popup opening/closing and the first input after leaving Meta. Test stock COPY/PASTE outside Meta, transport, Track Solo, SRC list, native SRC editor and Arranger. A popup cancels pending confirmation. If exclusive modal routing cannot be proven, prefer explicit Copy Row, Copy Cell and Paste entries reached through the existing matrix YES/NO navigation. Qualify that route separately. + +## Architecture and failure behavior + +- Use Bank-local slots and a project-owned versioned sidecar with indexed sections. Sixteen separate Bank files simplify partial reads but multiply identity and recovery transactions. A single generation makes one saved arrangement set recoverable. Embedding data in undocumented stock files or borrowing Arranger/battery storage risks stock recovery. See [storage design and lifecycle evidence](../sdk/drafts/clyps/ROW_STORAGE.md). +- Today a row packs eight four-bit slot indices plus a separate row-defined bit. All Banks cost 1,024 bytes of packed slots plus 32 bytes of row masks. A format supporting individually tagged empty/STOP/HOLD cells costs about 2,080 payload bytes with one byte per cell. Encoding, offsets, checksums, generations, filenames and migration remain design decisions. Never treat slot zero as empty. Keep parsing, snapshots and I/O outside the clock and input callbacks. Measure stack, pool, image and worst-case callback cost on the candidate before adoption. +- Use value snapshots with distinct row/cell types, never pointers into pattern memory or stock clipboard buffers. Permit repeated same-Bank paste. Initially require the same track for cell paste and a defined destination row. Explicit cancellation abandons pending mutation. Invalidate on project change, reload or unload. Until Bank identity is committed, refuse cross-bank reference paste. Later decide whether to rebind slot numbers to the destination Bank or explicitly support foreign references. Native pattern duplication across Banks remains mandatory. +- Stage and validate before a single commit. At confirmation, revalidate project, Bank, destination contents, clipboard, source-slot compatibility and ownership. Keep a preimage for undo in the same generation. On a failed Bank load or interrupted save, retain prior state, dirty edits and the last valid generation. Remove/off releases RAM and hooks, leaving ordinary project data usable. Stock saving with CLYPS absent requires reconciliation before sidecar writeback. +- Native duplication needs verified read/write ownership for both Banks, lock/condition/metadata extent, destination Part semantics, dirty tracking, undo and persistence/reload. Verify all other referencing tracks continue playing their selected source. Keep native editing interlocked until these pass. No raw pattern-block copy based only on a presumed size. + +## Qualification ledger + +All physical MKII tests A–H are **NOT TESTED**. The internal clipboard fixture exercises reference transformations with synthetic rows. No panel gesture, file transaction or independent native edit is qualified by that fixture. + +| Gate | Acceptance observation | +|---|---| +| A | Copy A/R01 to R05, compare eight sources, change one destination cell and recheck original. | +| B | Paste R01/T3 into R08/T3. Compare the other seven cells and the original byte-for-byte. | +| C | Give A, B, C and H different arrangements. Edit H, return to A, and verify every Bank including intermediate ones. Repeat with an unrelated notification and failed load. | +| D | Save, reload and power-cycle a disposable project. Restore every row exactly. Interrupt writeback and recover the last complete generation. | +| E | Duplicate A03 to D07, independently change a destination trig and p-lock, reload, compare source and destination, timing, conditions, Parts and other references. | +| F | Copy/paste stopped, check feedback, press/release and normal stock gestures outside the matrix. | +| G | Try invalid targets, cancelled overwrite, popup, stale Bank/project and interrupted operations. Compare all unrelated project data. Exercise undo. | +| H | Disable/remove CLYPS, open the project in stock, compare patterns, Parts, scenes and Arranger; exercise stock save and recovery. | + +## Milestones + +1. Retain this decision in the README and handoff. Preserve attribution and both source licences. +2. Keep popup and Bank-read regressions green on the isolated candidate. Maintain independent shared-base qualification. +3. Exercise the internal value clipboard. Panel wiring requires ownership, feedback, overwrite and undo evidence. +4. Test the versioned codec and interrupted generations offline. Device I/O waits for project identity, successful lifecycle notifications, reserved filenames and recovery contracts. +5. Qualify the native pattern transaction and source editor separately. Hardware acceptance requires a later authorized physical session. diff --git a/sdk/octatrack/modules/clyps/HANDOFF.md b/sdk/octatrack/modules/clyps/HANDOFF.md new file mode 100644 index 0000000000..84caf7e15b --- /dev/null +++ b/sdk/octatrack/modules/clyps/HANDOFF.md @@ -0,0 +1,174 @@ +## Current integration checkpoint · 23 November 2026 + +**DRAFT / NOT_FLASH_CANDIDATE / HARDWARE NOT TESTED.** Use the contributor +branch `integration/clyps-current-base-nov23` at +`5c32cbacd2b1efea3d70e9b543a9a43cfe634651` for native development. +Its parents are the cumulative #1910 revision and the preserved integration +candidate. The source-only module remains on Draft #1997. +[Build identities and current results](evidence/nov23-reliability.json). + +Two builds reproduced MAIN, its symbol map, base.elemod and the complete proof. +The matched MKII T2 slice passed at wrap 90 (384 events, 400 writes, +786432 bytes free after OFF). Popup re-entry retained R04. The SDK +catalogue checker excludes the draft. The integration branch's release +package reconstruction check fails because the USB Audio recipe pins +the generated event header SHA-256 to the cumulative revision. Preserve +that review gate when proposing new event declarations. + +The unchanged eight-lane strict grader passed at both 5 ms and 1 ms on +this MAIN. The old pair was reproduced byte for byte with absolute clock +witnesses. Its stock and module reads fell on opposite sides of the same +five frame-consumer clears. See [timing and MIDI results](TESTING.md). +The early/late diagnostic gates remain failed. Native MIDI note/CC semantics +matched on the two-lane fixture; candidate and fixed-A01 stock differ by +one running-status byte and by up to 64.1 samples in relative message-end +timing. No native MIDI source switch has been implemented. + +The production-callback EOF fixture reproduces loss of the row-defined mask +after destination initialization. The isolated mock and offline codec are +under `offline/`. See [bank records and recovery](ROW_STORAGE.md). +No archive reader or writer is linked into the runtime. + +Next engineering gate: inject a late abort on a disposable same-bank +project change and qualify a stock terminal callback. Confirm that the old +incarnation, bank and source epoch were restored before re-enabling R04; +otherwise keep selection suspended with the old generation recoverable. + +# CLYPS contributor checkpoint · 23 November 2026 + +[Authoritative Bank and copy/paste requirements](BANKS_COPY_PASTE_REQUIREMENTS.md) · artist decision, 23 November 2026. + +PR #1997 remains an experimental source draft. See [testing](TESTING.md) for per-build results. The 22 November checkpoint below is historical. The final module reproduced byte-for-byte (SHA-256 32ebca98345840f4e107550683f4fd14f2be35e5355df3d8933b7132f324aea9). On the pinned MKII base it passed popup re-entry, the matched T2 wrap, stock Arranger restoration, fail-closed admission and a real transition from GATE3/A to GATE4/B with the module installed. + +The final eight-lane replay at 1 ms matched every ordered event and relative write. Its strict queue comparison failed at tick 193 (218/219 states matched). Full timing equivalence remains open. + +## Maintainer findings + +- Stock UI takeover discards the Row Edit draft, disarms row capture and yields new keys, the base ownership query and encoders. Keys already consumed retain their releases. A key pressed in a popup stays with stock through repeats and release, including when it closes the popup. ARR reopens the view after dismissal. The transition never calls the launch or row-commit paths. +- Rows represent local slot numbers in the current volatile session. The pre-load mask suspends foreign-source selection during a read of A. Wrap and tick preserve requests while A is being replaced. A read of B–P leaves selection active. The paired return releases this guard on either outcome and retains the row definitions. Each recall checks current grid compatibility. A relevant successful bank read can change what the same slot sounds like. Stock project initialization clears row validity, active lanes and pending work together. It can also occur during CHANGE and RELOAD. A failed whole-project operation that initializes stock state cannot be distinguished from a new epoch. The public callbacks supply neither a committed project identity nor a success mask. Confirm this boundary before extending the lifetime of rows. The module writes no bank, Part or project files. + +## Artist contract and next design work + +The historical artist handoff and idea register are in the private design branch `design/clyps-session-view-ui-2026-11-22`, files `docs/CLYPS_MODWERK_HANDOFF_2026-11-21.md` and `docs/CLYPS_IDEAS.md`. D18–D22 and I60–I64 were appended at `e376ba5`. The public summary below supports implementation review. + +| Decision / idea | Status | Engineering consequence | +|---|---|---| +| D18 / I60 | Artist confirmed A–P × 16; storage layout proposed | Sixteen local rows per bank A–P, versioned project storage, extensible row count. Compare against 128 global rows. [Decision record](ROW_STORAGE.md). | +| D19 / I61 | Artist confirmed | A popup cancels only the unconfirmed row edit. Keep playback and pending launches intact. | +| D20 / I62 | Artist confirmed, future scheduler | A defined row can request CLIP(source), STOP (empty default) or explicit HOLD. STOP executes at the common boundary. Undefined rows issue no operations. Voice cutoff, FX tails, MIDI note-offs, representation and gestures remain open. | +| D21 / I63 | Artist confirmed, future scheduler | Select Restart or Legato at clip or row level. Both use the common launch boundary. | +| D22 / I64 | Artist confirmed, future editing | Edit Source changes all references. Duplicate & Edit requires an independent destination and must preserve the original and other references. Prove safe allocation, full-bank refusal, trig/p-lock/sample/slice-lock and metadata copying, retarget scope, undo and cross-bank behavior. E1 remains interlocked. | + +| Future phase fixture | Acceptance at the common boundary | +|---|---| +| Restart 16→32 and 32→16 | Observe new source step 1 and unchanged phase on the other seven lanes. | +| Legato 16→32 and 32→16 | Agree the phase rule first, then compare actual next steps against an independent oracle in both directions. | +| Clip/row modes disagree or either mode is unset | Choose precedence/default with the artist before fixing expected values. | +| Independent scales, polymeter, looping and one-shots | Define clock domain and terminal behavior. Test requests either side of wrap and STOP cancellation. | + +**Next gate:** on the agreed #1910 build, interrupt a disposable full-project load after stock has initialized the destination but before its final card operation succeeds. Keep separate R04 sentinels for the two project identities. Correlate request, resulting identity and outcome. Require zero cross-project recall and recoverable previous rows on failure before accepting persistence. + +--- + +# CLYPS · chiusura indipendente del 22 novembre 2026 + +**Sessione chiusa. Modulo Draft, ABI proposta, hardware NOT TESTED / NOT_FLASH_CANDIDATE.** Questa verifica ha riletto sorgenti, build e ricevute conservate e rieseguito i grader offline. I replay MKII e le misure appartengono allo sprint precedente. Le sezioni storiche più sotto ne conservano il contesto. + +| Riferimento | Identità verificata alla chiusura | +|---|---| +| [PR modulo #1997](https://github.com/repeat98/modwerk/pull/1997), aperta in Draft | `feature/clyps-community-draft`, checkpoint pre-verbale `93481e7c5509a914f6a8cdf8e9f5d140400ef2bd`. Sorgente consumatore testato con harness a `3478465af605575964c215dfef9e6b6fca8c27f3`. | +| Candidato pubblicato sul fork contributor | `integration/clyps-shared-sequencer` a `b3184dd5e19caaae8c88e2e002c6ab5204ac27d6`, incorpora `23f41e720e6f3d90ecf44f66780fa76324a5ff9f`. MAIN e simboli identici alla build di replay `18e28a172b7836199e17d6da987649eda1710be2`. | +| [PR cumulativa #1910](https://github.com/repeat98/modwerk/pull/1910), aperta in Draft | `base/octatrack-next` a `3375b212c55d85ef59ced4201f87d007d213c61c`. Quattro commit successivi alla base incorporata modificano il calcolo della riserva e la build. Questo HEAD richiede riqualificazione. | +| Agent Board | Claim modulo `5f767223-670c-414e-88cd-301fcc8b1a6e` e claim hook `6bc7b6d1-559b-462f-8c5b-a05185f120e3` attivi. 63/64/65 e capability ABI 9 `0x4000` attendono la decisione del maintainer. [RFC](https://github.com/repeat98/modwerk/pull/1910#issuecomment-7084762329) | + +### Evidenza conservata + +SHA-256 del modulo MWRM `8aa6ccef2afd7db7874de28e8f6948f948e70f1e8b94a2f023d22452e4e90423`; MAIN `6a9d7518ba7707e3763215ecc50be1c7eec09628b1bdf45b86b3f207a02b434b`. Ricontrollati 33/33 digest delle ricevute, eseguibile Octabam MKII, scheda sintetica preparata, MAIN positivo e negativo, mappa simboli e digest di configurazione. Ambiente OS 1.40C, Python 3.12 e toolchain ColdFire. OS e progetto seed sono input locali. La scheda MODWERK/GATE3 è costruita su copie temporanee. L'archivio locale è `CLYPS-shared-replay-evidence/rc3/` nella workspace. [Manifesto delle identità](evidence/shared-base-refresh.json) · [Ricetta riproducibile](NATIVE_REPLAY.md) · [Provenienza e licenze](PROVENANCE.md) + +| Confronto su catture native | Esito riverificato offline | +|---|---| +| T2 da A01 ad A02 su A01 globale | PASS al wrap 90, 384 chiamate ordinate e 400 timestamp. SRC/ARR coerenti, altre sette tracce invariate, STOP annulla il pending. | +| Otto tracce | 624 eventi e 608 timestamp coincidono. Default FAIL al tick 193, 218/219 stati coincidenti. Osservatore appaiato a 1 ms PASS con 219/219 e tre troncamenti respinti dallo stesso grader. | +| Anticipato / RESTORE tardivo | Anticipato PASS, 576 eventi, 560 timestamp, 202 tick. Tardivo: coincidono 848 eventi, 816 timestamp e 298 tick. Richiesta a +1 ms del 187, pubblicazione a +5 ms del 187, T2 home al 282. FAIL del diagnostico che attende 188. | + +Le ricevute archiviate documentano 128 combinazioni su sedici righe, rifiuto 259 prima dell'attivazione con zero callback e owner, pool ripristinato a 786432 byte e Arranger stock con 336 chiamate e 336 scritture dopo OFF. Track Solo in entrambi gli ordini, ritorno SRC di Grain e delle schermate POLY8/VECTOR, popup, pool, AMP/LFO/FX, Scene A/B, crossfader, MAIN 64 → 56 → 64 fuori da Meta e trig/p-lock AMP su HOME sono coperti nei percorsi descritti. FLEX T1 passa da picco 0 a 1930. STATIC T2 registra 2117 prima e 2337 dopo anche nel controllo stock: fallisce il silenzio pre-lancio, isolamento audio inconclusivo. [Dettaglio prove e limiti](TESTING.md) + +5456 byte code/data, 164 BSS, 238 rilocazioni. Massimi osservati nel carico denso: 160 istruzioni emulate per selezione e 540 al wrap. Zero skip/shed nelle sei finestre. Frame locali del compilatore: 8 byte per callback del sequencer, 188 per draw. High-water totale dello stack e worst-case di cicli fisici non misurati. CI del checkpoint `93481e7c5`: 9 riusciti, 5 saltati. Compatibilità di catalogo archiviata: 44 moduli, 946 coppie, zero problemi. Doctor del draft rieseguito: FAIL, manca `octamod.module.json`. + +### Unico gate per la prossima sessione + +**Risolvere i due difetti di ownership con regressioni indipendenti.** Jannik ha compilato il draft e superato i quattro test circoscritti. Entrambi i difetti sono confermati dal maintainer e aperti sul sorgente ispezionato. La chiusura ha verificato il codice e la sua storia; la riproduzione dinamica dei difetti appartiene al prossimo gate. [Commento originale](https://github.com/repeat98/modwerk/pull/1997#issuecomment-7084719712) + +1. **Row Edit interrotto.** Aprire un popup stock durante Row Edit, chiuderlo e premere/rilasciare ARR. In [check_src_context](live_module.c) il popup azzera la visibilità lasciando attivo `editing`; [module_key](session_controls.h) può consumare ARR nel ramo di editing nascosto. Per accettare la correzione, verificare uscita pulita o ripristino visibile, ownership del rilascio e ritorno allo stock. Dopo la chiusura del popup ARR deve sempre poter riaprire una UI valida. +2. **Invalidazione delle righe.** Definire una riga, notificare il pre-load di un banco estraneo e provare un caricamento fallito. [clyps_bank_load](live_module.c) ignora `mask` e `caller` e azzera `defined`, rendendo indisponibili tutte le sedici definizioni. Stabilire quale completamento riuscito autorizzi invalidazione o ripristino. Verificare conservazione delle righe su banco estraneo e fallimento, integrità del progetto e comportamento atteso sul successo pertinente. + +Per chiudere il gate devono restare validi SRC/ARR, quantizzazione e recupero stock. Poi riprendere il coordinamento su #1910 e riqualificare il candidato sulla base concordata. E1 resta interlocked. + +--- + +## Source integration update + +The eight-track engine, UI implementation, executable checks and source inventory are available in this branch. Start with [TESTING.md](TESTING.md) and [PROVENANCE.md](PROVENANCE.md). The numbered work items below preserve the initial RFC and its original evidence dates. + +# CLYPS community engineering handoff +**22 November 2026 — early DRAFT, source-only, no physical hardware qualification** + +## Product requirements + +Original artistic target: eight independently replaceable Octatrack audio-track sequences, quantized to the shared stock musical boundary; sixteen references per track, sixteen global rows, row launch then individual-track override. One playing source **per** track; no simultaneous clip polyphony. Preserve the instrument's scenes, crossfader, p-locks, Parts, samples, recorders, other Modwerk modules and stock Arranger data. + +Jannik Aßfalg's proposed integration approach, as conveyed by the artist: **track-local clip chooser on SRC and global Meta matrix on ARR**. This avoids a full-time alternative control layout. Grain's native SRC integration is a useful *UI pattern*, not a machine dependency. CLYPS is a project-level module, not a new instrument/machine. + +## Initial RFC snapshot (before the source publication) + +| Capability | Earlier private native emulator evidence (owner-reported) | In this public PR | +| --- | --- | --- | +| Eight ordinary audio lanes | 16 source references per lane; T8 Master refused | Source transfer pending | +| 16 rows | Store/retrieve/override; volatile | Source transfer pending | +| Quantized launch | 624 events and 608 scheduling writes in the eight-lane fixture | Re-run pending | +| UI | SRC list with LEVEL/YES; ARR Panorama 8×4, Zoom 4×4 and Row Edit, native 128×64 captures | Transfer and rerun pending | +| Module install/remove | 20 emulator cycles and 27 project-file comparisons | Re-run pending | +| Native editing | Foreign-source editing locked after wrong-target regression | Still gated | +| Audio | One synthetic T1 FLEX PCM transition reported; T2 STATIC audio inconclusive | Hardware not tested | +| Compatibility | Grain/POLY8/VECTOR SRC screen restoration reported; Track Solo key conflict | Requires independent audit | +| Base ABI | Local callback extensions; current public base lacks them | Maintainer design decision needed | +| Timing | A one-tick diagnostic/queue observation difference remains | Reproduce before changing oracle | +| Physical MKII | No authorized installed/played CLYPS build | NOT TESTED / NOT_FLASH_CANDIDATE | + +**The tested local integrated checkout is not automatically the same as this public branch.** This handoff is not a reproducible release. The local developer must import only reviewed source files, build against the exact updated Modwerk base, run its checks and supply exact source/package identities. + +## Minimal musical acceptance + +1. Prepare distinguishable source sequences in A01–A16 on the same bank and Part. +2. A global A01 plays; on selected T2, request A03 from SRC. Request becomes queued, then playing at the musical boundary; T1 and T3–T8 continue unchanged. +3. Open ARR Meta; observe current source T2=A03, other lanes=A01; enter Zoom and edit a row reference, with no stock pattern writes. +4. Launch row 05; every addressed lane switches on the qualified boundary, not on arbitrary UI refresh. +5. Override one track again; actual playing sources must reflect the override, not falsely show the last complete row. +6. Reenter native SRC of a track with Grain or other compatible machine; controls, sample pool and overlay must remain intact. Test Track Solo independently. +7. STOP, uninstall/undo, verify original stock Arranger, memory and project/Parts/scene/saved data. +8. Reject incompatible bases before activation. Native foreign-source editing stays locked until display, write, dirty flag, undo, timing and reload pass. + +Emulator comparisons must include exact native event order/timestamp/queue and real panel frames. They do not establish analog audio quality or device CPU headroom. + +## Original RFC work items (see TESTING.md for completed checks) + +**A — Base/sequencer hooks (maintainer-owned):** decide how the stock scheduling-wrap and per-track audio source-selector entry points should be exposed as shared, versioned Modwerk events, with correct site ownership, task context, ordering, admission and public base compatibility. + +**B — Timing verification (emulator):** independent before/after wrap fixtures and a trace of the request edge vs pending-state publication and actual musical commit. Investigate the historical tick 193 and 187-versus-188 observations with independent witnesses. Do not relax tests to hide anomalies. + +**C — Panel/UI coexistence:** replace/condition the Meta TRACK navigation that conflicts with Track Solo; preserve stock TRACK gesture, SRC controls, Grain's page and sample pool, crossfader/scene, LEVEL master semantics, p-lock edit and popup ownership; test key-down/up and modifier handling. + +**D — Reproducible build/import (source review):** port only code demonstrably reviewed and licensed from the private experiment to `sdk/drafts/clyps/`, with source pins and source-only test cases. Avoid importing a second SDK copy or private hook index 61. Run doctor/compat and native emulator fixtures. + +**E — Native source editing (separate):** trace source pattern vs global pattern editor read/write, dirty/undo ownership. Do not enable the unsafe path in the integrated draft. + +**F — Storage design (later):** versioned CLYPS row data and stock-compatible recovery; no Arranger RAM alias or unverified card format. + +**G — MKII physical qualification (later, explicit independent authorization):** real hardware test and recovery, CPU cycles, memory, analog audio and proof of versioned build identity. Do not flash an emulator research image. + +## Collaboration rules + +- Claim the corresponding module/hook or issue through Modwerk's real Agent Board **before changing shared sites**; check outstanding claims and existing draft base PR. Do not claim an already-owned index. +- All code contributions to a published branch require appropriate source licence/provenance and attribution. Original author permission to experiment privately does not automatically authorize representing their module as your own. +- Keep only source, manifests, documentation, test fixtures without proprietary content, and legitimate captures. Never commit Elektron's OS, firmware binaries, dumps, personal projects or credentials. +- Keep this PR in DRAFT while the dependent public build, maintained hook contract and physical qualification are outstanding. Review discussion is welcome; merge is not. diff --git a/sdk/octatrack/modules/clyps/HOOK_PROPOSAL.md b/sdk/octatrack/modules/clyps/HOOK_PROPOSAL.md new file mode 100644 index 0000000000..6cd2e69e60 --- /dev/null +++ b/sdk/octatrack/modules/clyps/HOOK_PROPOSAL.md @@ -0,0 +1,75 @@ +# RFC (draft) — Octatrack sequencer hooks for CLYPS +**For Modwerk base maintainers and contributors. Not an approved ABI.** + +The implemented contract and source are available in [the candidate RFC](https://github.com/btzz5w8w5d-star/modwerk/blob/b3184dd5e19caaae8c88e2e002c6ab5204ac27d6/sdk/machines/octatrack/SEQUENCER_SOURCE_RFC.md). The implementation uses 63/64 for sequencing and 65 for independent modal ownership. The questions below preserve the original review context. + +## Why shared hooks are requested + +CLYPS is a removable performance module, not a replacement OS. It must subscribe to the stock Octatrack scheduling mechanism so that a row launch and one-track override follow the instrument's actual timing, swing, negative microtiming and queue semantics. It must not patch a stock site the public Modwerk base or another module owns. + +Private R&D used two guarded sites with an isolated base build (OS 1.40C), **not the public ABI**: + +- Scheduling wrap before stock re-homes tracks: `0x400a43a0`, private event `ev_seq_wrap`, historically indexed **61**. +- Audio track's source-pattern argument before the stock event builder: `0x400a2d5a`, private `ev_audio_seq_source(int *pattern, unsigned track, unsigned bank_word)`, historically indexed **62**. + +**Critical collision:** public `base/octatrack-next` event **61** is `ev_audio_frame_prepare` at `0x4000cf4a`, an audio-frame interrupt hook. This is *not* the sequencer wrap. Reusing index 61 would be an ABI break. Replacing the frame callback with a wrap callback or merely renaming the index is invalid. + +## Questions for Jannik / base reviewers + +1. Do equivalent existing public hooks or take-sites already provide the required atomic source-selection and wrap ordering at all relevant stock paths? If yes, how are they meant to be used? +2. If not, should the minimal shared base expose a **bounded scheduling-boundary notification** plus a **validated audio source-selector hook**, or is a different ownership boundary preferable? +3. What callback context, register preservation, execution budget, subscriber count, ordering and abort semantics should the base enforce? Is a single selector owner required? +4. What is the safe way to make CLYPS's protected early key/encoder ownership cooperate with native SRC pages, ARR Meta, Track Solo, existing machine pages and other modules? Can an existing page/context dispatcher be reused rather than hijacking TRACK? +5. How should a module advertise a **minimum base capability** such that older bases refuse admission before publication of any callbacks? Existing private B1 experiment used a required-feature bit; do not reserve that private bit in public ABI by assumption. +6. Where should any shared hook implementation land given the cumulative public `base/octatrack-next` draft PR #1910? One base owner should merge/allocate indices. Do not modify another contributor's draft without coordination. + +## Suggested separations of concerns + +**In the Modwerk base (only if approved):** guarded stock site ownership, dispatch contracts, safe early panel routing, module admission capability. + +**In the CLYPS module:** eight ordinary-track source references, requested/committed states, sixteen volatile rows, GUI, SRC list, ARR Meta, conditional edit lock, cleanup. + +**Not to infer from emulator tests:** 32/64-step clock behavior, external clock, T8 Master, simultaneous MIDI clips, real-time CPU headroom, audio quality or safe hardware recovery. + +## Verification criteria for proposed events + +- Build with base feature off/on, matching stock and installed-empty controls. +- Refuse the new module on old bases without allocation or callback publication, verify ARR and project data afterward. +- Trace requests immediately before and after scheduling wrap and compare actual stock builder calls, all queue domains and due timestamps, including negative microtiming and swing. +- Race/queue tests: SELECT, supersede, RESTORE, STOP, restart; no stale target/duplicate events. +- Measure stack and worst callback cost, including eight-lane maximum and competitor subscribers. +- Test coexistence: native track SRC and Grain, Track Solo, UI popups, p-lock editor, crossfader, unload and original Arranger. +- Keep exact OS/build/source provenance and real native emulator witnesses; physical device test requires separate authorization. + +**No current proposal should merge to a shipping base from this document alone.** + +## Updated cumulative base + +At f2754cbbe6e363aff38e354c7fc8e3108542e4fd the cumulative base assigns **61 to ev_audio_frame_prepare and 62 to ev_frame_deadline**. The protected emulator donor a9980c97cbd2 predates the latter assignment. Its private wire layout is incompatible with the current cumulative branch. The public draft records only symbolic requirements in contracts/runtime.proposed.json. The maintainer must decide whether to provide a pre-wrap notification and an exclusive, typed source selector; any public numbers must come from the coordinated registry. The Agent Board claim is for the module only. + +## Public engine integration decision + +The live PR #1910 head checked for this import was a9674ed846ebe75d2bcbced307922fe9c4cb63f1. Its events.json and the separately resolved base/octatrack-next branch both returned Git blob 71eea6a5a526af64a2a0e67becf537db4ea4696b. Event 29 (ot_sequencer_rows) contributes settings-menu rows in the UI task. Event 61 runs after staging, and event 62 supplies a deadline. None supplies a mutable source argument before stock builds each audio event. + +Reset volatile rows only on the stock project-initialization event. Ordinary bank loads retain local slot references. See ROW_STORAGE.md for the completion contract required by persistence. At the pre-rehome boundary the base calls the wrap notification once; before building each ordinary lane it passes the current pattern by reference, track index and bank word to a single admitted selector. Preserve stock input for ineligible bank, track or pattern. Fail admission before callback registration unless both named contracts and protected key/encoder ownership are supported. A selector conflict must fail admission as well. Keep public numbering, register preservation and fail-closed loader implementation in the cumulative base PR. The module PR adds no index, direct site patch or alternate scheduler. Public hardware and emulator admission remain blocked until those base changes land. + +## Development candidate on the cumulative base + +The contributor fork now carries the implementation on integration/clyps-shared-sequencer, commit 7419b7598, based on a9674ed84. Its Board claim covers candidate slots 63–65. Source and scheduling use two call events. An independent modal-input marker allows an eligible UI to take its own controls before stock shortcuts. The versioned feature requirement prevents an equal-width loader missing that capability from publishing the package. The shipping registry and official base are subject to maintainer review. See NATIVE_REPLAY.md for the matched development build and control. + +On 23 November PR #1910 head c3706472be93ff0d02a7293412ab3992b3b60be7 still ended its event registry at 62 (events.json blob c572264f6142843e6f93bfb6d08233c6f9909439). The contributor candidate's 63–65 contract remains pending. + +### Project completion contract requested for maintainer review + +A serialized begin notification supplies a unique token and destination +incarnation before stock can replace any referenced pattern or Part. At begin +the module retains its committed generation and suspends foreign selection. +The terminal notification correlates the token, supplies commit or abort, and +identifies the usable project incarnation, bank and stock source epoch. On +abort the base must distinguish an exactly restored previous binding from an +unknown or partially replaced binding. The latter keeps selection suspended. +The module may validate and prepare its own data on an idle task, then publish +one generation at a scheduling-safe point. A shared reader return, RELOAD +return, or project initialization cannot substitute for this terminal event. +The executable host model is in `offline/project_transition.py`. No event +index or battery storage is assigned by this proposal. diff --git a/sdk/octatrack/modules/clyps/LICENSE b/sdk/octatrack/modules/clyps/LICENSE new file mode 100644 index 0000000000..f288702d2f --- /dev/null +++ b/sdk/octatrack/modules/clyps/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/sdk/octatrack/modules/clyps/LICENSE.kyoti b/sdk/octatrack/modules/clyps/LICENSE.kyoti new file mode 100644 index 0000000000..8cd09176a2 --- /dev/null +++ b/sdk/octatrack/modules/clyps/LICENSE.kyoti @@ -0,0 +1,82 @@ +MIT License + +Copyright (c) 2026 Zac Kyoti and the OT Kyoti FW contributors + +WHAT THIS LICENSE COVERS + +Everything in this repository is offered under the MIT terms below, EXCEPT the +items listed under "What it does not cover". That includes the reverse-engineering +notes and knowledge base, the analysis, emulation and diagnostic scripts, the +ColdFire and DSP patch sources, the build tooling, and the documentation. A file +does not need an "SPDX-License-Identifier: MIT" tag to be covered; the tag is a +convenience. Where a file carries its own license tag or header, that tag or +header takes precedence over this default. + +WHAT IT DOES NOT COVER + + 1. Elektron material. This repository contains no Elektron firmware, firmware + image, or binary (.bin / .syx / .zip), and no Elektron user manual. You + supply your own copy of the official OS. Firmware built with these tools is + derived from Elektron's software and is not distributed here; it is not + licensed by this file. + + 2. Files inherited from https://github.com/mxldyn/octamax, which ships no license + file: fetch-os.sh, analyze.sh, setup.sh, tools/entropy.py and + tools/bin_decode.py. They remain the property of their author. They are kept + because the one-time setup and the flashing checks use them, and are offered + under GitHub's Terms of Service in the same educational spirit as upstream + (see CREDITS.md). tools/elektron-firmware-tool.patch, also inherited, falls + under item 3. + + 3. Patches to third-party tools, and everything fetched at build time. The + *.patch files under tools/ (for example tools/elektron-firmware-tool.patch, + tools/dsp56300_xcore/vendor.patch and tools/refs/local-patches/) modify + other projects' code and stay under the license of the project they modify. + Anything fetched into vendor/ or refs/ keeps its own license (for example + dsp56300/dsp56300 is GPLv3, and octabam is MIT). Neither directory is + tracked here beyond its manifests. + + 4. Third-party sources are never copied into this repository unless their + license is compatible with MIT and they carry their own notice. Code under + GPL-family licenses (including other Paulstretch implementations) may be + read as a reference but is not to be copied in. + +ABOUT THE FIRMWARE FACTS, DISASSEMBLY AND DECOMPILER EXCERPTS + +Factual information about the Elektron firmware (memory addresses, byte values, +field offsets, and behavioural descriptions) is stated as fact, and is claimed as +no one's copyrightable expression. + +This repository does not include a disassembly or decompilation of the firmware +as a whole, or wholesale listings of it. It does include behavioural pseudocode +restated in our own notation, a small number of closer excerpts of decompiler +output (in NOTES.md), and a few two-instruction "displaced prologue" listings in +reference/, quoted as evidence for individual findings or to document a patch +site. To the extent that any such excerpt is Elektron's expression, it is not +licensed by this file and remains subject to whatever rights Elektron holds in +it. The patch sources in +this repository are our own code and are covered by the MIT terms. + +"Elektron" and "Octatrack" are trademarks of Elektron Music Machines MAV AB, used +only to identify the hardware under study. This project is independent and +unofficial, and is not affiliated with or endorsed by Elektron. + +MIT TERMS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/sdk/octatrack/modules/clyps/NATIVE_REPLAY.md b/sdk/octatrack/modules/clyps/NATIVE_REPLAY.md new file mode 100644 index 0000000000..e9c9f8b051 --- /dev/null +++ b/sdk/octatrack/modules/clyps/NATIVE_REPLAY.md @@ -0,0 +1,161 @@ +# Shared development base replay + +Use the candidate base branch integration/clyps-shared-sequencer from the contributor fork, at commit b3184dd5e on cumulative head 23f41e720. The module checkout contains the original public engine and UI. The build resolves the handlers from the candidate registry and packages them with a versioned modal-input marker and the ABI 9 requirement. The recipe produces a local emulator package. Keep the distribution and hardware trial gates closed. + +Use Python 3.12, Node 24, m68k-elf GCC 16.2, a legally supplied Octatrack OS 1.40C, the Elekloader source pinned in the base proof, its DSP assembler, and the MKII frame emulator with interactive watch, key, knob and memory commands. The measured run uses the existing synthetic MODWERK/GATE3 test card with eight ordinary audio tracks and a clean SRC page. Its SHA-256 is 0e69834f607f27e090b34a7c6204dffbb90baf34bbcdebc3fbbf5a01eed996d2. The OS and seed project are external inputs. The source recipe below regenerates the card locally. With the original seed, the final shelved card SHA-256 for candidate b3184dd5e is 486a7937319e2a8f6747fc3e4fe1ca63137a1587888c65af37a009cd8ab500e1. All replay writes go to temporary card copies. + +Set BASE to the candidate repository, DRAFT to the module directory, OUT to a new scratch directory, OCTABAM to the Octabam source checkout containing tools/emu/emu_card.py, ELEK to the Elekloader checkout, EMU to the MKII emulator executable, STOCK_OS to the OS file, ELEKLOADER_DSP_ASM to the DSP assembler and FIXTURE to the synthetic card. Use absolute paths and export ELEKLOADER_DSP_ASM. + +```sh +mkdir -p "$OUT" +cd "$BASE" +node scripts/mirror-octatrack-modules.mjs +python3.12 -B sdk/machines/octatrack/elekloader/build_core.py \ + --upstream "$ELEK" --stock "$STOCK_OS" --output "$OUT/base" \ + --dev --usb-midi --dsp-loader --site-events --module-sets --module-ui-roots \ + --cached-modules --resident-stock-hooks --resident-on-demand --part-menu --sample-editor +python3.12 -B "$DRAFT/build_candidate.py" "$BASE/sdk" "$OUT/clyps-live.mwrm" +python3.12 -B "$DRAFT/tests/prepare_slice.py" "$OCTABAM" "$FIXTURE" \ + "$OUT/base/proofs.json" "$OUT/clyps-live.mwrm" "$OUT/ui.img" +for role in candidate stock; do + if [ "$role" = stock ]; then set -- --stock; else set --; fi + python3.12 -B "$DRAFT/tests/native_slice.py" "$EMU" "$OUT/base/MAIN.raw" \ + "$OUT/base/symbols.json" "$OUT/ui.img" "$OUT/$role.json" "$@" || exit 1 +done +python3.12 -B "$DRAFT/tests/grade_slice.py" "$OUT/candidate.json" "$OUT/stock.json" +``` + +The independent control queues stock global A02 in disposable RAM. A02 duplicates home apart from the distinct T2 trigger mask. Both runs receive the same pattern bytes. The candidate's native SRC gesture queues T2 only. The harness checks builder arguments on both sides of wrap before comparing event order and relative timestamp writes. It also checks SRC and ARR state, STOP cancellation, callbacks, pattern and Part bytes, and the largest free pool extent. A saved trace can precede a failed pool assertion. Grade the pair and check each process exit status. + +After a positive slice and matching control, run the existing wider oracle on fresh copies of the same synthetic card. + +```sh +for role in candidate stock; do + if [ "$role" = stock ]; then set -- --reference; else set --; fi + python3.12 -B "$DRAFT/tests/native_rows.py" "$EMU" "$OUT/base/MAIN.raw" \ + "$OUT/ui.img" "$OUT/base/symbols.json" "$OUT/wide-$role.json" --octabam "$OCTABAM" "$@" || exit 1 +done +python3.12 -B "$DRAFT/tests/grade_wide.py" "$OUT/wide-candidate.json" "$OUT/wide-stock.json" +python3.12 -B "$DRAFT/tests/native_rows.py" "$EMU" "$OUT/base/MAIN.raw" \ + "$OUT/ui.img" "$OUT/base/symbols.json" "$OUT/matrix.json" --octabam "$OCTABAM" --lane-matrix +``` + +### Build the emulator and disposable card inputs + +The native run used sambanks/octabam at f7d7290663135ff8bc4ea18aa45d2854a7b332c1 and the candidate repository's scripts/octatrack-emulator/build.py idle-loop adapter. Build the emulator archives in the Octabam checkout with its setup procedure and make emu-cf. From the candidate checkout run the commands below. LOCAL_PROJECT is a read-only seed directory containing OS 1.40C .work files with an empty first arrangement. The script builds the bank, stock composite, first arrangement row and silent sample in temporary storage. The seed's other project settings can affect results. Preserve the original comparison thresholds when testing a different seed. + +```sh +python3.12 -B scripts/octatrack-emulator/build.py --native "$OCTABAM" --out "$OUT/adapter" +EMU="$OUT/adapter/ot_emu" +python3.12 -B "$DRAFT/tests/make_fixture.py" "$OCTABAM" "$LOCAL_PROJECT" "$OUT/seed.img" +FIXTURE="$OUT/seed.img" +``` + +### Requests on either side of wrap + +Rebuild the package with the linked symbol witness. Each pair requires a fresh emulator boot. The candidate receipt records the physical input edge in emulated time, the request state read from the linked module, its published diagnostic and the stock scheduling trace. + +```sh +python3.12 -B "$DRAFT/build_candidate.py" "$BASE/sdk" "$OUT/clyps-live.mwrm" --symbols "$OUT/module-symbols.json" +for phase in early late; do + for role in candidate stock; do + if [ "$role" = stock ]; then set -- --reference; else set --; fi + python3.12 -B "$DRAFT/tests/native_rows.py" "$EMU" "$OUT/base/MAIN.raw" \ + "$OUT/ui.img" "$OUT/base/symbols.json" "$OUT/$phase-$role.json" \ + --octabam "$OCTABAM" --boundary "$phase" --symbols-module "$OUT/module-symbols.json" \ + --package "$OUT/clyps-live.mwrm" "$@" || exit 1 + done + python3.12 -B "$DRAFT/tests/grade_boundary.py" "$phase" "$OUT/$phase-candidate.json" "$OUT/$phase-stock.json" || exit 1 +done +``` + +Run the stock Arranger before and after unloading a module with a foreign source selected. Run the frame/MAIN probe on a separate boot. The latter reads stock MAIN and CUE settings after reversible knob input, counts emulator instructions between the two stock continuations, and samples the base's frame counters over three-second windows. + +```sh +python3.12 -B "$DRAFT/tests/native_rows.py" "$EMU" "$OUT/base/MAIN.raw" "$OUT/ui.img" \ + "$OUT/base/symbols.json" "$OUT/arranger.json" --octabam "$OCTABAM" --arranger-recovery +python3.12 -B "$DRAFT/tests/native_profile.py" "$EMU" "$OUT/base/MAIN.raw" "$OUT/base/symbols.json" \ + "$OUT/ui.img" "$OUT/profile.json" +``` + +### Matched missing-capability control + +In a disposable checkout of the pinned base candidate, edit the advertised feature mask in sdk/machines/octatrack/module-adapters/resident-runtime/resident_engines.c. Change the single return expression `MW_DSP_KEYBUS | MODWERK_SEQ_PANEL_FEATURE` to `MW_DSP_KEYBUS`. Leave the hooks, registry width, module package and admission code intact. Run the same build recipe into a fresh output directory. Prepare a shelf with that build's proofs.json. Run the command below on that build and card. The expected refusal is decimal 259 with unchanged owner count, callback heads and pool size. + +```sh +python3.12 -B "$DRAFT/tests/native_refusal.py" "$EMU" "$NEG/base/MAIN.raw" \ + "$NEG/base/symbols.json" "$NEG/ui.img" "$NEG/refusal.json" +``` + +For the tick-193 queue witness, repeat both wide commands with --observe-queue and separate output names. This samples in 1 ms increments near ticks 190–195 and writes a .phase file for each role. Grade the two new JSON files with the same grade_wide.py. Keep the original wide capture and its exit status. Compare the queue flag changes independently from ordered native builder calls and timestamp writes. + +### Row lifecycle replay (23 November) + +Build and shelve the current module using the commands above. Against the pinned candidate base, pass `--row-popup` to the same native_rows.py invocation used for arranger recovery, with a separate output file. The popup case uses the stock timed message routine while Row Edit owns the panel. Wait for the stock message handle to clear before testing ARR. Run the identical popup fixture with the previous module on the shelf for the negative control. + +For project transition diagnostics, use `--project-change --package "$OUT/clyps-live.mwrm" --symbols-module "$OUT/module-symbols.json"` with a newly generated symbol witness. The fixture creates a second disposable project that selects bank B, confirms a nonzero R04 in the first project, and posts a load to the stock card task. The receipt records which callbacks ran and whether the new project's bank was selected. A failed assertion can leave a diagnostic receipt; always check process status. Ordinary masked bank-return and failed-read semantics are also covered by the scoped host suite. + +Use the same command with `--project-reload stored` or `--project-reload missing` in place of `--project-change`. Both follow the stock PROJECT menu and confirm RELOAD. The stored fixture prepares a bank-B saved generation. The missing fixture omits stored files in the disposable copy. A completed recovery receipt includes off_pool after stock I/O and module retirement. + +### Timing and MIDI witnesses + +Add `--clock-witness NEW.jsonl --observe-queue` to each wide replay. +Use a new filename for each boot. Each JSON line records the observation's +absolute emulator sample, stock tick, queue mask, PC hits in instruction +order and timestamped writes. Selector trampoline and stock continuation +bracket audio source selection. PC hit times are bounded by consecutive +observations. Watch hits carry an instruction count. Queue writes carry an +emulator sample timestamp. Keep the strict wide grader unchanged. Run +`--home-control home` and `--home-control stop` with and without +`--reference` to compare an active module using stock sources and the +disabled shelf, including STOP near tick 193. + +For MIDI, run the T2 slice twice with `--midi-wire WIRE.json` and distinct +output names. Use `--stock` on the independent control. On the disposable +bank the probe seeds two MIDI trig masks, two different note locks and two +Part channels, then watches the emulated UART0 transmit register through +STOP. Use `tests/grade_midi_wire.py CANDIDATE-WIRE.json STOCK-WIRE.json` +with Python 3.12. An empty stream or missing expected notes fails. +Audio builder comparisons and UART byte/timestamp comparisons have separate +verdicts. Physical MIDI, physical clock jitter and acoustic timbre require +independent qualification. + +The stock MIDI builder at 0x4009cf4c has a separate call path (observed return address 0x400a39ca). +The audio-only redirect at 0x400a2d5a cannot supply its pattern. Trace the +MIDI builder's caller before argument publication to find a candidate lane +selector, then verify prefetched note, p-lock, arpeggiator and matching +note-off paths. The existing note-key hook operates after source selection. +A future shared wrap could commit separate audio and MIDI override masks +while each native lane retains its phase. An optional versioned MIDI bank +section could represent MIDI-only or combined rows. HOLD retains the lane, +CLIP selects a bank-local reference, and STOP requires retiring only the +lane's owned notes, including arp notes, with an explicit policy for pending +CC and locks. V1 stores eight audio cells. No MIDI selector is installed. + +For the generated two-voice card, run +`python3.12 -B tests/prepare_midi_slice.py "$OCTABAM" "$OUT/ui.img" "$OUT/musical.img"` +from this directory. Pass musical.img as the synthetic card to both MIDI +runs. T1 uses a generated descending kick in FLEX slot 1 and T2 a generated +82.41 Hz bass in FLEX slot 2. The MIDI fixture sets two different trig +masks, note locks (48 and 67, channels 1 and 2) and alternating CC1 locks +on MIDI T2. Both roles send STOP at stock tick 158. The second wire receipt +(`.off.json`) records a new transport with the shelf disabled. Grade it as +a separate pair. UART0 write times are reported in emulator samples. + +Add `--stock --stock-midi-home` for an independent MIDI transport that +remains on A01. Keep the stock global-pattern composite as a second control. +The active and OFF pairs each require their own UART verdict. A difference +in running status may preserve message semantics but still fails exact-byte +comparison. Report message-end timing separately, in emulator samples at +44.1 kHz. This fixture sends two note patterns and CC1 locks. It does not +qualify arpeggiator carry, external clock, or physical MIDI. + +For the 23 November current-base run, use the refreshed candidate commit +from evidence/nov23-reliability.json. The seed was a copy of the prior +synthetic GATE3 shelf (its hash is recorded as `seed`). prepare_slice.py +replaced MODWERK0.SET using the new base proof. Run the full base recipe +again into an independent empty directory and compare MAIN.raw, +symbols.json, proofs.json and base.elemod with cmp. For the old failing +pair use the previous MAIN and its original shelved card. Compare the +instrumented and unchanged JSON receipts byte for byte before interpreting +the extra timing observations. diff --git a/sdk/octatrack/modules/clyps/PERFORMANCE_SPRINT01.md b/sdk/octatrack/modules/clyps/PERFORMANCE_SPRINT01.md new file mode 100644 index 0000000000..3358b2acb1 --- /dev/null +++ b/sdk/octatrack/modules/clyps/PERFORMANCE_SPRINT01.md @@ -0,0 +1,62 @@ +# CLYPS private performance overlay · 25 November 2026 + +Experimental MKII / OS 1.40C implementation. Runtime source d9909f52f on module baseline 6b78afac9, contributor SDK and base 5c32cbacd. Original CLYPS sequencing work by Zac Kyoti and the OT Kyoti FW contributors. See PROVENANCE.md, LICENSE and LICENSE.kyoti. + +## Performance controls + +In the supported audio context, ARR opens the view last used (Row first). ARR again switches Row and Clip. Row shows eight tracks and five of sixteen row slots. UP/DOWN or LEVEL move the row; TRACK keys select the column through the stock, so the stock tab and CLYPS always name the same track (LEFT/RIGHT do nothing in Row). Clip shows sixteen sources for the selected track. TRIG launches directly. YES in Clip launches the focused source. In Row, hold TRACK first and press TRIG to launch that one cell. With a row focused, PAGE opens the setup popup. UP/DOWN or LEVEL choose Capture, Cell Source or Restore All. YES confirms. Capture stores the currently playing references at the cursor (including overwriting a previously defined slot). To edit one cell, choose its row and track before entering setup, select Cell Source, then TRIG or encoder A and YES. NO cancels setup. Restore All requires stopped transport. Rows live in RAM. + +In Row, YES scans strictly forward from the last committed row. It ignores the cursor, undefined slots and repeat presses while a row is pending. At the end it leaves playback alone. A direct row launch moves the path on commit. A single-track override after a row commits keeps that position. STOP cancels an outstanding request. Initial state, confirmed project initialization and stopped Restore All start the path before the first row. Bank A only. An unsupported Bank suspends performance. The late project-load failure remains open. + +NO returns to the native surface. At home, Native mode retains direct TRIG launch; a second NO exits it. With foreign sources, the selective edit lock applies: page keys, TRACK, Scene A/B (and Scene + TRIG), the crossfader and plain encoder turns reach the stock; trigs, encoder turns with a trig held, FUNC, REC, PATTERN, BANK and PART stay held, and a held gesture names the way out in the page bar. ARR reopens the remembered view; stopped YES restores home. Native sound and source editing, every popup, modifier ordering and every mode transition require separate qualification. + +## Build and replay + +Use the developer's private contributor SDK, a disposable GATE3 card and the MKII emulator specified in NATIVE_REPLAY.md. Run from the module checkout. Set D to sdk/octatrack/modules/clyps, BASE to the contributor checkout, OUT to a new private directory, OCTABAM to the Octabam source, and EMU to the MKII emulator. Keep firmware, cards and MWRM files outside Git. + +```sh +python3.12 -B -m unittest discover -s "$D" -v +python3.12 -B "$D/generate_performance.py" "$BASE/sdk" --check +python3.12 -B "$D/build_candidate.py" "$BASE/sdk" "$OUT/clyps.mwrm" --performance --symbols "$OUT/module.json" +python3.12 -B "$D/tests/prepare_slice.py" "$OCTABAM" "$SEED" "$OUT/base/proofs.json" "$OUT/clyps.mwrm" "$OUT/panel.img" +python3.12 -B "$D/tests/performance_replay.py" "$EMU" "$OUT/base" "$OUT/panel.img" "$OUT/clyps.mwrm" "$OUT/module.json" "$OCTABAM" "$OUT/screens" +python3.12 -B "$D/tests/native_rows.py" "$EMU" "$OUT/base/MAIN.raw" "$OUT/panel.img" "$OUT/base/symbols.json" "$OUT/wide.json" --octabam "$OCTABAM" --performance-overlay +python3.12 -B "$D/tests/native_rows.py" "$EMU" "$OUT/base/MAIN.raw" "$OUT/panel.img" "$OUT/base/symbols.json" "$OUT/stock.json" --octabam "$OCTABAM" --reference +python3.12 -B "$D/tests/grade_wide.py" "$OUT/wide.json" "$OUT/stock.json" +``` + +The base recipe in NATIVE_REPLAY.md reproduced MAIN 1f8e2e9ffd6919bafd6302fa4d61aeeab32e7349ee49ce159ab6a15d276f69d1. The original package reproduced SHA-256 32ebca98345840f4e107550683f4fd14f2be35e5355df3d8933b7132f324aea9. The performance package is dea54e4f2ed47c01a8a7e277ceabf80a14b708ed0121c4bccc703094be7461b9. The original build path remains available by omitting --performance. + +## Engineering decision and qualification + +OS 1.40C stock audio modes documented by the synth port are TRACKS (0), CHROMATIC (1), SLOTS (2), SLICES (3), QUICK MUTE (4) and DELAY CTRL (5). The existing synth and quantizer use chromatic and selector gestures. The public octave hook handles a chromatic action. The public sequencer settings table contributes settings. Neither service extends the stock mode list or substitutes an audio lane source at a stock boundary. No evidence shows that hiding CHROMATIC or DELAY CTRL frees bytes, cycles or stack. Extending the native selector remains an upstream design question. The private overlay implements a reversible entry on ARR and leaves the stock mode table and persisted IDs intact. Stock mode LED rendering, persistence of selector changes, all MIDI paths and inter-module arbitration remain open. The earlier SRC list is outside this adapter. + +The private builder requires ABI 9 and the candidate sequencer/panel mask. Public main 061fd547c includes PRs 2050 and 2062, and its event registry ends at 62. Runtime subscriptions 63–65 belong only to the contributor experiment. The regular draft descriptor and GNU-as unit expose the actual implementation to the official builder. The schema, declared UI claims and draft doctor pass with Track Solo declared incompatible because both own TRACK. No public catalogue entry. The public official procedure stops at step 3 on ev_seq_wrap. A stock-frame callback cannot select an independent pattern per audio lane. Future upstream adoption must express the capability in the official package and prove negative admission again. + +On the contributor base, stock-composite comparison matched 624 events, 608 relative writes and 219 sampled states for the prepared eight-lane fixture. Three truncation controls were rejected by the unchanged grader. The UI replay observed capture R02/R05, direct T2 source selection, YES path advance, no implicit loop, override retaining position, pending cancellation and stopped restoration. After OFF the pool returned to 786432 bytes. These observations apply to the named package. Historical boundary, late-load and STATIC baseline failures remain separate. Hardware, listening, new-build MAIN/CUE capture, full-part edit coverage, power cycle, persistence across sessions and external clock remain unqualified. + +The official public-base control refused the 66-entry package with code 257 (malformed hook table width) and preserved the pool, active count, owner count and three lifecycle callback heads. The equal-width feature-negative test remains a separate historical result. The new-build stock Arranger replay measured the same 336 calls and 336 writes before installation and after removal from a foreign T1 source. Native compositor captures, hashes, resource records and summary receipts are in evidence/performance-01 and media. GCC individual frames in bytes changed from 40 to 36 for key, 16 to 20 for encoder, and 188 to 120 for draw; tick and both sequencer callbacks remained at 8. These values exclude nested stack use. + +For the Octabam declaration, regenerate performance_core.s with generate_performance.py against the contributor SDK. It follows the source-generated GNU-as unit pattern used by Arr Rows. The deployment contract must carry a feature check before a public or a private official-builder package can be qualified. Until then use only the explicitly named private build path for emulator reproduction. + +A separate stock-control replay entered Native at home, changed AMP encoder A and restored the complete active Part hash. It compared the same T1 action, Scene A selection, crossfader positions 0/64/127/0 and the stock TRIG MODE path 0/1/0 with and without the adapter. The snapshots matched, playing and requested stayed home. Native T2 TRIG 2 then selected A02 and engaged the edit lock. The successful gesture sequence does not qualify arbitrary p-lock or source editing. + +For cost.json use tests/native_profile.py with --performance-overlay and the same MAIN, symbol map and shelved card. Across six three-second windows there were zero measured skips and sheds. In the dense eight-lane A02 workload the 192 observed lane selections reached 162 emulator instructions and one boundary spanned 544. Stock maxima were 16 and 12. For the host-only draw comparison, compile tests/render_cost.c with cc -O2 and the SDK runtime/loader include directory, once with -DCLYPS_PERFORMANCE and once without. Each of seven batch means covers 20000 composed frames. Neither measurement is a physical frame price. + +The timed stock popup interrupted Cell Source editing of R04 in a fresh native boot. ARR reopened, and a T1 override followed by R04 recall demonstrated that A01 survived the abandoned edit. OFF restored 786432 bytes. The same production adapter also refused MIDI, grid/live recording, pattern-chain and foreign-Bank entry in a host fixture and retained release ownership across popup takeover. + +## Sprint 03 · 26 November 2026 + +Package 190ec4db032ab9a70f26c704af89cce142d239f5ebb80c660a89c4b84d57a67d (image 12340 bytes). The original build still reproduces 32ebca98…. Provenance keeps one byte per lane for requested and playing (0 unknown, else the one-based Row); submit, STOP and the stock wrap carry it with the sources, and the Panorama lights only the real origin, never a matching value. Headers always read T1–T8: a plate marks a lane playing from a Row out of view (notched without a Row origin), a dotted outline the same while stopped, a bracket a pending change out of view; the focused lane's source is in the bar. + +`performance_replay.py ... --sprint03` adds 17 observations to the 13-step replay on the same card (evidence/native-ui-02): the stock tab follows T2, crossfader 0/64/127/0 and Scene A under the Panorama with the moved group live, moving beat markers in Clip, PLAY during play pauses (transport word 2) and holds a pending Row until the next boundary after resume, two Cell Launches from R02 held in pause and committed with the path still on R05, Row Advance unchanged, and under the lock an AMP page and knob that edit the Part while trig, trig + knob and FUNC leave the home pattern hash unchanged. ARR returned to the remembered Clip. Tempo changes, LED state, key-repeat and TRIG-before-TRACK ordering, other stock pages under the lock indicator and hardware remain unobserved. + +## Sprint 06-A · 27 November 2026 + +Package and offsets in evidence/native-ui-03/build.json (image 13644 bytes, bss 232); the original build still reproduces 32ebca98…. The replay card must carry the package under test: run tests/prepare_slice.py on the seed for every new build (the replay switches on the shelved package, `--module` only checks its hash). + +`performance_replay.py ... --sprint03 --alpha2` passes the 13 steps, the 17 Sprint 03 observations and the Alpha 2 ones (evidence/native-ui-03): Clip View on first entry; occupancy read for the fixture as T1–T3 occupied in A01–A03 and T4–T8 empty (written through the bank file, independent of CLYPS's offsets); FUNC alone keeps CLYPS in Clip and Panorama; FUNC + T2 changes exactly the stock bytes a stock FUNC + T2 changes (two mute/unmute cycles, mute mask 0x8000000a) in both views; TEMPO opens the stock popup (shared window 0x460d175c), its knob moves the tempo from 120 to 124 BPM, NO returns to Clip with the view kept; a stock message (MISSING E-VERB on the fixture) suspends CLYPS and it returns; FUNC + LEVEL moves the Panorama column without moving the stock track and the TRACK key takes it back; the NXT line alternates between beats. Hardware, listening, LED and timing remain unobserved for this build. + +## Sprint 06-C · 27 November 2026 + +Alpha 2 (236838b7f, 2a9b497e…) is kept as it was. This candidate adds Codex's 06-B bank guard (abaa9f6a3, 19cba8259: rows, values and mask survive an uncertain bank load or project init, the sequencer goes back to the stock, CLYPS stays suspended for the instance) and keeps the pending line an outline (the beat pulse adds a second outline). The late-EOF reproducer (bank-lab/reproduce_alpha.py) loses the mask on Alpha 1 and on 236838b7f; the guard keeps it. Host: 8 bank combinations, capture of an empty lane keeps its index and a Row launch plays it like any lane. Emulator (evidence/native-ui-04): `--sprint03 --alpha2` exit 0; `native_rows.py --performance-overlay --project-reload missing` keeps rows usable, `stored` keeps the rows' digest and suspends; both return 786432 bytes at OFF. diff --git a/sdk/octatrack/modules/clyps/PROVENANCE.md b/sdk/octatrack/modules/clyps/PROVENANCE.md new file mode 100644 index 0000000000..50e2f36846 --- /dev/null +++ b/sdk/octatrack/modules/clyps/PROVENANCE.md @@ -0,0 +1,85 @@ +# Source review + +| File or group | Origin and scope | +| --- | --- | +| session_view.h | Original GPL-3.0-or-later CLYPS SRC, Panorama, Zoom and row editor drawing code from the local Modwerk integration at 8e7e4b0f307c0c877786bc1d67fc78543bbf8dd0. Font columns are embedded in the source. No stock pixel data is included. | +| session_controls.h, meta_focus.h | CLYPS Modwerk UI callbacks from the same integration with the TRACK handoff change. The private full build produces identical module bytes before and after extracting the callbacks into this header. The callbacks issue requests through a sequencer adapter. | +| contracts/module.proposed.json | Identification, classification and UI claims from the local draft metadata. Presented as an excerpt until the complete package can be built publicly. | +| contracts/runtime.proposed.json | The integration's symbolic subscription requirements. The two proposed sequencer events need a maintained base contract. No new public index is assigned. | +| tests/input_fixture.c, tests/render_fixture.c, test_renderer.py | Original synthetic input and display fixtures, native frame digest comparisons and ColdFire compilation checks. | +| LICENSE | GPL-3.0-or-later licence for the published UI and test sources. | + +Zac Kyoti and the OT Kyoti FW contributors developed the original CLYPS sequencing work. The private port credits their scheduling rules and the private rows overlay. The pinned [source licence](https://github.com/Zac-Kyoti/octatrack-kyoti-fw/blob/e750155a3d5c16fe2c8752413582fa61a90d97a2/LICENSE) covers the listed original code under MIT and excludes Elektron material, certain inherited files and third-party dependencies. Its Git blob is 8cd09176a276a3854ae947ab148b9b327d77e381. + +## Public engine import + +The donor is the artist's Modwerk integration at 6f7bdabc473e8ed8eea7d50711405f35008c76d9. Its live_module.c carries GPL-3.0-or-later and explicitly credits the scheduling rules of Zac Kyoti and the MIT row overlay. The overlay has its own MIT SPDX header, introduced by the artist's development account in a94bfc7b4. The complete Kyoti notice and its exclusions accompany the C source in LICENSE.kyoti. The pinned upstream LICENSE blob was independently checked against GitHub. This is Endrew’s Modwerk adaptation; the original authors have not endorsed this PR. + +The following inventory covers every tracked file in the donor draft. IDs are Git blob prefixes. A replacement in the public draft can differ from the historical file even when the name is identical. The public verification script derives the target object directly from C; no second SDK is required. + +| Donor path | Blob | Disposition | +|---|---|---| +| CHANGELOG.json | d963ebc046fe | Package or release metadata deferred until public admission exists; symbolic subscriptions already in contracts/. | +| HANDOFF.md | 92f065ad8194 | Use existing public source, documentation or licence. | +| HOOK_PROPOSAL.md | af20055e3081 | Use existing public source, documentation or licence. | +| LICENSE | f288702d2fa1 | Use existing public source, documentation or licence. | +| LICENSE.kyoti | 8cd09176a276 | Import source or notice. | +| README.md | 06f59fc222cd | Use existing public source, documentation or licence. | +| TESTING.md | 47638605f296 | Use existing public source, documentation or licence. | +| clyps_core.s | b4eb1fe0d066 | Compiler output; regenerate from C. | +| design/CLYPS_IDEAS.md | f567d0235fb3 | Historical private design record; public specification in README and HANDOFF. | +| design/CLYPS_ISSUES.md | 448b09e6c7e8 | Historical private design record; public specification in README and HANDOFF. | +| design/CLYPS_ISSUE_MAP.json | 5331079ce5a8 | Historical private design record; public specification in README and HANDOFF. | +| design/CLYPS_MODWERK_GRAIN_UI_INTEGRATION_2026-11-22.md | cac312576a07 | Historical private design record; public specification in README and HANDOFF. | +| design/CLYPS_MODWERK_HANDOFF_2026-11-21.md | 6c979e9ff809 | Historical private design record; public specification in README and HANDOFF. | +| design/CLYPS_UI_SESSION_VIEW_2026-11-22.md | 9daf17399a34 | Historical private design record; public specification in README and HANDOFF. | +| design/verification/2026-11-22-clyps-arranger-replacement.md | a87bf3cbf067 | Historical private design record; public specification in README and HANDOFF. | +| design/verification/2026-11-22-clyps-b1.md | 1becc6fbc792 | Historical private design record; public specification in README and HANDOFF. | +| design/verification/2026-11-22-clyps-performance.md | f6144c9743b3 | Historical private design record; public specification in README and HANDOFF. | +| design/verification/2026-11-22-clyps-session-frames.json | 10bce9b8fdbf | Historical private design record; public specification in README and HANDOFF. | +| design/verification/2026-11-22-clyps-session-ui.md | adb2c1d08cd4 | Historical private design record; public specification in README and HANDOFF. | +| design/verification/native-editing.md | f004852a02e3 | Historical private design record; public specification in README and HANDOFF. | +| evidence/early.phase-185.json | 95bcc559c68e | Protected-run observation; public results in TESTING. | +| evidence/early.phase-89.json | b52dc7a67799 | Protected-run observation; public results in TESTING. | +| evidence/late.phase-187.json | ece56a220863 | Protected-run observation; public results in TESTING. | +| evidence/late.phase-91.json | 36c6e30c789c | Protected-run observation; public results in TESTING. | +| evidence/native-results.json | e5b28a794c34 | Protected-run observation; public results in TESTING. | +| live_module.c | 1ad95139ad0d | Import source or notice. | +| manifest.py | 802d952d16ab | Package or release metadata deferred until public admission exists; symbolic subscriptions already in contracts/. | +| meta_focus.h | 483af91f8eb1 | Use existing public source, documentation or licence. | +| octamod.module.json | 1c9b29bc914f | Package or release metadata deferred until public admission exists; symbolic subscriptions already in contracts/. | +| runtime.json | 603817ea64f8 | Package or release metadata deferred until public admission exists; symbolic subscriptions already in contracts/. | +| session_controls.h | a762ed2e1d50 | Use existing public source, documentation or licence. | +| session_view.h | ea79267d5b62 | Use existing public source, documentation or licence. | +| test_clyps.py | 90906ff47b8c | Import source or notice. | +| tests/grade_admission.py | 07e7d19a6660 | Requires protected evidence layout. | +| tests/grade_boundary.py | a9e746a4441d | Import source or notice. | +| tests/grade_panel.py | c9fad59b66c6 | Requires protected evidence layout. | +| tests/grade_wide.py | d61f154a1736 | Import source or notice. | +| tests/platform.h | a450efd152a9 | Import source or notice. | +| tests/shared_state.c | 867adf83650f | Import and extend lifecycle and row tests. | +| tests/twin/README.md | d15657c5735a | Protected base, admission or emulator-specific fixture; unsuitable for public registry. | +| tests/twin/emulator-profile-a9980c97c.json | f0ad683cd4aa | Protected base, admission or emulator-specific fixture; unsuitable for public registry. | +| tests/twin/emulator-profile.json | 25db5daddafd | Protected base, admission or emulator-specific fixture; unsuitable for public registry. | +| tests/twin/prepare.py | e8051fbbf88f | Protected base, admission or emulator-specific fixture; unsuitable for public registry. | +| tests/twin/private-sequencer.json | 24c1e48b031b | Protected base, admission or emulator-specific fixture; unsuitable for public registry. | +| tests/twin/protected-twin.patch | b891a1f5a84b | Protected base, admission or emulator-specific fixture; unsuitable for public registry. | +| tests/twin/replay/build_live.py | 91de516c5b29 | Protected base, admission or emulator-specific fixture; unsuitable for public registry. | +| tests/twin/replay/clyps_arranger_replay.py | fd4646b372a3 | Protected base, admission or emulator-specific fixture; unsuitable for public registry. | +| tests/twin/replay/edit_lock.py | 48f229e69e74 | Protected base, admission or emulator-specific fixture; unsuitable for public registry. | +| tests/twin/replay/live_fixture.py | b33a6c16ba98 | Protected base, admission or emulator-specific fixture; unsuitable for public registry. | +| tests/twin/replay/live_replay.py | e7a2f96f76aa | Protected base, admission or emulator-specific fixture; unsuitable for public registry. | +| tests/twin/replay/pcm_stems.py | 8409a8bd6f37 | Protected base, admission or emulator-specific fixture; unsuitable for public registry. | +| tests/twin/replay/session_panel.py | 57643d045569 | Protected base, admission or emulator-specific fixture; unsuitable for public registry. | +| tests/twin/ui_fixture.py | b84b287e2930 | Protected base, admission or emulator-specific fixture; unsuitable for public registry. | +| verify.py | 90459344f4b3 | Use SDK linker and code-generation guard directly from C. | + +## Shared candidate tools + +build_candidate.py links the public CLYPS sources against the candidate SDK and emits the ABI 9 package. The new tests adapt the original CLYPS synthetic card, MKII interactive transport and timing assays recorded above to the coordinated registry. They generate local inputs from a separately supplied synthetic project. They contain no firmware, card images, samples or linked executables. The original GPL and Kyoti notices apply as above. evidence/shared-base.json contains hashes, counts and measured emulator results. + +The shared-base replay adds a card recipe, native sequencer and panel harnesses, independently graded timing traces and the profile probe. make_fixture.py prepares project copies using the Octabam project tools. Provide the OS and project locally. The repository contains source and measured metadata only. + +## Performance sprint 01 + +The new C panel adapter, source-generated GNU-as unit and test fixtures are original Modwerk integration work. The existing sequencing engine retains the provenance and exclusions above. The generated unit is compiler output from the C source and the contributor SDK ABI marker. diff --git a/sdk/octatrack/modules/clyps/README.md b/sdk/octatrack/modules/clyps/README.md new file mode 100644 index 0000000000..89dee8d117 --- /dev/null +++ b/sdk/octatrack/modules/clyps/README.md @@ -0,0 +1,48 @@ +# CLYPS — experimental Octatrack performance module (community draft) + +Private performance overlay (25 November 2026): [controls, limits and reproduction](PERFORMANCE_SPRINT01.md). Select it explicitly with `build_candidate.py --performance` on the contributor SDK. The earlier SRC/ARR build remains the baseline. + +[Authoritative Bank and copy/paste requirements](BANKS_COPY_PASTE_REQUIREMENTS.md) · artist decision, 23 November 2026. + +**Build the eight-track engine.** From the repository root run: + +```sh +python3.12 -B -m unittest discover -s sdk/octatrack/modules/clyps -p 'test_*.py' -v +``` + +Use host cc, Python 3.12 and m68k-elf GCC/binutils (tested with GCC 16.2). This compiles the actual SRC/ARR, sequencer and edit-lock callbacks, checks ColdFire instructions, and links the relocatable image in a temporary directory. The stock-memory inputs in host tests are synthetic. For the public candidate based on the cumulative Octatrack branch, follow [the MKII build and replay recipe](NATIVE_REPLAY.md). The shared contract is under maintainer review. + +**Artist/product direction:** Endrew. Built on Zac Kyoti's existing CLYPS ideas and independent Modwerk research with attribution retained. The project is independent and unofficial. + +## What CLYPS is + +A Session View-inspired performance system for Octatrack's **native sequencer**, not an audio machine and not a new clock. + +- Each of eight **ordinary** audio tracks selects **one source sequence at a time** (not multiple simultaneous clips / no within-track polyphony). +- Sixteen source-pattern references per track and sixteen rows of combinations. +- Quantized row launch; a musician can then override only the bass, kick or another track without restarting the others. +- **Track SRC:** a contextual list to select and launch a sequence for the currently selected track, while retaining the underlying machine's SRC controls. +- **ARR:** an 8×4 global Meta overview with optional 4×4 Zoom / Row Edit, retaining stock Arranger data when CLYPS is removed. +- Native source-aware trig / p-lock editing remains **interlocked** until its separate ownership and undo gates pass. + +**Only pattern references are implemented:** these are not sixteen independently allocated clip objects, and the row data is currently volatile. + +## Emulator qualification + +The contributor candidate at b3184dd5e integrates cumulative base 23f41e720. T2 switched at stock wrap 90. The eight-lane replay matched all 624 native calls and 608 timestamp writes. Its default capture differed in one of 219 queue samples, at tick 193. A second pair sampled at 1 ms around that tick passed the unchanged oracle on all three streams. The late request was accepted and published at 187 and restored musically at 282; the historical diagnostic expects publication at 188. A separate 16-row sweep verified all 128 ordinary track/source combinations. FUNC+LEVEL outside Meta moved MAIN from 64 to 56 and back, with CUE steady. [Qualification and limits](TESTING.md). + +The cumulative branch still needs the proposed capability. External clock, physical hardware and T8 as a playable Master track remain outside qualification. + +## Work requested from Modwerk community + +See [HOOK_PROPOSAL.md](HOOK_PROPOSAL.md) for the shared-base ABI questions and [HANDOFF.md](HANDOFF.md) for implementation status, acceptance tests, and independent tasks. Focused help is welcome with sequencer hook ownership, key/UI coexistence, timing witnesses, negative controls, portability to the current upstream base and source review. + +**Do not flash this development build.** No OS files, stock executable bytes, emulated project images, binaries, dumps, copyrighted samples or private project data belong in Git. + +## Source and qualification + +[File-by-file import and licences](PROVENANCE.md). The native module remains a draft outside the catalogue. No physical MKII runs are recorded. + +## Volatile rows in the contributor draft + +A stock popup cancels an unconfirmed Row Edit. Reopen CLYPS with ARR after dismissal. Bank reads preserve the sixteen row definitions as local slot numbers. Recall validates the current grids. Project initialization clears the volatile set and returns all lanes home, including when stock initializes during a project change or reload. See [handoff](HANDOFF.md) for verification scope and [row storage](ROW_STORAGE.md) for the proposed multi-bank model. diff --git a/sdk/octatrack/modules/clyps/ROW_STORAGE.md b/sdk/octatrack/modules/clyps/ROW_STORAGE.md new file mode 100644 index 0000000000..e88f3477bd --- /dev/null +++ b/sdk/octatrack/modules/clyps/ROW_STORAGE.md @@ -0,0 +1,53 @@ +# Bank-local rows · decision record · 23 November 2026 + +**D18 now requires 16 independent rows in every Bank A–P.** [Authoritative Bank and copy/paste requirements](BANKS_COPY_PASTE_REQUIREMENTS.md). The file layout remains proposed. The current runtime holds sixteen volatile rows in total and qualifies source selection only on A01 in bank A. A row refers to stock sequence slots. Parts, their assignments and their sound data remain stock-owned. + +| Model | Interaction and engineering cost | Disposition | +|---|---|---| +| A · 128 global | Eight TRIG pages. Each reference needs source-bank resolution and a policy for foreign Parts and unloaded banks. | Defer pending a musical need for a project-wide list. | +| B · fixed 16 × 16 | All sixteen rows of the selected bank fit one TRIG page. Local pattern slots and their Part context can be resolved within the same bank. A fixed file layout would make later expansion a migration. | Prefer its interaction; validate with A → B → A using identical row numbers. | +| C · extensible bank namespaces | Start with B's controls. Store bank ID, row count, record width and bounded section length separately. Larger row counts can use additional pages without renumbering the first sixteen. | Recommended. Cross-bank playback requires its own qualification. | + +**Logical layout and budget.** Consider a header with magic, supported version, length, generation and checksum, followed by sixteen length-delimited bank sections. In each section store row existence separately from eight tagged cells. A one-byte cell could hold a local source index and explicit CLIP/STOP/HOLD operation. Reserve mode encoding for D21 after phase and precedence are settled. Today the sixteen 32-bit source words and defined mask cost 66 bytes before alignment. At eight bytes per future row plus a bank-defined bitmap the 256-row payload is 2,080 bytes. For example, a 32-byte header and sixteen 8-byte descriptors would make 2,240 bytes per file, 4,480 for work and stored versions before filesystem allocation or a temporary write. These are design estimates. Loading one bank needs 130 bytes of payload plus parsing/staging buffers. A future 128-row bank would need 1,040 bytes with the same encoding. Measure linked BSS, stack, free-pool recovery and admitted peer sets before reserving RAM. + +**Identity and lifecycle.** Bind the live namespace to a committed project incarnation and bank ID. A folder path is a locator: save-as, renamed folders, removable cards and same-path replacement need explicit identity rules. Stock has sixteen pattern slots and four Parts per bank. Moving between banks should change the displayed rows only after the destination is available. A failed read retains the previous live generation and queued music. Stage, validate and then publish a bank as one transaction outside the sequencer interrupt. Never perform card I/O in a key or audio callback. + +Kits and MIDI Scenes implement project-local work/stored files, writeback and restore, with their own data ownership. MIDI Scenes also tags its packed current-bank battery copy with project identity. The battery map assigns ranges to specific owners and lists no CLYPS allocation. Sample memory and the loader pool have different owners and lifetimes. The proposal requests neither a battery range nor a sample allocation. Source evidence: sdk/octatrack/modules/kits/kits.s, sdk/octatrack/modules/midi-scenes/scenes.s, sdk/machines/octatrack/battery-ram.json and HOOKS.md in the same directory. + +| Trigger | Proposed behavior and evidence required | +|---|---| +| Modules ready, including reinstall | Idempotently read a validated working generation for the committed identity at idle. Missing file starts undefined. Unsupported version, checksum error or I/O failure blocks writeback and preserves the file. | +| Single/all-bank load and return | Stage only relevant bank sections. Pre-load gives intent; post-load gives routine return without result or committed identity. A mask plus pending flag cannot prove success. Require correlated completion, success mask, project identity and an abort path from the base before publishing. | +| Background write / SAVE PROJECT | Snapshot confirmed rows. Write and verify a new work generation, then promote it. Only a confirmed SAVE advances the stored generation. Retain dirty edits on error, including later edits made during the write. Prove replacement or a two-generation recovery scheme across power loss on disposable media. | +| RELOAD PROJECT / change / new | Stage stored data, validate identity and publish only on success. Distinguish unsaved state, saved snapshot and undo. A failed reload must keep the prior working generation. Define whether reload intentionally discards unsaved rows with the artist. | +| Module OFF | Remove callbacks, release RAM and return stock control. Retain files. Stock can save/reload while the module is absent; define reconciliation on re-entry before automatic writes. | + +**Migration and first implementation slice.** There is no existing durable CLYPS row file. Offer explicit capture of the current sixteen rows from a verified bank into an empty namespace. Each defined nibble maps to CLIP, including zero/A01. An undefined bit stays undefined. Begin with an offline two-bank codec and an in-memory fake filesystem. Test A/R04 and B/R04 isolation, 16/32/64/128 counts, unknown versions, truncation, interrupted writes, failed reads, same-path replacement, undo and exact restoration. Keep the writer out of the module pending maintainer allocation of file names and a committed project/bank lifecycle contract. + +### Host reference codec and lifecycle experiment (23 November) + +Run `python3.12 -B -m unittest discover -s sdk/octatrack/modules/clyps -v`. +`offline/bank_codec.py` encodes one 2,212-byte big-endian archive. A +32-byte header stores CLYP, version 1, total size, a 16-byte opaque project +incarnation and a nonzero 64-bit generation. Sixteen six-byte descriptors +index bank A through P. Each payload has a defined-row bitmap and 16 × 8 +cells. Values 0–15 select local clips, 16 stops, 17 holds. Undefined rows have +zero payload. CRC32 covers everything except the final four-byte checksum. +The fixed-width reader rejects unknown versions, bad descriptors and invalid +cells. Changing row width requires a schema decision. No path or RAM range +has been allocated on the instrument. + +The fake filesystem stages a complete snapshot, decodes it, then atomically +replaces either the working or saved slot. Every short prefix is exercised. +A failed replacement leaves the previous slot readable. Corrupt or unsupported +existing data blocks writeback. These guarantees assume a serialized writer +and atomic replacement in memory. Media durability and on-card promotion +remain open. + +The production-callback host fixture injects EOF after project initialization. +Source selection falls back to stock, but a confirmed A/R04 is lost. The +isolated transaction model in `offline/project_transition.py` needs a +nonreused transaction token, a committed project incarnation and a terminal +result. Abort may re-enable the prior generation only if stock certifies +the original project, bank and stock source epoch as usable again. Otherwise preserve the snapshot and +keep selection suspended. Stale completion cannot publish a generation. diff --git a/sdk/octatrack/modules/clyps/TESTING.md b/sdk/octatrack/modules/clyps/TESTING.md new file mode 100644 index 0000000000..f2c60b7650 --- /dev/null +++ b/sdk/octatrack/modules/clyps/TESTING.md @@ -0,0 +1,237 @@ +# Testing the public source + +Run `python3 -B sdk/octatrack/modules/clyps/test_renderer.py`. A host C compiler runs the actual input and display routines against synthetic adapter state. With m68k-elf-gcc installed the suite also compiles both translation units for MCF54455. There is no installable public module. + +The frame oracle comes from transmitted MKII emulator frames on OS 1.40C. Two checks cover all 1,024 bytes of Panorama at home and following a T2 override. The third covers all six CLYPS-owned bands in SRC when T2 plays A01 with A03 queued. The synthetic fixture never embeds the stock screen. The input fixture checks down/up in both dispatch phases, track focus, row focus, explicit launch and stock routing after exit. + +In Meta the proposed integration leaves TRACK edges available to stock and Track Solo. LEVEL focuses a column in CLIP or a row in ROW. ARR switches between the contexts. On ordinary SRC press ARR, then SRC in Meta to enter the selected track's list. LEVEL browses and YES requests the selected source. The sequencer and protected loader remain independent qualification gates. + +Hardware: NOT TESTED. Rows are volatile, T8 Master is unsupported, and foreign-source editing remains interlocked. + +## Track Solo comparison + +On the same protected base donor, Track Solo 0.2.5 alone produced native track lamp levels 15 on T2 and 3 on the other tracks during a hold. Adding T3 changed both T3 levels to 15; releasing T3 retained the group. The previous CLYPS package swallowed TRACK in Meta, failed this comparison and moved the focus. The updated package reproduced the control levels while leaving Meta focused on T4 with all eight sources still at A01. LEVEL moved the row focus to R03, and Track Solo worked again after CLYPS removal. This case measures native input, group indication and display ownership. It does not measure eight audio stems. + +[Track Solo held in Meta](media/meta-track-solo.png) · [Row navigation after release](media/meta-row-focus.png) + +## Protected MKII results + +The revised module (SHA-256 `887a0fa2cd1c1002fd127e7448d9a2e849fb90d34f89feee3c677ed0d60421a8`) rebuilt with SDK sources at `23dac9b85`. Native runs used an isolated protected sequencer twin based on donor `a9980c97c`. An altered package with the same ID was refused with status 259. The admission comparison retained 336 stock calls and 336 writes and rejected nine damaged records. + +| Native comparison | Result | +| --- | --- | +| Original eight-lane replay vs independent stock | 624 ordered event calls and 608 timestamp writes matched. One of 219 sampled states differed. At tick 193 the first 1 ms observation differed and the following 19 agreed. | +| Revised eight-lane replay vs independent stock | All 624 calls, 608 writes and 219 samples matched. Three truncated streams failed. An additional replay with queue flag write instrumentation also passed the musical grader. Raw flag-write logs cover different numbers of writes and do not establish identical instruction-level execution. | +| Early request | Strict test passed, including the pending observation at 185. 576 ordered calls, 560 writes, 202 ticks. | +| Late request | Strict diagnostic check still fails at 187 vs expected 188. At +1 ms in tick 187 the request was accepted while the old selection played. At +10 ms, still in tick 187, the pending selection was visible. The sequence switched at wrap 282. All 848 ordered calls and 816 timestamp writes matched the stock composite across 298 ticks, including swing and negative microtiming. | +| Track Solo | Passed with either module loaded first. TRACK edges no longer move CLYPS focus. No launch was observed. | +| Panel and Grain | 17 panel frames and 21 Grain coexistence frames matched prior native witnesses. The panel fixture covers the T2 override, queued/playing SRC, row edit, crossfader and stock return. Grain 0.1.2 retained its native SRC, pool and FX paths. | + +The tick observations distinguish UI/state publication from event scheduling on these fixtures. The musical scheduler and historical diagnostic expectations are unchanged. These comparisons do not establish sample-identical audio on all tracks. + +LEVEL is owned by the modal navigator while Meta is active. FUNC+LEVEL there is suppressed. Outside Meta a stock/candidate master-gain probe returned the same constant word in both runs; a positive master gain response has yet to be demonstrated independently. + +## Public engine checks + +The README discovery command builds the donor C handlers, links with the repository SDK and verifies the required entry points. The checked build produced 5,452 linked bytes, 164 BSS bytes and 238 relocations. tests/shared_state.c drives SRC on every combination of eight lanes and 16 references, checks preserved SRC bands, tests popup and page ownership, and exercises row 16 with all eight lanes distinct. It covers stopped immediate selection, a request after wrap, commit at the next wrap, supersession, STOP cancellation, native TRACK handoff, bank reset, foreign-source edit lock, and explicit stopped YES recovery. The host calls wrap explicitly; it does not reproduce the native clock. + +With independent native captures available, run tests/grade_wide.py CANDIDATE STOCK or tests/grade_boundary.py early|late CANDIDATE STOCK from this directory. In the archived protected captures the fixed eight-lane pair passes all three streams and the truncation controls; early passes; late passes its musical comparisons and still fails the strict pending-state diagnostic. Those are regrades of existing captures. New runs on the shared base require both callbacks and modal-input admission. + +## First shared-development candidate (7419b7598) + +The base candidate at 7419b7598 and the public source from c3c516e8a completed a fresh native A01/T2→A02 replay. Both executable identities are recorded in evidence/shared-base.json. The SRC key path reported QUEUED, then PLAY. Stock scheduled the change at wrap 90. All eight audio lanes were observed before and after that wrap. The other seven kept A01 and the MIDI builder kept its stock input. All 384 ordered audio/MIDI calls and 400 relative timestamp writes matched the stock global-pattern composite. STOP canceled a second pending request. ARR displayed the committed sources, bank and Part bytes matched, callback rows returned to their starting values and the largest free extent returned to 786432 bytes. + +A native negative control on an earlier, equal-width development base without the required feature returned 259. Its active count, owner count and four observed rows stayed zero and the pool stayed at 786432 bytes. The first positive build before deferred reclamation retained 6416 bytes after OFF even though all musical comparisons passed. The final build includes the stopped-engine reachability recheck and rebuilt byte-for-byte from the candidate commit. NATIVE_REPLAY.md gives the reproduction commands. + +The eight-track pair on the same public candidate matched all 624 ordered calls, 608 relative timestamp writes and 219 sampled states, including independently detected negative microtiming and swung T3. All three truncated stream controls failed as required. The matrix stored 16 rows, recalled them in reverse, observed all expected audio lane/source pairs and ordinary MIDI sources, and compared bank, Parts, project files, ownership and pool after OFF. + +The late request met the unchanged strict diagnostic oracle on this candidate. RESTORE was pressed at 187. The linked requested state already contained 0x101 at +1 ms, with 0x111 still playing. At +16 ms the published diagnostic reported the request in tick 188. The native T2 builder selected home at tick 282. The same-build stock composite matched all 848 calls, 816 timestamp writes and 298 ticks. These observations supersede the earlier protected-base diagnostic for this build. + +Outside Meta, FUNC+LEVEL moved native MAIN 64 → 56 → 64 on both stock and installed runs. CUE remained at 64. This measures the stock project settings. The same installed and empty instrument boot saw zero frame skips and zero sheds in the profiled windows. GCC reported 8 bytes for each sequencer callback's individual frame and 188 for module_draw. Total stack high-water and physical worst-case cycles remain unmeasured. + +The early fixture passed its historical diagnostic and musical oracle too, with requests observed at 89 and 185, 576 ordered calls, 560 writes and 202 ticks. + +Stock Arranger recovery after a foreign source was selected matched its pre-install two-row control. The playhead advanced from row 0 to row 1. Both signatures contained 336 ordered calls and 336 relative timestamp writes. Pool, callback heads, bank, Parts and disposable project files returned to their starting state. + +Track Solo passed in both load orders, including native group LED states and stable CLYPS focus. The crossfader reached stock position 47. Grain retained its native SRC, page IDs, pool and FX routes. POLY8 and VECTOR restored their native SRC screens after leaving CLYPS. These peer checks cover panel coexistence. T1 FLEX's generated tone rose from 0 to 1930, with the seven other lane peaks unchanged. The T2 STATIC isolation test failed its prelaunch-silence assertion. It measured 2117 before and 2337 after. An independent stock global-pattern composite reproduced both readings and the other seven peaks. The cause of the nonzero baseline remains open. + +The measured three-second dense window had all eight audio builders selecting A02. There were 192 source spans in the candidate, with maximum 160 retired emulator instructions per selection and 540 across the one observed wrap. The stock composite maxima were 16 and 12. In the light A01 case these were 31 and 28 with the module, 16 and 12 without. At rest both runs observed zero sequencer spans. Frame busy counts are accumulated as per-frame timer delta shifted right by eight. The stopped windows measured 443904 over 8364 frames without the module and 481832 over 8354 with it. This includes all frame work. The six windows recorded no frame skips or sheds. These samples describe the pinned emulator and workload. + +The native HOME editing test inserted the T2 step-6 trig and held it while changing AMP encoder A. Stock and CLYPS produced identical hashes before and after the p-lock and after leaving the editor. Parts stayed intact. A separate boot confirmed stock popup priority. Editing a foreign source remains interlocked. + +The scene-selection fixture changed A and B independently using each physical scene button and a trig, read the two active Part scene bytes after each gesture and restored both. The five pairs matched with and without CLYPS. Run native_rows.py with the same arguments as the Arranger check and use --scene-select in place of --arranger-recovery. + +## Current candidate on cumulative 23f41e720 + +Candidate 18e28a172 merged the cumulative frame-budget update. Candidate b3184dd5e subsequently integrated the upstream pricing-curve and measurement-script changes through 23f41e720. Its freshly built MAIN, symbol map and configuration digest matched the tested executable byte for byte. The code/data size, BSS, relocations and CLYPS package digest are unchanged. The new MAIN and negative control identities are in evidence/shared-base-refresh.json. Both vertical-slice traces and the missing-feature receipt reproduced byte for byte. The 16-row sweep and the stock Arranger after OFF passed. Six profiling windows again had zero skips and zero sheds. The maxima at the two sequencer sites were unchanged. + +The default eight-lane capture matched 624 ordered calls, 608 relative timestamp writes and 218 of 219 sampled states. At tick 193 the candidate snapshot retained queue entries for T2–T7 while stock retained only T3. The paired 1 ms near-boundary observer read the T3-only flag on both runs at 193. The same unmodified grader accepted the full refined pair and rejected each truncated stream. Keep both results. + +The early boundary passed its strict grader. In the late case the stock and candidate musical comparison passed for all 848 calls, 816 writes and 298 ticks. The request entered module state at +1 ms of tick 187; the diagnostic published it at +5 ms of that same tick. The T2 builder first used home again at 282. The strict diagnostic expectation of 188 failed. The previous base's +16 ms result remains in the preceding evidence. The input, diagnostic and builder observations are separate. + +Track Solo (both orders), panel, Grain, POLY8, VECTOR, stock popup priority, native Scene A/B parameter changes and the home trig/p-lock comparison repeated on the refreshed executable. The FLEX stem test passed. Both native STATIC controls again measured T2 peak 2117 before selection and 2337 after selection. The prelaunch-silence assertion failed in both. No physical test was performed. + +## 23 November · contributor regressions + +Run `python3.12 -B -m unittest discover -s sdk/octatrack/modules/clyps -v`. The host fixture compiles the production callbacks; lifecycle delivery follows the candidate subscription JSON. The bank fixture reads a one-byte grid marker from a temporary file and exercises a short read at EOF. On the previous implementation the popup path failed when ARR did not reopen, and the unrelated bank request removed an already confirmed R04. Both failed independently when linked to the previous handlers. The previous MKII package also reproduced the ARR re-entry failure after opening a real timed stock message during Row Edit. On the corrected candidate all four discovered host/ColdFire tests pass. Standalone linked image 5,596 bytes, BSS 176 bytes, 248 relocations. + +UI-01/02/03/04 cover the home case and three repeated interruptions with a foreign lane playing, a different confirmed row queued and an unconfirmed third source held down. Check encoder, modal query, stock YES, owned release, popup-owned ARR repeat/release, row bytes and next wrap. A separate stock YES/NO dialog handle used by Temp Save reproduced the same ownership failure before its addition to the stock-window check. UI-05 includes the existing TRACK and SRC ownership fixtures. + +BANK-01/02/03 cover an unrelated bank return, failed read with original fixture bytes retained, and a successful relevant replacement that changes the saved source to an unsupported grid. Recall refuses it and the native source selector falls back to home. Restoring compatible grid bytes makes the same confirmed slot usable. BANK-04 exercises project initialization and a missing R04 on next recall. BANK-05 covers a failed reload event sequence without initialization. A failure after project initialization is unresolved. The tests inject no success argument into a module callback. During an A read the fixture calls the real tick, wrap and selector: current and requested state survive, and the selector leaves the stock pattern argument alone. During a B read the same selector continues redirecting T1. + +The intermediate build that subscribed to project initialization alone was refused with 259 by the positive base: candidate B1 admission requires the bank pre-load subscription. The final contract keeps that subscription as the read guard and pairs it with bank-loaded; both the base and its admission rules are unchanged. + +### Native build identities and comparisons + +All 23 November runs use the existing MKII integration base b3184dd5e, MAIN SHA-256 `6a9d7518ba7707e3763215ecc50be1c7eec09628b1bdf45b86b3f207a02b434b`. The cumulative #1910 branch at c3706472b requires separate qualification. No hardware trial. + +| Package SHA-256 | Scope | +|---|---| +| `7707f1199cd7595bf49d8974445acbfb0610a0f7fb12c2c86268d259826a1142` | Admitted implementation of both fixes, before adding the additional stock YES/NO window handle. | +| `32ebca98345840f4e107550683f4fd14f2be35e5355df3d8933b7132f324aea9` | Final implementation, also guards the YES/NO dialog. 5,600 bytes of linked package image, 176 BSS, 248 relocations. | + +The first admitted package passed the native interrupted-editor replay. The independent stock T2 pair matched at wrap 90, 384 ordered calls and 400 relative writes. The stock Arranger matched its pre-install run after OFF (336 calls, 336 writes, complete 786432-byte pool). Track Solo, Grain and panel receipts matched the archived 9/21/17 observations respectively. POLY8 and VECTOR SRC returned correctly. Scene A/B selections matched stock on every step. In the fresh eight-lane pair, 624 events and 608 writes matched; strict default capture **FAIL**, with tick 193 the only mismatch among 219 samples. The historical 1 ms pair regraded PASS at 219/219; the historical late diagnostic still fails its 188 expectation after publication at 187. The musical and diagnostic graders retain their previous assertions. + +On the final package the stock timed popup closed, ARR reopened CLYPS, R04 recalled its confirmed A01 and OFF returned the full pool. The equal-width base without the required capability refused this package with 259, zero installed owners and six empty observed hooks. Catalog compatibility on the public checkout: 44 active modules, 946 pairs, zero problems. The catalog excludes this draft. Module doctor in draft mode still fails because octamod.module.json is absent. + + +The final package also passed the matched T2 slice against the fresh, same-MAIN stock control. Wrap 90, 384 ordered calls, 400 relative writes, the seven unaffected lanes, SRC/ARR, STOP cancellation, bank and Part checks and pool recovery all passed. + +On the same final package, the GATE4 project fixture selected bank B, observed project initialization and the bank pre/post callbacks, and found R04 undefined with CLYPS still installed. Waiting for the stock card task before OFF returned 786432 bytes. The initial short OFF timeout had expired while the stock operation was still running. A direct attempt to invoke the stock bank reader synchronously from emulator main timed out; it provides no native bank-only I/O result. The independent host short-read case covers that path. Fresh FLEX on the first admitted package went from 0 to 1930 on T1. STATIC T2 measured 2117 before and 2337 after, failing the pre-launch silence assertion as in the historical stock control. E1 remains locked. + +On the final package, Track Solo and Grain both passed fresh native replays. OFF restored the same stock Arranger signature (336/336) and the complete pool. Every package and card used in these tests stayed local. + +Both final native RELOAD fixtures passed. The stored B project cleared R04. Missing stored state kept bank A and its confirmed R04. OFF restored 786432 bytes in both cases. + +The final package also ran a fresh eight-lane pair using the 1 ms queue observation near wrap. Both replay processes exited successfully. The unchanged strict grader **FAILS** at tick 193: the queue snapshot contained one entry on the candidate and six on stock. All 624 ordered events, 608 relative writes and 218 of 219 sampled states matched. The earlier 219/219 result belongs to the historical package. The cause and any audible consequence remain unresolved. + +## Artist requirements checkpoint + +Discovery now runs five tests. The added stopped popup/Bank H case injects both events into the production callbacks during a draft edit, then checks ARR re-entry, confirmed row, playback and pending state. The independent C clipboard fixture checks row and same-track cell snapshots, source isolation, overwrite refusal, cancellation/clear, invalid targets and cross-bank refusal. This fixture works on staging rows only. The firmware has no clipboard binding, sidecar writer or native duplication command. Hardware A–H: NOT TESTED. + +### Matched cumulative-base qualification · 23 November + +Candidate 5c32cbacd, module 32ebca98, emulator a1410ad4. +[Identities and suite results](evidence/nov23-reliability.json). +Both the default and 1 ms wide captures passed the unchanged strict grader, +including its three truncation controls. The shelf-disabled vs active-home +pair matched 624 events and 219 states. STOP at tick 190 matched 544 events +and 190 states. The missing-feature control refused the package with 259, +zero owners, six empty hooks and unchanged free pool. + +On the earlier MAIN we repeated the original failure byte for byte, even +with the additional PC and absolute-sample witness. At the first tick-193 +read stock had six entries. Its frame consumer at 0x4000bc22 cleared five +flags from +0.408 to +2.708 samples relative to the read. CLYPS had one +entry. Its same five clears spanned −23.745 to −21.345 samples. Both +reported one entry at the next poll. In both runs we observed eight audio +selector returns, eight audio builder entries and eight MIDI builder entries +during the tick. On the refreshed MAIN both first reads followed the five +clears. The instrumented ordered streams match their uninstrumented +counterparts. [Original samples](evidence/tick193-original-clock.json) · +[refreshed samples](evidence/tick193-current-clock.json). + +The original fixture samples after an emulator run quantum containing a tick. +That does not fix whether stock's frame consumer has run. This explains the +recorded 6:1 difference for these inputs. Neither a general permission for +callback jitter nor a change in the strict oracle follows from that finding. + +The before-wrap boundary replay failed its diagnostic assertion. The request +was in RAM by tick 89 +1 ms; the queued-only diagnostic was still zero at ++15 ms, then the wrap committed at tick 90 +16 ms. The after-wrap replay +matched all 848 calls, 816 relative writes and 298 states, but the diagnostic +appeared at 187 instead of the expected 188. Both failures remain open. + +### Audio and stock MIDI on the refreshed candidate + +The disposable two-FLEX-voice fixture (generated kick and bass) sends six +channel-1 note 48 pairs and four channel-2 note 67 pairs with MIDI T2's +CC1 locks at 34 and 42. All 27 decoded messages match both independent +stock controls, including their order, channels and note lifetimes. The +candidate sent 69 UART bytes; both controls sent 70. The only byte edit is +an extra 0x90 status at zero-based index 38 in each control. MIDI running +status yields the same decoded note. Maximum relative message-end timestamp +deviation was 48.1 emulator samples against the stock global-pattern +composite and 64.1 against fixed A01. The exact wire/timing comparison +**fails** in both cases. The global-pattern control alone cannot explain +the extra status. Absolute device latency and physical clock are unmeasured. + +On a subsequent transport after OFF, candidate and global stock control +matched all 69 bytes and 26 decoded messages; relative timing still differed +by up to 7.3 samples. Native independent MIDI source launching remains +unimplemented. See NATIVE_REPLAY.md for both control commands and the +separate stock MIDI builder. + +The same-base peer replays passed for Track Solo, Grain, POLY8, VECTOR, +Panorama/Zoom and the foreign-edit interlock. Scene selection matched all +five stock A/B pairs. The master LEVEL probe and six load windows passed +with zero frame skips or sheds. FLEX T1 measured 0 before launch and 1930 +after. STATIC T2 measured 2117 before and 2337 after, failing the required +pre-launch silence. The catalogue compatibility result covers 44 published +modules and 946 pairs. The candidate's 20 machine-event host checks passed. +One of 23 runtime-loader checks failed at USB Audio source reconstruction; +two checks were skipped. + +The disposable GATE3-to-GATE4 change and stored reload selected bank B, +cleared the R04-defined flag and recovered the pool after OFF. Missing +stored files left bank A and R04 intact. The late EOF experiment and the +recovery contract model remain host-only. The native reload tests use +stock files; the offline CLYPS codec is absent from the module. + +The dedicated crossfader replay (`native_rows.py --crossfader`, using the +same base and card arguments as --scene-select) drove the native panel ADC +and read position and all ten stock morph weights. The sequence 0, 64, +127, 0 matched with the module off and installed. All three positions had +different weight vectors and the return restored the original weights. +The stored-reload repeat exited 0 and reproduced its first receipt exactly; +the original scratch wrapper had failed to save the exit status. + +## Official procedure on upstream main — 23 November 2026 + +Tested merge 613db9857006 (CLYPS 236294956e38, official procedure 6f31dd3c43ff). The plan printed all 12 steps. The host run and the connected MKII emulator run both **failed step 1**. Doctor could not read the staged draft's octamod.module.json. **Steps 2–12 did not run** in either procedure. The emulator session was available and received an explicit candidate package. Package selection does not skip the software check. The draft currently has proposed contracts and depends on shared base services missing from upstream. A build against upstream also failed at the modal-input ABI. See [records, logs, exact commands and hashes](evidence/procedure-nov23/README.md). + +Separate checks passed on the same module source: ten host tests, ColdFire link and callback fixtures, and a byte-identical candidate MWRM on shared SDK 5c32cbacd (SHA-256 32ebca98345840f4e107550683f4fd14f2be35e5355df3d8933b7132f324aea9). The standalone Python 3.12 catalogue check passed for 44 active modules and 946 pairs; CLYPS is outside that catalogue. The standalone DSP scan found ten current records. Neither standalone result changes the official step statuses. + +Edge cases + +| Case | Why this change makes it a risk | How run | Result | +|---|---|---|---| +| Eight audio lanes and independent source selection | A source change could redirect a neighboring lane | Native MKII wide pair against independent stock composite and T2-only slice | Pass. All 624 events, 608 relative writes and 219 states matched. The separate T2 slice matched 384 calls and 400 writes at wrap 90. | +| Request just before wrap | Pending state could appear too late | Native early-boundary panel fixture | Fail. Requested by tick 89 +1 ms, pending diagnostic still zero at +15 ms, committed at wrap 90 +16 ms. | +| Request just after wrap | Restore could be reported on the wrong tick | Native late pair and strict boundary grader | Fail. All 848 events, 816 writes and 298 states matched, but pending restore appeared at tick 187; the oracle requires 188. | +| ARR after stock popup during Row Edit | Editor could keep the panel hidden or lose a row | Native popup fixture and host callback test | Pass. ARR reopened, R04 retained its definition and OFF recovered the full pool. | +| Unrelated bank, early EOF, popup during bank load | An already-defined R04 could be cleared | Host callbacks with an actual temporary-file EOF and an unrelated bank mask | Pass. R04 and its source survive. | +| Late interrupted project load | Destination initialization can clear the previous rows before completion | Host late-failure case with a short read after init | Fail. The characterization test passes by reproducing loss of R04. Native late-abort recovery remains unverified. | +| Missing versus completed stored reload | Rows could be kept or discarded for the wrong destination | Stock PROJECT menu in native emulator on disposable cards | Pass. Missing stored files preserved bank A and R04. Completed stored reload selected bank B and cleared R04. OFF recovered the full pool in both cases. | +| STOP, OFF and stock Arranger | Queued source changes or handlers could survive removal | T2 slice and Arranger recovery fixtures | Pass. STOP cancelled the queued change; OFF restored callback heads and all 786432 pool bytes. Stock Arranger playback matched before and after removal. | +| Shared hook interaction | Panel, source or wrap registration could conflict with base owners | Candidate build by named hooks, callback heads before/after OFF and upstream-only compile | Pass on the candidate for bindings and T2 unload. Blocked on upstream main for the three proposed bindings; catalogue-only compatibility excludes CLYPS. | +| Physical MKII | Audio, cost, USB trial and persistence require the real instrument | Separate authorization required | Not run. Trial, soak, pricing, rollback and inventory, MAIN/CUE listening and persistence remain open. | + +### Physical MKII admission recheck after #1910 merged — 23 November 2026 + +**BLOCKED before opening a device session.** macOS enumerated an Elektron Octatrack DPS-1 over USB. The artist identified the intended instrument as MKII / OS 1.40C. Its revision, running base, module inventory and saved Part were not read from the unit. No transport, trial, project or card command was sent. There was no physical rollback to verify. + +The draft was recovered at 188bda33a5d71f2001b941b80bcd1f6b724b8d41. The current upstream SDK tested was 4035fdfa857d1c83929bd9b2776871ab17432559, after #1910 merged. With that main merged locally at 2949c6f87cb59aa48394cabaad48888b35bce4a7, the CLYPS source tree was identical. The plan printed twelve steps. The host-only procedure reproduced step 1 FAIL on both checkouts. The draft doctor could not open the staged octamod.module.json. Compiling the draft against the new upstream SDK separately failed on the incomplete modwerk_modal_input struct and undefined MODWERK_MODAL_INPUT_ABI. The upstream Octatrack registry and SDK lack the candidate wrap, per-track audio source and modal-input bindings. + +| Official step | Status | Observation | +| --- | --- | --- | +| 1 Software checks | FAIL | Draft manifest missing during staging | +| 2 Compatibility | BLOCKED | Runner stopped at 1. Standalone catalogue check passed for 44 active modules and 946 pairs. It excludes the CLYPS draft. | +| 3 Identify build | BLOCKED | No official CLYPS build | +| 4 DSP cost model | BLOCKED | Runner stopped at 1 | +| 5 Emulator rehearsal | BLOCKED | Runner stopped at 1 | +| 6 Read unit | NOT TESTED | USB enumeration only | +| 7 Scripted trial | NOT TESTED | No eligible package | +| 8 Soak | NOT TESTED | No trial | +| 9 Cost | NOT TESTED | No CPU, frame or guard samples | +| 10 Restore | NOT TESTED | No device-state change initiated | +| 11 Manual cases | NOT TESTED | Physical playback, isolated T2 launch, early/late timing, ARR/popup, STOP and removal all unmeasured | +| 12 Artist stage | NOT TESTED | No physical session | + +Two local builds with the contributor SDK at 5c32cbacd2b1efea3d70e9b543a9a43cfe634651 produced identical MWRM SHA-256 32ebca98345840f4e107550683f4fd14f2be35e5355df3d8933b7132f324aea9. Both used the draft's candidate builder. All ten host tests passed. + +To unblock admission, land the shared wrap callback, exclusive audio source selector and modal-input opt-in with loader capability enforcement in the supported development base, then bind the staged module manifest and SDK builder to that contract. Restart the procedure at step 1. The existing integration proposal uses slots 63–65 and feature 0x4000, pending allocation. Before a device trial, independently identify the running base, inventory, saved scratch Part and supported rollback route. + +## Private performance overlay · 25 November 2026 + +See [PERFORMANCE_SPRINT01.md](PERFORMANCE_SPRINT01.md) for the exact package, positive and negative scope and independent stock-composite replay. diff --git a/sdk/octatrack/modules/clyps/build_candidate.py b/sdk/octatrack/modules/clyps/build_candidate.py new file mode 100644 index 0000000000..ef668cbe05 --- /dev/null +++ b/sdk/octatrack/modules/clyps/build_candidate.py @@ -0,0 +1,61 @@ +"""Build CLYPS for the candidate shared SDK; all bindings resolve by name.""" +import argparse +import hashlib +import json +from pathlib import Path +import struct +import subprocess +import sys +import tempfile + +here = Path(__file__).resolve().parent +parser = argparse.ArgumentParser(description=__doc__) +parser.add_argument('sdk', type=Path, help='Candidate repository sdk directory') +parser.add_argument('output', type=Path) +parser.add_argument('--symbols', type=Path, help='Write offsets for the phase witness') +parser.add_argument('--performance', action='store_true', help='Build the private Row/Clip overlay') +args = parser.parse_args() +sdk = args.sdk.resolve() +sys.path[:0] = [str(sdk / 'runtime/loader'), str(sdk / 'runtime'), str(sdk / 'machines/octatrack')] +import build +import events +import m68k_codegen + +registry = events.load() +bindings = json.loads((here / 'contracts/runtime.proposed.json').read_text())['subscribe'] +bindings = [entry for entry in bindings if entry['event'] not in build.HANDLERS] +bindings.append(dict(event='ot_modal_input', fn='clyps_modal', order=50)) +with tempfile.TemporaryDirectory() as tmp: + work = Path(tmp) + marker = work / 'modal.c' + marker.write_text('#include "modwerk_events.h"\nconst struct modwerk_modal_input clyps_modal = { MODWERK_MODAL_INPUT_ABI };\n') + objects = [] + for source in [here / 'live_module.c', marker]: + obj = work / (source.stem + '.o') + subprocess.run(['m68k-elf-gcc', *build.CFLAGS, *m68k_codegen.FLAGS, + *(['-DCLYPS_PERFORMANCE'] if args.performance else []), + '-I', sdk / 'machines/octatrack/include', '-c', source, '-o', obj], check=True) + objects.append(obj) + m68k_codegen.check_mcf54455(objects, 'm68k-elf-objdump') + image, symbols, bss, offsets = build.link_units(objects, 'm68k-elf-', 0, work) +hooks = build.subscribe([symbols[name] for name in build.HANDLERS], bindings, symbols, registry=registry) +package = build.package(image, bss, hooks, offsets, name='clyps-live', abi=8, hashed=True, title='clyps-live') +# ABI 9 adds the required base features and two empty DSP claim counts. +feature = next(line for line in events.sdk(registry).splitlines() + if line.startswith('#define MODWERK_SEQ_PANEL_FEATURE ')) +mask = int(feature.split()[-1].rstrip('u'), 0) +package = package[:4] + struct.pack('>H', 9) + package[6:76] + struct.pack('>HBB', mask, 0, 0) + package[76:] +args.output.write_bytes(package) +if args.symbols: + names = ['clyps_project_init', 'playing', 'requested', 'defined'] + if args.performance: + names.extend(['last_row', 'pending_row', 'view', 'slot', 'track', + 'src_cursor', 'mode', 'locked', 'lock_note', 'last_view', + 'operation', 'org_play', 'org_req', 'occ', 'usable', 'occ_known', + 'seen_stock', 'rows', 'bank_uncertain']) + args.symbols.write_text(json.dumps({ + 'sha256': hashlib.sha256(package).hexdigest(), + 'offsets': {name: symbols[name] for name in names}, + }, indent=2)) +print(json.dumps(dict(sha256=hashlib.sha256(package).hexdigest(), image=len(image), bss=bss, + relocations=len(offsets), hooks={e['event']:events.index(e['event'], registry) for e in bindings}))) diff --git a/sdk/octatrack/modules/clyps/contracts/module.proposed.json b/sdk/octatrack/modules/clyps/contracts/module.proposed.json new file mode 100644 index 0000000000..3243a53626 --- /dev/null +++ b/sdk/octatrack/modules/clyps/contracts/module.proposed.json @@ -0,0 +1,27 @@ +{ + "schemaVersion": 2, + "id": "clyps", + "key": "CLYPS", + "name": "CLYPS", + "version": "0.1.0-experimental", + "category": "system", + "compatibility": { + "firmware": "1.40C", + "location": "Project sequencer", + "uiClaims": [ + "key:ARR", + "key:SRC@CLYPS META", + "key:LEVEL@CLYPS", + "key:YES@CLYPS", + "key:NO@CLYPS", + "key:TRIG@CLYPS META", + "key:PAGE@CLYPS META", + "screen:CLYPS META", + "screen:CLYPS SRC" + ] + }, + "target": "Octatrack MKII", + "nativeKind": "CF_PATCH", + "scope": "Review metadata excerpt; no installable public package.", + "hardwareStatus": "untested" +} diff --git a/sdk/octatrack/modules/clyps/contracts/runtime.proposed.json b/sdk/octatrack/modules/clyps/contracts/runtime.proposed.json new file mode 100644 index 0000000000..67c795a254 --- /dev/null +++ b/sdk/octatrack/modules/clyps/contracts/runtime.proposed.json @@ -0,0 +1,46 @@ +{ + "schema": 1, + "subscribe": [ + { + "event": "module_key", + "fn": "module_key" + }, + { + "event": "module_enc", + "fn": "module_enc" + }, + { + "event": "module_tick", + "fn": "module_tick" + }, + { + "event": "module_draw", + "fn": "module_draw" + }, + { + "event": "ev_bank_load", + "fn": "clyps_bank_load", + "order": 50 + }, + { + "event": "ev_bank_loaded", + "fn": "clyps_bank_loaded", + "order": 50 + }, + { + "event": "ev_project_new", + "fn": "clyps_project_init", + "order": 50 + }, + { + "event": "ev_seq_wrap", + "fn": "clyps_wrap", + "order": 50 + }, + { + "event": "ev_audio_seq_source", + "fn": "clyps_audio_source", + "order": 50 + } + ] +} diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-01/build.json b/sdk/octatrack/modules/clyps/evidence/native-ui-01/build.json new file mode 100644 index 0000000000..557972694a --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/native-ui-01/build.json @@ -0,0 +1,17 @@ +{ + "sha256": "65eefdf479eb5fadc645c28a475ed9f871e61b693f24a99e87894a2cc4296d56", + "offsets": { + "clyps_project_init": 3330, + "playing": 13226, + "requested": 13222, + "defined": 13156, + "last_row": 13104, + "pending_row": 13100, + "view": 13096, + "slot": 13128, + "track": 13148, + "src_cursor": 13108, + "mode": 13092, + "locked": 13116 + } +} diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-01/clip.png b/sdk/octatrack/modules/clyps/evidence/native-ui-01/clip.png new file mode 100644 index 0000000000..d73782fbf6 Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-01/clip.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-01/first-arr.png b/sdk/octatrack/modules/clyps/evidence/native-ui-01/first-arr.png new file mode 100644 index 0000000000..0c787361ee Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-01/first-arr.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-01/host-render-cost.txt b/sdk/octatrack/modules/clyps/evidence/native-ui-01/host-render-cost.txt new file mode 100644 index 0000000000..d51f62e13d --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/native-ui-01/host-render-cost.txt @@ -0,0 +1,21 @@ +row 2112 +row 2090 +row 2068 +row 2059 +row 2080 +row 2071 +row 2056 +clip 1245 +clip 1259 +clip 1258 +clip 1246 +clip 1241 +clip 1249 +clip 1239 +setup 152 +setup 156 +setup 152 +setup 152 +setup 159 +setup 153 +setup 151 diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-01/host-views.tsv b/sdk/octatrack/modules/clyps/evidence/native-ui-01/host-views.tsv new file mode 100644 index 0000000000..38d3201e92 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/native-ui-01/host-views.tsv @@ -0,0 +1,36 @@ +F00a-sprint01-row panorama 0 +F00a-sprint01-row clip 0 +F00b-sprint01-clip panorama 0 +F00b-sprint01-clip clip 0 +F01-stopped panorama 0 +F01-stopped clip 0 +F02-playback panorama 0 +F02-playback clip 0 +F03-pause panorama 0 +F03-pause clip 0 +F04-focus-vs-playing panorama 0 +F04-focus-vs-playing clip 0 +F05-pending-focus-playing panorama 0 +F05-pending-focus-playing clip 0 +F06a-coincident-clip panorama 87 +F06a-coincident-clip clip 0 +F06b-coincident-row panorama 0 +F06b-coincident-row clip 0 +F07-lane-override panorama 0 +F07-lane-override clip 0 +F08-undefined-rows panorama 0 +F08-undefined-rows clip 0 +F09-end-of-path panorama 0 +F09-end-of-path clip 0 +F10-draft-multi panorama 93 +F10-draft-multi clip 0 +F11-pending-then-draft panorama 85 +F11-pending-then-draft clip 0 +F12-record-working-clip panorama 97 +F12-record-working-clip clip 100 +F13-unsupported panorama 117 +F13-unsupported clip 538 +F14a-error-over-takeover panorama 99 +F14a-error-over-takeover clip 106 +F14b-stock-popup panorama 0 +F14b-stock-popup clip 0 diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-01/replay.json b/sdk/octatrack/modules/clyps/evidence/native-ui-01/replay.json new file mode 100644 index 0000000000..21a10c1a1c --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/native-ui-01/replay.json @@ -0,0 +1,115 @@ +{ + "module": "65eefdf479eb5fadc645c28a475ed9f871e61b693f24a99e87894a2cc4296d56", + "observations": [ + [ + "open row", + { + "view": 1, + "mode": 1, + "playing": 0 + } + ], + [ + "cursor row 2 track 2", + { + "slot": 1, + "track": 1, + "playing": 0 + } + ], + [ + "capture R02", + { + "defined": 2, + "last_row": 0 + } + ], + [ + "T2 selects A02", + { + "view": 2, + "track": 1, + "src_cursor": 1, + "playing": 16 + } + ], + [ + "capture R05", + { + "view": 1, + "defined": 18, + "slot": 4, + "last_row": 0 + } + ], + [ + "advance to R02 independently of cursor", + { + "playing": 0, + "last_row": 2, + "slot": 4 + } + ], + [ + "advance to R05", + { + "playing": 16, + "last_row": 5 + } + ], + [ + "end retains R05", + { + "playing": 16, + "last_row": 5 + } + ], + [ + "override T2 retains path", + { + "playing": 32, + "last_row": 5 + } + ], + [ + "direct R02 pending during play", + { + "playing": 32, + "pending_row": 2, + "last_row": 5 + } + ], + [ + "STOP cancels pending", + { + "playing": 32, + "requested": 32, + "pending_row": 0, + "last_row": 5 + } + ], + [ + "exit with foreign edit lock", + { + "view": 0, + "locked": 1 + } + ], + [ + "stopped restore", + { + "playing": 0, + "requested": 0, + "last_row": 0, + "mode": 0 + } + ] + ], + "free_before_after": 786432, + "composed_frames": { + "first-arr": "4f84fa29137bad50811114450e9d6c08aff1d914c28c30dec7a428d29afdde43", + "setup": "bfb937b38fec112c1ea24461f3193c233f2291cdecc332d06dce92a54f3ea905", + "clip": "41aea567fc856698dd405de02aa8168f9db72c83fc40c159d11c57f1f6231f1f", + "row": "94354e45a1568b5e009b22e2dbfdf29d6734b8998470be81f13a92c9658228aa" + } +} diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-01/row.png b/sdk/octatrack/modules/clyps/evidence/native-ui-01/row.png new file mode 100644 index 0000000000..7bcdc03fa3 Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-01/row.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-01/setup.png b/sdk/octatrack/modules/clyps/evidence/native-ui-01/setup.png new file mode 100644 index 0000000000..1c374b6e11 Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-01/setup.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-02/build.json b/sdk/octatrack/modules/clyps/evidence/native-ui-02/build.json new file mode 100644 index 0000000000..af7320c174 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/native-ui-02/build.json @@ -0,0 +1,22 @@ +{ + "sha256": "190ec4db032ab9a70f26c704af89cce142d239f5ebb80c660a89c4b84d57a67d", + "offsets": { + "clyps_project_init": 6112, + "playing": 12538, + "requested": 12534, + "defined": 12468, + "last_row": 12420, + "pending_row": 12416, + "view": 12412, + "slot": 12440, + "track": 12460, + "src_cursor": 12424, + "mode": 12408, + "locked": 12428, + "lock_note": 12400, + "last_view": 12336, + "operation": 12404, + "org_play": 12376, + "org_req": 12368 + } +} \ No newline at end of file diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-02/clip.png b/sdk/octatrack/modules/clyps/evidence/native-ui-02/clip.png new file mode 100644 index 0000000000..857e44e048 Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-02/clip.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-02/first-arr.png b/sdk/octatrack/modules/clyps/evidence/native-ui-02/first-arr.png new file mode 100644 index 0000000000..076ac54f12 Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-02/first-arr.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-02/host-render-cost.txt b/sdk/octatrack/modules/clyps/evidence/native-ui-02/host-render-cost.txt new file mode 100644 index 0000000000..d3e246cce2 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/native-ui-02/host-render-cost.txt @@ -0,0 +1 @@ +Host only (cc -O2, seven batches of 20000 frames, same run): D32 f85393656 clip=1273 row=2113 setup=154; this candidate clip=1281 row=2124 setup=3370 (SETUP now draws the Panorama under its popup). Not a device measurement. diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-02/host-views.tsv b/sdk/octatrack/modules/clyps/evidence/native-ui-02/host-views.tsv new file mode 100644 index 0000000000..4f4b6cf535 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/native-ui-02/host-views.tsv @@ -0,0 +1,36 @@ +F00a-sprint01-row panorama 0 +F00a-sprint01-row clip 0 +F00b-sprint01-clip panorama 0 +F00b-sprint01-clip clip 0 +F01-stopped panorama 153 +F01-stopped clip 0 +F02-playback panorama 0 +F02-playback clip 0 +F03-pause panorama 0 +F03-pause clip 0 +F04-focus-vs-playing panorama 0 +F04-focus-vs-playing clip 0 +F05-pending-focus-playing panorama 51 +F05-pending-focus-playing clip 0 +F06a-coincident-clip panorama 138 +F06a-coincident-clip clip 0 +F06b-coincident-row panorama 0 +F06b-coincident-row clip 0 +F07-lane-override panorama 13 +F07-lane-override clip 0 +F08-undefined-rows panorama 168 +F08-undefined-rows clip 0 +F09-end-of-path panorama 0 +F09-end-of-path clip 0 +F10-draft-multi panorama 93 +F10-draft-multi clip 0 +F11-pending-then-draft panorama 128 +F11-pending-then-draft clip 0 +F12-record-working-clip panorama 147 +F12-record-working-clip clip 100 +F13-unsupported panorama 460 +F13-unsupported clip 538 +F14a-error-over-takeover panorama 99 +F14a-error-over-takeover clip 106 +F14b-stock-popup panorama 0 +F14b-stock-popup clip 0 diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-02/replay.json b/sdk/octatrack/modules/clyps/evidence/native-ui-02/replay.json new file mode 100644 index 0000000000..6600d82b5d --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/native-ui-02/replay.json @@ -0,0 +1,278 @@ +{ + "module": "190ec4db032ab9a70f26c704af89cce142d239f5ebb80c660a89c4b84d57a67d", + "observations": [ + [ + "open row", + { + "view": 1, + "mode": 1, + "playing": 0 + } + ], + [ + "cursor row 2, T2 through the stock tab", + { + "slot": 1, + "track": 1, + "playing": 0 + } + ], + [ + "capture R02", + { + "defined": 2, + "last_row": 0 + } + ], + [ + "T2 selects A02", + { + "view": 2, + "track": 1, + "src_cursor": 1, + "playing": 16 + } + ], + [ + "capture R05", + { + "view": 1, + "defined": 18, + "slot": 4, + "last_row": 0 + } + ], + [ + "advance to R02 independently of cursor", + { + "playing": 0, + "last_row": 2, + "slot": 4 + } + ], + [ + "advance to R05", + { + "playing": 16, + "last_row": 5 + } + ], + [ + "end retains R05", + { + "playing": 16, + "last_row": 5 + } + ], + [ + "override T2 retains path", + { + "playing": 32, + "last_row": 5 + } + ], + [ + "direct R02 pending during play", + { + "playing": 32, + "pending_row": 2, + "last_row": 5 + } + ], + [ + "STOP cancels pending", + { + "playing": 32, + "requested": 32, + "pending_row": 0, + "last_row": 5 + } + ], + [ + "exit with foreign edit lock", + { + "view": 0, + "locked": 1 + } + ], + [ + "stopped restore", + { + "playing": 0, + "requested": 0, + "last_row": 0, + "mode": 0 + } + ], + [ + "S03 ARR returns to the remembered Panorama", + { + "view": 1, + "mode": 1, + "locked": 0 + } + ], + [ + "S03 crossfader under Panorama", + { + "view": 1 + } + ], + [ + "S03 Scene A under Panorama, no launch", + { + "view": 1, + "playing": 0, + "requested": 0 + } + ], + [ + "S03 Clip", + { + "view": 2 + } + ], + [ + "S03 pause keeps the pending Row", + { + "view": 1, + "pending_row": 5, + "playing": 0, + "last_row": 0 + } + ], + [ + "S03 resume commits at the next boundary", + { + "pending_row": 0, + "last_row": 5, + "playing": 16 + } + ], + [ + "S03 T3 + TRIG 2: cell from R02", + { + "requested": 16, + "org_req": 84018437, + "pending_row": 0, + "last_row": 5 + } + ], + [ + "S03 T2 + TRIG 2: second cell pending", + { + "requested": 0, + "playing": 16, + "org_req": 84017669, + "org_play": 84215045, + "last_row": 5 + } + ], + [ + "S03 cells commit, path unchanged", + { + "playing": 0, + "org_play": 84017669, + "last_row": 5, + "pending_row": 0 + } + ], + [ + "S03 Row Advance ends after R05", + { + "last_row": 5, + "pending_row": 0 + } + ], + [ + "S03 T2 A02 from R05", + { + "playing": 16 + } + ], + [ + "S03 native with foreign sources", + { + "view": 0, + "locked": 1 + } + ], + [ + "S03 AMP page passes", + { + "locked": 1, + "lock_note": 0 + } + ], + [ + "S03 trig edit held under the lock", + { + "lock_note": 1, + "playing": 16 + } + ], + [ + "S03 Clip remembered", + { + "view": 2 + } + ], + [ + "S03 AMP page from Clip", + { + "view": 0, + "locked": 1 + } + ], + [ + "S03 ARR back to Clip", + { + "view": 2 + } + ], + [ + "S03 stop and restore home", + { + "playing": 0, + "requested": 0, + "last_row": 0, + "mode": 0 + } + ] + ], + "sprint03": { + "crossfader": [ + 0, + 64, + 127, + 0 + ], + "scene": [ + "0008", + "0308" + ], + "beats": [ + "0c0c0c0c0c0f0d0d0d0d0d0f0d0d0d0d0d0f0d0d0d0d0d0f", + "0d0d0d0d0d0f0c0c0c0c0c0f0d0d0d0d0d0f0d0d0d0d0d0f" + ], + "lock": { + "part": [ + "20f4e86ac989d57c7b4e12ccf4e2c37fb0dbb6663597db63e75991e1bab6f436", + "e81d8c06f44cc028ddc5a5be10a4b4b4ec2f3d8699612dbf321aa4219117a3fd" + ], + "pattern": "5e5298575f9f75623d99981391b4b722cc16cee4fc72e1aae5fcb9ad2bef7070" + } + }, + "free_before_after": 786432, + "composed_frames": { + "first-arr": "0dcc1372cf4e2a807a1b2e6f055e9f922ea1633d61774bba8c1c8f41030b154e", + "setup": "b79b41530148e5bfe0e445877c2680956bb8b69a4e6b114d94eba3ecf67d44eb", + "clip": "3ddcfd6ee9070f7bca1d69e364fb06e4ab03cd717b38b3e322665bc576704bb9", + "row": "94354e45a1568b5e009b22e2dbfdf29d6734b8998470be81f13a92c9658228aa", + "s03-scene": "92e1f9609e6727a92a0383843f87a44594db4d2c4fa330305aac59ba8c294ed2", + "s03-clip-playing": "298d0fd5e4e93bd3cd86fe4e791d59d4118701cb2c4393797389aed3d26a9179", + "s03-pause": "7801cd4d1dcd45d34d855bc8eff149e14f7b0050196608c80162e7355d81fe4a", + "s03-cell-pending": "1e2f3756bccc05f6a8adc0ae4745b8fabdfbfd151bf352b174952c82b88d9eaf", + "s03-lock-note": "be75ea37b88d64bf47ffa65b97a3373480ecb23a32838a1c6d38b587abe9401b" + } +} diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-02/row.png b/sdk/octatrack/modules/clyps/evidence/native-ui-02/row.png new file mode 100644 index 0000000000..7bcdc03fa3 Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-02/row.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-02/s03-cell-pending.png b/sdk/octatrack/modules/clyps/evidence/native-ui-02/s03-cell-pending.png new file mode 100644 index 0000000000..6021776717 Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-02/s03-cell-pending.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-02/s03-clip-playing.png b/sdk/octatrack/modules/clyps/evidence/native-ui-02/s03-clip-playing.png new file mode 100644 index 0000000000..185faaca8b Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-02/s03-clip-playing.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-02/s03-lock-note.png b/sdk/octatrack/modules/clyps/evidence/native-ui-02/s03-lock-note.png new file mode 100644 index 0000000000..6e794683c3 Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-02/s03-lock-note.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-02/s03-pause.png b/sdk/octatrack/modules/clyps/evidence/native-ui-02/s03-pause.png new file mode 100644 index 0000000000..d7f8b440f2 Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-02/s03-pause.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-02/s03-scene.png b/sdk/octatrack/modules/clyps/evidence/native-ui-02/s03-scene.png new file mode 100644 index 0000000000..e97f3cce3d Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-02/s03-scene.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-02/setup.png b/sdk/octatrack/modules/clyps/evidence/native-ui-02/setup.png new file mode 100644 index 0000000000..5fcdcae685 Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-02/setup.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-03/a2-clip-empty-track.png b/sdk/octatrack/modules/clyps/evidence/native-ui-03/a2-clip-empty-track.png new file mode 100644 index 0000000000..7b39d1b911 Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-03/a2-clip-empty-track.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-03/a2-clip-muted.png b/sdk/octatrack/modules/clyps/evidence/native-ui-03/a2-clip-muted.png new file mode 100644 index 0000000000..1beeaf383c Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-03/a2-clip-muted.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-03/a2-clip-pending.png b/sdk/octatrack/modules/clyps/evidence/native-ui-03/a2-clip-pending.png new file mode 100644 index 0000000000..ae61cfc381 Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-03/a2-clip-pending.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-03/a2-clip-playing.png b/sdk/octatrack/modules/clyps/evidence/native-ui-03/a2-clip-playing.png new file mode 100644 index 0000000000..7df3aad7c1 Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-03/a2-clip-playing.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-03/a2-first-clip.png b/sdk/octatrack/modules/clyps/evidence/native-ui-03/a2-first-clip.png new file mode 100644 index 0000000000..5d396dcd44 Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-03/a2-first-clip.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-03/a2-panorama-muted.png b/sdk/octatrack/modules/clyps/evidence/native-ui-03/a2-panorama-muted.png new file mode 100644 index 0000000000..a35e696065 Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-03/a2-panorama-muted.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-03/a2-row-focus-footer.png b/sdk/octatrack/modules/clyps/evidence/native-ui-03/a2-row-focus-footer.png new file mode 100644 index 0000000000..626b8d2ca8 Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-03/a2-row-focus-footer.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-03/a2-stock-message.png b/sdk/octatrack/modules/clyps/evidence/native-ui-03/a2-stock-message.png new file mode 100644 index 0000000000..b8d09c076c Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-03/a2-stock-message.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-03/a2-tempo-closed.png b/sdk/octatrack/modules/clyps/evidence/native-ui-03/a2-tempo-closed.png new file mode 100644 index 0000000000..42d34d0157 Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-03/a2-tempo-closed.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-03/a2-tempo-popup.png b/sdk/octatrack/modules/clyps/evidence/native-ui-03/a2-tempo-popup.png new file mode 100644 index 0000000000..814761a797 Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-03/a2-tempo-popup.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-03/build.json b/sdk/octatrack/modules/clyps/evidence/native-ui-03/build.json new file mode 100644 index 0000000000..e99e2459d5 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/native-ui-03/build.json @@ -0,0 +1,26 @@ +{ + "sha256": "2a9b497e29935d2869d27d6f3ca956fbe8b6bed2afef5f6ee9cc5aacaa060c17", + "offsets": { + "clyps_project_init": 6906, + "playing": 13872, + "requested": 13868, + "defined": 13802, + "last_row": 13754, + "pending_row": 13750, + "view": 13746, + "slot": 13774, + "track": 13794, + "src_cursor": 13758, + "mode": 13742, + "locked": 13762, + "lock_note": 13734, + "last_view": 13640, + "operation": 13738, + "org_play": 13706, + "org_req": 13698, + "occ": 13662, + "usable": 13660, + "occ_known": 13652, + "seen_stock": 13636 + } +} \ No newline at end of file diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-03/clip.png b/sdk/octatrack/modules/clyps/evidence/native-ui-03/clip.png new file mode 100644 index 0000000000..dee0e7b198 Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-03/clip.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-03/first-arr.png b/sdk/octatrack/modules/clyps/evidence/native-ui-03/first-arr.png new file mode 100644 index 0000000000..f0f02b0b1c Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-03/first-arr.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-03/replay.json b/sdk/octatrack/modules/clyps/evidence/native-ui-03/replay.json new file mode 100644 index 0000000000..a9de2d11ec --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/native-ui-03/replay.json @@ -0,0 +1,473 @@ +{ + "module": "2a9b497e29935d2869d27d6f3ca956fbe8b6bed2afef5f6ee9cc5aacaa060c17", + "observations": [ + [ + "A2 first entry opens Clip View", + { + "view": 2, + "mode": 1, + "playing": 0 + } + ], + [ + "open row", + { + "view": 1, + "mode": 1, + "playing": 0 + } + ], + [ + "cursor row 2, T2 through the stock tab", + { + "slot": 1, + "track": 1, + "playing": 0 + } + ], + [ + "capture R02", + { + "defined": 2, + "last_row": 0 + } + ], + [ + "T2 selects A02", + { + "view": 2, + "track": 1, + "src_cursor": 1, + "playing": 16 + } + ], + [ + "capture R05", + { + "view": 1, + "defined": 18, + "slot": 4, + "last_row": 0 + } + ], + [ + "advance to R02 independently of cursor", + { + "playing": 0, + "last_row": 2, + "slot": 4 + } + ], + [ + "advance to R05", + { + "playing": 16, + "last_row": 5 + } + ], + [ + "end retains R05", + { + "playing": 16, + "last_row": 5 + } + ], + [ + "override T2 retains path", + { + "playing": 32, + "last_row": 5 + } + ], + [ + "direct R02 pending during play", + { + "playing": 32, + "pending_row": 2, + "last_row": 5 + } + ], + [ + "STOP cancels pending", + { + "playing": 32, + "requested": 32, + "pending_row": 0, + "last_row": 5 + } + ], + [ + "exit with foreign edit lock", + { + "view": 0, + "locked": 1 + } + ], + [ + "stopped restore", + { + "playing": 0, + "requested": 0, + "last_row": 0, + "mode": 0 + } + ], + [ + "S03 ARR returns to the remembered Panorama", + { + "view": 1, + "mode": 1, + "locked": 0 + } + ], + [ + "S03 crossfader under Panorama", + { + "view": 1 + } + ], + [ + "S03 Scene A under Panorama, no launch", + { + "view": 1, + "playing": 0, + "requested": 0 + } + ], + [ + "S03 Clip", + { + "view": 2 + } + ], + [ + "S03 pause keeps the pending Row", + { + "view": 1, + "pending_row": 5, + "playing": 0, + "last_row": 0 + } + ], + [ + "S03 resume commits at the next boundary", + { + "pending_row": 0, + "last_row": 5, + "playing": 16 + } + ], + [ + "S03 T3 + TRIG 2: cell from R02", + { + "requested": 16, + "org_req": 84018437, + "pending_row": 0, + "last_row": 5 + } + ], + [ + "S03 T2 + TRIG 2: second cell pending", + { + "requested": 0, + "playing": 16, + "org_req": 84017669, + "org_play": 84215045, + "last_row": 5 + } + ], + [ + "S03 cells commit, path unchanged", + { + "playing": 0, + "org_play": 84017669, + "last_row": 5, + "pending_row": 0 + } + ], + [ + "S03 Row Advance ends after R05", + { + "last_row": 5, + "pending_row": 0 + } + ], + [ + "S03 T2 A02 from R05", + { + "playing": 16 + } + ], + [ + "S03 native with foreign sources", + { + "view": 0, + "locked": 1 + } + ], + [ + "S03 AMP page passes", + { + "locked": 1, + "lock_note": 0 + } + ], + [ + "S03 trig edit held under the lock", + { + "lock_note": 1, + "playing": 16 + } + ], + [ + "S03 Clip remembered", + { + "view": 2 + } + ], + [ + "S03 AMP page from Clip", + { + "view": 0, + "locked": 1 + } + ], + [ + "S03 ARR back to Clip", + { + "view": 2 + } + ], + [ + "S03 stop and restore home", + { + "playing": 0, + "requested": 0, + "last_row": 0, + "mode": 0 + } + ], + [ + "A2 reference at home", + { + "mode": 0, + "playing": 0, + "requested": 0 + } + ], + [ + "A2 Clip before FUNC+T2", + { + "view": 2, + "mode": 1 + } + ], + [ + "A2 Clip FUNC+T2 mutes through the stock", + { + "view": 2, + "mode": 1 + } + ], + [ + "A2 Clip FUNC alone stays", + { + "view": 2, + "mode": 1 + } + ], + [ + "A2 Panorama before FUNC+T2", + { + "view": 1, + "mode": 1 + } + ], + [ + "A2 Panorama FUNC+T2 mutes through the stock", + { + "view": 1, + "mode": 1 + } + ], + [ + "A2 Panorama FUNC alone stays", + { + "view": 1, + "mode": 1 + } + ], + [ + "A2 Clip before TEMPO", + { + "view": 2, + "mode": 1 + } + ], + [ + "A2 TEMPO keeps CLYPS", + { + "view": 2, + "mode": 1 + } + ], + [ + "A2 back in Clip after TEMPO", + { + "view": 2, + "mode": 1 + } + ], + [ + "A2 Clip T6 empty slots", + { + "view": 2, + "track": 5 + } + ], + [ + "A2 empty slot reachable", + { + "src_cursor": 1 + } + ], + [ + "A2 back from the stock message", + { + "view": 2, + "mode": 1 + } + ], + [ + "A2 Panorama", + { + "view": 1, + "track": 0 + } + ], + [ + "A2 FUNC+LEVEL moves the column only", + { + "view": 1, + "track": 3, + "playing": 0 + } + ], + [ + "A2 TRACK takes the column back", + { + "track": 0 + } + ], + [ + "A2 stop and restore home", + { + "playing": 0, + "requested": 0, + "mode": 0 + } + ] + ], + "alpha2_occupancy": { + "occ": [ + 7, + 7, + 7, + 0, + 0, + 0, + 0, + 0 + ], + "usable": 65535 + }, + "sprint03": { + "crossfader": [ + 0, + 64, + 127, + 0 + ], + "scene": [ + "0008", + "0308" + ], + "beats": [ + "0c0c0c0c0c0f0d0d0d0d0d0f0d0d0d0d0d0f0d0d0d0d0d0f", + "0d0d0d0d0d0f0c0c0c0c0c0f0d0d0d0d0d0f0d0d0d0d0d0f" + ], + "lock": { + "part": [ + "20f4e86ac989d57c7b4e12ccf4e2c37fb0dbb6663597db63e75991e1bab6f436", + "e81d8c06f44cc028ddc5a5be10a4b4b4ec2f3d8699612dbf321aa4219117a3fd" + ], + "pattern": "5e5298575f9f75623d99981391b4b722cc16cee4fc72e1aae5fcb9ad2bef7070" + } + }, + "alpha2": { + "mute_reference": { + "0x8000000a": [ + 8, + 10 + ], + "0x8000546a": [ + 108, + 0 + ], + "0x800054ea": [ + 108, + 0 + ], + "0x8000556a": [ + 108, + 0 + ], + "0x800055ea": [ + 108, + 0 + ] + }, + "tempo": { + "windows": { + "0x460d1e70": 0, + "0x460d175c": 1187500876, + "0x460e70e0": 0, + "0x460e5e30": 0, + "0x460e5cd0": 0, + "0x460d16a0": 1187500876 + }, + "before": 2880, + "after": 2976 + }, + "stock_message_after_track": true, + "focus": { + "slot": 5, + "track": 3 + }, + "pending_pulse": [ + "ffffffffefe0e0efff63616c6e6ffffcfcfde0e0ffefffe0eee0ffff", + "ffffffffefe0e0efffe3e1eceeefff7c7c7d6060ffefffe0eee0ffff" + ] + }, + "free_before_after": 786432, + "composed_frames": { + "a2-first-clip": "374cbdd12143effd6cf8d32e8287124b35a0cc4ad0c3164f17e637578aaafd3d", + "first-arr": "fc4586e971fdc1a2b06b8543a404e7f932e1141eee5d8d3d300d9d58d8dfbd86", + "setup": "d0751ac887ca9cf603e02c77ab9715ffdd7a9beba6f7a34a0aedbfe7dcb7975d", + "clip": "e90ea3a7cdbae46684f4bb97b82b192432532dc28ce18c909b7ad9626f2a7267", + "row": "a4dd7555f6a9688d4902ac67fa352a51dfc971177d63d7f75c2b20fcad828daf", + "s03-scene": "0bb08de7be1e843abb0663efef86c387fdf9cb30dfb1efde2cdb75b866542eaf", + "s03-clip-playing": "afa51eb23e018fa5b0da4e518abc825261f1d232e9ca14033af537c900789505", + "s03-pause": "401cf0ff28658af7e941e17d9c73dca387527b1432b94ad8b660b868c826d230", + "s03-cell-pending": "498fb490071efa87c3ec90495733532f2ffbab390934afe83ea8d006182413ee", + "s03-lock-note": "f61efa898f710209926723d83918c3f9ace5eeda85c66f4e92b71a0d8554950e", + "a2-clip-muted": "7a6010706837e2a44bd3ab9179fd143847f4ecbad283db916aa38379d5b37268", + "a2-panorama-muted": "411b5584d4b18d7ed48ceb9bfcfea2dba489b8634893309502f81d47991aea25", + "a2-tempo-popup": "335da269d1b07e8eeb60547dc0b73eb0f787f04265450e058510cd1f2753d0c1", + "a2-tempo-closed": "0f52d8c8b0408d9dc81a1ddcca2b3901f85c0780469e05b37638aeb3d29692d7", + "a2-clip-empty-track": "4e4ee04ff2f6ca1e58a4cc4f708f79c685514d5ef96537e37ed5c172d235e5bc", + "a2-row-focus-footer": "4bd9d3ed566a71815b7302dfe7bcc27c2fa94381ad9ff1eaa948b7c50c0dffbf", + "a2-clip-pending": "8f06d71965e87564b56f353753a66c739f59f68628869d8bbcdd27c545e1ede8", + "a2-clip-playing": "e38c4dec15e9a8d84c0e919155b09041f5a5598ebaac6b62a513b736e86ded8c" + } +} diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-03/row.png b/sdk/octatrack/modules/clyps/evidence/native-ui-03/row.png new file mode 100644 index 0000000000..3e68bdcfce Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-03/row.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-03/s03-cell-pending.png b/sdk/octatrack/modules/clyps/evidence/native-ui-03/s03-cell-pending.png new file mode 100644 index 0000000000..5dbfd16238 Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-03/s03-cell-pending.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-03/s03-clip-playing.png b/sdk/octatrack/modules/clyps/evidence/native-ui-03/s03-clip-playing.png new file mode 100644 index 0000000000..01127c09c3 Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-03/s03-clip-playing.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-03/s03-lock-note.png b/sdk/octatrack/modules/clyps/evidence/native-ui-03/s03-lock-note.png new file mode 100644 index 0000000000..af1dc723d9 Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-03/s03-lock-note.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-03/s03-pause.png b/sdk/octatrack/modules/clyps/evidence/native-ui-03/s03-pause.png new file mode 100644 index 0000000000..c313e4345f Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-03/s03-pause.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-03/s03-scene.png b/sdk/octatrack/modules/clyps/evidence/native-ui-03/s03-scene.png new file mode 100644 index 0000000000..bcec24bbe6 Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-03/s03-scene.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-03/setup.png b/sdk/octatrack/modules/clyps/evidence/native-ui-03/setup.png new file mode 100644 index 0000000000..28e7c4cae8 Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-03/setup.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-04/a2-clip-empty-track.png b/sdk/octatrack/modules/clyps/evidence/native-ui-04/a2-clip-empty-track.png new file mode 100644 index 0000000000..7b39d1b911 Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-04/a2-clip-empty-track.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-04/a2-clip-muted.png b/sdk/octatrack/modules/clyps/evidence/native-ui-04/a2-clip-muted.png new file mode 100644 index 0000000000..1beeaf383c Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-04/a2-clip-muted.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-04/a2-clip-pending.png b/sdk/octatrack/modules/clyps/evidence/native-ui-04/a2-clip-pending.png new file mode 100644 index 0000000000..ae61cfc381 Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-04/a2-clip-pending.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-04/a2-clip-playing.png b/sdk/octatrack/modules/clyps/evidence/native-ui-04/a2-clip-playing.png new file mode 100644 index 0000000000..7df3aad7c1 Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-04/a2-clip-playing.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-04/a2-first-clip.png b/sdk/octatrack/modules/clyps/evidence/native-ui-04/a2-first-clip.png new file mode 100644 index 0000000000..5d396dcd44 Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-04/a2-first-clip.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-04/a2-panorama-muted.png b/sdk/octatrack/modules/clyps/evidence/native-ui-04/a2-panorama-muted.png new file mode 100644 index 0000000000..a35e696065 Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-04/a2-panorama-muted.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-04/a2-row-focus-footer.png b/sdk/octatrack/modules/clyps/evidence/native-ui-04/a2-row-focus-footer.png new file mode 100644 index 0000000000..626b8d2ca8 Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-04/a2-row-focus-footer.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-04/a2-stock-message.png b/sdk/octatrack/modules/clyps/evidence/native-ui-04/a2-stock-message.png new file mode 100644 index 0000000000..b8d09c076c Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-04/a2-stock-message.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-04/a2-tempo-closed.png b/sdk/octatrack/modules/clyps/evidence/native-ui-04/a2-tempo-closed.png new file mode 100644 index 0000000000..42d34d0157 Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-04/a2-tempo-closed.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-04/a2-tempo-popup.png b/sdk/octatrack/modules/clyps/evidence/native-ui-04/a2-tempo-popup.png new file mode 100644 index 0000000000..814761a797 Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-04/a2-tempo-popup.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-04/build.json b/sdk/octatrack/modules/clyps/evidence/native-ui-04/build.json new file mode 100644 index 0000000000..89c58d7dc7 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/native-ui-04/build.json @@ -0,0 +1,28 @@ +{ + "sha256": "d5c3e8864ce590bbde8e4d586074552f83cf3f897b60e32b64e90fe83e2742fd", + "offsets": { + "clyps_project_init": 7042, + "playing": 14068, + "requested": 14064, + "defined": 13998, + "last_row": 13950, + "pending_row": 13946, + "view": 13942, + "slot": 13970, + "track": 13990, + "src_cursor": 13954, + "mode": 13938, + "locked": 13958, + "lock_note": 13930, + "last_view": 13832, + "operation": 13934, + "org_play": 13902, + "org_req": 13894, + "occ": 13854, + "usable": 13852, + "occ_known": 13844, + "seen_stock": 13828, + "rows": 14000, + "bank_uncertain": 13878 + } +} \ No newline at end of file diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-04/clip.png b/sdk/octatrack/modules/clyps/evidence/native-ui-04/clip.png new file mode 100644 index 0000000000..dee0e7b198 Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-04/clip.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-04/first-arr.png b/sdk/octatrack/modules/clyps/evidence/native-ui-04/first-arr.png new file mode 100644 index 0000000000..f0f02b0b1c Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-04/first-arr.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-04/reload-missing.json b/sdk/octatrack/modules/clyps/evidence/native-ui-04/reload-missing.json new file mode 100644 index 0000000000..255aa1339d --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/native-ui-04/reload-missing.json @@ -0,0 +1 @@ +{"bank": 0, "defined": 8, "active": 1, "observed": [false, false, false], "rows_sha256": "635fb96bfc2afdbd8f739fb8f57d1561af66f5e545386857226684ca0847655f", "uncertain": 0, "off_pool": 786432} \ No newline at end of file diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-04/reload-stored.json b/sdk/octatrack/modules/clyps/evidence/native-ui-04/reload-stored.json new file mode 100644 index 0000000000..12d4a7f41d --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/native-ui-04/reload-stored.json @@ -0,0 +1 @@ +{"bank": 1, "defined": 8, "active": 1, "observed": [true, true, true], "rows_sha256": "635fb96bfc2afdbd8f739fb8f57d1561af66f5e545386857226684ca0847655f", "uncertain": 1, "off_pool": 786432} \ No newline at end of file diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-04/replay.json b/sdk/octatrack/modules/clyps/evidence/native-ui-04/replay.json new file mode 100644 index 0000000000..701dc07ae1 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/native-ui-04/replay.json @@ -0,0 +1,473 @@ +{ + "module": "d5c3e8864ce590bbde8e4d586074552f83cf3f897b60e32b64e90fe83e2742fd", + "observations": [ + [ + "A2 first entry opens Clip View", + { + "view": 2, + "mode": 1, + "playing": 0 + } + ], + [ + "open row", + { + "view": 1, + "mode": 1, + "playing": 0 + } + ], + [ + "cursor row 2, T2 through the stock tab", + { + "slot": 1, + "track": 1, + "playing": 0 + } + ], + [ + "capture R02", + { + "defined": 2, + "last_row": 0 + } + ], + [ + "T2 selects A02", + { + "view": 2, + "track": 1, + "src_cursor": 1, + "playing": 16 + } + ], + [ + "capture R05", + { + "view": 1, + "defined": 18, + "slot": 4, + "last_row": 0 + } + ], + [ + "advance to R02 independently of cursor", + { + "playing": 0, + "last_row": 2, + "slot": 4 + } + ], + [ + "advance to R05", + { + "playing": 16, + "last_row": 5 + } + ], + [ + "end retains R05", + { + "playing": 16, + "last_row": 5 + } + ], + [ + "override T2 retains path", + { + "playing": 32, + "last_row": 5 + } + ], + [ + "direct R02 pending during play", + { + "playing": 32, + "pending_row": 2, + "last_row": 5 + } + ], + [ + "STOP cancels pending", + { + "playing": 32, + "requested": 32, + "pending_row": 0, + "last_row": 5 + } + ], + [ + "exit with foreign edit lock", + { + "view": 0, + "locked": 1 + } + ], + [ + "stopped restore", + { + "playing": 0, + "requested": 0, + "last_row": 0, + "mode": 0 + } + ], + [ + "S03 ARR returns to the remembered Panorama", + { + "view": 1, + "mode": 1, + "locked": 0 + } + ], + [ + "S03 crossfader under Panorama", + { + "view": 1 + } + ], + [ + "S03 Scene A under Panorama, no launch", + { + "view": 1, + "playing": 0, + "requested": 0 + } + ], + [ + "S03 Clip", + { + "view": 2 + } + ], + [ + "S03 pause keeps the pending Row", + { + "view": 1, + "pending_row": 5, + "playing": 0, + "last_row": 0 + } + ], + [ + "S03 resume commits at the next boundary", + { + "pending_row": 0, + "last_row": 5, + "playing": 16 + } + ], + [ + "S03 T3 + TRIG 2: cell from R02", + { + "requested": 16, + "org_req": 84018437, + "pending_row": 0, + "last_row": 5 + } + ], + [ + "S03 T2 + TRIG 2: second cell pending", + { + "requested": 0, + "playing": 16, + "org_req": 84017669, + "org_play": 84215045, + "last_row": 5 + } + ], + [ + "S03 cells commit, path unchanged", + { + "playing": 0, + "org_play": 84017669, + "last_row": 5, + "pending_row": 0 + } + ], + [ + "S03 Row Advance ends after R05", + { + "last_row": 5, + "pending_row": 0 + } + ], + [ + "S03 T2 A02 from R05", + { + "playing": 16 + } + ], + [ + "S03 native with foreign sources", + { + "view": 0, + "locked": 1 + } + ], + [ + "S03 AMP page passes", + { + "locked": 1, + "lock_note": 0 + } + ], + [ + "S03 trig edit held under the lock", + { + "lock_note": 1, + "playing": 16 + } + ], + [ + "S03 Clip remembered", + { + "view": 2 + } + ], + [ + "S03 AMP page from Clip", + { + "view": 0, + "locked": 1 + } + ], + [ + "S03 ARR back to Clip", + { + "view": 2 + } + ], + [ + "S03 stop and restore home", + { + "playing": 0, + "requested": 0, + "last_row": 0, + "mode": 0 + } + ], + [ + "A2 reference at home", + { + "mode": 0, + "playing": 0, + "requested": 0 + } + ], + [ + "A2 Clip before FUNC+T2", + { + "view": 2, + "mode": 1 + } + ], + [ + "A2 Clip FUNC+T2 mutes through the stock", + { + "view": 2, + "mode": 1 + } + ], + [ + "A2 Clip FUNC alone stays", + { + "view": 2, + "mode": 1 + } + ], + [ + "A2 Panorama before FUNC+T2", + { + "view": 1, + "mode": 1 + } + ], + [ + "A2 Panorama FUNC+T2 mutes through the stock", + { + "view": 1, + "mode": 1 + } + ], + [ + "A2 Panorama FUNC alone stays", + { + "view": 1, + "mode": 1 + } + ], + [ + "A2 Clip before TEMPO", + { + "view": 2, + "mode": 1 + } + ], + [ + "A2 TEMPO keeps CLYPS", + { + "view": 2, + "mode": 1 + } + ], + [ + "A2 back in Clip after TEMPO", + { + "view": 2, + "mode": 1 + } + ], + [ + "A2 Clip T6 empty slots", + { + "view": 2, + "track": 5 + } + ], + [ + "A2 empty slot reachable", + { + "src_cursor": 1 + } + ], + [ + "A2 back from the stock message", + { + "view": 2, + "mode": 1 + } + ], + [ + "A2 Panorama", + { + "view": 1, + "track": 0 + } + ], + [ + "A2 FUNC+LEVEL moves the column only", + { + "view": 1, + "track": 3, + "playing": 0 + } + ], + [ + "A2 TRACK takes the column back", + { + "track": 0 + } + ], + [ + "A2 stop and restore home", + { + "playing": 0, + "requested": 0, + "mode": 0 + } + ] + ], + "alpha2_occupancy": { + "occ": [ + 7, + 7, + 7, + 0, + 0, + 0, + 0, + 0 + ], + "usable": 65535 + }, + "sprint03": { + "crossfader": [ + 0, + 64, + 127, + 0 + ], + "scene": [ + "0008", + "0308" + ], + "beats": [ + "0c0c0c0c0c0f0d0d0d0d0d0f0d0d0d0d0d0f0d0d0d0d0d0f", + "0d0d0d0d0d0f0c0c0c0c0c0f0d0d0d0d0d0f0d0d0d0d0d0f" + ], + "lock": { + "part": [ + "20f4e86ac989d57c7b4e12ccf4e2c37fb0dbb6663597db63e75991e1bab6f436", + "e81d8c06f44cc028ddc5a5be10a4b4b4ec2f3d8699612dbf321aa4219117a3fd" + ], + "pattern": "5e5298575f9f75623d99981391b4b722cc16cee4fc72e1aae5fcb9ad2bef7070" + } + }, + "alpha2": { + "mute_reference": { + "0x8000000a": [ + 8, + 10 + ], + "0x8000546a": [ + 108, + 0 + ], + "0x800054ea": [ + 108, + 0 + ], + "0x8000556a": [ + 108, + 0 + ], + "0x800055ea": [ + 108, + 0 + ] + }, + "tempo": { + "windows": { + "0x460d1e70": 0, + "0x460d175c": 1187500876, + "0x460e70e0": 0, + "0x460e5e30": 0, + "0x460e5cd0": 0, + "0x460d16a0": 1187500876 + }, + "before": 2880, + "after": 2976 + }, + "stock_message_after_track": true, + "focus": { + "slot": 5, + "track": 3 + }, + "pending_pulse": [ + "ffffffffefe0e0efff63616c6e6ffffcfcfde0e0ffefffe0eee0ffff", + "ffffffffefe0e0efffe3e1eceeefff7c7c7d6060ffefffe0eee0ffff" + ] + }, + "free_before_after": 786432, + "composed_frames": { + "a2-first-clip": "374cbdd12143effd6cf8d32e8287124b35a0cc4ad0c3164f17e637578aaafd3d", + "first-arr": "fc4586e971fdc1a2b06b8543a404e7f932e1141eee5d8d3d300d9d58d8dfbd86", + "setup": "d0751ac887ca9cf603e02c77ab9715ffdd7a9beba6f7a34a0aedbfe7dcb7975d", + "clip": "e90ea3a7cdbae46684f4bb97b82b192432532dc28ce18c909b7ad9626f2a7267", + "row": "a4dd7555f6a9688d4902ac67fa352a51dfc971177d63d7f75c2b20fcad828daf", + "s03-scene": "0bb08de7be1e843abb0663efef86c387fdf9cb30dfb1efde2cdb75b866542eaf", + "s03-clip-playing": "afa51eb23e018fa5b0da4e518abc825261f1d232e9ca14033af537c900789505", + "s03-pause": "401cf0ff28658af7e941e17d9c73dca387527b1432b94ad8b660b868c826d230", + "s03-cell-pending": "498fb490071efa87c3ec90495733532f2ffbab390934afe83ea8d006182413ee", + "s03-lock-note": "f61efa898f710209926723d83918c3f9ace5eeda85c66f4e92b71a0d8554950e", + "a2-clip-muted": "7a6010706837e2a44bd3ab9179fd143847f4ecbad283db916aa38379d5b37268", + "a2-panorama-muted": "411b5584d4b18d7ed48ceb9bfcfea2dba489b8634893309502f81d47991aea25", + "a2-tempo-popup": "335da269d1b07e8eeb60547dc0b73eb0f787f04265450e058510cd1f2753d0c1", + "a2-tempo-closed": "0f52d8c8b0408d9dc81a1ddcca2b3901f85c0780469e05b37638aeb3d29692d7", + "a2-clip-empty-track": "4e4ee04ff2f6ca1e58a4cc4f708f79c685514d5ef96537e37ed5c172d235e5bc", + "a2-row-focus-footer": "4bd9d3ed566a71815b7302dfe7bcc27c2fa94381ad9ff1eaa948b7c50c0dffbf", + "a2-clip-pending": "8f06d71965e87564b56f353753a66c739f59f68628869d8bbcdd27c545e1ede8", + "a2-clip-playing": "e38c4dec15e9a8d84c0e919155b09041f5a5598ebaac6b62a513b736e86ded8c" + } +} diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-04/row.png b/sdk/octatrack/modules/clyps/evidence/native-ui-04/row.png new file mode 100644 index 0000000000..3e68bdcfce Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-04/row.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-04/s03-cell-pending.png b/sdk/octatrack/modules/clyps/evidence/native-ui-04/s03-cell-pending.png new file mode 100644 index 0000000000..5dbfd16238 Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-04/s03-cell-pending.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-04/s03-clip-playing.png b/sdk/octatrack/modules/clyps/evidence/native-ui-04/s03-clip-playing.png new file mode 100644 index 0000000000..01127c09c3 Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-04/s03-clip-playing.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-04/s03-lock-note.png b/sdk/octatrack/modules/clyps/evidence/native-ui-04/s03-lock-note.png new file mode 100644 index 0000000000..af1dc723d9 Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-04/s03-lock-note.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-04/s03-pause.png b/sdk/octatrack/modules/clyps/evidence/native-ui-04/s03-pause.png new file mode 100644 index 0000000000..c313e4345f Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-04/s03-pause.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-04/s03-scene.png b/sdk/octatrack/modules/clyps/evidence/native-ui-04/s03-scene.png new file mode 100644 index 0000000000..bcec24bbe6 Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-04/s03-scene.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/native-ui-04/setup.png b/sdk/octatrack/modules/clyps/evidence/native-ui-04/setup.png new file mode 100644 index 0000000000..28e7c4cae8 Binary files /dev/null and b/sdk/octatrack/modules/clyps/evidence/native-ui-04/setup.png differ diff --git a/sdk/octatrack/modules/clyps/evidence/nov23-reliability.json b/sdk/octatrack/modules/clyps/evidence/nov23-reliability.json new file mode 100644 index 0000000000..e561ef9fef --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/nov23-reliability.json @@ -0,0 +1,367 @@ +{ + "moduleSource": "8e19ccd65cccb4e7f7718ae80bf1637b9a797e02", + "cumulative": "c3706472be93ff0d02a7293412ab3992b3b60be7", + "previous": "b3184dd5e19caaae8c88e2e002c6ab5204ac27d6", + "candidate": "5c32cbacd2b1efea3d70e9b543a9a43cfe634651", + "configuration": "d7e727cd84cf2d99baf656acfc291db2912a756ae8a3857af89db2a5b658e6f0", + "module": "32ebca98345840f4e107550683f4fd14f2be35e5355df3d8933b7132f324aea9", + "main": "1f8e2e9ffd6919bafd6302fa4d61aeeab32e7349ee49ce159ab6a15d276f69d1", + "symbols": "7d63c1caf5d5968b373fd872438d5c2547193cc0dabe3946381bb2face5c86b4", + "buildProof": "34058e0462bde3ed4ae745b05b035d66877c5246262094a39e6334408ed740dd", + "card": "b110845a7a16e8ce0db58f9987249157275bb76fefe733acc82060265c96d0ba", + "negativeMain": "319e782c5a48430a656b9189f320a68933423098825a1f821af0fa10b4b2056e", + "emulator": "a1410ad471be5fbf0fee5e0865dbce9ec1ffcba1d4697aaa6e607943b5614a87", + "seed": "b29909a9bd931d4741f60d2ad33b94a0f514a0d35a49a9c2f7cda0d3ad8e88d7", + "identicalBuildOutputs": [ + "MAIN.raw", + "symbols.json", + "proofs.json", + "base.elemod" + ], + "nativeFixtureExitCodes": { + "arr": 0, + "change": 0, + "clock-stock": 0, + "clock": 0, + "default-stock": 0, + "default": 0, + "early-stock": 0, + "early": 1, + "fader": 0, + "home-stock": 0, + "home": 0, + "late-stock": 0, + "late": 1, + "midi-stock": 0, + "midi": 0, + "missing": 0, + "obs-stock": 0, + "obs": 0, + "original-stock": 0, + "original": 0, + "popup": 0, + "profile": 0, + "refusal": 0, + "scenes": 0, + "slice": 0, + "stock": 0, + "stop-stock": 0, + "stop": 0, + "stored-repeat": 0, + "voices-home": 0, + "voices-stock": 0, + "voices": 0 + }, + "matchedSlice": "Wrap 90, 384 ordered calls, 400 relative timestamp writes, pool 786432.", + "popup": { + "reopened": true, + "r04": 0, + "pool": 786432 + }, + "arranger": { + "events": 336, + "writes": 336, + "row": 1, + "pool": 786432, + "sha256": "2db4fed437f3f9095af9d085e956054a9538384b612b30a5433b01a34a70dbac" + }, + "comparisons": { + "obs": { + "events": { + "candidate": 624, + "stock": 624, + "mismatches": 0 + }, + "writes": { + "candidate": 608, + "stock": 608, + "mismatches": 0 + }, + "states": { + "candidate": 219, + "stock": 219, + "mismatches": 0, + "differingTicks": [] + } + }, + "clock": { + "events": { + "candidate": 624, + "stock": 624, + "mismatches": 0 + }, + "writes": { + "candidate": 608, + "stock": 608, + "mismatches": 0 + }, + "states": { + "candidate": 219, + "stock": 219, + "mismatches": 0, + "differingTicks": [] + } + }, + "original": { + "events": { + "candidate": 624, + "stock": 624, + "mismatches": 0 + }, + "writes": { + "candidate": 608, + "stock": 608, + "mismatches": 0 + }, + "states": { + "candidate": 219, + "stock": 219, + "mismatches": 1, + "differingTicks": [ + 193 + ] + } + }, + "default": { + "events": { + "candidate": 624, + "stock": 624, + "mismatches": 0 + }, + "writes": { + "candidate": 608, + "stock": 608, + "mismatches": 0 + }, + "states": { + "candidate": 219, + "stock": 219, + "mismatches": 0, + "differingTicks": [] + } + }, + "home": { + "events": { + "candidate": 624, + "stock": 624, + "mismatches": 0 + }, + "states": { + "candidate": 219, + "stock": 219, + "mismatches": 0, + "differingTicks": [] + } + }, + "stop": { + "events": { + "candidate": 544, + "stock": 544, + "mismatches": 0 + }, + "states": { + "candidate": 190, + "stock": 190, + "mismatches": 0, + "differingTicks": [] + } + } + }, + "traceDigests": { + "arr.json": "4f11f7019655baf3998789acb6d409a603e72d88199ec0747763caf0e4c77725", + "change.json": "2d813c4a03f03e2dfc525bd99fcecc1d03dc15619c62288ccdfe9a0835a3ef24", + "clock-report.json": "8389188a09f647edf7af85465fa889cf147cab9aec67296ee60ad98007eafa79", + "clock-stock.flags.json": "40d39b4a40773946ce0bc65701bc4b9f3f8f086192f48823dccec6cb73a4c6a5", + "clock-stock.json": "a1cef1580ff0597ecf540d28e2004abe79a8d9654c346eed4febb2b7e325fba6", + "clock.flags.json": "a5f84c953dc1266d939d6e7de2ea2b7620959124e12112a81f13f808d10268d2", + "clock.json": "a1cef1580ff0597ecf540d28e2004abe79a8d9654c346eed4febb2b7e325fba6", + "current-clock-report.json": "84802da7020eded23c28789088bdba0e30484a30738190b55a80c1df0472eeb0", + "default-stock.json": "a1cef1580ff0597ecf540d28e2004abe79a8d9654c346eed4febb2b7e325fba6", + "default.json": "a1cef1580ff0597ecf540d28e2004abe79a8d9654c346eed4febb2b7e325fba6", + "early-stock.json": "c5bda1d6b8832bdcc3b52586d33f0f5e4f43196f73c019a1835ee042b0295f85", + "early.phase-89.json": "a4764efaf7a34cd54e5a7a74aa7edbe308f150b6b67313fd5d9b4f98a15d8658", + "fader.json": "61341521d475e09d6692e6fe321900d5404d33e9fad9ca6123629bcbdfd826bb", + "home-stock.json": "8708d5a52fb5523a9f876d73a8902838f5f08ab8c1d9ae49e9bbdadf1d15ee89", + "home.json": "8708d5a52fb5523a9f876d73a8902838f5f08ab8c1d9ae49e9bbdadf1d15ee89", + "late-stock.json": "b51cc639a607a6ab9e4e26809623e3bb6a12bd96d0d8ef6da67c65be669c654a", + "late.json": "4d3f4326cd585236bf84fb38643f9e1799364b0e4b706345a1cf66c65c6aaf02", + "late.phase-187.json": "e8e1884197305e4833bdaa62ff6bd8f54050efb32f3790ea2dec45c707094a2b", + "late.phase-91.json": "377d36e48fefe56ec5ebd7bb0c71865297f80c4ce5b1c379dd1e1ea0c4ea1fd3", + "midi-stock-wire.json": "f92a56d068a450a3b7abb6dfbff1a8a4dabe325d2c1305b7ce1fb0eca0e95684", + "midi-stock.json": "c585aeb5c8e20940d98c930475a207e0d218e9e1a92ffdc33ef528be0e789587", + "midi-wire.json": "763282c322a79d1d8ce66915c284d0e5c22cdea4b02c4adfe27f060e7a633184", + "midi.json": "a44351ebcfc11dfd1ea1b5eec2acf64f404b7425cbd054a9737b7a27ab0e2eb5", + "missing.json": "570ad0762506540bfa23b3210518b391e5fccd1b1757f9dfdff8ca9b9f3d87d3", + "obs-stock.flags.json": "40d39b4a40773946ce0bc65701bc4b9f3f8f086192f48823dccec6cb73a4c6a5", + "obs-stock.json": "a1cef1580ff0597ecf540d28e2004abe79a8d9654c346eed4febb2b7e325fba6", + "obs.flags.json": "a5f84c953dc1266d939d6e7de2ea2b7620959124e12112a81f13f808d10268d2", + "obs.json": "a1cef1580ff0597ecf540d28e2004abe79a8d9654c346eed4febb2b7e325fba6", + "original-report.json": "9e69b0daabc6e1f1271cd17cce815426c05ad5f4ca0933671d8cf00ee739a8b6", + "original-stock.flags.json": "133be976428da4181d91f7da400f0345ef21fb65fe3a153eb057c995b81febd9", + "original-stock.json": "ea5bb7b2f1337d5553dfb63d71e685d54f0e7b4edfdb81b1e9cf4c16c88d05a0", + "original.flags.json": "6d32487f7f1b0fc18885ef7965f8a74d1913995738d158d4c9c61f75d1c4b0fd", + "original.json": "a1cef1580ff0597ecf540d28e2004abe79a8d9654c346eed4febb2b7e325fba6", + "popup.json": "4a6fee10669880b179edcab30a17cdde3d8beb6df82ab4a7bffa980f7fe3e6e4", + "profile.json": "344aabd817ec27cbc6a57bbd54125a8086f19baeeb04831d3f4bf5d9f9659611", + "refusal.json": "07afe51209ef57fbb09247fe258240eb5cfbeaa9439aaaa23ba9155eebc2cc9e", + "scenes.json": "51a91cbf7d260dde580252030b048523f9c315272813b5535a15fff4068c3446", + "slice.json": "c585aeb5c8e20940d98c930475a207e0d218e9e1a92ffdc33ef528be0e789587", + "stock.json": "c585aeb5c8e20940d98c930475a207e0d218e9e1a92ffdc33ef528be0e789587", + "stop-stock.json": "06019d95188c764f0c876e8c464432d4c0662b962ed9aebb7796327b2c24ed74", + "stop.json": "06019d95188c764f0c876e8c464432d4c0662b962ed9aebb7796327b2c24ed74", + "stored-repeat.json": "7abb52946765eae9c7e72f0a3cb81e0cfdb5ed5204304215731362850277ec33", + "stored.json": "7abb52946765eae9c7e72f0a3cb81e0cfdb5ed5204304215731362850277ec33", + "voices-home-wire.json": "a60a681f5f96df9cbb8ccc95418180ed42ed3ad32ed42fe924bd88e25f95fb05", + "voices-home-wire.off.json": "d663557b89306c9366710a33f7a62961ce497b2ce335d7234dd0b003eaa32648", + "voices-home.json": "8395cc1c362f3796babc00f0a05c0b44588b3b2573ed5f119d3351ed0c7c20a2", + "voices-stock-wire.json": "b874573e2d0a821d665cf7ad9b6f726addb72cfa65896dee0f022b7f78050928", + "voices-stock-wire.off.json": "721131f6535c3ebf9003a24742d1aafa51cd668e1bf95545888f8e3a1caeb3bc", + "voices-stock.json": "8395cc1c362f3796babc00f0a05c0b44588b3b2573ed5f119d3351ed0c7c20a2", + "voices-wire.json": "9d50cbde83c4ac45271fd81aab9b091bee975df684ca3deb160e2bc803bd4f71", + "voices-wire.off.json": "a2dec5b1c9a765c15d8704a9a037350dcfbab1e1fbea0657703397cce7e0600b", + "voices.json": "8395cc1c362f3796babc00f0a05c0b44588b3b2573ed5f119d3351ed0c7c20a2" + }, + "hostChecks": { + "draftDiscovery": 10, + "machineEvents": 20, + "compatibility": { + "catalogueModules": 44, + "pairs": 946, + "problems": 0, + "includesDraft": false + }, + "runtimeLoader": { + "run": 23, + "skipped": 2, + "failed": [ + "test_published_module_packages_rebuild_byte_for_byte: USB Audio event-header source hash" + ] + }, + "doctor": "ENOENT octamod.module.json" + }, + "negativeAdmission": { + "refusal": 259, + "before": { + "callbacks": [ + 0, + 0, + 0, + 0, + 0, + 0 + ], + "active": 0, + "pool": 786432, + "owners": 0 + }, + "after": { + "callbacks": [ + 0, + 0, + 0, + 0, + 0, + 0 + ], + "active": 0, + "pool": 786432, + "owners": 0 + } + }, + "peerExitCodes": { + "grain": 0, + "poly8": 0, + "vector": 0, + "pcm-flex": 0, + "pcm-static": 1, + "track-solo": 0, + "panel": 0, + "clyps-edit": 0 + }, + "peerReceiptSHA256": { + "peer-pcm-static": "70234dfc827e2c6b5a4662d134091e01c7bc75bd8128886bab7844d33deb3de1", + "peer-clyps-edit": "7e9781b155dc306459adc31cf7cd2d878a83035808d63cdc44bd9dacac183a4a", + "peer-grain": "e3c71ee17fa3e179f23d7fd9a3d72747779d1bd30bf06005c887b3675e7d1ad6", + "peer-track-solo": "bfefe3f48b2818cc6b401685634083bdccee9f4c5b2e2a0310424850ec5cad83", + "peer-poly8": "93739f0fc0f432b57e1413997d9e2a578c13e27fa69962d528ae53af3065d78d", + "peer-panel": "7dada3fbddef99ad1fb473f65349a3e60c4caa26d3fa9f03319d2c7a9f6fa9c0", + "peer-vector": "03ab940d1051410a2f5ada7c4bdd54606bb777054f8da1c324477be541910e2f", + "peer-pcm-flex": "09a2d1e7be3f290255fdb8a8ccfe132ff450eb91efd901dc2203076cd10caa15" + }, + "physicalHardware": "NOT TESTED", + "midi": { + "fixtureSHA256": "29c115b04bafd9cad7cb12becc3c896b0509dd179eae01df2d818c6f9772afac", + "scope": "Two FLEX voices and two stock MIDI tracks. Timestamp unit is emulator samples at 44.1 kHz.", + "active": { + "candidateBytes": 69, + "stockBytes": 70, + "additionalStockStatus": 144, + "additionalStockStatusIndex": 38, + "identicalDecodedMessages": 27, + "noteOnOffPairs": [ + 6, + 4 + ], + "cc1Locks": [ + 34, + 42 + ], + "maxRelativeMessageEndDeviationSamples": { + "stockGlobal": 48.1, + "stockHome": 64.1 + }, + "strict": "FAILED" + }, + "off": { + "identicalBytes": 69, + "identicalDecodedMessages": 26, + "maxRelativeMessageEndDeviationSamples": { + "stockGlobal": 7.3, + "stockHome": 8.7 + }, + "strict": "FAILED" + }, + "externalClock": "NOT TESTED", + "independentMIDILaunch": "NOT TESTED" + }, + "project": { + "change": { + "bank": 1, + "defined": 0, + "active": 1, + "observed": [ + true, + true, + true + ], + "off_pool": 786432 + }, + "stored": { + "bank": 1, + "defined": 0, + "active": 1, + "observed": [ + true, + true, + false + ], + "off_pool": 786432 + }, + "missing": { + "bank": 0, + "defined": 8, + "active": 1, + "observed": [ + false, + false, + false + ], + "off_pool": 786432 + }, + "lateFailure": "Production-callback host reproduction; proposed rollback host tested only." + }, + "boundaryDiagnostics": { + "early": "FAILED: RAM requested=273 by tick 89 +1 ms, diag=0 until wrap at +16 ms; fixture stopped at assertion", + "late": "FAILED: observed tick 187, expected 188; all 848 events, 816 writes and 298 states matched" + } +} diff --git a/sdk/octatrack/modules/clyps/evidence/performance-01/arranger.json b/sdk/octatrack/modules/clyps/evidence/performance-01/arranger.json new file mode 100644 index 0000000000..a3ca7e996b --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/performance-01/arranger.json @@ -0,0 +1 @@ +{"events": 336, "writes": 336, "row": 1, "pool": 786432, "sha256": "2db4fed437f3f9095af9d085e956054a9538384b612b30a5433b01a34a70dbac"} \ No newline at end of file diff --git a/sdk/octatrack/modules/clyps/evidence/performance-01/baseline-build.json b/sdk/octatrack/modules/clyps/evidence/performance-01/baseline-build.json new file mode 100644 index 0000000000..883fbae860 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/performance-01/baseline-build.json @@ -0,0 +1 @@ +{"sha256": "32ebca98345840f4e107550683f4fd14f2be35e5355df3d8933b7132f324aea9", "image": 5600, "bss": 176, "relocations": 248, "hooks": {"ev_bank_load": 40, "ev_bank_loaded": 41, "ev_project_new": 42, "ev_seq_wrap": 63, "ev_audio_seq_source": 64, "ot_modal_input": 65}} diff --git a/sdk/octatrack/modules/clyps/evidence/performance-01/build.json b/sdk/octatrack/modules/clyps/evidence/performance-01/build.json new file mode 100644 index 0000000000..c5c326f309 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/performance-01/build.json @@ -0,0 +1 @@ +{"sha256": "dea54e4f2ed47c01a8a7e277ceabf80a14b708ed0121c4bccc703094be7461b9", "image": 6464, "bss": 192, "relocations": 257, "hooks": {"ev_bank_load": 40, "ev_bank_loaded": 41, "ev_project_new": 42, "ev_seq_wrap": 63, "ev_audio_seq_source": 64, "ot_modal_input": 65}} diff --git a/sdk/octatrack/modules/clyps/evidence/performance-01/emulator-cost.json b/sdk/octatrack/modules/clyps/evidence/performance-01/emulator-cost.json new file mode 100644 index 0000000000..7e8f706d0c --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/performance-01/emulator-cost.json @@ -0,0 +1,282 @@ +{ + "empty-master": [ + [ + 64, + 64 + ], + [ + 56, + 64 + ], + [ + 64, + 64 + ] + ], + "empty-stopped": { + "mw_frame_skips": 0, + "mw_frame_sheds": 0, + "mw_frame_busy": 444778, + "mw_frame_count": 8356, + "instruction_spans": { + "boundary": { + "count": 0, + "minimum": null, + "maximum": null + }, + "source": { + "count": 0, + "minimum": null, + "maximum": null + } + }, + "frame_peak_timer_counts_since_boot": 21180, + "audio_lane_sources": [] + }, + "empty-light": { + "mw_frame_skips": 0, + "mw_frame_sheds": 0, + "mw_frame_busy": 480842, + "mw_frame_count": 8349, + "instruction_spans": { + "boundary": { + "count": 1, + "minimum": 12, + "maximum": 12 + }, + "source": { + "count": 192, + "minimum": 16, + "maximum": 16 + } + }, + "frame_peak_timer_counts_since_boot": 21180, + "audio_lane_sources": [ + [ + 0, + 0 + ], + [ + 1, + 0 + ], + [ + 2, + 0 + ], + [ + 3, + 0 + ], + [ + 4, + 0 + ], + [ + 5, + 0 + ], + [ + 6, + 0 + ], + [ + 7, + 0 + ] + ] + }, + "installed-master": [ + [ + 64, + 64 + ], + [ + 56, + 64 + ], + [ + 64, + 64 + ] + ], + "installed-stopped": { + "mw_frame_skips": 0, + "mw_frame_sheds": 0, + "mw_frame_busy": 482505, + "mw_frame_count": 8352, + "instruction_spans": { + "boundary": { + "count": 0, + "minimum": null, + "maximum": null + }, + "source": { + "count": 0, + "minimum": null, + "maximum": null + } + }, + "frame_peak_timer_counts_since_boot": 21180, + "audio_lane_sources": [] + }, + "installed-light": { + "mw_frame_skips": 0, + "mw_frame_sheds": 0, + "mw_frame_busy": 481188, + "mw_frame_count": 8347, + "instruction_spans": { + "boundary": { + "count": 1, + "minimum": 30, + "maximum": 30 + }, + "source": { + "count": 192, + "minimum": 31, + "maximum": 31 + } + }, + "frame_peak_timer_counts_since_boot": 21180, + "audio_lane_sources": [ + [ + 0, + 0 + ], + [ + 1, + 0 + ], + [ + 2, + 0 + ], + [ + 3, + 0 + ], + [ + 4, + 0 + ], + [ + 5, + 0 + ], + [ + 6, + 0 + ], + [ + 7, + 0 + ] + ] + }, + "installed-dense": { + "mw_frame_skips": 0, + "mw_frame_sheds": 0, + "mw_frame_busy": 524483, + "mw_frame_count": 8332, + "instruction_spans": { + "boundary": { + "count": 1, + "minimum": 544, + "maximum": 544 + }, + "source": { + "count": 192, + "minimum": 162, + "maximum": 162 + } + }, + "frame_peak_timer_counts_since_boot": 27822, + "audio_lane_sources": [ + [ + 0, + 1 + ], + [ + 1, + 1 + ], + [ + 2, + 1 + ], + [ + 3, + 1 + ], + [ + 4, + 1 + ], + [ + 5, + 1 + ], + [ + 6, + 1 + ], + [ + 7, + 1 + ] + ] + }, + "empty-dense": { + "mw_frame_skips": 0, + "mw_frame_sheds": 0, + "mw_frame_busy": 526239, + "mw_frame_count": 8345, + "instruction_spans": { + "boundary": { + "count": 1, + "minimum": 12, + "maximum": 12 + }, + "source": { + "count": 200, + "minimum": 16, + "maximum": 16 + } + }, + "frame_peak_timer_counts_since_boot": 27822, + "audio_lane_sources": [ + [ + 0, + 1 + ], + [ + 1, + 1 + ], + [ + 2, + 1 + ], + [ + 3, + 1 + ], + [ + 4, + 1 + ], + [ + 5, + 1 + ], + [ + 6, + 1 + ], + [ + 7, + 1 + ] + ] + } +} \ No newline at end of file diff --git a/sdk/octatrack/modules/clyps/evidence/performance-01/host-render.json b/sdk/octatrack/modules/clyps/evidence/performance-01/host-render.json new file mode 100644 index 0000000000..f69db0cd91 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/performance-01/host-render.json @@ -0,0 +1,54 @@ +{ + "row": { + "batch_means_ns": [ + 323, + 322, + 310, + 312, + 317, + 318, + 319 + ], + "median_ns": 318, + "max_batch_mean_ns": 323 + }, + "clip": { + "batch_means_ns": [ + 131, + 126, + 128, + 125, + 128, + 126, + 129 + ], + "median_ns": 128, + "max_batch_mean_ns": 131 + }, + "setup": { + "batch_means_ns": [ + 151, + 153, + 155, + 157, + 159, + 155, + 151 + ], + "median_ns": 155, + "max_batch_mean_ns": 159 + }, + "legacy-row": { + "batch_means_ns": [ + 354, + 356, + 372, + 361, + 367, + 359, + 360 + ], + "median_ns": 360, + "max_batch_mean_ns": 372 + } +} diff --git a/sdk/octatrack/modules/clyps/evidence/performance-01/identities.json b/sdk/octatrack/modules/clyps/evidence/performance-01/identities.json new file mode 100644 index 0000000000..976a230f16 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/performance-01/identities.json @@ -0,0 +1,17 @@ +{ + "candidate_runtime": "d9909f52fd84e8af158b0adfb8e6a6ae059cc97f", + "official_main": "061fd547c24234ff3561ae0749c4aaf4e0e6b1a7", + "private_base": "5c32cbacd2b1efea3d70e9b543a9a43cfe634651", + "baseline_module": "6b78afac97b4e836fa804c529765f9bc85829d17", + "inputs": { + "private_MAIN": "1f8e2e9ffd6919bafd6302fa4d61aeeab32e7349ee49ce159ab6a15d276f69d1", + "public_MAIN": "23dd2465f34c0bf00419cc329ef9cee8471229de70efedfcd6799556be4e2022", + "private_base_symbols": "7d63c1caf5d5968b373fd872438d5c2547193cc0dabe3946381bb2face5c86b4", + "disposable_fixture": "18460f09753bdb91a578de517e39c8e6b00991cc6005b526646d0e9250541332", + "baseline_card": "b110845a7a16e8ce0db58f9987249157275bb76fefe733acc82060265c96d0ba", + "candidate_card": "36e6739fae8ee9245eeca0bcce24b123a8b68f69187bbce56c37df51801dcbfe", + "public_control_card": "a6d4e61ada29d391d4bf052a0cb6090c4c2f34346aa24e29292431f2a3136d0c", + "emulator": "a1410ad471be5fbf0fee5e0865dbce9ec1ffcba1d4697aaa6e607943b5614a87", + "package": "dea54e4f2ed47c01a8a7e277ceabf80a14b708ed0121c4bccc703094be7461b9" + } +} diff --git a/sdk/octatrack/modules/clyps/evidence/performance-01/native-controls.json b/sdk/octatrack/modules/clyps/evidence/performance-01/native-controls.json new file mode 100644 index 0000000000..45aee9b583 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/performance-01/native-controls.json @@ -0,0 +1,179 @@ +{ + "module": "dea54e4f2ed47c01a8a7e277ceabf80a14b708ed0121c4bccc703094be7461b9", + "observations": [ + [ + "open row", + { + "view": 1, + "mode": 1, + "playing": 0 + } + ], + [ + "cursor row 2 track 2", + { + "slot": 1, + "track": 1, + "playing": 0 + } + ], + [ + "capture R02", + { + "defined": 2, + "last_row": 0 + } + ], + [ + "T2 selects A02", + { + "view": 2, + "track": 1, + "src_cursor": 1, + "playing": 16 + } + ], + [ + "capture R05", + { + "view": 1, + "defined": 18, + "slot": 4, + "last_row": 0 + } + ], + [ + "advance to R02 independently of cursor", + { + "playing": 0, + "last_row": 2, + "slot": 4 + } + ], + [ + "advance to R05", + { + "playing": 16, + "last_row": 5 + } + ], + [ + "end retains R05", + { + "playing": 16, + "last_row": 5 + } + ], + [ + "override T2 retains path", + { + "playing": 32, + "last_row": 5 + } + ], + [ + "direct R02 pending during play", + { + "playing": 32, + "pending_row": 2, + "last_row": 5 + } + ], + [ + "STOP cancels pending", + { + "playing": 32, + "requested": 32, + "pending_row": 0, + "last_row": 5 + } + ], + [ + "exit with foreign edit lock", + { + "view": 0, + "locked": 1 + } + ], + [ + "stopped restore", + { + "playing": 0, + "requested": 0, + "last_row": 0, + "mode": 0 + } + ], + [ + "Native mode at home", + { + "mode": 1, + "view": 0, + "locked": 0 + } + ], + [ + "sound page and stock controls preserve sources", + { + "playing": 0, + "requested": 0 + } + ], + [ + "Native T2 trig launches A02", + { + "playing": 16, + "locked": 1 + } + ] + ], + "stock_controls": { + "amp": [ + "20f4e86ac989d57c7b4e12ccf4e2c37fb0dbb6663597db63e75991e1bab6f436", + "0cf29fa5ce1d1f4179439842a8348ef5a30d2b7bdf1a600b875e3df4cff5a8a0" + ], + "scene": [ + "0008", + "0308" + ], + "fader": [ + 0, + 64, + 127, + 0 + ], + "trig_mode": [ + 0, + 1, + 0 + ] + }, + "installed_controls": { + "amp": [ + "20f4e86ac989d57c7b4e12ccf4e2c37fb0dbb6663597db63e75991e1bab6f436", + "0cf29fa5ce1d1f4179439842a8348ef5a30d2b7bdf1a600b875e3df4cff5a8a0" + ], + "scene": [ + "0008", + "0308" + ], + "fader": [ + 0, + 64, + 127, + 0 + ], + "trig_mode": [ + 0, + 1, + 0 + ] + }, + "free_before_after": 786432, + "composed_frames": { + "first-arr": "72afe41ff19095776a94a87b60d644e34b89bd521224f75cb2e2bc3c4af83298", + "setup": "bfb937b38fec112c1ea24461f3193c233f2291cdecc332d06dce92a54f3ea905", + "clip": "bc9ffc11e92e7ec87423ed7bc60aa637b2a5fdf9301982e241cb688b76e6349f", + "row": "dc8713ae7fd21afa32b9cfa0f12ef5aeba92e32ed92577585ce92e70939bb1a0" + } +} diff --git a/sdk/octatrack/modules/clyps/evidence/performance-01/official.json b/sdk/octatrack/modules/clyps/evidence/performance-01/official.json new file mode 100644 index 0000000000..d4703d436a --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/performance-01/official.json @@ -0,0 +1,66 @@ +{ + "source": "Official host-only procedure, overlay staged into export of upstream main 061fd547c24234ff3561ae0749c4aaf4e0e6b1a7", + "module": "d9909f52fd84e8af158b0adfb8e6a6ae059cc97f", + "steps": [ + { + "id": "software", + "status": "passed" + }, + { + "id": "compat", + "status": "not run", + "reason": "a draft is judged beside every other module by module:doctor --draft (its compatibility line, step 1)" + }, + { + "id": "build", + "status": "failed", + "reason": "exit 1: npm run module:dev -- clyps --build-only --out /clyps.mwrm" + }, + { + "id": "cost-model", + "status": "not run", + "reason": "stopped: step 3 (Name the build) failed" + }, + { + "id": "emulator", + "status": "not run", + "reason": "stopped: step 3 (Name the build) failed" + }, + { + "id": "unit-read", + "status": "not run", + "reason": "stopped: step 3 (Name the build) failed" + }, + { + "id": "unit-pass", + "status": "not run", + "reason": "stopped: step 3 (Name the build) failed" + }, + { + "id": "soak", + "status": "not run", + "reason": "stopped: step 3 (Name the build) failed" + }, + { + "id": "cost-unit", + "status": "not run", + "reason": "stopped: step 3 (Name the build) failed" + }, + { + "id": "restore", + "status": "not run", + "reason": "stopped: step 3 (Name the build) failed" + }, + { + "id": "by-hand", + "status": "not run", + "reason": "stopped: step 3 (Name the build) failed" + }, + { + "id": "developer", + "status": "not run", + "reason": "stopped: step 3 (Name the build) failed" + } + ], + "public_builder": "Unknown registered event ev_seq_wrap at package construction. No official package produced." +} diff --git a/sdk/octatrack/modules/clyps/evidence/performance-01/panel.json b/sdk/octatrack/modules/clyps/evidence/performance-01/panel.json new file mode 100644 index 0000000000..0f70042b36 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/performance-01/panel.json @@ -0,0 +1,115 @@ +{ + "module": "dea54e4f2ed47c01a8a7e277ceabf80a14b708ed0121c4bccc703094be7461b9", + "observations": [ + [ + "open row", + { + "view": 1, + "mode": 1, + "playing": 0 + } + ], + [ + "cursor row 2 track 2", + { + "slot": 1, + "track": 1, + "playing": 0 + } + ], + [ + "capture R02", + { + "defined": 2, + "last_row": 0 + } + ], + [ + "T2 selects A02", + { + "view": 2, + "track": 1, + "src_cursor": 1, + "playing": 16 + } + ], + [ + "capture R05", + { + "view": 1, + "defined": 18, + "slot": 4, + "last_row": 0 + } + ], + [ + "advance to R02 independently of cursor", + { + "playing": 0, + "last_row": 2, + "slot": 4 + } + ], + [ + "advance to R05", + { + "playing": 16, + "last_row": 5 + } + ], + [ + "end retains R05", + { + "playing": 16, + "last_row": 5 + } + ], + [ + "override T2 retains path", + { + "playing": 32, + "last_row": 5 + } + ], + [ + "direct R02 pending during play", + { + "playing": 32, + "pending_row": 2, + "last_row": 5 + } + ], + [ + "STOP cancels pending", + { + "playing": 32, + "requested": 32, + "pending_row": 0, + "last_row": 5 + } + ], + [ + "exit with foreign edit lock", + { + "view": 0, + "locked": 1 + } + ], + [ + "stopped restore", + { + "playing": 0, + "requested": 0, + "last_row": 0, + "mode": 0 + } + ] + ], + "free_before_after": 786432, + "composed_frames": { + "first-arr": "72afe41ff19095776a94a87b60d644e34b89bd521224f75cb2e2bc3c4af83298", + "setup": "bfb937b38fec112c1ea24461f3193c233f2291cdecc332d06dce92a54f3ea905", + "clip": "bc9ffc11e92e7ec87423ed7bc60aa637b2a5fdf9301982e241cb688b76e6349f", + "row": "dc8713ae7fd21afa32b9cfa0f12ef5aeba92e32ed92577585ce92e70939bb1a0" + } +} diff --git a/sdk/octatrack/modules/clyps/evidence/performance-01/popup.json b/sdk/octatrack/modules/clyps/evidence/performance-01/popup.json new file mode 100644 index 0000000000..4e9435507b --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/performance-01/popup.json @@ -0,0 +1 @@ +{"reopened": true, "r04": 0, "pool": 786432} \ No newline at end of file diff --git a/sdk/octatrack/modules/clyps/evidence/performance-01/public-base-refusal.json b/sdk/octatrack/modules/clyps/evidence/performance-01/public-base-refusal.json new file mode 100644 index 0000000000..2f0f013c0c --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/performance-01/public-base-refusal.json @@ -0,0 +1 @@ +{"refusal": 257, "before": {"callbacks": [0, 0, 0], "active": 0, "pool": 786432, "owners": 0}, "after": {"callbacks": [0, 0, 0], "active": 0, "pool": 786432, "owners": 0}} \ No newline at end of file diff --git a/sdk/octatrack/modules/clyps/evidence/performance-01/stack-budget.json b/sdk/octatrack/modules/clyps/evidence/performance-01/stack-budget.json new file mode 100644 index 0000000000..1cac70a504 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/performance-01/stack-budget.json @@ -0,0 +1,67 @@ +{ + "baseline": { + "object_size": [ + "5607", + "0", + "174" + ], + "individual_frames_bytes": { + "stock_window": 0, + "stock_src_available": 4, + "focus_row": 0, + "alone": 8, + "grid": 4, + "supported": 4, + "redraw": 4, + "label": 20, + "number": 20, + "valid": 16, + "submit": 8, + "submit_lane": 4, + "check_src_context": 0, + "clyps_bank_load": 0, + "clyps_bank_loaded": 0, + "clyps_project_init": 0, + "clyps_wrap": 8, + "clyps_audio_source": 8, + "module_key": 40, + "module_enc": 16, + "module_tick": 8, + "module_draw": 188 + } + }, + "performance": { + "object_size": [ + "6476", + "0", + "190" + ], + "individual_frames_bytes": { + "clyps_focus_step": 4, + "stock_window": 0, + "focus_row": 0, + "alone": 8, + "grid": 4, + "supported": 4, + "redraw": 4, + "set_operation": 0, + "label": 20, + "number": 20, + "session_draw": 152, + "valid": 16, + "submit": 8, + "submit_lane": 4, + "open_view": 4, + "performance_context": 4, + "clyps_bank_load": 0, + "clyps_bank_loaded": 0, + "clyps_project_init": 0, + "clyps_wrap": 8, + "clyps_audio_source": 8, + "module_key": 36, + "module_enc": 20, + "module_tick": 8, + "module_draw": 120 + } + } +} diff --git a/sdk/octatrack/modules/clyps/evidence/performance-01/wide.json b/sdk/octatrack/modules/clyps/evidence/performance-01/wide.json new file mode 100644 index 0000000000..13bd6cedb3 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/performance-01/wide.json @@ -0,0 +1,19 @@ +{ + "events": { + "count": 624, + "identical": true + }, + "writes": { + "count": 608, + "identical": true + }, + "states": { + "count": 219, + "identical": true + }, + "grader": "Eight-lane stock composite matched; three truncated streams rejected.", + "source_files_sha256": { + "wide3-0.json": "a1cef1580ff0597ecf540d28e2004abe79a8d9654c346eed4febb2b7e325fba6", + "wide3-1.json": "a1cef1580ff0597ecf540d28e2004abe79a8d9654c346eed4febb2b7e325fba6" + } +} diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/README.md b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/README.md new file mode 100644 index 0000000000..67051460d9 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/README.md @@ -0,0 +1,25 @@ +# Official CLYPS procedure, 23 November 2026 + +Source tested: 613db9857006a1f865d85a28e9aebd6bfba6e527, merging contributor 236294956 with upstream 6f31dd3c4. The procedure and runner match that upstream revision. Use Node 24 and Python 3.12. Run from the repository root: + +```sh +D=sdk/drafts/clyps +E="$D/evidence/procedure-nov23" +npm run test:procedure -- clyps --plan +npm run test:procedure -- clyps --no-unit --out "$OUT/host" +python3.12 -B "$D/build_candidate.py" "$BASE/sdk" "$OUT/clyps.mwrm" --symbols "$OUT/mod.json" +npm run device:emulator -- --image "$MAIN" --emulator "$EMU" --dir "$OUT/session-sockets" -- npm run test:procedure -- clyps --target emulator --package "$OUT/clyps.mwrm" --out "$OUT/session" +python3.12 -B -m unittest discover -s "$D" -p 'test_*.py' +``` + +Use an empty scratch directory for OUT and candidate SDK 5c32cbacd for BASE. Match MAIN, emulator, linked symbols, synthetic card and rebuilt module against [hashes.json](hashes.json). See [the input and replay recipe](../../NATIVE_REPLAY.md). Only distribute logs, hashes and test results. The official records are [host](host/procedure.md) and [connected emulator session](session/procedure.md), each with adjacent JSON. [Emulator preflight](emulator/procedure.md) records the earlier invocation with an isolated socket before the emulator session existed. The plan merely enumerates steps. + +Both host and connected emulator runs stopped in step 1. Doctor stages the draft and attempts to read octamod.module.json; the module ships a proposed metadata excerpt and proposed runtime contract. Supplying the rebuilt MWRM to the connected session still goes through doctor first. The official runner never reached package identification or device trial. Its generated records retain the original step statuses. + +The independent build against the upstream SDK also fails: the modal-input struct and MODWERK_MODAL_INPUT_ABI required by the builder are absent. The candidate package binds ev_seq_wrap, ev_audio_seq_source and ot_modal_input at 63–65 and requires the candidate capability. Renaming the proposed manifest would not supply those base services. The next integration step is to agree the upstream shared contract, add supported module and build declarations against it, then repeat step 1 on that exact revision. All physical-unit steps await separate authorization. + +## Supplemental native fixtures + +Use native_slice.py with candidate and --stock, then grade_slice.py. Use native_rows.py with the default arguments and --reference, then grade_wide.py. On separate boots, pass --row-popup, --arranger-recovery, and --project-reload missing or stored. The reload and --boundary early/late fixtures require --symbols-module and --package from the rebuild. Use --reference for the late control, then grade_boundary.py late. Each fixture boots a fresh MKII emulator and writes only to a temporary synthetic card copy. See [the edge-case table](../../TESTING.md#official-procedure-on-upstream-main--23-november-2026) for outcomes. Raw boot images and card contents are local inputs. + +The first two reload invocations in replays/missing.txt and stored.txt stopped at argument parsing. The corrected reload-missing.txt and reload-stored.txt runs supply the package and matching symbol map. archive-*-grade.txt rechecks earlier recordings separately. The first standalone catalogue invocation used an older system Python; catalog-compat312.txt is the Python 3.12 rerun. Absolute workstation home and system temporary-directory prefixes in published text logs have been shortened. diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/archive-late-grade.txt b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/archive-late-grade.txt new file mode 100644 index 0000000000..686918aeb2 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/archive-late-grade.txt @@ -0,0 +1,6 @@ +late 848 ordered calls including tick zero, 816 timestamp writes, 298 ticks; deadlines {0: 565466144, 1: 570758144, 2: 575838464} +Traceback (most recent call last): + File "sdk/drafts/clyps/tests/grade_boundary.py", line 61, in + assert candidate['panel_requests'] == [ + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +AssertionError: missing or incorrect pending selection evidence diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/archive-wide-grade.txt b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/archive-wide-grade.txt new file mode 100644 index 0000000000..a6774e43eb --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/archive-wide-grade.txt @@ -0,0 +1 @@ +Eight-lane stock composite matched; three truncated streams rejected. diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/build.txt b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/build.txt new file mode 100644 index 0000000000..883fbae860 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/build.txt @@ -0,0 +1 @@ +{"sha256": "32ebca98345840f4e107550683f4fd14f2be35e5355df3d8933b7132f324aea9", "image": 5600, "bss": 176, "relocations": 248, "hooks": {"ev_bank_load": 40, "ev_bank_loaded": 41, "ev_project_new": 42, "ev_seq_wrap": 63, "ev_audio_seq_source": 64, "ot_modal_input": 65}} diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/catalog-compat.txt b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/catalog-compat.txt new file mode 100644 index 0000000000..7ff2b13b33 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/catalog-compat.txt @@ -0,0 +1,28 @@ + +> octamod@0.1.0 modules:compat +> node scripts/mirror-octatrack-modules.mjs && python3 -B scripts/module-compat.py + +Traceback (most recent call last): + File "scripts/module-compat.py", line 457, in + sys.exit(main(sys.argv[1:])) + File "scripts/module-compat.py", line 421, in main + ids, modules, inputs, problems = repository_inputs(extra) + File "scripts/module-compat.py", line 363, in repository_inputs + known = registry.modules() + File "sdk/octabam/tools/remix/registry.py", line 81, in modules + m = _load_one(manifest) + File "sdk/octabam/tools/remix/registry.py", line 59, in _load_one + mod = _exec(manifest, f"remix_manifest_{manifest.parent.name}") + File "sdk/octabam/tools/remix/registry.py", line 48, in _exec + exec(compile(path.read_text(), str(path), "exec"), ns.__dict__) + File "sdk/octabam/platform/dsp-dynload-stock/manifest.py", line 16, in + from experimental.dsp_dynload.runtime_catalog import include_dynamic + File "sdk/octabam/tools/experimental/dsp_dynload/runtime_catalog.py", line 13, in + from .build_candidates import build as new_build + File "sdk/octabam/tools/experimental/dsp_dynload/build_candidates.py", line 14, in + from .package import Package, Relocation, Section + File "sdk/octabam/tools/experimental/dsp_dynload/package.py", line 39, in + class Package: + File "sdk/octabam/tools/experimental/dsp_dynload/package.py", line 46, in Package + cycles_per_block: int | None +TypeError: unsupported operand type(s) for |: 'type' and 'NoneType' diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/catalog-compat312.txt b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/catalog-compat312.txt new file mode 100644 index 0000000000..f92440a49b --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/catalog-compat312.txt @@ -0,0 +1,6 @@ + +> octamod@0.1.0 modules:compat +> node scripts/mirror-octatrack-modules.mjs && python3 -B scripts/module-compat.py + +· ot_sample_memory is full: room for 1 (kits); another module that uses it needs more room first (docs/module-guides/README.md#hooks) +Cross-compatibility: 44 active Octatrack modules, 946 pairs and the whole set, 105 hooks, 0 reviewed relations; 0 problem(s) in 2.34s diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/cycle-scan.txt b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/cycle-scan.txt new file mode 100644 index 0000000000..09eb3a83c1 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/cycle-scan.txt @@ -0,0 +1,16 @@ + · airwindows-chorus: 649 cycles a sample (14.3 %), 56.5 of them stalls, at defaults/max; stock CHORUS 290 (6.4 %), 2.24x in cycles against 1.39x in instructions + · bbd: 528.31 cycles a sample (11.7 %), 54.31 of them stalls, at STGS=1024/dear; stock CHORUS 290 (6.4 %), 1.82x in cycles against 1.42x in instructions + · euclid: performance.json records no instructions a sample to compare + · euclid: 232.44 cycles a sample (5.1 %), 25.19 of them stalls, at RATE=1/32/def + · everb: 664.88 cycles a sample (14.7 %), 132.81 of them stalls, at REV=ON/dear; stock DARK REV 253.25 (5.6 %), 2.63x in cycles against 1.87x in instructions + · lofi2: 654.25 cycles a sample (14.4 %), 89.63 of them stalls, at DOWN/max; stock LO-FI 305.88 (6.7 %), 2.14x in cycles against 1.47x in instructions + · miniverb: performance.json records no instructions a sample to compare + · miniverb: 698.56 cycles a sample (15.4 %), 159.25 of them stalls, at RATE=0.34/min + · ring-sc: 121.94 cycles a sample (2.7 %), 15.94 of them stalls, at RING/dear; stock COMPRESSOR 103.06 (2.3 %), 1.18x in cycles against 0.99x in instructions + · sidechain-compressor: performance.json records no instructions a sample to compare + · sidechain-compressor: 106.69 cycles a sample (2.4 %), 11 of them stalls, at MON=OFF/def + · tapehead: performance.json records no instructions a sample to compare + · tapehead: 425.5 cycles a sample (9.4 %), 67.13 of them stalls, at COLOR=BRGT/def + · vibrato: 207 cycles a sample (4.6 %), 36.25 of them stalls, at SHP=TRI/max; stock CHORUS 290 (6.4 %), 0.71x in cycles against 0.47x in instructions + · no cycle scan yet: output-matrix +Cycle scan: 10 records current, none under-reported. diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/emulator-run.txt b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/emulator-run.txt new file mode 100644 index 0000000000..d29bf03487 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/emulator-run.txt @@ -0,0 +1,41 @@ + +> octamod@0.1.0 test:procedure +> node scripts/test-procedure.mjs clyps --target emulator --share /tmp/clyps-1997-isolated.sock --out sdk/drafts/clyps/evidence/procedure-nov23/emulator + + +$ npm run module:doctor -- --draft clyps + +> octamod@0.1.0 module:doctor +> node scripts/module-doctor.mjs --draft clyps + +node:fs:483 + return binding.readFileUtf8(path, stringToFlags(options.flag)); + ^ + +Error: ENOENT: no such file or directory, open 'sdk/octatrack/modules/clyps/octamod.module.json' + at readFileSync (node:fs:483:20) + at json (file://$HOME/Documents/ChatGPT/Modwerk%20&%20OT/CLYPS-community/scripts/module-doctor.mjs:47:33) + at file://$HOME/Documents/ChatGPT/Modwerk%20&%20OT/CLYPS-community/scripts/module-doctor.mjs:336:40 + at process.processTicksAndRejections (node:internal/process/task_queues:104:5) { + errno: -2, + code: 'ENOENT', + syscall: 'open', + path: 'sdk/octatrack/modules/clyps/octamod.module.json' +} + +Node.js v24.22.3 + + 1. Software checks: failed (exit 1: npm run module:doctor -- --draft clyps) + 2. Beside every other module: not run (stopped: step 1 (Software checks) failed) + 3. Name the build: not run (stopped: step 1 (Software checks) failed) + 4. DSP cost model: not run (stopped: step 1 (Software checks) failed) + 5. Emulator rehearsal: not run (stopped: step 1 (Software checks) failed) + 6. Read the unit: not run (stopped: step 1 (Software checks) failed) + 7. Scripted unit pass: not run (stopped: step 1 (Software checks) failed) + 8. Soak: not run (stopped: step 1 (Software checks) failed) + 9. Cost on the unit: not run (stopped: step 1 (Software checks) failed) +10. Put back: not run (stopped: step 1 (Software checks) failed) +11. Agent by hand: not run (stopped: step 1 (Software checks) failed) +12. Submitter's own stage: not run (stopped: step 1 (Software checks) failed) + +Record: sdk/drafts/clyps/evidence/procedure-nov23/emulator/procedure.md and procedure.json, 2 s. Fill in its edge-case table, run each case, then copy the entry to the module's TESTING.md and its last two lines to the pull request. diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/emulator/logs/01-software.log b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/emulator/logs/01-software.log new file mode 100644 index 0000000000..937a1d6524 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/emulator/logs/01-software.log @@ -0,0 +1,21 @@ +$ npm run module:doctor -- --draft clyps + +> octamod@0.1.0 module:doctor +> node scripts/module-doctor.mjs --draft clyps + +node:fs:483 + return binding.readFileUtf8(path, stringToFlags(options.flag)); + ^ + +Error: ENOENT: no such file or directory, open 'sdk/octatrack/modules/clyps/octamod.module.json' + at readFileSync (node:fs:483:20) + at json (file://$HOME/Documents/ChatGPT/Modwerk%20&%20OT/CLYPS-community/scripts/module-doctor.mjs:47:33) + at file://$HOME/Documents/ChatGPT/Modwerk%20&%20OT/CLYPS-community/scripts/module-doctor.mjs:336:40 + at process.processTicksAndRejections (node:internal/process/task_queues:104:5) { + errno: -2, + code: 'ENOENT', + syscall: 'open', + path: 'sdk/octatrack/modules/clyps/octamod.module.json' +} + +Node.js v24.22.3 diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/emulator/procedure.json b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/emulator/procedure.json new file mode 100644 index 0000000000..7e4dfb87ff --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/emulator/procedure.json @@ -0,0 +1,271 @@ +{ + "procedure": 1, + "command": "npm run test:procedure -- clyps --target emulator --share /tmp/clyps-1997-isolated.sock --out sdk/drafts/clyps/evidence/procedure-nov23/emulator", + "date": "2026-11-23", + "started": "2026-11-23T14:22:05.834Z", + "finished": "2026-11-23T14:22:07.833Z", + "seconds": 2, + "target": { + "kind": "module", + "id": "clyps", + "machine": "octatrack", + "draft": true + }, + "build": { + "revision": "613db9857006a1f865d85a28e9aebd6bfba6e527", + "dirty": false + }, + "unit": { + "available": false, + "reason": "no emulator session on /tmp/clyps-1997-isolated.sock (ot_emu --usb-host EMU, then MODWERK_DEV_SOCKET=DEV npm run device -- serve --emulator --socket EMU --share /tmp/clyps-1997-isolated.sock, and --dev-socket DEV here)", + "share": "/tmp/clyps-1997-isolated.sock", + "target": "emulator" + }, + "steps": [ + { + "id": "software", + "title": "Software checks", + "layer": "host", + "unit": false, + "status": "failed", + "commands": [ + "npm run module:doctor -- --draft clyps" + ], + "seconds": 2, + "log": "logs/01-software.log", + "reason": "exit 1: npm run module:doctor -- --draft clyps" + }, + { + "id": "compat", + "title": "Beside every other module", + "layer": "contract", + "unit": false, + "status": "not run", + "commands": [], + "seconds": 0, + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "build", + "title": "Name the build", + "layer": "host", + "unit": false, + "status": "not run", + "commands": [ + "npm run module:dev -- clyps --build-only --out 'sdk/drafts/clyps/evidence/procedure-nov23/emulator/clyps.mwrm'" + ], + "seconds": 0, + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "cost-model", + "title": "DSP cost model", + "layer": "contract", + "unit": false, + "status": "not run", + "commands": [ + "node scripts/cycle-scan.mjs check" + ], + "seconds": 0, + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "emulator", + "title": "Emulator rehearsal", + "layer": "emulator", + "unit": false, + "status": "not run", + "commands": [], + "seconds": 0, + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "unit-read", + "title": "Read the unit", + "layer": "target", + "unit": true, + "status": "not run", + "commands": [ + "node scripts/device.mjs status --socket /tmp/clyps-1997-isolated.sock", + "node scripts/device.mjs do inventory --socket /tmp/clyps-1997-isolated.sock" + ], + "seconds": 0, + "emulator": true, + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "unit-pass", + "title": "Scripted unit pass", + "layer": "target", + "unit": true, + "status": "not run", + "commands": [ + "npm run device:test -- --share /tmp/clyps-1997-isolated.sock --testing-entry 'sdk/drafts/clyps/evidence/procedure-nov23/emulator/device-test.md' 'sdk/drafts/clyps/evidence/procedure-nov23/emulator/clyps.mwrm'" + ], + "seconds": 0, + "emulator": true, + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "soak", + "title": "Soak", + "layer": "target", + "unit": true, + "status": "not run", + "commands": [], + "seconds": 0, + "emulator": true, + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "cost-unit", + "title": "Cost on the unit", + "layer": "unit", + "unit": true, + "status": "not run", + "commands": [], + "seconds": 0, + "emulator": true, + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "restore", + "title": "Put back", + "layer": "target", + "unit": true, + "status": "not run", + "commands": [ + "node scripts/device.mjs do inventory --socket /tmp/clyps-1997-isolated.sock" + ], + "seconds": 0, + "emulator": true, + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "by-hand", + "title": "Agent by hand", + "layer": "target", + "unit": false, + "status": "not run", + "commands": [], + "seconds": 0, + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "developer", + "title": "Submitter's own stage", + "layer": "unit", + "unit": false, + "status": "not run", + "commands": [], + "seconds": 0, + "reason": "stopped: step 1 (Software checks) failed" + } + ], + "edgeCases": { + "suggested": [ + { + "touches": "persistence", + "ask": "saved in a Part, then a Part reload, a project reload and a power cycle; removed while a saved Part still names it", + "see": "OCTATRACK_MODULE_EDGE_CASES.md#copying-and-saving" + }, + { + "touches": "the loader", + "ask": "install, replace, remove and Undo; a set the base refuses rolls back whole; the pool full; a trial that expires with a page open", + "see": "OCTATRACK_HARDWARE_TRAPS.md#dsp-loader-dynamic-dsp-code" + }, + { + "touches": "DSP code", + "ask": "DSP FULL; both cores; the receiver window; pipeline stalls the instruction count hides", + "see": "OCTATRACK_HARDWARE_TRAPS.md#coldfire-and-dsp-load" + }, + { + "touches": "the USB link", + "ask": "USB unplugged mid-transfer; the host silent until the base rolls back; a reconnect", + "see": "OCTATRACK_HARDWARE_TRAPS.md#usb-and-ep0" + }, + { + "touches": "load and admission", + "ask": "the pick at the 85 % line with the delays quiet and open; the guard counters while playing", + "see": "OCTATRACK_HARDWARE_TRAPS.md#coldfire-and-dsp-load" + }, + { + "touches": "boot and restore", + "ask": "PROJ held at power-on; the restore held back; a RAM boot back to the flashed base", + "see": "OCTATRACK_MODULE_EDGE_CASES.md#boot-and-power" + } + ], + "cases": [ + { + "case": "Eight audio lanes and independent source selection", + "risk": "A source change could redirect a neighboring lane", + "how": "Native MKII wide pair against independent stock composite and T2-only slice", + "result": "Pass. All 624 events, 608 relative writes and 219 states matched. The separate T2 slice matched 384 calls and 400 writes at wrap 90." + }, + { + "case": "Request just before wrap", + "risk": "Pending state could appear too late", + "how": "Native early-boundary panel fixture", + "result": "Fail. Requested by tick 89 +1 ms, pending diagnostic still zero at +15 ms, committed at wrap 90 +16 ms." + }, + { + "case": "Request just after wrap", + "risk": "Restore could be reported on the wrong tick", + "how": "Native late pair and strict boundary grader", + "result": "Fail. All 848 events, 816 writes and 298 states matched, but pending restore appeared at tick 187; the oracle requires 188." + }, + { + "case": "ARR after stock popup during Row Edit", + "risk": "Editor could keep the panel hidden or lose a row", + "how": "Native popup fixture and host callback test", + "result": "Pass. ARR reopened, R04 retained its definition and OFF recovered the full pool." + }, + { + "case": "Unrelated bank, early EOF, popup during bank load", + "risk": "An already-defined R04 could be cleared", + "how": "Host callbacks with an actual temporary-file EOF and an unrelated bank mask", + "result": "Pass. R04 and its source survive." + }, + { + "case": "Late interrupted project load", + "risk": "Destination initialization can clear the previous rows before completion", + "how": "Host late-failure case with a short read after init", + "result": "Fail. The characterization test passes by reproducing loss of R04. Native late-abort recovery remains unverified." + }, + { + "case": "Missing versus completed stored reload", + "risk": "Rows could be kept or discarded for the wrong destination", + "how": "Stock PROJECT menu in native emulator on disposable cards", + "result": "Pass. Missing stored files preserved bank A and R04. Completed stored reload selected bank B and cleared R04. OFF recovered the full pool in both cases." + }, + { + "case": "STOP, OFF and stock Arranger", + "risk": "Queued source changes or handlers could survive removal", + "how": "T2 slice and Arranger recovery fixtures", + "result": "Pass. STOP cancelled the queued change; OFF restored callback heads and all 786432 pool bytes. Stock Arranger playback matched before and after removal." + }, + { + "case": "Shared hook interaction", + "risk": "Panel, source or wrap registration could conflict with base owners", + "how": "Candidate build by named hooks, callback heads before/after OFF and upstream-only compile", + "result": "Pass on the candidate for bindings and T2 unload. Blocked on upstream main for the three proposed bindings; catalogue-only compatibility excludes CLYPS." + }, + { + "case": "Physical MKII", + "risk": "Audio, cost, USB trial and persistence require the real instrument", + "how": "Separate authorization required", + "result": "Not run. Trial, soak, pricing, rollback and inventory, MAIN/CUE listening and persistence remain open." + } + ] + }, + "developer": { + "status": "to do", + "items": [ + "how it sounds and plays, and timing by ear", + "MIDI, scenes and recording with it", + "it beside the other modules installed on their unit", + "two instances with different settings, on both FX slots and both DSP cores where it can (docs/MODULE_QUALIFICATION.md)", + "Part reload, project save and reload, and a power cycle with it saved: what survives (the Keep and the power cycle are theirs)" + ] + } +} diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/emulator/procedure.md b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/emulator/procedure.md new file mode 100644 index 0000000000..d987b066bb --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/emulator/procedure.md @@ -0,0 +1,55 @@ +### Test procedure: clyps, 2026-11-23 + +Build: revision `613db9857006`, no package named. `npm run test:procedure -- clyps --target emulator --share /tmp/clyps-1997-isolated.sock --out sdk/drafts/clyps/evidence/procedure-nov23/emulator`, 2 s. Emulator results are not hardware evidence; only what ran on the unit is. + +| # | Step | Layer | Result | Command | Evidence | +|---|---|---|---|---|---| +| 1 | Software checks | host | **failed**: exit 1: npm run module:doctor -- --draft clyps | `npm run module:doctor -- --draft clyps` | logs/01-software.log | +| 2 | Beside every other module | contract | not run: stopped: step 1 (Software checks) failed | | | +| 3 | Name the build | host | not run: stopped: step 1 (Software checks) failed | `npm run module:dev -- clyps --build-only --out 'sdk/drafts/clyps/evidence/procedure-nov23/emulator/clyps.mwrm'` | | +| 4 | DSP cost model | contract | not run: stopped: step 1 (Software checks) failed | `node scripts/cycle-scan.mjs check` | | +| 5 | Emulator rehearsal | emulator | not run: stopped: step 1 (Software checks) failed | | | +| 6 | Read the unit (emulator) | emulator | not run: stopped: step 1 (Software checks) failed | `node scripts/device.mjs status --socket /tmp/clyps-1997-isolated.sock`
`node scripts/device.mjs do inventory --socket /tmp/clyps-1997-isolated.sock` | | +| 7 | Scripted unit pass (emulator) | emulator | not run: stopped: step 1 (Software checks) failed | `npm run device:test -- --share /tmp/clyps-1997-isolated.sock --testing-entry 'sdk/drafts/clyps/evidence/procedure-nov23/emulator/device-test.md' 'sdk/drafts/clyps/evidence/procedure-nov23/emulator/clyps.mwrm'` | | +| 8 | Soak (emulator) | emulator | not run: stopped: step 1 (Software checks) failed | | | +| 9 | Cost on the unit (emulator) | unit | not run: stopped: step 1 (Software checks) failed | | | +| 10 | Put back (emulator) | emulator | not run: stopped: step 1 (Software checks) failed | `node scripts/device.mjs do inventory --socket /tmp/clyps-1997-isolated.sock` | | +| 11 | Agent by hand | unit | not run: stopped: step 1 (Software checks) failed | | | +| 12 | Submitter's own stage | unit | not run: stopped: step 1 (Software checks) failed | | | + +#### Edge cases for this change + +Derive them from what the change touches and run each one (docs/TEST_PROCEDURE.md#edge-cases). A start, from the manifest and the changed files: + +- persistence: saved in a Part, then a Part reload, a project reload and a power cycle; removed while a saved Part still names it (docs/OCTATRACK_MODULE_EDGE_CASES.md#copying-and-saving) +- the loader: install, replace, remove and Undo; a set the base refuses rolls back whole; the pool full; a trial that expires with a page open (docs/OCTATRACK_HARDWARE_TRAPS.md#dsp-loader-dynamic-dsp-code) +- DSP code: DSP FULL; both cores; the receiver window; pipeline stalls the instruction count hides (docs/OCTATRACK_HARDWARE_TRAPS.md#coldfire-and-dsp-load) +- the USB link: USB unplugged mid-transfer; the host silent until the base rolls back; a reconnect (docs/OCTATRACK_HARDWARE_TRAPS.md#usb-and-ep0) +- load and admission: the pick at the 85 % line with the delays quiet and open; the guard counters while playing (docs/OCTATRACK_HARDWARE_TRAPS.md#coldfire-and-dsp-load) +- boot and restore: PROJ held at power-on; the restore held back; a RAM boot back to the flashed base (docs/OCTATRACK_MODULE_EDGE_CASES.md#boot-and-power) + +| Case | Why this change makes it a risk | How run | Result | +|---|---|---|---| +| Eight audio lanes and independent source selection | A source change could redirect a neighboring lane | Native MKII wide pair against independent stock composite and T2-only slice | Pass. All 624 events, 608 relative writes and 219 states matched. The separate T2 slice matched 384 calls and 400 writes at wrap 90. | +| Request just before wrap | Pending state could appear too late | Native early-boundary panel fixture | Fail. Requested by tick 89 +1 ms, pending diagnostic still zero at +15 ms, committed at wrap 90 +16 ms. | +| Request just after wrap | Restore could be reported on the wrong tick | Native late pair and strict boundary grader | Fail. All 848 events, 816 writes and 298 states matched, but pending restore appeared at tick 187; the oracle requires 188. | +| ARR after stock popup during Row Edit | Editor could keep the panel hidden or lose a row | Native popup fixture and host callback test | Pass. ARR reopened, R04 retained its definition and OFF recovered the full pool. | +| Unrelated bank, early EOF, popup during bank load | An already-defined R04 could be cleared | Host callbacks with an actual temporary-file EOF and an unrelated bank mask | Pass. R04 and its source survive. | +| Late interrupted project load | Destination initialization can clear the previous rows before completion | Host late-failure case with a short read after init | Fail. The characterization test passes by reproducing loss of R04. Native late-abort recovery remains unverified. | +| Missing versus completed stored reload | Rows could be kept or discarded for the wrong destination | Stock PROJECT menu in native emulator on disposable cards | Pass. Missing stored files preserved bank A and R04. Completed stored reload selected bank B and cleared R04. OFF recovered the full pool in both cases. | +| STOP, OFF and stock Arranger | Queued source changes or handlers could survive removal | T2 slice and Arranger recovery fixtures | Pass. STOP cancelled the queued change; OFF restored callback heads and all 786432 pool bytes. Stock Arranger playback matched before and after removal. | +| Shared hook interaction | Panel, source or wrap registration could conflict with base owners | Candidate build by named hooks, callback heads before/after OFF and upstream-only compile | Pass on the candidate for bindings and T2 unload. Blocked on upstream main for the three proposed bindings; catalogue-only compatibility excludes CLYPS. | +| Physical MKII | Audio, cost, USB trial and persistence require the real instrument | Separate authorization required | Not run. Trial, soak, pricing, rollback and inventory, MAIN/CUE listening and persistence remain open. | + +#### Left for the submitter at their unit + +- how it sounds and plays, and timing by ear +- MIDI, scenes and recording with it +- it beside the other modules installed on their unit +- two instances with different settings, on both FX slots and both DSP cores where it can (docs/MODULE_QUALIFICATION.md) +- Part reload, project save and reload, and a power cycle with it saved: what survives (the Keep and the power cycle are theirs) + +#### For the pull request + +Not tested on a unit: stopped: step 1 (Software checks) failed. +Edge cases: the table above, one row a case (or "Edge cases: none, because …"). diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/hashes.json b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/hashes.json new file mode 100644 index 0000000000..4b04c86fac --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/hashes.json @@ -0,0 +1,7 @@ +{ + "main": "1f8e2e9ffd6919bafd6302fa4d61aeeab32e7349ee49ce159ab6a15d276f69d1", + "card": "b110845a7a16e8ce0db58f9987249157275bb76fefe733acc82060265c96d0ba", + "symbols": "7d63c1caf5d5968b373fd872438d5c2547193cc0dabe3946381bb2face5c86b4", + "emulator": "a1410ad471be5fbf0fee5e0865dbce9ec1ffcba1d4697aaa6e607943b5614a87", + "module": "32ebca98345840f4e107550683f4fd14f2be35e5355df3d8933b7132f324aea9" +} diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/host-run.txt b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/host-run.txt new file mode 100644 index 0000000000..922f139b3e --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/host-run.txt @@ -0,0 +1,41 @@ + +> octamod@0.1.0 test:procedure +> node scripts/test-procedure.mjs clyps --no-unit --out sdk/drafts/clyps/evidence/procedure-nov23/host + + +$ npm run module:doctor -- --draft clyps + +> octamod@0.1.0 module:doctor +> node scripts/module-doctor.mjs --draft clyps + +node:fs:483 + return binding.readFileUtf8(path, stringToFlags(options.flag)); + ^ + +Error: ENOENT: no such file or directory, open 'sdk/octatrack/modules/clyps/octamod.module.json' + at readFileSync (node:fs:483:20) + at json (file://$HOME/Documents/ChatGPT/Modwerk%20&%20OT/CLYPS-community/scripts/module-doctor.mjs:47:33) + at file://$HOME/Documents/ChatGPT/Modwerk%20&%20OT/CLYPS-community/scripts/module-doctor.mjs:336:40 + at process.processTicksAndRejections (node:internal/process/task_queues:104:5) { + errno: -2, + code: 'ENOENT', + syscall: 'open', + path: 'sdk/octatrack/modules/clyps/octamod.module.json' +} + +Node.js v24.22.3 + + 1. Software checks: failed (exit 1: npm run module:doctor -- --draft clyps) + 2. Beside every other module: not run (stopped: step 1 (Software checks) failed) + 3. Name the build: not run (stopped: step 1 (Software checks) failed) + 4. DSP cost model: not run (stopped: step 1 (Software checks) failed) + 5. Emulator rehearsal: not run (stopped: step 1 (Software checks) failed) + 6. Read the unit: not run (stopped: step 1 (Software checks) failed) + 7. Scripted unit pass: not run (stopped: step 1 (Software checks) failed) + 8. Soak: not run (stopped: step 1 (Software checks) failed) + 9. Cost on the unit: not run (stopped: step 1 (Software checks) failed) +10. Put back: not run (stopped: step 1 (Software checks) failed) +11. Agent by hand: not run (stopped: step 1 (Software checks) failed) +12. Submitter's own stage: not run (stopped: step 1 (Software checks) failed) + +Record: sdk/drafts/clyps/evidence/procedure-nov23/host/procedure.md and procedure.json, 2 s. Fill in its edge-case table, run each case, then copy the entry to the module's TESTING.md and its last two lines to the pull request. diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/host/logs/01-software.log b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/host/logs/01-software.log new file mode 100644 index 0000000000..937a1d6524 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/host/logs/01-software.log @@ -0,0 +1,21 @@ +$ npm run module:doctor -- --draft clyps + +> octamod@0.1.0 module:doctor +> node scripts/module-doctor.mjs --draft clyps + +node:fs:483 + return binding.readFileUtf8(path, stringToFlags(options.flag)); + ^ + +Error: ENOENT: no such file or directory, open 'sdk/octatrack/modules/clyps/octamod.module.json' + at readFileSync (node:fs:483:20) + at json (file://$HOME/Documents/ChatGPT/Modwerk%20&%20OT/CLYPS-community/scripts/module-doctor.mjs:47:33) + at file://$HOME/Documents/ChatGPT/Modwerk%20&%20OT/CLYPS-community/scripts/module-doctor.mjs:336:40 + at process.processTicksAndRejections (node:internal/process/task_queues:104:5) { + errno: -2, + code: 'ENOENT', + syscall: 'open', + path: 'sdk/octatrack/modules/clyps/octamod.module.json' +} + +Node.js v24.22.3 diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/host/procedure.json b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/host/procedure.json new file mode 100644 index 0000000000..c5afe8f17f --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/host/procedure.json @@ -0,0 +1,271 @@ +{ + "procedure": 1, + "command": "npm run test:procedure -- clyps --no-unit --out sdk/drafts/clyps/evidence/procedure-nov23/host", + "date": "2026-11-23", + "started": "2026-11-23T14:22:03.299Z", + "finished": "2026-11-23T14:22:05.626Z", + "seconds": 2, + "target": { + "kind": "module", + "id": "clyps", + "machine": "octatrack", + "draft": true + }, + "build": { + "revision": "613db9857006a1f865d85a28e9aebd6bfba6e527", + "dirty": false + }, + "unit": { + "available": false, + "reason": "left alone with --no-unit", + "share": "/tmp/modwerk-share.sock", + "target": "unit" + }, + "steps": [ + { + "id": "software", + "title": "Software checks", + "layer": "host", + "unit": false, + "status": "failed", + "commands": [ + "npm run module:doctor -- --draft clyps" + ], + "seconds": 2.3, + "log": "logs/01-software.log", + "reason": "exit 1: npm run module:doctor -- --draft clyps" + }, + { + "id": "compat", + "title": "Beside every other module", + "layer": "contract", + "unit": false, + "status": "not run", + "commands": [], + "seconds": 0, + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "build", + "title": "Name the build", + "layer": "host", + "unit": false, + "status": "not run", + "commands": [ + "npm run module:dev -- clyps --build-only --out 'sdk/drafts/clyps/evidence/procedure-nov23/host/clyps.mwrm'" + ], + "seconds": 0, + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "cost-model", + "title": "DSP cost model", + "layer": "contract", + "unit": false, + "status": "not run", + "commands": [ + "node scripts/cycle-scan.mjs check" + ], + "seconds": 0, + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "emulator", + "title": "Emulator rehearsal", + "layer": "emulator", + "unit": false, + "status": "not run", + "commands": [], + "seconds": 0, + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "unit-read", + "title": "Read the unit", + "layer": "target", + "unit": true, + "status": "not run", + "commands": [ + "node scripts/device.mjs status --socket /tmp/modwerk-share.sock", + "node scripts/device.mjs do inventory --socket /tmp/modwerk-share.sock" + ], + "seconds": 0, + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "unit-pass", + "title": "Scripted unit pass", + "layer": "target", + "unit": true, + "status": "not run", + "commands": [ + "npm run device:test -- --share /tmp/modwerk-share.sock --testing-entry 'sdk/drafts/clyps/evidence/procedure-nov23/host/device-test.md' 'sdk/drafts/clyps/evidence/procedure-nov23/host/clyps.mwrm'" + ], + "seconds": 0, + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "soak", + "title": "Soak", + "layer": "target", + "unit": true, + "status": "not run", + "commands": [ + "node scripts/device.mjs try 'sdk/drafts/clyps/evidence/procedure-nov23/host/clyps.mwrm' --seconds 420 --socket /tmp/modwerk-share.sock", + "node scripts/octatrack-soak.mjs --seconds 120 --log 'sdk/drafts/clyps/evidence/procedure-nov23/host/soak.json'" + ], + "seconds": 0, + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "cost-unit", + "title": "Cost on the unit", + "layer": "unit", + "unit": true, + "status": "not run", + "commands": [ + "npm run device:price -- --share /tmp/modwerk-share.sock --out 'sdk/drafts/clyps/evidence/procedure-nov23/host/price.json' --scene 'the bank, pattern and Part the unit was on, transport stopped (test:procedure)' --curve T1,T3,T6,T7 'sdk/drafts/clyps/evidence/procedure-nov23/host/clyps.mwrm'" + ], + "seconds": 0, + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "restore", + "title": "Put back", + "layer": "target", + "unit": true, + "status": "not run", + "commands": [ + "node scripts/device.mjs do inventory --socket /tmp/modwerk-share.sock" + ], + "seconds": 0, + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "by-hand", + "title": "Agent by hand", + "layer": "target", + "unit": false, + "status": "not run", + "commands": [], + "seconds": 0, + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "developer", + "title": "Submitter's own stage", + "layer": "unit", + "unit": false, + "status": "not run", + "commands": [], + "seconds": 0, + "reason": "stopped: step 1 (Software checks) failed" + } + ], + "edgeCases": { + "suggested": [ + { + "touches": "persistence", + "ask": "saved in a Part, then a Part reload, a project reload and a power cycle; removed while a saved Part still names it", + "see": "OCTATRACK_MODULE_EDGE_CASES.md#copying-and-saving" + }, + { + "touches": "the loader", + "ask": "install, replace, remove and Undo; a set the base refuses rolls back whole; the pool full; a trial that expires with a page open", + "see": "OCTATRACK_HARDWARE_TRAPS.md#dsp-loader-dynamic-dsp-code" + }, + { + "touches": "DSP code", + "ask": "DSP FULL; both cores; the receiver window; pipeline stalls the instruction count hides", + "see": "OCTATRACK_HARDWARE_TRAPS.md#coldfire-and-dsp-load" + }, + { + "touches": "the USB link", + "ask": "USB unplugged mid-transfer; the host silent until the base rolls back; a reconnect", + "see": "OCTATRACK_HARDWARE_TRAPS.md#usb-and-ep0" + }, + { + "touches": "load and admission", + "ask": "the pick at the 85 % line with the delays quiet and open; the guard counters while playing", + "see": "OCTATRACK_HARDWARE_TRAPS.md#coldfire-and-dsp-load" + }, + { + "touches": "boot and restore", + "ask": "PROJ held at power-on; the restore held back; a RAM boot back to the flashed base", + "see": "OCTATRACK_MODULE_EDGE_CASES.md#boot-and-power" + } + ], + "cases": [ + { + "case": "Eight audio lanes and independent source selection", + "risk": "A source change could redirect a neighboring lane", + "how": "Native MKII wide pair against independent stock composite and T2-only slice", + "result": "Pass. All 624 events, 608 relative writes and 219 states matched. The separate T2 slice matched 384 calls and 400 writes at wrap 90." + }, + { + "case": "Request just before wrap", + "risk": "Pending state could appear too late", + "how": "Native early-boundary panel fixture", + "result": "Fail. Requested by tick 89 +1 ms, pending diagnostic still zero at +15 ms, committed at wrap 90 +16 ms." + }, + { + "case": "Request just after wrap", + "risk": "Restore could be reported on the wrong tick", + "how": "Native late pair and strict boundary grader", + "result": "Fail. All 848 events, 816 writes and 298 states matched, but pending restore appeared at tick 187; the oracle requires 188." + }, + { + "case": "ARR after stock popup during Row Edit", + "risk": "Editor could keep the panel hidden or lose a row", + "how": "Native popup fixture and host callback test", + "result": "Pass. ARR reopened, R04 retained its definition and OFF recovered the full pool." + }, + { + "case": "Unrelated bank, early EOF, popup during bank load", + "risk": "An already-defined R04 could be cleared", + "how": "Host callbacks with an actual temporary-file EOF and an unrelated bank mask", + "result": "Pass. R04 and its source survive." + }, + { + "case": "Late interrupted project load", + "risk": "Destination initialization can clear the previous rows before completion", + "how": "Host late-failure case with a short read after init", + "result": "Fail. The characterization test passes by reproducing loss of R04. Native late-abort recovery remains unverified." + }, + { + "case": "Missing versus completed stored reload", + "risk": "Rows could be kept or discarded for the wrong destination", + "how": "Stock PROJECT menu in native emulator on disposable cards", + "result": "Pass. Missing stored files preserved bank A and R04. Completed stored reload selected bank B and cleared R04. OFF recovered the full pool in both cases." + }, + { + "case": "STOP, OFF and stock Arranger", + "risk": "Queued source changes or handlers could survive removal", + "how": "T2 slice and Arranger recovery fixtures", + "result": "Pass. STOP cancelled the queued change; OFF restored callback heads and all 786432 pool bytes. Stock Arranger playback matched before and after removal." + }, + { + "case": "Shared hook interaction", + "risk": "Panel, source or wrap registration could conflict with base owners", + "how": "Candidate build by named hooks, callback heads before/after OFF and upstream-only compile", + "result": "Pass on the candidate for bindings and T2 unload. Blocked on upstream main for the three proposed bindings; catalogue-only compatibility excludes CLYPS." + }, + { + "case": "Physical MKII", + "risk": "Audio, cost, USB trial and persistence require the real instrument", + "how": "Separate authorization required", + "result": "Not run. Trial, soak, pricing, rollback and inventory, MAIN/CUE listening and persistence remain open." + } + ] + }, + "developer": { + "status": "to do", + "items": [ + "how it sounds and plays, and timing by ear", + "MIDI, scenes and recording with it", + "it beside the other modules installed on their unit", + "two instances with different settings, on both FX slots and both DSP cores where it can (docs/MODULE_QUALIFICATION.md)", + "Part reload, project save and reload, and a power cycle with it saved: what survives (the Keep and the power cycle are theirs)" + ] + } +} diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/host/procedure.md b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/host/procedure.md new file mode 100644 index 0000000000..a3ef81ddc9 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/host/procedure.md @@ -0,0 +1,55 @@ +### Test procedure: clyps, 2026-11-23 + +Build: revision `613db9857006`, no package named. `npm run test:procedure -- clyps --no-unit --out sdk/drafts/clyps/evidence/procedure-nov23/host`, 2 s. Emulator results are not hardware evidence; only what ran on the unit is. + +| # | Step | Layer | Result | Command | Evidence | +|---|---|---|---|---|---| +| 1 | Software checks | host | **failed**: exit 1: npm run module:doctor -- --draft clyps | `npm run module:doctor -- --draft clyps` | logs/01-software.log | +| 2 | Beside every other module | contract | not run: stopped: step 1 (Software checks) failed | | | +| 3 | Name the build | host | not run: stopped: step 1 (Software checks) failed | `npm run module:dev -- clyps --build-only --out 'sdk/drafts/clyps/evidence/procedure-nov23/host/clyps.mwrm'` | | +| 4 | DSP cost model | contract | not run: stopped: step 1 (Software checks) failed | `node scripts/cycle-scan.mjs check` | | +| 5 | Emulator rehearsal | emulator | not run: stopped: step 1 (Software checks) failed | | | +| 6 | Read the unit | unit | not run: stopped: step 1 (Software checks) failed | `node scripts/device.mjs status --socket /tmp/modwerk-share.sock`
`node scripts/device.mjs do inventory --socket /tmp/modwerk-share.sock` | | +| 7 | Scripted unit pass | unit | not run: stopped: step 1 (Software checks) failed | `npm run device:test -- --share /tmp/modwerk-share.sock --testing-entry 'sdk/drafts/clyps/evidence/procedure-nov23/host/device-test.md' 'sdk/drafts/clyps/evidence/procedure-nov23/host/clyps.mwrm'` | | +| 8 | Soak | unit | not run: stopped: step 1 (Software checks) failed | `node scripts/device.mjs try 'sdk/drafts/clyps/evidence/procedure-nov23/host/clyps.mwrm' --seconds 420 --socket /tmp/modwerk-share.sock`
`node scripts/octatrack-soak.mjs --seconds 120 --log 'sdk/drafts/clyps/evidence/procedure-nov23/host/soak.json'` | | +| 9 | Cost on the unit | unit | not run: stopped: step 1 (Software checks) failed | `npm run device:price -- --share /tmp/modwerk-share.sock --out 'sdk/drafts/clyps/evidence/procedure-nov23/host/price.json' --scene 'the bank, pattern and Part the unit was on, transport stopped (test:procedure)' --curve T1,T3,T6,T7 'sdk/drafts/clyps/evidence/procedure-nov23/host/clyps.mwrm'` | | +| 10 | Put back | unit | not run: stopped: step 1 (Software checks) failed | `node scripts/device.mjs do inventory --socket /tmp/modwerk-share.sock` | | +| 11 | Agent by hand | unit | not run: stopped: step 1 (Software checks) failed | | | +| 12 | Submitter's own stage | unit | not run: stopped: step 1 (Software checks) failed | | | + +#### Edge cases for this change + +Derive them from what the change touches and run each one (docs/TEST_PROCEDURE.md#edge-cases). A start, from the manifest and the changed files: + +- persistence: saved in a Part, then a Part reload, a project reload and a power cycle; removed while a saved Part still names it (docs/OCTATRACK_MODULE_EDGE_CASES.md#copying-and-saving) +- the loader: install, replace, remove and Undo; a set the base refuses rolls back whole; the pool full; a trial that expires with a page open (docs/OCTATRACK_HARDWARE_TRAPS.md#dsp-loader-dynamic-dsp-code) +- DSP code: DSP FULL; both cores; the receiver window; pipeline stalls the instruction count hides (docs/OCTATRACK_HARDWARE_TRAPS.md#coldfire-and-dsp-load) +- the USB link: USB unplugged mid-transfer; the host silent until the base rolls back; a reconnect (docs/OCTATRACK_HARDWARE_TRAPS.md#usb-and-ep0) +- load and admission: the pick at the 85 % line with the delays quiet and open; the guard counters while playing (docs/OCTATRACK_HARDWARE_TRAPS.md#coldfire-and-dsp-load) +- boot and restore: PROJ held at power-on; the restore held back; a RAM boot back to the flashed base (docs/OCTATRACK_MODULE_EDGE_CASES.md#boot-and-power) + +| Case | Why this change makes it a risk | How run | Result | +|---|---|---|---| +| Eight audio lanes and independent source selection | A source change could redirect a neighboring lane | Native MKII wide pair against independent stock composite and T2-only slice | Pass. All 624 events, 608 relative writes and 219 states matched. The separate T2 slice matched 384 calls and 400 writes at wrap 90. | +| Request just before wrap | Pending state could appear too late | Native early-boundary panel fixture | Fail. Requested by tick 89 +1 ms, pending diagnostic still zero at +15 ms, committed at wrap 90 +16 ms. | +| Request just after wrap | Restore could be reported on the wrong tick | Native late pair and strict boundary grader | Fail. All 848 events, 816 writes and 298 states matched, but pending restore appeared at tick 187; the oracle requires 188. | +| ARR after stock popup during Row Edit | Editor could keep the panel hidden or lose a row | Native popup fixture and host callback test | Pass. ARR reopened, R04 retained its definition and OFF recovered the full pool. | +| Unrelated bank, early EOF, popup during bank load | An already-defined R04 could be cleared | Host callbacks with an actual temporary-file EOF and an unrelated bank mask | Pass. R04 and its source survive. | +| Late interrupted project load | Destination initialization can clear the previous rows before completion | Host late-failure case with a short read after init | Fail. The characterization test passes by reproducing loss of R04. Native late-abort recovery remains unverified. | +| Missing versus completed stored reload | Rows could be kept or discarded for the wrong destination | Stock PROJECT menu in native emulator on disposable cards | Pass. Missing stored files preserved bank A and R04. Completed stored reload selected bank B and cleared R04. OFF recovered the full pool in both cases. | +| STOP, OFF and stock Arranger | Queued source changes or handlers could survive removal | T2 slice and Arranger recovery fixtures | Pass. STOP cancelled the queued change; OFF restored callback heads and all 786432 pool bytes. Stock Arranger playback matched before and after removal. | +| Shared hook interaction | Panel, source or wrap registration could conflict with base owners | Candidate build by named hooks, callback heads before/after OFF and upstream-only compile | Pass on the candidate for bindings and T2 unload. Blocked on upstream main for the three proposed bindings; catalogue-only compatibility excludes CLYPS. | +| Physical MKII | Audio, cost, USB trial and persistence require the real instrument | Separate authorization required | Not run. Trial, soak, pricing, rollback and inventory, MAIN/CUE listening and persistence remain open. | + +#### Left for the submitter at their unit + +- how it sounds and plays, and timing by ear +- MIDI, scenes and recording with it +- it beside the other modules installed on their unit +- two instances with different settings, on both FX slots and both DSP cores where it can (docs/MODULE_QUALIFICATION.md) +- Part reload, project save and reload, and a power cycle with it saved: what survives (the Keep and the power cycle are theirs) + +#### For the pull request + +Not tested on a unit: stopped: step 1 (Software checks) failed. +Edge cases: the table above, one row a case (or "Edge cases: none, because …"). diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/physical-admission.json b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/physical-admission.json new file mode 100644 index 0000000000..a5b0df3d8e --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/physical-admission.json @@ -0,0 +1,80 @@ +{ + "date": "2026-11-23", + "started": "2026-11-23T15:46:16.948Z", + "finished": "2026-11-23T15:46:21.955Z", + "build": { + "revision": "2949c6f87cb59aa48394cabaad48888b35bce4a7", + "dirty": false + }, + "target": { + "kind": "module", + "id": "clyps", + "machine": "octatrack", + "draft": true + }, + "unit": { + "reason": "left alone with --no-unit" + }, + "steps": [ + { + "id": "software", + "status": "failed", + "reason": "exit 1: npm run module:doctor -- --draft clyps" + }, + { + "id": "compat", + "status": "not run", + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "build", + "status": "not run", + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "cost-model", + "status": "not run", + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "emulator", + "status": "not run", + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "unit-read", + "status": "not run", + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "unit-pass", + "status": "not run", + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "soak", + "status": "not run", + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "cost-unit", + "status": "not run", + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "restore", + "status": "not run", + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "by-hand", + "status": "not run", + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "developer", + "status": "not run", + "reason": "stopped: step 1 (Software checks) failed" + } + ] +} diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/plan.txt b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/plan.txt new file mode 100644 index 0000000000..ace2619c15 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/plan.txt @@ -0,0 +1,17 @@ + +> octamod@0.1.0 test:procedure +> node scripts/test-procedure.mjs clyps --plan + +The test procedure for clyps (docs/TEST_PROCEDURE.md). Steps 6 to 10 on the unit: no unit session on /tmp/modwerk-share.sock (npm run device -- serve --share /tmp/modwerk-share.sock; on a contributor's unit with their OK). + 1. Software checks [host]: npm run module:doctor -- --draft clyps + 2. Beside every other module [contract]: not run: a draft is judged beside every other module by module:doctor --draft (its compatibility line, step 1) + 3. Name the build [host]: npm run module:dev -- clyps --build-only --out $TMPDIR/modwerk-procedure/clyps-2026-11-23-613db985/clyps.mwrm + 4. DSP cost model [contract]: node scripts/cycle-scan.mjs check + 5. Emulator rehearsal [emulator]: not run: no emulator session (--emulator-socket SOCK, an ot_emu with --usb-host on a development base) + 6. Read the unit [unit]: not run: no unit session on /tmp/modwerk-share.sock (npm run device -- serve --share /tmp/modwerk-share.sock; on a contributor's unit with their OK) + 7. Scripted unit pass [unit]: not run: no unit session on /tmp/modwerk-share.sock (npm run device -- serve --share /tmp/modwerk-share.sock; on a contributor's unit with their OK) + 8. Soak [unit]: not run: no unit session on /tmp/modwerk-share.sock (npm run device -- serve --share /tmp/modwerk-share.sock; on a contributor's unit with their OK) + 9. Cost on the unit [unit]: not run: no unit session on /tmp/modwerk-share.sock (npm run device -- serve --share /tmp/modwerk-share.sock; on a contributor's unit with their OK) +10. Put back [unit]: not run: no unit session on /tmp/modwerk-share.sock (npm run device -- serve --share /tmp/modwerk-share.sock; on a contributor's unit with their OK) +11. Agent by hand [unit]: by hand: every control and screen by the README's button steps, a png: screenshot of each, compared with the README and its UI claims; MAIN and CUE recorded over USB (rec) with a sustained sound, checked for dropouts (runs of exact zeros, a block played twice) +12. Submitter's own stage [unit]: by hand: how it sounds and plays, and timing by ear; MIDI, scenes and recording with it; it beside the other modules installed on their unit; two instances with different settings, on both FX slots and both DSP cores where it can (docs/MODULE_QUALIFICATION.md); Part reload, project save and reload, and a power cycle with it saved: what survives (the Keep and the power cycle are theirs) diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/arr.txt b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/arr.txt new file mode 100644 index 0000000000..ed48654a11 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/arr.txt @@ -0,0 +1,12 @@ +write16@100: write16 addr=000ffa04, val=3f00 +updateClock@207: Fsys=8388608Hz / 8.38861MHz, Fext=32768Hz, SYNCR=$3f00, W=0, X=0, Y=3f +read16@29: read16 addr=000ffa22 +read16@29: read16 addr=000ffa24 +write16@100: write16 addr=000ffa22, val=000f +read16@29: read16 addr=000ffa22 +read16@29: read16 addr=000ffa24 +write16@91: Set SCSR to 0180 +boot active 0 shelved 1 +clean start 0x0 0x0 +stock Arranger before 336 calls +exit 0 diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/early.txt b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/early.txt new file mode 100644 index 0000000000..eec6e622f6 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/early.txt @@ -0,0 +1,21 @@ +write16@100: write16 addr=000ffa04, val=3f00 +updateClock@207: Fsys=8388608Hz / 8.38861MHz, Fext=32768Hz, SYNCR=$3f00, W=0, X=0, Y=3f +read16@29: read16 addr=000ffa22 +read16@29: read16 addr=000ffa24 +write16@100: write16 addr=000ffa22, val=000f +read16@29: read16 addr=000ffa22 +read16@29: read16 addr=000ffa24 +write16@91: Set SCSR to 0180 +boot active 0 shelved 1 +clean start 0x0 0x0 +stock Arranger before 336 calls +Traceback (most recent call last): + File "sdk/drafts/clyps/tests/native_rows.py", line 460, in + request(4, 1, 0, 0x111, first) + File "sdk/drafts/clyps/tests/native_rows.py", line 452, in request + expect(committed, pending) + File "sdk/drafts/clyps/tests/native_rows.py", line 406, in expect + assert diag() & 0xffffff == queued << 12 | active + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +AssertionError +exit 1 diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/grade-late.txt b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/grade-late.txt new file mode 100644 index 0000000000..686918aeb2 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/grade-late.txt @@ -0,0 +1,6 @@ +late 848 ordered calls including tick zero, 816 timestamp writes, 298 ticks; deadlines {0: 565466144, 1: 570758144, 2: 575838464} +Traceback (most recent call last): + File "sdk/drafts/clyps/tests/grade_boundary.py", line 61, in + assert candidate['panel_requests'] == [ + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +AssertionError: missing or incorrect pending selection evidence diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/grade-slice.txt b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/grade-slice.txt new file mode 100644 index 0000000000..f7aef7b0ef --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/grade-slice.txt @@ -0,0 +1 @@ +Wrap 90, 384 ordered calls, 400 relative timestamp writes, pool 786432. diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/grade-wide.txt b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/grade-wide.txt new file mode 100644 index 0000000000..a6774e43eb --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/grade-wide.txt @@ -0,0 +1 @@ +Eight-lane stock composite matched; three truncated streams rejected. diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/late-control.txt b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/late-control.txt new file mode 100644 index 0000000000..ed48654a11 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/late-control.txt @@ -0,0 +1,12 @@ +write16@100: write16 addr=000ffa04, val=3f00 +updateClock@207: Fsys=8388608Hz / 8.38861MHz, Fext=32768Hz, SYNCR=$3f00, W=0, X=0, Y=3f +read16@29: read16 addr=000ffa22 +read16@29: read16 addr=000ffa24 +write16@100: write16 addr=000ffa22, val=000f +read16@29: read16 addr=000ffa22 +read16@29: read16 addr=000ffa24 +write16@91: Set SCSR to 0180 +boot active 0 shelved 1 +clean start 0x0 0x0 +stock Arranger before 336 calls +exit 0 diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/late.txt b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/late.txt new file mode 100644 index 0000000000..f2e9a72fe4 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/late.txt @@ -0,0 +1,17 @@ +write16@100: write16 addr=000ffa04, val=3f00 +updateClock@207: Fsys=8388608Hz / 8.38861MHz, Fext=32768Hz, SYNCR=$3f00, W=0, X=0, Y=3f +read16@29: read16 addr=000ffa22 +read16@29: read16 addr=000ffa24 +write16@100: write16 addr=000ffa22, val=000f +read16@29: read16 addr=000ffa22 +read16@29: read16 addr=000ffa24 +write16@91: Set SCSR to 0180 +boot active 0 shelved 1 +clean start 0x0 0x0 +stock Arranger before 336 calls +Traceback (most recent call last): + File "sdk/drafts/clyps/tests/native_rows.py", line 479, in + assert request['observed'] == refresh, ('diagnostic refresh',edge,request) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +AssertionError: ('diagnostic refresh', 187, {'edge': 187, 'observed': 187, 'playing': 273, 'pending': 257}) +exit 1 diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/missing.txt b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/missing.txt new file mode 100644 index 0000000000..7221d67c68 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/missing.txt @@ -0,0 +1,11 @@ +usage: native_rows.py [-h] --octabam OCTABAM [--reference] [--lane-matrix] + [--project-reload {stored,missing}] [--project-change] + [--row-popup] [--scene-select] [--crossfader] + [--arranger-recovery] [--observe-queue] + [--home-control {home,stop}] + [--clock-witness CLOCK_WITNESS] + [--boundary {early,late}] [--package PACKAGE] + [--symbols-module SYMBOLS_MODULE] + emulator base card symbols output +native_rows.py: error: Project change requires package and matching module symbols +exit 2 diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/popup.txt b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/popup.txt new file mode 100644 index 0000000000..87aba73649 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/popup.txt @@ -0,0 +1,11 @@ +write16@100: write16 addr=000ffa04, val=3f00 +updateClock@207: Fsys=8388608Hz / 8.38861MHz, Fext=32768Hz, SYNCR=$3f00, W=0, X=0, Y=3f +read16@29: read16 addr=000ffa22 +read16@29: read16 addr=000ffa24 +write16@100: write16 addr=000ffa22, val=000f +read16@29: read16 addr=000ffa22 +read16@29: read16 addr=000ffa24 +write16@91: Set SCSR to 0180 +boot active 0 shelved 1 +clean start 0x0 0x0 +exit 0 diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/receipts.json b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/receipts.json new file mode 100644 index 0000000000..abdef39214 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/receipts.json @@ -0,0 +1,524 @@ +{ + "slice": { + "sha256": "c585aeb5c8e20940d98c930475a207e0d218e9e1a92ffdc33ef528be0e789587", + "receipt": { + "wraps": [ + 90 + ], + "events": 384, + "writes": 400, + "initial_pool": 786432, + "final_pool": 786432 + } + }, + "stock": { + "sha256": "c585aeb5c8e20940d98c930475a207e0d218e9e1a92ffdc33ef528be0e789587", + "receipt": { + "wraps": [ + 90 + ], + "events": 384, + "writes": 400, + "initial_pool": 786432, + "final_pool": 786432 + } + }, + "wide": { + "sha256": "a1cef1580ff0597ecf540d28e2004abe79a8d9654c346eed4febb2b7e325fba6", + "receipt": { + "events": 624, + "writes": 608, + "states": 219 + } + }, + "wide-stock": { + "sha256": "a1cef1580ff0597ecf540d28e2004abe79a8d9654c346eed4febb2b7e325fba6", + "receipt": { + "events": 624, + "writes": 608, + "states": 219 + } + }, + "early.phase-89": { + "sha256": "a4764efaf7a34cd54e5a7a74aa7edbe308f150b6b67313fd5d9b4f98a15d8658", + "receipt": [ + { + "ms": 1, + "tick": 89, + "playing": 0, + "requested": 273, + "diag": 0, + "wraps": [] + }, + { + "ms": 2, + "tick": 89, + "playing": 0, + "requested": 273, + "diag": 0, + "wraps": [] + }, + { + "ms": 3, + "tick": 89, + "playing": 0, + "requested": 273, + "diag": 0, + "wraps": [] + }, + { + "ms": 4, + "tick": 89, + "playing": 0, + "requested": 273, + "diag": 0, + "wraps": [] + }, + { + "ms": 5, + "tick": 89, + "playing": 0, + "requested": 273, + "diag": 0, + "wraps": [] + }, + { + "ms": 6, + "tick": 89, + "playing": 0, + "requested": 273, + "diag": 0, + "wraps": [] + }, + { + "ms": 7, + "tick": 89, + "playing": 0, + "requested": 273, + "diag": 0, + "wraps": [] + }, + { + "ms": 8, + "tick": 89, + "playing": 0, + "requested": 273, + "diag": 0, + "wraps": [] + }, + { + "ms": 9, + "tick": 89, + "playing": 0, + "requested": 273, + "diag": 0, + "wraps": [] + }, + { + "ms": 10, + "tick": 89, + "playing": 0, + "requested": 273, + "diag": 0, + "wraps": [] + }, + { + "ms": 11, + "tick": 89, + "playing": 0, + "requested": 273, + "diag": 0, + "wraps": [] + }, + { + "ms": 12, + "tick": 89, + "playing": 0, + "requested": 273, + "diag": 0, + "wraps": [] + }, + { + "ms": 13, + "tick": 89, + "playing": 0, + "requested": 273, + "diag": 0, + "wraps": [] + }, + { + "ms": 14, + "tick": 89, + "playing": 0, + "requested": 273, + "diag": 0, + "wraps": [] + }, + { + "ms": 15, + "tick": 89, + "playing": 0, + "requested": 273, + "diag": 0, + "wraps": [] + }, + { + "ms": 16, + "tick": 90, + "playing": 273, + "requested": 273, + "diag": 1118481, + "wraps": [ + 90 + ] + }, + { + "ms": 17, + "tick": 90, + "playing": 273, + "requested": 273, + "diag": 1118481, + "wraps": [ + 90 + ] + }, + { + "ms": 18, + "tick": 90, + "playing": 273, + "requested": 273, + "diag": 1118481, + "wraps": [ + 90 + ] + }, + { + "ms": 19, + "tick": 90, + "playing": 273, + "requested": 273, + "diag": 1118481, + "wraps": [ + 90 + ] + }, + { + "ms": 20, + "tick": 90, + "playing": 273, + "requested": 273, + "diag": 1118481, + "wraps": [ + 90 + ] + } + ] + }, + "late": { + "sha256": "4d3f4326cd585236bf84fb38643f9e1799364b0e4b706345a1cf66c65c6aaf02", + "receipt": { + "events": 848, + "wraps": [ + 90, + 186, + 282 + ], + "writes": 5175, + "states": 298, + "panel_requests": [ + { + "edge": 91, + "observed": 91, + "playing": 0, + "pending": 273 + }, + { + "edge": 187, + "observed": 187, + "playing": 273, + "pending": 257 + } + ] + } + }, + "late-control": { + "sha256": "b51cc639a607a6ab9e4e26809623e3bb6a12bd96d0d8ef6da67c65be669c654a", + "receipt": { + "events": 848, + "wraps": [ + 90, + 186, + 282 + ], + "writes": 5175, + "states": 298, + "panel_requests": [] + } + }, + "late.phase-91": { + "sha256": "377d36e48fefe56ec5ebd7bb0c71865297f80c4ce5b1c379dd1e1ea0c4ea1fd3", + "receipt": [ + { + "ms": 1, + "tick": 91, + "playing": 0, + "requested": 273, + "diag": 0, + "wraps": [ + 90 + ] + }, + { + "ms": 2, + "tick": 91, + "playing": 0, + "requested": 273, + "diag": 0, + "wraps": [ + 90 + ] + }, + { + "ms": 3, + "tick": 91, + "playing": 0, + "requested": 273, + "diag": 0, + "wraps": [ + 90 + ] + }, + { + "ms": 4, + "tick": 91, + "playing": 0, + "requested": 273, + "diag": 0, + "wraps": [ + 90 + ] + }, + { + "ms": 5, + "tick": 91, + "playing": 0, + "requested": 273, + "diag": 0, + "wraps": [ + 90 + ] + }, + { + "ms": 6, + "tick": 91, + "playing": 0, + "requested": 273, + "diag": 0, + "wraps": [ + 90 + ] + }, + { + "ms": 7, + "tick": 91, + "playing": 0, + "requested": 273, + "diag": 0, + "wraps": [ + 90 + ] + }, + { + "ms": 8, + "tick": 91, + "playing": 0, + "requested": 273, + "diag": 0, + "wraps": [ + 90 + ] + }, + { + "ms": 9, + "tick": 91, + "playing": 0, + "requested": 273, + "diag": 0, + "wraps": [ + 90 + ] + }, + { + "ms": 10, + "tick": 91, + "playing": 0, + "requested": 273, + "diag": 1118208, + "wraps": [ + 90 + ] + } + ] + }, + "late.phase-187": { + "sha256": "e8e1884197305e4833bdaa62ff6bd8f54050efb32f3790ea2dec45c707094a2b", + "receipt": [ + { + "ms": 1, + "tick": 187, + "playing": 273, + "requested": 257, + "diag": 1118481, + "wraps": [ + 90, + 186 + ] + }, + { + "ms": 2, + "tick": 187, + "playing": 273, + "requested": 257, + "diag": 1118481, + "wraps": [ + 90, + 186 + ] + }, + { + "ms": 3, + "tick": 187, + "playing": 273, + "requested": 257, + "diag": 1118481, + "wraps": [ + 90, + 186 + ] + }, + { + "ms": 4, + "tick": 187, + "playing": 273, + "requested": 257, + "diag": 1118481, + "wraps": [ + 90, + 186 + ] + }, + { + "ms": 5, + "tick": 187, + "playing": 273, + "requested": 257, + "diag": 1118481, + "wraps": [ + 90, + 186 + ] + }, + { + "ms": 6, + "tick": 187, + "playing": 273, + "requested": 257, + "diag": 1118481, + "wraps": [ + 90, + 186 + ] + }, + { + "ms": 7, + "tick": 187, + "playing": 273, + "requested": 257, + "diag": 1118481, + "wraps": [ + 90, + 186 + ] + }, + { + "ms": 8, + "tick": 187, + "playing": 273, + "requested": 257, + "diag": 1118481, + "wraps": [ + 90, + 186 + ] + }, + { + "ms": 9, + "tick": 187, + "playing": 273, + "requested": 257, + "diag": 1118481, + "wraps": [ + 90, + 186 + ] + }, + { + "ms": 10, + "tick": 187, + "playing": 273, + "requested": 257, + "diag": 1052945, + "wraps": [ + 90, + 186 + ] + } + ] + }, + "popup": { + "sha256": "4a6fee10669880b179edcab30a17cdde3d8beb6df82ab4a7bffa980f7fe3e6e4", + "receipt": { + "reopened": true, + "r04": 0, + "pool": 786432 + } + }, + "reload-missing": { + "sha256": "570ad0762506540bfa23b3210518b391e5fccd1b1757f9dfdff8ca9b9f3d87d3", + "receipt": { + "bank": 0, + "defined": 8, + "active": 1, + "observed": [ + false, + false, + false + ], + "off_pool": 786432 + } + }, + "reload-stored": { + "sha256": "7abb52946765eae9c7e72f0a3cb81e0cfdb5ed5204304215731362850277ec33", + "receipt": { + "bank": 1, + "defined": 0, + "active": 1, + "observed": [ + true, + true, + false + ], + "off_pool": 786432 + } + }, + "arr": { + "sha256": "4f11f7019655baf3998789acb6d409a603e72d88199ec0747763caf0e4c77725", + "receipt": { + "events": 336, + "writes": 336, + "row": 1, + "pool": 786432, + "sha256": "2db4fed437f3f9095af9d085e956054a9538384b612b30a5433b01a34a70dbac" + } + } +} diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/reload-missing.txt b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/reload-missing.txt new file mode 100644 index 0000000000..87aba73649 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/reload-missing.txt @@ -0,0 +1,11 @@ +write16@100: write16 addr=000ffa04, val=3f00 +updateClock@207: Fsys=8388608Hz / 8.38861MHz, Fext=32768Hz, SYNCR=$3f00, W=0, X=0, Y=3f +read16@29: read16 addr=000ffa22 +read16@29: read16 addr=000ffa24 +write16@100: write16 addr=000ffa22, val=000f +read16@29: read16 addr=000ffa22 +read16@29: read16 addr=000ffa24 +write16@91: Set SCSR to 0180 +boot active 0 shelved 1 +clean start 0x0 0x0 +exit 0 diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/reload-stored.txt b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/reload-stored.txt new file mode 100644 index 0000000000..87aba73649 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/reload-stored.txt @@ -0,0 +1,11 @@ +write16@100: write16 addr=000ffa04, val=3f00 +updateClock@207: Fsys=8388608Hz / 8.38861MHz, Fext=32768Hz, SYNCR=$3f00, W=0, X=0, Y=3f +read16@29: read16 addr=000ffa22 +read16@29: read16 addr=000ffa24 +write16@100: write16 addr=000ffa22, val=000f +read16@29: read16 addr=000ffa22 +read16@29: read16 addr=000ffa24 +write16@91: Set SCSR to 0180 +boot active 0 shelved 1 +clean start 0x0 0x0 +exit 0 diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/slice.txt b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/slice.txt new file mode 100644 index 0000000000..b091af4c64 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/slice.txt @@ -0,0 +1,9 @@ +write16@100: write16 addr=000ffa04, val=3f00 +updateClock@207: Fsys=8388608Hz / 8.38861MHz, Fext=32768Hz, SYNCR=$3f00, W=0, X=0, Y=3f +read16@29: read16 addr=000ffa22 +read16@29: read16 addr=000ffa24 +write16@100: write16 addr=000ffa22, val=000f +read16@29: read16 addr=000ffa22 +read16@29: read16 addr=000ffa24 +write16@91: Set SCSR to 0180 +exit 0 diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/stock.txt b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/stock.txt new file mode 100644 index 0000000000..b091af4c64 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/stock.txt @@ -0,0 +1,9 @@ +write16@100: write16 addr=000ffa04, val=3f00 +updateClock@207: Fsys=8388608Hz / 8.38861MHz, Fext=32768Hz, SYNCR=$3f00, W=0, X=0, Y=3f +read16@29: read16 addr=000ffa22 +read16@29: read16 addr=000ffa24 +write16@100: write16 addr=000ffa22, val=000f +read16@29: read16 addr=000ffa22 +read16@29: read16 addr=000ffa24 +write16@91: Set SCSR to 0180 +exit 0 diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/stored.txt b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/stored.txt new file mode 100644 index 0000000000..7221d67c68 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/stored.txt @@ -0,0 +1,11 @@ +usage: native_rows.py [-h] --octabam OCTABAM [--reference] [--lane-matrix] + [--project-reload {stored,missing}] [--project-change] + [--row-popup] [--scene-select] [--crossfader] + [--arranger-recovery] [--observe-queue] + [--home-control {home,stop}] + [--clock-witness CLOCK_WITNESS] + [--boundary {early,late}] [--package PACKAGE] + [--symbols-module SYMBOLS_MODULE] + emulator base card symbols output +native_rows.py: error: Project change requires package and matching module symbols +exit 2 diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/wide-stock.txt b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/wide-stock.txt new file mode 100644 index 0000000000..87aba73649 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/wide-stock.txt @@ -0,0 +1,11 @@ +write16@100: write16 addr=000ffa04, val=3f00 +updateClock@207: Fsys=8388608Hz / 8.38861MHz, Fext=32768Hz, SYNCR=$3f00, W=0, X=0, Y=3f +read16@29: read16 addr=000ffa22 +read16@29: read16 addr=000ffa24 +write16@100: write16 addr=000ffa22, val=000f +read16@29: read16 addr=000ffa22 +read16@29: read16 addr=000ffa24 +write16@91: Set SCSR to 0180 +boot active 0 shelved 1 +clean start 0x0 0x0 +exit 0 diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/wide.txt b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/wide.txt new file mode 100644 index 0000000000..87aba73649 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/replays/wide.txt @@ -0,0 +1,11 @@ +write16@100: write16 addr=000ffa04, val=3f00 +updateClock@207: Fsys=8388608Hz / 8.38861MHz, Fext=32768Hz, SYNCR=$3f00, W=0, X=0, Y=3f +read16@29: read16 addr=000ffa22 +read16@29: read16 addr=000ffa24 +write16@100: write16 addr=000ffa22, val=000f +read16@29: read16 addr=000ffa22 +read16@29: read16 addr=000ffa24 +write16@91: Set SCSR to 0180 +boot active 0 shelved 1 +clean start 0x0 0x0 +exit 0 diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/session-run.txt b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/session-run.txt new file mode 100644 index 0000000000..d5de2d62bd --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/session-run.txt @@ -0,0 +1,57 @@ + +> octamod@0.1.0 device:emulator +> node scripts/octatrack-emulator/session.mjs --image /tmp/clyps-reliability23/base1/MAIN.raw --emulator /tmp/clyps-shared-run/portable-emu/ot_emu --dir /tmp/clyps-1997-review-23/session -- npm run test:procedure -- clyps --target emulator --package /tmp/clyps-1997-review-23/clyps.mwrm --out sdk/drafts/clyps/evidence/procedure-nov23/session + +write16@100: write16 addr=000ffa04, val=3f00 +updateClock@207: Fsys=8388608Hz / 8.38861MHz, Fext=32768Hz, SYNCR=$3f00, W=0, X=0, Y=3f +read16@29: read16 addr=000ffa22 +read16@29: read16 addr=000ffa24 +write16@100: write16 addr=000ffa22, val=000f +read16@29: read16 addr=000ffa22 +read16@29: read16 addr=000ffa24 +write16@91: Set SCSR to 0180 +OCTATRACK 1.40C, base d7e727cd84cf2d99… +serving on /tmp/clyps-1997-review-23/session/dev.sock +sharing the unit on /tmp/clyps-1997-review-23/session/share.sock +Emulator session: MODWERK_UNIT=emulator MODWERK_SHARE_SOCKET=/tmp/clyps-1997-review-23/session/share.sock MODWERK_DEV_SOCKET=/tmp/clyps-1997-review-23/session/dev.sock + +> octamod@0.1.0 test:procedure +> node scripts/test-procedure.mjs clyps --target emulator --package /tmp/clyps-1997-review-23/clyps.mwrm --out sdk/drafts/clyps/evidence/procedure-nov23/session + + +$ npm run module:doctor -- --draft clyps + +> octamod@0.1.0 module:doctor +> node scripts/module-doctor.mjs --draft clyps + +node:fs:483 + return binding.readFileUtf8(path, stringToFlags(options.flag)); + ^ + +Error: ENOENT: no such file or directory, open 'sdk/octatrack/modules/clyps/octamod.module.json' + at readFileSync (node:fs:483:20) + at json (file://$HOME/Documents/ChatGPT/Modwerk%20&%20OT/CLYPS-community/scripts/module-doctor.mjs:47:33) + at file://$HOME/Documents/ChatGPT/Modwerk%20&%20OT/CLYPS-community/scripts/module-doctor.mjs:336:40 + at process.processTicksAndRejections (node:internal/process/task_queues:104:5) { + errno: -2, + code: 'ENOENT', + syscall: 'open', + path: 'sdk/octatrack/modules/clyps/octamod.module.json' +} + +Node.js v24.22.3 + + 1. Software checks: failed (exit 1: npm run module:doctor -- --draft clyps) + 2. Beside every other module: not run (stopped: step 1 (Software checks) failed) + 3. Name the build: not run (stopped: step 1 (Software checks) failed) + 4. DSP cost model: not run (stopped: step 1 (Software checks) failed) + 5. Emulator rehearsal: not run (stopped: step 1 (Software checks) failed) + 6. Read the unit: not run (stopped: step 1 (Software checks) failed) + 7. Scripted unit pass: not run (stopped: step 1 (Software checks) failed) + 8. Soak: not run (stopped: step 1 (Software checks) failed) + 9. Cost on the unit: not run (stopped: step 1 (Software checks) failed) +10. Put back: not run (stopped: step 1 (Software checks) failed) +11. Agent by hand: not run (stopped: step 1 (Software checks) failed) +12. Submitter's own stage: not run (stopped: step 1 (Software checks) failed) + +Record: sdk/drafts/clyps/evidence/procedure-nov23/session/procedure.md and procedure.json, 2 s. Fill in its edge-case table, run each case, then copy the entry to the module's TESTING.md and its last two lines to the pull request. diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/session/logs/01-software.log b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/session/logs/01-software.log new file mode 100644 index 0000000000..937a1d6524 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/session/logs/01-software.log @@ -0,0 +1,21 @@ +$ npm run module:doctor -- --draft clyps + +> octamod@0.1.0 module:doctor +> node scripts/module-doctor.mjs --draft clyps + +node:fs:483 + return binding.readFileUtf8(path, stringToFlags(options.flag)); + ^ + +Error: ENOENT: no such file or directory, open 'sdk/octatrack/modules/clyps/octamod.module.json' + at readFileSync (node:fs:483:20) + at json (file://$HOME/Documents/ChatGPT/Modwerk%20&%20OT/CLYPS-community/scripts/module-doctor.mjs:47:33) + at file://$HOME/Documents/ChatGPT/Modwerk%20&%20OT/CLYPS-community/scripts/module-doctor.mjs:336:40 + at process.processTicksAndRejections (node:internal/process/task_queues:104:5) { + errno: -2, + code: 'ENOENT', + syscall: 'open', + path: 'sdk/octatrack/modules/clyps/octamod.module.json' +} + +Node.js v24.22.3 diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/session/procedure.json b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/session/procedure.json new file mode 100644 index 0000000000..bd449bc7a6 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/session/procedure.json @@ -0,0 +1,268 @@ +{ + "procedure": 1, + "command": "npm run test:procedure -- clyps --target emulator --package /tmp/clyps-1997-review-23/clyps.mwrm --out sdk/drafts/clyps/evidence/procedure-nov23/session", + "date": "2026-11-23", + "started": "2026-11-23T14:24:27.875Z", + "finished": "2026-11-23T14:24:30.284Z", + "seconds": 2, + "target": { + "kind": "module", + "id": "clyps", + "machine": "octatrack", + "draft": true + }, + "build": { + "revision": "613db9857006a1f865d85a28e9aebd6bfba6e527", + "dirty": false + }, + "unit": { + "available": true, + "share": "/tmp/clyps-1997-review-23/session/share.sock", + "target": "emulator" + }, + "steps": [ + { + "id": "software", + "title": "Software checks", + "layer": "host", + "unit": false, + "status": "failed", + "commands": [ + "npm run module:doctor -- --draft clyps" + ], + "seconds": 2.4, + "log": "logs/01-software.log", + "reason": "exit 1: npm run module:doctor -- --draft clyps" + }, + { + "id": "compat", + "title": "Beside every other module", + "layer": "contract", + "unit": false, + "status": "not run", + "commands": [], + "seconds": 0, + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "build", + "title": "Name the build", + "layer": "host", + "unit": false, + "status": "not run", + "commands": [], + "seconds": 0, + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "cost-model", + "title": "DSP cost model", + "layer": "contract", + "unit": false, + "status": "not run", + "commands": [ + "node scripts/cycle-scan.mjs check" + ], + "seconds": 0, + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "emulator", + "title": "Emulator rehearsal", + "layer": "emulator", + "unit": false, + "status": "not run", + "commands": [], + "seconds": 0, + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "unit-read", + "title": "Read the unit", + "layer": "target", + "unit": true, + "status": "not run", + "commands": [ + "node scripts/device.mjs status --socket /tmp/clyps-1997-review-23/session/share.sock", + "node scripts/device.mjs do inventory --socket /tmp/clyps-1997-review-23/session/share.sock" + ], + "seconds": 0, + "emulator": true, + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "unit-pass", + "title": "Scripted unit pass", + "layer": "target", + "unit": true, + "status": "not run", + "commands": [ + "npm run device:test -- --share /tmp/clyps-1997-review-23/session/share.sock --testing-entry 'sdk/drafts/clyps/evidence/procedure-nov23/session/device-test.md' /tmp/clyps-1997-review-23/clyps.mwrm" + ], + "seconds": 0, + "emulator": true, + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "soak", + "title": "Soak", + "layer": "target", + "unit": true, + "status": "not run", + "commands": [], + "seconds": 0, + "emulator": true, + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "cost-unit", + "title": "Cost on the unit", + "layer": "unit", + "unit": true, + "status": "not run", + "commands": [], + "seconds": 0, + "emulator": true, + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "restore", + "title": "Put back", + "layer": "target", + "unit": true, + "status": "not run", + "commands": [ + "node scripts/device.mjs do inventory --socket /tmp/clyps-1997-review-23/session/share.sock" + ], + "seconds": 0, + "emulator": true, + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "by-hand", + "title": "Agent by hand", + "layer": "target", + "unit": false, + "status": "not run", + "commands": [], + "seconds": 0, + "reason": "stopped: step 1 (Software checks) failed" + }, + { + "id": "developer", + "title": "Submitter's own stage", + "layer": "unit", + "unit": false, + "status": "not run", + "commands": [], + "seconds": 0, + "reason": "stopped: step 1 (Software checks) failed" + } + ], + "edgeCases": { + "suggested": [ + { + "touches": "persistence", + "ask": "saved in a Part, then a Part reload, a project reload and a power cycle; removed while a saved Part still names it", + "see": "OCTATRACK_MODULE_EDGE_CASES.md#copying-and-saving" + }, + { + "touches": "the loader", + "ask": "install, replace, remove and Undo; a set the base refuses rolls back whole; the pool full; a trial that expires with a page open", + "see": "OCTATRACK_HARDWARE_TRAPS.md#dsp-loader-dynamic-dsp-code" + }, + { + "touches": "DSP code", + "ask": "DSP FULL; both cores; the receiver window; pipeline stalls the instruction count hides", + "see": "OCTATRACK_HARDWARE_TRAPS.md#coldfire-and-dsp-load" + }, + { + "touches": "the USB link", + "ask": "USB unplugged mid-transfer; the host silent until the base rolls back; a reconnect", + "see": "OCTATRACK_HARDWARE_TRAPS.md#usb-and-ep0" + }, + { + "touches": "load and admission", + "ask": "the pick at the 85 % line with the delays quiet and open; the guard counters while playing", + "see": "OCTATRACK_HARDWARE_TRAPS.md#coldfire-and-dsp-load" + }, + { + "touches": "boot and restore", + "ask": "PROJ held at power-on; the restore held back; a RAM boot back to the flashed base", + "see": "OCTATRACK_MODULE_EDGE_CASES.md#boot-and-power" + } + ], + "cases": [ + { + "case": "Eight audio lanes and independent source selection", + "risk": "A source change could redirect a neighboring lane", + "how": "Native MKII wide pair against independent stock composite and T2-only slice", + "result": "Pass. All 624 events, 608 relative writes and 219 states matched. The separate T2 slice matched 384 calls and 400 writes at wrap 90." + }, + { + "case": "Request just before wrap", + "risk": "Pending state could appear too late", + "how": "Native early-boundary panel fixture", + "result": "Fail. Requested by tick 89 +1 ms, pending diagnostic still zero at +15 ms, committed at wrap 90 +16 ms." + }, + { + "case": "Request just after wrap", + "risk": "Restore could be reported on the wrong tick", + "how": "Native late pair and strict boundary grader", + "result": "Fail. All 848 events, 816 writes and 298 states matched, but pending restore appeared at tick 187; the oracle requires 188." + }, + { + "case": "ARR after stock popup during Row Edit", + "risk": "Editor could keep the panel hidden or lose a row", + "how": "Native popup fixture and host callback test", + "result": "Pass. ARR reopened, R04 retained its definition and OFF recovered the full pool." + }, + { + "case": "Unrelated bank, early EOF, popup during bank load", + "risk": "An already-defined R04 could be cleared", + "how": "Host callbacks with an actual temporary-file EOF and an unrelated bank mask", + "result": "Pass. R04 and its source survive." + }, + { + "case": "Late interrupted project load", + "risk": "Destination initialization can clear the previous rows before completion", + "how": "Host late-failure case with a short read after init", + "result": "Fail. The characterization test passes by reproducing loss of R04. Native late-abort recovery remains unverified." + }, + { + "case": "Missing versus completed stored reload", + "risk": "Rows could be kept or discarded for the wrong destination", + "how": "Stock PROJECT menu in native emulator on disposable cards", + "result": "Pass. Missing stored files preserved bank A and R04. Completed stored reload selected bank B and cleared R04. OFF recovered the full pool in both cases." + }, + { + "case": "STOP, OFF and stock Arranger", + "risk": "Queued source changes or handlers could survive removal", + "how": "T2 slice and Arranger recovery fixtures", + "result": "Pass. STOP cancelled the queued change; OFF restored callback heads and all 786432 pool bytes. Stock Arranger playback matched before and after removal." + }, + { + "case": "Shared hook interaction", + "risk": "Panel, source or wrap registration could conflict with base owners", + "how": "Candidate build by named hooks, callback heads before/after OFF and upstream-only compile", + "result": "Pass on the candidate for bindings and T2 unload. Blocked on upstream main for the three proposed bindings; catalogue-only compatibility excludes CLYPS." + }, + { + "case": "Physical MKII", + "risk": "Audio, cost, USB trial and persistence require the real instrument", + "how": "Separate authorization required", + "result": "Not run. Trial, soak, pricing, rollback and inventory, MAIN/CUE listening and persistence remain open." + } + ] + }, + "developer": { + "status": "to do", + "items": [ + "how it sounds and plays, and timing by ear", + "MIDI, scenes and recording with it", + "it beside the other modules installed on their unit", + "two instances with different settings, on both FX slots and both DSP cores where it can (docs/MODULE_QUALIFICATION.md)", + "Part reload, project save and reload, and a power cycle with it saved: what survives (the Keep and the power cycle are theirs)" + ] + } +} diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/session/procedure.md b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/session/procedure.md new file mode 100644 index 0000000000..146074d0c6 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/session/procedure.md @@ -0,0 +1,55 @@ +### Test procedure: clyps, 2026-11-23 + +Build: revision `613db9857006`, no package named. `npm run test:procedure -- clyps --target emulator --package /tmp/clyps-1997-review-23/clyps.mwrm --out sdk/drafts/clyps/evidence/procedure-nov23/session`, 2 s. Emulator results are not hardware evidence; only what ran on the unit is. + +| # | Step | Layer | Result | Command | Evidence | +|---|---|---|---|---|---| +| 1 | Software checks | host | **failed**: exit 1: npm run module:doctor -- --draft clyps | `npm run module:doctor -- --draft clyps` | logs/01-software.log | +| 2 | Beside every other module | contract | not run: stopped: step 1 (Software checks) failed | | | +| 3 | Name the build | host | not run: stopped: step 1 (Software checks) failed | | | +| 4 | DSP cost model | contract | not run: stopped: step 1 (Software checks) failed | `node scripts/cycle-scan.mjs check` | | +| 5 | Emulator rehearsal | emulator | not run: stopped: step 1 (Software checks) failed | | | +| 6 | Read the unit (emulator) | emulator | not run: stopped: step 1 (Software checks) failed | `node scripts/device.mjs status --socket /tmp/clyps-1997-review-23/session/share.sock`
`node scripts/device.mjs do inventory --socket /tmp/clyps-1997-review-23/session/share.sock` | | +| 7 | Scripted unit pass (emulator) | emulator | not run: stopped: step 1 (Software checks) failed | `npm run device:test -- --share /tmp/clyps-1997-review-23/session/share.sock --testing-entry 'sdk/drafts/clyps/evidence/procedure-nov23/session/device-test.md' /tmp/clyps-1997-review-23/clyps.mwrm` | | +| 8 | Soak (emulator) | emulator | not run: stopped: step 1 (Software checks) failed | | | +| 9 | Cost on the unit (emulator) | unit | not run: stopped: step 1 (Software checks) failed | | | +| 10 | Put back (emulator) | emulator | not run: stopped: step 1 (Software checks) failed | `node scripts/device.mjs do inventory --socket /tmp/clyps-1997-review-23/session/share.sock` | | +| 11 | Agent by hand | unit | not run: stopped: step 1 (Software checks) failed | | | +| 12 | Submitter's own stage | unit | not run: stopped: step 1 (Software checks) failed | | | + +#### Edge cases for this change + +Derive them from what the change touches and run each one (docs/TEST_PROCEDURE.md#edge-cases). A start, from the manifest and the changed files: + +- persistence: saved in a Part, then a Part reload, a project reload and a power cycle; removed while a saved Part still names it (docs/OCTATRACK_MODULE_EDGE_CASES.md#copying-and-saving) +- the loader: install, replace, remove and Undo; a set the base refuses rolls back whole; the pool full; a trial that expires with a page open (docs/OCTATRACK_HARDWARE_TRAPS.md#dsp-loader-dynamic-dsp-code) +- DSP code: DSP FULL; both cores; the receiver window; pipeline stalls the instruction count hides (docs/OCTATRACK_HARDWARE_TRAPS.md#coldfire-and-dsp-load) +- the USB link: USB unplugged mid-transfer; the host silent until the base rolls back; a reconnect (docs/OCTATRACK_HARDWARE_TRAPS.md#usb-and-ep0) +- load and admission: the pick at the 85 % line with the delays quiet and open; the guard counters while playing (docs/OCTATRACK_HARDWARE_TRAPS.md#coldfire-and-dsp-load) +- boot and restore: PROJ held at power-on; the restore held back; a RAM boot back to the flashed base (docs/OCTATRACK_MODULE_EDGE_CASES.md#boot-and-power) + +| Case | Why this change makes it a risk | How run | Result | +|---|---|---|---| +| Eight audio lanes and independent source selection | A source change could redirect a neighboring lane | Native MKII wide pair against independent stock composite and T2-only slice | Pass. All 624 events, 608 relative writes and 219 states matched. The separate T2 slice matched 384 calls and 400 writes at wrap 90. | +| Request just before wrap | Pending state could appear too late | Native early-boundary panel fixture | Fail. Requested by tick 89 +1 ms, pending diagnostic still zero at +15 ms, committed at wrap 90 +16 ms. | +| Request just after wrap | Restore could be reported on the wrong tick | Native late pair and strict boundary grader | Fail. All 848 events, 816 writes and 298 states matched, but pending restore appeared at tick 187; the oracle requires 188. | +| ARR after stock popup during Row Edit | Editor could keep the panel hidden or lose a row | Native popup fixture and host callback test | Pass. ARR reopened, R04 retained its definition and OFF recovered the full pool. | +| Unrelated bank, early EOF, popup during bank load | An already-defined R04 could be cleared | Host callbacks with an actual temporary-file EOF and an unrelated bank mask | Pass. R04 and its source survive. | +| Late interrupted project load | Destination initialization can clear the previous rows before completion | Host late-failure case with a short read after init | Fail. The characterization test passes by reproducing loss of R04. Native late-abort recovery remains unverified. | +| Missing versus completed stored reload | Rows could be kept or discarded for the wrong destination | Stock PROJECT menu in native emulator on disposable cards | Pass. Missing stored files preserved bank A and R04. Completed stored reload selected bank B and cleared R04. OFF recovered the full pool in both cases. | +| STOP, OFF and stock Arranger | Queued source changes or handlers could survive removal | T2 slice and Arranger recovery fixtures | Pass. STOP cancelled the queued change; OFF restored callback heads and all 786432 pool bytes. Stock Arranger playback matched before and after removal. | +| Shared hook interaction | Panel, source or wrap registration could conflict with base owners | Candidate build by named hooks, callback heads before/after OFF and upstream-only compile | Pass on the candidate for bindings and T2 unload. Blocked on upstream main for the three proposed bindings; catalogue-only compatibility excludes CLYPS. | +| Physical MKII | Audio, cost, USB trial and persistence require the real instrument | Separate authorization required | Not run. Trial, soak, pricing, rollback and inventory, MAIN/CUE listening and persistence remain open. | + +#### Left for the submitter at their unit + +- how it sounds and plays, and timing by ear +- MIDI, scenes and recording with it +- it beside the other modules installed on their unit +- two instances with different settings, on both FX slots and both DSP cores where it can (docs/MODULE_QUALIFICATION.md) +- Part reload, project save and reload, and a power cycle with it saved: what survives (the Keep and the power cycle are theirs) + +#### For the pull request + +Not tested on a unit: stopped: step 1 (Software checks) failed. +Edge cases: the table above, one row a case (or "Edge cases: none, because …"). diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/tests.txt b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/tests.txt new file mode 100644 index 0000000000..80cbc4a693 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/tests.txt @@ -0,0 +1,7 @@ +ColdFire image 5596 bytes, BSS 176, relocations 248 +Host callbacks passed for 8 lanes x 16 sources and eight ownership transitions. +.......... +---------------------------------------------------------------------- +Ran 10 tests in 1.404s + +OK diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/upstream-build.txt b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/upstream-build.txt new file mode 100644 index 0000000000..804f38ad4e --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/upstream-build.txt @@ -0,0 +1,19 @@ +$TMPDIR/tmpj9c4oh4p/modal.c:2:14: error: variable 'clyps_modal' has initializer but incomplete type + 2 | const struct modwerk_modal_input clyps_modal = { MODWERK_MODAL_INPUT_ABI }; + | ^~~~~~~~~~~~~~~~~~~ +$TMPDIR/tmpj9c4oh4p/modal.c:2:50: error: 'MODWERK_MODAL_INPUT_ABI' undeclared here (not in a function); did you mean 'MODWERK_MACHINE_ABI'? + 2 | const struct modwerk_modal_input clyps_modal = { MODWERK_MODAL_INPUT_ABI }; + | ^~~~~~~~~~~~~~~~~~~~~~~ + | MODWERK_MACHINE_ABI +$TMPDIR/tmpj9c4oh4p/modal.c:2:50: error: excess elements in struct initializer [-Werror] +$TMPDIR/tmpj9c4oh4p/modal.c:2:50: note: (near initialization for 'clyps_modal') +$TMPDIR/tmpj9c4oh4p/modal.c:2:34: error: storage size of 'clyps_modal' isn't known + 2 | const struct modwerk_modal_input clyps_modal = { MODWERK_MODAL_INPUT_ABI }; + | ^~~~~~~~~~~ +cc1: all warnings being treated as errors +Traceback (most recent call last): + File "sdk/drafts/clyps/build_candidate.py", line 34, in + subprocess.run(['m68k-elf-gcc', *build.CFLAGS, *m68k_codegen.FLAGS, + File "$HOME/.local/share/uv/python/cpython-3.12.14-macos-aarch64-none/lib/python3.12/subprocess.py", line 571, in run + raise CalledProcessError(retcode, process.args, +subprocess.CalledProcessError: Command '['m68k-elf-gcc', '-mcpu=54455', '-Os', '-std=c99', '-ffreestanding', '-fno-builtin', '-fno-common', '-fno-tree-loop-distribute-patterns', '-fno-asynchronous-unwind-tables', '-fno-unwind-tables', '-Wall', '-Wextra', '-Werror', '-I', 'sdk/runtime/loader', '-fno-late-combine-instructions', '-I', PosixPath('sdk/machines/octatrack/include'), '-c', PosixPath('$TMPDIR/tmpj9c4oh4p/modal.c'), '-o', PosixPath('$TMPDIR/tmpj9c4oh4p/modal.o')]' returned non-zero exit status 1. diff --git a/sdk/octatrack/modules/clyps/evidence/procedure-nov23/verify.txt b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/verify.txt new file mode 100644 index 0000000000..fc7e03b43a --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/procedure-nov23/verify.txt @@ -0,0 +1,2 @@ +ColdFire image 5596 bytes, BSS 176, relocations 248 +Host callbacks passed for 8 lanes x 16 sources and eight ownership transitions. diff --git a/sdk/octatrack/modules/clyps/evidence/shared-base-refresh.json b/sdk/octatrack/modules/clyps/evidence/shared-base-refresh.json new file mode 100644 index 0000000000..19da9ca3cd --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/shared-base-refresh.json @@ -0,0 +1,487 @@ +{ + "cumulative": "23f41e720e6f3d90ecf44f66780fa76324a5ff9f", + "baseCommit": "b3184dd5e19caaae8c88e2e002c6ab5204ac27d6", + "moduleTestCommit": "3478465af605575964c215dfef9e6b6fca8c27f3", + "configuration": "59596991c4ce348b795fc4cdc375723b02ee32c6014c0f5bf35d95c776aed1a7", + "linkedMain": "6a9d7518ba7707e3763215ecc50be1c7eec09628b1bdf45b86b3f207a02b434b", + "equalWidthNegativeMain": "4d2573b85d19806535556c1fdfb40917ff343a30828696e1c5ecbff4ce0e74ac", + "module": "8aa6ccef2afd7db7874de28e8f6948f948e70f1e8b94a2f023d22452e4e90423", + "preparedCard": "486a7937319e2a8f6747fc3e4fe1ca63137a1587888c65af37a009cd8ab500e1", + "emulator": "a1410ad471be5fbf0fee5e0865dbce9ec1ffcba1d4697aaa6e607943b5614a87", + "nativeSlice": { + "wrap": 90, + "events": 384, + "writes": 400, + "poolAfterOff": 786432 + }, + "negativeControl": { + "refusal": 259, + "before": { + "callbacks": [ + 0, + 0, + 0, + 0 + ], + "active": 0, + "pool": 786432, + "owners": 0 + }, + "after": { + "callbacks": [ + 0, + 0, + 0, + 0 + ], + "active": 0, + "pool": 786432, + "owners": 0 + } + }, + "wide": { + "events": 624, + "relativeTimestampWrites": 608, + "sampledStates": 219, + "defaultCaptureMismatchTicks": [ + 193 + ], + "oneMsObserverPass": true, + "truncationControlsRejected": 3 + }, + "matrix": { + "rows": 16, + "sourcesPerTrack": 16, + "tracks": 8, + "poolAfterOff": 786432, + "ownersAfterOff": 0 + }, + "early": { + "strictPass": true, + "events": 576, + "writes": 560, + "ticks": 202 + }, + "late": { + "strictPass": false, + "events": 848, + "writes": 816, + "ticks": 298, + "press": 187, + "requestAcceptedMs": 1, + "pendingSeenMs": 5, + "pendingSeenTick": 187, + "expectedDiagnosticTick": 188, + "firstT2HomeBuilderTick": 282 + }, + "arrangerAfterOff": { + "events": 336, + "writes": 336, + "row": 1, + "pool": 786432, + "sha256": "2db4fed437f3f9095af9d085e956054a9538384b612b30a5433b01a34a70dbac" + }, + "profile": { + "empty-master": [ + [ + 64, + 64 + ], + [ + 56, + 64 + ], + [ + 64, + 64 + ] + ], + "empty-stopped": { + "mw_frame_skips": 0, + "mw_frame_sheds": 0, + "mw_frame_busy": 444814, + "mw_frame_count": 8357, + "instruction_spans": { + "boundary": { + "count": 0, + "minimum": null, + "maximum": null + }, + "source": { + "count": 0, + "minimum": null, + "maximum": null + } + }, + "frame_peak_timer_counts_since_boot": 21183, + "audio_lane_sources": [] + }, + "empty-light": { + "mw_frame_skips": 0, + "mw_frame_sheds": 0, + "mw_frame_busy": 481024, + "mw_frame_count": 8352, + "instruction_spans": { + "boundary": { + "count": 1, + "minimum": 12, + "maximum": 12 + }, + "source": { + "count": 192, + "minimum": 16, + "maximum": 16 + } + }, + "frame_peak_timer_counts_since_boot": 21183, + "audio_lane_sources": [ + [ + 0, + 0 + ], + [ + 1, + 0 + ], + [ + 2, + 0 + ], + [ + 3, + 0 + ], + [ + 4, + 0 + ], + [ + 5, + 0 + ], + [ + 6, + 0 + ], + [ + 7, + 0 + ] + ] + }, + "installed-master": [ + [ + 64, + 64 + ], + [ + 56, + 64 + ], + [ + 64, + 64 + ] + ], + "installed-stopped": { + "mw_frame_skips": 0, + "mw_frame_sheds": 0, + "mw_frame_busy": 482518, + "mw_frame_count": 8351, + "instruction_spans": { + "boundary": { + "count": 0, + "minimum": null, + "maximum": null + }, + "source": { + "count": 0, + "minimum": null, + "maximum": null + } + }, + "frame_peak_timer_counts_since_boot": 21183, + "audio_lane_sources": [] + }, + "installed-light": { + "mw_frame_skips": 0, + "mw_frame_sheds": 0, + "mw_frame_busy": 481269, + "mw_frame_count": 8348, + "instruction_spans": { + "boundary": { + "count": 1, + "minimum": 28, + "maximum": 28 + }, + "source": { + "count": 192, + "minimum": 31, + "maximum": 31 + } + }, + "frame_peak_timer_counts_since_boot": 21183, + "audio_lane_sources": [ + [ + 0, + 0 + ], + [ + 1, + 0 + ], + [ + 2, + 0 + ], + [ + 3, + 0 + ], + [ + 4, + 0 + ], + [ + 5, + 0 + ], + [ + 6, + 0 + ], + [ + 7, + 0 + ] + ] + }, + "installed-dense": { + "mw_frame_skips": 0, + "mw_frame_sheds": 0, + "mw_frame_busy": 524537, + "mw_frame_count": 8333, + "instruction_spans": { + "boundary": { + "count": 1, + "minimum": 540, + "maximum": 540 + }, + "source": { + "count": 192, + "minimum": 160, + "maximum": 160 + } + }, + "frame_peak_timer_counts_since_boot": 27822, + "audio_lane_sources": [ + [ + 0, + 1 + ], + [ + 1, + 1 + ], + [ + 2, + 1 + ], + [ + 3, + 1 + ], + [ + 4, + 1 + ], + [ + 5, + 1 + ], + [ + 6, + 1 + ], + [ + 7, + 1 + ] + ] + }, + "empty-dense": { + "mw_frame_skips": 0, + "mw_frame_sheds": 0, + "mw_frame_busy": 526237, + "mw_frame_count": 8345, + "instruction_spans": { + "boundary": { + "count": 1, + "minimum": 12, + "maximum": 12 + }, + "source": { + "count": 200, + "minimum": 16, + "maximum": 16 + } + }, + "frame_peak_timer_counts_since_boot": 27822, + "audio_lane_sources": [ + [ + 0, + 1 + ], + [ + 1, + 1 + ], + [ + 2, + 1 + ], + [ + 3, + 1 + ], + [ + 4, + 1 + ], + [ + 5, + 1 + ], + [ + 6, + 1 + ], + [ + 7, + 1 + ] + ] + } + }, + "receiptSha256": { + "arranger.json": "4f11f7019655baf3998789acb6d409a603e72d88199ec0747763caf0e4c77725", + "candidate.json": "c585aeb5c8e20940d98c930475a207e0d218e9e1a92ffdc33ef528be0e789587", + "early-stock.json": "dfa714ba81a449202f0674673981cdb7c249e15f8678d4846f42f09d19d55ee0", + "early.json": "f8d1e984ceb87edb65412da6098780cc9b282c7cdcc8600aa89c397b67e8cc15", + "early.phase-185.json": "54a61db958e986ca923ea521e3e7e350c625a412724e8a9ac775ec9dd82b5aab", + "early.phase-89.json": "dfbfa770a5b6f2fd90611e11396859895445347da8a1df7c7a5c1c64648b3f46", + "late-stock.json": "50f9181c4e0dcc41a6a87df19ccd55dd1b3237505a12ccb481ad37d1d0677148", + "late.json": "ddc07415a019a3105f1e6ea9f9b5d692f1ce0be9dc45638f1618490600acab1d", + "late.phase-187.json": "f17ccd3ba061e0084f9de68449f34d3ceb8764e89eca5a86cff31341a996c581", + "late.phase-91.json": "db727c4dd2ae8d9b562dbbd3013a693cfb88d83c21049e4c4c7589ba74e227c4", + "matrix.json": "82f68f39fdf73bb1a57d56d4558e9008dd59b734968e4941e215a8a5493eb9cc", + "module-symbols.json": "f1b8bf951be28b619f70fd24b7ab05cd499eed8360bcbc04cf8c816053112a5c", + "observe-candidate.flags.json": "baf12ccf240d079732883337d27a16b490a722aa7130aeb56240f8de9be89c3b", + "observe-candidate.json": "a1cef1580ff0597ecf540d28e2004abe79a8d9654c346eed4febb2b7e325fba6", + "observe-stock.flags.json": "e00041445960b6c6f3cba52ca81a73f76f736ff9d9422cf148b7e44a4b09a11a", + "observe-stock.json": "a1cef1580ff0597ecf540d28e2004abe79a8d9654c346eed4febb2b7e325fba6", + "profile.json": "8d0d8e992a4574236113962fd85a3f6eb658d1a5d4ae492f62199a2f52b8f53e", + "refusal.json": "acf2ba583a6b4261c3cd3db7727341681288220cfad279d6b9156e1143f6b9d6", + "stock.json": "c585aeb5c8e20940d98c930475a207e0d218e9e1a92ffdc33ef528be0e789587", + "wide-stock.json": "a1cef1580ff0597ecf540d28e2004abe79a8d9654c346eed4febb2b7e325fba6", + "wide.json": "ea5bb7b2f1337d5553dfb63d71e685d54f0e7b4edfdb81b1e9cf4c16c88d05a0", + "grain/result.json": "e3c71ee17fa3e179f23d7fd9a3d72747779d1bd30bf06005c887b3675e7d1ad6", + "poly8/result.json": "93739f0fc0f432b57e1413997d9e2a578c13e27fa69962d528ae53af3065d78d", + "vector/result.json": "03ab940d1051410a2f5ada7c4bdd54606bb777054f8da1c324477be541910e2f", + "track-solo/result.json": "bfefe3f48b2818cc6b401685634083bdccee9f4c5b2e2a0310424850ec5cad83", + "panel/result.json": "7dada3fbddef99ad1fb473f65349a3e60c4caa26d3fa9f03319d2c7a9f6fa9c0", + "popup/result.json": "b556f0e8d873ef406750a1e3961352db7245f89d2076c9d9c9025fe906c50406", + "pcm-flex/result.json": "09a2d1e7be3f290255fdb8a8ccfe132ff450eb91efd901dc2203076cd10caa15", + "pcm-static/result.json": "70234dfc827e2c6b5a4662d134091e01c7bc75bd8128886bab7844d33deb3de1", + "clyps-edit/result.json": "7e9781b155dc306459adc31cf7cd2d878a83035808d63cdc44bd9dacac183a4a", + "stock-edit/result.json": "7e9781b155dc306459adc31cf7cd2d878a83035808d63cdc44bd9dacac183a4a", + "static-stock/result.json": "70234dfc827e2c6b5a4662d134091e01c7bc75bd8128886bab7844d33deb3de1", + "scenes.json": "51a91cbf7d260dde580252030b048523f9c315272813b5535a15fff4068c3446" + }, + "replayBuildCommit": "18e28a172b7836199e17d6da987649eda1710be2", + "replayCumulative": "0c8e39558b20ba4bc6d8e096f4c0ac7fb5b8cf08", + "tipRebuild": { + "mainAndSymbolsByteIdentical": true, + "sameConfigurationHash": true + }, + "peerChecks": { + "grain": "passed", + "poly8": "passed", + "vector": "passed", + "track-solo": "passed", + "panel": "passed", + "popup": "passed", + "pcm-flex": "passed", + "pcm-static": "failed prelaunch silence", + "clyps-edit": "passed", + "stock-edit": "passed" + }, + "sceneSelection": { + "stock": [ + [ + 0, + 8 + ], + [ + 5, + 8 + ], + [ + 5, + 15 + ], + [ + 0, + 15 + ], + [ + 0, + 8 + ] + ], + "installed": [ + [ + 0, + 8 + ], + [ + 5, + 8 + ], + [ + 5, + 15 + ], + [ + 0, + 15 + ], + [ + 0, + 8 + ] + ] + }, + "staticStockControl": { + "home": [ + 1930, + 2117, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "launched": [ + 1930, + 2337, + 0, + 0, + 0, + 0, + 0, + 0 + ] + } +} diff --git a/sdk/octatrack/modules/clyps/evidence/shared-base.json b/sdk/octatrack/modules/clyps/evidence/shared-base.json new file mode 100644 index 0000000000..604dc3d15d --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/shared-base.json @@ -0,0 +1,283 @@ +{ + "baseCommit": "7419b7598006646dd2bbbd3f09af6f352b95ff9b", + "donor": "a9674ed846ebe75d2bcbced307922fe9c4cb63f1", + "module": "c3c516e8a13511899a6c8ff8c5140d918051b728", + "main": "3db3ece713e65048102c442cd341d6d587b38d6638006eabc772d71c711b4cbd", + "configuration": "08f12c2ebe9f0df093ea09f9d150ffa885d2b2082438836b666e083fa863e63c", + "mwrm": "8aa6ccef2afd7db7874de28e8f6948f948e70f1e8b94a2f023d22452e4e90423", + "emulator": "a1410ad471be5fbf0fee5e0865dbce9ec1ffcba1d4697aaa6e607943b5614a87", + "sourceCardSha256": "0e69834f607f27e090b34a7c6204dffbb90baf34bbcdebc3fbbf5a01eed996d2", + "receiptSha256": { + "candidate.json": "c585aeb5c8e20940d98c930475a207e0d218e9e1a92ffdc33ef528be0e789587", + "stock.json": "c585aeb5c8e20940d98c930475a207e0d218e9e1a92ffdc33ef528be0e789587", + "refusal.json": "acf2ba583a6b4261c3cd3db7727341681288220cfad279d6b9156e1143f6b9d6", + "wide.json": "a1cef1580ff0597ecf540d28e2004abe79a8d9654c346eed4febb2b7e325fba6", + "wide-stock.json": "a1cef1580ff0597ecf540d28e2004abe79a8d9654c346eed4febb2b7e325fba6", + "matrix.json": "82f68f39fdf73bb1a57d56d4558e9008dd59b734968e4941e215a8a5493eb9cc", + "late.json": "1e35e4af3ff3ed9277ec9081358be7807a3c100a708b32001591bd154cd7a10a", + "late-stock.json": "a91038a3534b05f7db95a0764b7ccedaf9c6edbf3cd7b37f7c3917cfca7085d7", + "late.phase-187.json": "14337517e4d5b4b679415a6b2bd2574e8e2410bee215ca773290b544ed8699b9", + "profile.json": "8a719f620aef8be4ccae79e6023b3801e11a7872a76cea3093629b7f79797b32", + "early.json": "5ccee6c95d1ef428e1b7f07a3982e27b8b3d9db0d710163c614d2156c00b8d3c", + "early-stock.json": "b079b4e7ad88700dc8a6f8d377d6e45cc8d96750ccfd12a58492b7a89a089388", + "early.phase-185.json": "d52cf6e97a855530985a65c0a48b0b4d9a2ff3e889e406d9100a77820ef16634", + "arranger.json": "4f11f7019655baf3998789acb6d409a603e72d88199ec0747763caf0e4c77725", + "profile-with-sources.json": "598dbf8ac74dc335115fbb06dc2e184ebb8c6aa790aa8afea9f3847328fef002", + "static-stock.json": "70234dfc827e2c6b5a4662d134091e01c7bc75bd8128886bab7844d33deb3de1", + "pcm-static/result.json": "70234dfc827e2c6b5a4662d134091e01c7bc75bd8128886bab7844d33deb3de1", + "pcm-flex/result.json": "09a2d1e7be3f290255fdb8a8ccfe132ff450eb91efd901dc2203076cd10caa15", + "panel/result.json": "7dada3fbddef99ad1fb473f65349a3e60c4caa26d3fa9f03319d2c7a9f6fa9c0", + "track-solo/result.json": "bfefe3f48b2818cc6b401685634083bdccee9f4c5b2e2a0310424850ec5cad83", + "grain/result.json": "e3c71ee17fa3e179f23d7fd9a3d72747779d1bd30bf06005c887b3675e7d1ad6", + "poly8/result.json": "93739f0fc0f432b57e1413997d9e2a578c13e27fa69962d528ae53af3065d78d", + "vector/result.json": "03ab940d1051410a2f5ada7c4bdd54606bb777054f8da1c324477be541910e2f", + "stock-edit/result.json": "7e9781b155dc306459adc31cf7cd2d878a83035808d63cdc44bd9dacac183a4a", + "clyps-edit/result.json": "7e9781b155dc306459adc31cf7cd2d878a83035808d63cdc44bd9dacac183a4a", + "popup/result.json": "b556f0e8d873ef406750a1e3961352db7245f89d2076c9d9c9025fe906c50406", + "scenes.json": "51a91cbf7d260dde580252030b048523f9c315272813b5535a15fff4068c3446" + }, + "slice": { + "wraps": [ + 90 + ], + "orderedAudioAndMidiCalls": 384, + "relativeTimestampWrites": 400, + "initialPool": 786432, + "finalPool": 786432, + "track": 2, + "queuedSource": "A02", + "globalPattern": "A01", + "stopCancellation": true, + "srcLabels": true, + "arrSourceDigits": true, + "patternAndPartIntegrity": true + }, + "featureMissingControl": { + "refusal": 259, + "before": { + "callbacks": [ + 0, + 0, + 0, + 0 + ], + "active": 0, + "pool": 786432, + "owners": 0 + }, + "after": { + "callbacks": [ + 0, + 0, + 0, + 0 + ], + "active": 0, + "pool": 786432, + "owners": 0 + } + }, + "controlBase": "8aeb9c3d0239eedb0f091273dfe860006152b3c8cb35f7d9ada0b8289a591c63", + "moduleResources": { + "codeDataBytes": 5456, + "bssBytes": 164, + "relocations": 238 + }, + "reconstructedInputs": { + "preparedCardSha256": "2e204ad956098649f6c04feedc6d8fc8608d12b1b7f29c2d3b45db4ce1881465", + "emulatorSource": "sambanks/octabam@f7d7290663135ff8bc4ea18aa45d2854a7b332c1", + "emulatorRebuiltByteIdentical": true, + "preparedCardRebuiltByteIdentical": true + }, + "wide": { + "orderedCalls": 624, + "timestampWrites": 608, + "states": 219, + "mutatedStreamsRejected": 3 + }, + "matrix": { + "rows": 16, + "tracks": 8, + "sourcesPerTrack": 16, + "poolAfterOff": 786432, + "ownersAfterOff": 0 + }, + "late": { + "orderedCalls": 848, + "timestampWrites": 816, + "ticks": 298, + "restorePressTick": 187, + "requestedAfterMs": 1, + "pendingPublicationTick": 188, + "publishedAfterMs": 16, + "restoreWrap": 282 + }, + "mainLevelOutsideMeta": { + "empty": [ + [ + 64, + 64 + ], + [ + 56, + 64 + ], + [ + 64, + 64 + ] + ], + "installed": [ + [ + 64, + 64 + ], + [ + 56, + 64 + ], + [ + 64, + 64 + ] + ], + "fields": [ + "MAIN", + "CUE" + ] + }, + "early": { + "orderedCalls": 576, + "timestampWrites": 560, + "ticks": 202, + "pendingObservedAt": [ + 89, + 185 + ] + }, + "arrangerAfterOff": { + "events": 336, + "writes": 336, + "row": 1, + "pool": 786432, + "sha256": "2db4fed437f3f9095af9d085e956054a9538384b612b30a5433b01a34a70dbac" + }, + "profile": { + "empty-stopped": { + "boundaryMaxInstructions": null, + "sourceMaxInstructions": null, + "frames": 8364, + "skips": 0, + "sheds": 0, + "busyCounterDelta": 443904 + }, + "empty-light": { + "boundaryMaxInstructions": 12, + "sourceMaxInstructions": 16, + "frames": 8353, + "skips": 0, + "sheds": 0, + "busyCounterDelta": 480894 + }, + "installed-stopped": { + "boundaryMaxInstructions": null, + "sourceMaxInstructions": null, + "frames": 8354, + "skips": 0, + "sheds": 0, + "busyCounterDelta": 481832 + }, + "installed-light": { + "boundaryMaxInstructions": 28, + "sourceMaxInstructions": 31, + "frames": 8360, + "skips": 0, + "sheds": 0, + "busyCounterDelta": 480562 + }, + "installed-dense": { + "boundaryMaxInstructions": 540, + "sourceMaxInstructions": 160, + "frames": 8340, + "skips": 0, + "sheds": 0, + "busyCounterDelta": 524684 + }, + "empty-dense": { + "boundaryMaxInstructions": 12, + "sourceMaxInstructions": 16, + "frames": 8356, + "skips": 0, + "sheds": 0, + "busyCounterDelta": 526805 + } + }, + "compatibility": { + "trackSoloBothOrders": true, + "crossfaderNativePosition": 47, + "grainControlPages": true, + "poly8NativeSrcRecovery": true, + "vectorNativeSrcRecovery": true, + "flexT1Peak": [ + 0, + 1930 + ], + "staticT2Peak": [ + 2117, + 2337 + ], + "stockStaticT2Peak": [ + 2117, + 2337 + ], + "staticPrelaunchSilence": false, + "homeTrigAndAmpLockSameAsStock": true, + "popupStockPriority": true, + "nativeSceneSelect": { + "stock": [ + [ + 0, + 8 + ], + [ + 5, + 8 + ], + [ + 5, + 15 + ], + [ + 0, + 15 + ], + [ + 0, + 8 + ] + ], + "installed": [ + [ + 0, + 8 + ], + [ + 5, + 8 + ], + [ + 5, + 15 + ], + [ + 0, + 15 + ], + [ + 0, + 8 + ] + ] + } + } +} diff --git a/sdk/octatrack/modules/clyps/evidence/tick193-current-clock.json b/sdk/octatrack/modules/clyps/evidence/tick193-current-clock.json new file mode 100644 index 0000000000..1a6dd137b1 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/tick193-current-clock.json @@ -0,0 +1,132 @@ +{ + "events": { + "candidate": 624, + "stock": 624, + "differentIndices": [], + "overlapCompared": 624 + }, + "writes": { + "candidate": 608, + "stock": 608, + "differentIndices": [], + "overlapCompared": 608 + }, + "states": { + "candidate": 219, + "stock": 219, + "differentIndices": [], + "overlapCompared": 219 + }, + "tick193": [ + { + "firstSample": 1610053.593, + "firstMask": "0000010000000000", + "nextSample": 1610097.693, + "nextMask": "0000010000000000", + "selectorReturnsAndBuilders": { + "400a2d60": 8, + "4009d1e8": 8, + "4009cf4c": 8 + }, + "mutations": [ + { + "lane": 1, + "pc": "4000bc22", + "value": 0, + "width": 1, + "deltaSamples": -6.693 + }, + { + "lane": 3, + "pc": "4000bc22", + "value": 0, + "width": 1, + "deltaSamples": -6.293 + }, + { + "lane": 4, + "pc": "4000bc22", + "value": 0, + "width": 1, + "deltaSamples": -5.993 + }, + { + "lane": 5, + "pc": "4000bc22", + "value": 0, + "width": 1, + "deltaSamples": -4.693 + }, + { + "lane": 6, + "pc": "4000bc22", + "value": 0, + "width": 1, + "deltaSamples": -4.393 + }, + { + "lane": 2, + "pc": "4000bc22", + "value": 0, + "width": 1, + "deltaSamples": 1751.107 + } + ] + }, + { + "firstSample": 1489924.228, + "firstMask": "0000010000000000", + "nextSample": 1489969.68, + "nextMask": "0000010000000000", + "selectorReturnsAndBuilders": { + "400a2d60": 8, + "4009d1e8": 8, + "4009cf4c": 8 + }, + "mutations": [ + { + "lane": 1, + "pc": "4000bc22", + "value": 0, + "width": 1, + "deltaSamples": -11.728 + }, + { + "lane": 3, + "pc": "4000bc22", + "value": 0, + "width": 1, + "deltaSamples": -11.328 + }, + { + "lane": 4, + "pc": "4000bc22", + "value": 0, + "width": 1, + "deltaSamples": -11.028 + }, + { + "lane": 5, + "pc": "4000bc22", + "value": 0, + "width": 1, + "deltaSamples": -9.628 + }, + { + "lane": 6, + "pc": "4000bc22", + "value": 0, + "width": 1, + "deltaSamples": -9.328 + }, + { + "lane": 2, + "pc": "4000bc22", + "value": 0, + "width": 1, + "deltaSamples": 1746.772 + } + ] + } + ] +} diff --git a/sdk/octatrack/modules/clyps/evidence/tick193-original-clock.json b/sdk/octatrack/modules/clyps/evidence/tick193-original-clock.json new file mode 100644 index 0000000000..2fe20d1e49 --- /dev/null +++ b/sdk/octatrack/modules/clyps/evidence/tick193-original-clock.json @@ -0,0 +1,134 @@ +{ + "events": { + "candidate": 624, + "stock": 624, + "differentIndices": [], + "overlapCompared": 624 + }, + "writes": { + "candidate": 608, + "stock": 608, + "differentIndices": [], + "overlapCompared": 608 + }, + "states": { + "candidate": 219, + "stock": 219, + "differentIndices": [ + 192 + ], + "overlapCompared": 219 + }, + "tick193": [ + { + "firstSample": 1609994.045, + "firstMask": "0000010000000000", + "nextSample": 1610038.145, + "nextMask": "0000010000000000", + "selectorReturnsAndBuilders": { + "400a2d60": 8, + "4009d1e8": 8, + "4009cf4c": 8 + }, + "mutations": [ + { + "lane": 1, + "pc": "4000bc22", + "value": 0, + "width": 1, + "deltaSamples": -23.745 + }, + { + "lane": 3, + "pc": "4000bc22", + "value": 0, + "width": 1, + "deltaSamples": -23.345 + }, + { + "lane": 4, + "pc": "4000bc22", + "value": 0, + "width": 1, + "deltaSamples": -23.045 + }, + { + "lane": 5, + "pc": "4000bc22", + "value": 0, + "width": 1, + "deltaSamples": -21.645 + }, + { + "lane": 6, + "pc": "4000bc22", + "value": 0, + "width": 1, + "deltaSamples": -21.345 + }, + { + "lane": 2, + "pc": "4000bc22", + "value": 0, + "width": 1, + "deltaSamples": 1735.055 + } + ] + }, + { + "firstSample": 1489692.492, + "firstMask": "0001010101010100", + "nextSample": 1489738.933, + "nextMask": "0000010000000000", + "selectorReturnsAndBuilders": { + "400a2d60": 8, + "4009d1e8": 8, + "4009cf4c": 8 + }, + "mutations": [ + { + "lane": 1, + "pc": "4000bc22", + "value": 0, + "width": 1, + "deltaSamples": 0.408 + }, + { + "lane": 3, + "pc": "4000bc22", + "value": 0, + "width": 1, + "deltaSamples": 0.808 + }, + { + "lane": 4, + "pc": "4000bc22", + "value": 0, + "width": 1, + "deltaSamples": 1.108 + }, + { + "lane": 5, + "pc": "4000bc22", + "value": 0, + "width": 1, + "deltaSamples": 2.408 + }, + { + "lane": 6, + "pc": "4000bc22", + "value": 0, + "width": 1, + "deltaSamples": 2.708 + }, + { + "lane": 2, + "pc": "4000bc22", + "value": 0, + "width": 1, + "deltaSamples": 1758.108 + } + ] + } + ] +} diff --git a/sdk/octatrack/modules/clyps/generate_performance.py b/sdk/octatrack/modules/clyps/generate_performance.py new file mode 100644 index 0000000000..4af63185ca --- /dev/null +++ b/sdk/octatrack/modules/clyps/generate_performance.py @@ -0,0 +1,33 @@ +"""Generate the Octabam GNU-as unit from the performance C and the private SDK marker.""" +import argparse +from pathlib import Path +import subprocess +import sys +import tempfile + +here = Path(__file__).resolve().parent +parser = argparse.ArgumentParser(description=__doc__) +parser.add_argument('sdk', type=Path, help='Contributor SDK at 5c32cbacd') +parser.add_argument('--check', action='store_true') +args = parser.parse_args() +sdk = args.sdk.resolve() +sys.path[:0] = [str(sdk/'runtime/loader'),str(sdk/'runtime')] +import build +import m68k_codegen + +with tempfile.TemporaryDirectory() as tmp: + work = Path(tmp) + marker = work/'marker.c' + marker.write_text('#include "modwerk_events.h"\nconst struct modwerk_modal_input clyps_modal = { MODWERK_MODAL_INPUT_ABI };\n') + flags = [*build.CFLAGS,*m68k_codegen.FLAGS,'-DCLYPS_PERFORMANCE','-I',sdk/'machines/octatrack/include'] + parts = ['| Generated by generate_performance.py from the C sources.\n'] + for src in (here/'live_module.c', marker): + asm = work/(src.stem+'.s') + subprocess.run(['m68k-elf-gcc',*flags,'-S',src.name,'-o',asm],cwd=src.parent,check=True) + parts.append(asm.read_text()) + data = ''.join(parts) + dest = here/'performance_core.s' + if args.check: + if data != dest.read_text(): sys.exit('Stale performance_core.s') + else: + dest.write_text(data) diff --git a/sdk/octatrack/modules/clyps/live_module.c b/sdk/octatrack/modules/clyps/live_module.c new file mode 100644 index 0000000000..ee316bf4a1 --- /dev/null +++ b/sdk/octatrack/modules/clyps/live_module.c @@ -0,0 +1,456 @@ +/* SPDX-License-Identifier: GPL-3.0-or-later + * Modwerk ARR sketchpad with the scheduling rules of Zac Kyoti's CLYPS + * and private rows.s (MIT, LICENSE.kyoti). Private OS 1.40C emulator gate. + * A01 is the home pattern. A source reference changes a stock builder argument. + * Neither the module nor an event slot holds a pointer to another module. + */ +#include +#include "modwerk_module.h" + +#ifdef CLYPS_HOST_TEST +#include "tests/platform.h" +#else +#define BYTE(a) (*(volatile const uint8_t *)(uintptr_t)(a)) +#define LONG(a) (*(volatile const uint32_t *)(uintptr_t)(a)) +#endif +#define RUNNING LONG(0x800065b8) +#define ARRANGER LONG(0x460d1aec) +#define GRID_REC LONG(0x460d1736) +#define LIVE_REC LONG(0x460d172a) +#define REC_HELD LONG(0x460d1726) +#define ARR 0x1f +#define PLAY 0x28 +#define STOP 0x27 +#define YES 0x31 +#define NO 0x32 +#define SRC 0x22 +#include "meta_focus.h" +#define TRACKS 8 +#define BANK_BASE 0x400e21e0u +#define PATTERN_BYTES 0x8ed8u + +/* The eight four-bit references always publish as one aligned word. At STOP + * requests apply immediately. During PLAY only the stock wrap commits them. */ +static volatile uint32_t playing, requested; +static uint32_t rows[16]; +static uint16_t defined; +static volatile unsigned bank_read_active; +static unsigned track, row_view, armed, visible, refused, slot; +static uint32_t consumed[2]; +static unsigned locked; +static unsigned src_list, src_cursor; + +/* Project controls have no track-machine descriptor. The base must also + * arbitrate modal ownership before dispatching events to this adapter. */ +static int stock_window(void) +{ + /* Stock message-window handle (OS 1.40C message routine), shared SETUP + * window, sample browser, Grain popup and stock YES/NO dialog. */ + return LONG(0x460d1e70u) || LONG(0x460d175cu) || + LONG(0x460e70e0u) || LONG(0x460e5e30u) || LONG(0x460e5cd0u); +} + +#ifndef CLYPS_PERFORMANCE +static int stock_src_available(void) +{ + return !BYTE(0x80000015u) && BYTE(0x46c7d8d8u) == 0 && + !stock_window() && + !(BYTE(0x46100b1bu) & 6u) && !GRID_REC && !LIVE_REC && !REC_HELD; +} + +#endif + +/* Row IDs are one-based. Zero means no complete row transaction. */ +static volatile unsigned last_row, pending_row; +#ifdef CLYPS_PERFORMANCE +enum panel_view { NATIVE, ROW, CLIP, SETUP }; +static enum panel_view view, last_view = CLIP; /* Clip View first (D39.02) */ +static unsigned mode, operation, end_of_path, lock_note, mem_track, seen_stock = TRACKS, was_window; +#endif +static unsigned first_row, zoom, editing, draft, missing; +#ifdef CLYPS_PERFORMANCE +/* Provenance (D33): one byte per lane, the one-based Row its source came from; 0 is unknown + * (home, a Clip launch, or a cell edited after launch). Requested and playing stay distinct and + * the stock wrap commits both words with the sources. */ +static volatile uint32_t org_play[2], org_req[2]; +static unsigned origin(const volatile uint32_t *o, unsigned lane) +{ + return (o[lane >> 2] >> (8 * (lane & 3))) & 255u; +} +static void set_origin(volatile uint32_t *o, unsigned lane, unsigned row) +{ + unsigned shift = 8 * (lane & 3); + o[lane >> 2] = (o[lane >> 2] & ~(255u << shift)) | (row << shift); +} +#define ORIGIN_COMMIT() (org_play[0] = org_req[0], org_play[1] = org_req[1]) +#define ORIGIN_CLEAR() (org_play[0] = org_play[1] = org_req[0] = org_req[1] = 0) +#else +#define ORIGIN_COMMIT() ((void)0) +#define ORIGIN_CLEAR() ((void)0) +#endif +static unsigned last_run, last_seen_row, last_seen_pending; +#ifdef CLYPS_PERFORMANCE +/* The performance adapter retains its only row namespace until stock can + * certify a project incarnation and bank generation. The current hooks cannot. */ +static volatile unsigned bank_uncertain; +static unsigned last_live; +#endif +static uint32_t last_seen_sources; +#ifndef CLYPS_HOST_TEST +static unsigned critical(void) +{ + unsigned sr; + __asm__ volatile ("move.w %%sr,%0\n\tmove.w #0x2700,%%sr" : "=d"(sr) :: "memory","cc"); + return sr; +} + +static void restore(unsigned sr) +{ + __asm__ volatile ("move.w %0,%%sr" :: "d"(sr) : "memory","cc"); +} + +#endif + +static void focus_row(unsigned r) +{ + slot = r; +#ifdef CLYPS_PERFORMANCE + enum { WINDOW = 5 }; /* Panorama Full Grid shows five rows (D31) */ +#else + enum { WINDOW = 4 }; +#endif + if (r < first_row) first_row = r; + if (r >= first_row+WINDOW) first_row = r-(WINDOW-1); +} + +/* Physical row state also covers a modifier held before the module loaded. */ +static int alone(unsigned code) +{ + for (unsigned row = 0; row < 8; ++row) { + unsigned allowed = row == code / 8 ? 1u << (code % 8) : 0; + if (BYTE(0x46100b18u + row) & ~allowed) + return 0; + } + return 1; +} + +static int grid(unsigned pattern) +{ + uintptr_t trailer = BANK_BASE + pattern * PATTERN_BYTES + 0x8e50u; + return BYTE(trailer + 0) == 0 && BYTE(trailer + 1) == 16 && BYTE(trailer + 2) == 2 && BYTE(trailer + 3) == 16 && BYTE(trailer + 4) == 2 && BYTE(trailer + 5) == 0 && + BYTE(trailer + 7) == BYTE(BANK_BASE + 0x8e57u); +} + +static int supported(void) +{ +#ifdef CLYPS_PERFORMANCE + if (bank_uncertain) return 0; +#endif + return !bank_read_active && !BYTE(0x80000034u) && !ARRANGER && !LONG(0x80006546) && !(BYTE(0x80000028) & 1) && + BYTE(0x800065bd) == 0 && BYTE(0x800065be) == 0 && + BYTE(0x800065bf) == 0 && BYTE(0x800065c0) == 0 && grid(0); +} + +static int valid(unsigned refs) +{ + if (!supported()) + return 0; + for (unsigned t = 0; t < TRACKS; ++t, refs >>= 4) + if (!grid(refs & 15u)) + return 0; + return 1; +} + +#ifdef CLYPS_PERFORMANCE +/* Sequence occupancy (D37.03, D38.02): one shared answer to "does this track of this pattern + * hold a sequence?" for Clip View, the Panorama, Capture and Cell Source. A grid source plays + * steps 1-16 only, so only that page counts: the trig, trigless and four recorder masks of the + * audio track record (pattern + t * 0x91a; each 64-step mask keeps steps 1-16 in bytes 6-7). + * Conditional, micro-timed and locked trigs set the trig or trigless bit, so they count; a + * silent sequence is not an empty one. Locks without a trig play nothing and do not count. + * The UI tick rescans one pattern per call (12 byte reads per track), never the audio path or + * the frame, so a full refresh takes 16 ticks and edits show within a quarter second. */ +#define TRACK_BYTES 0x91au +static const unsigned char occ_bytes[12] = {0x06, 0x07, 0x0e, 0x0f, 0x26, 0x27, 0x2e, 0x2f, 0x36, 0x37, 0x3e, 0x3f}; +static uint16_t occ[TRACKS], usable; /* occ[t] bit p: A(p+1) has a sequence on track t */ +static unsigned occ_next, occ_known; /* occ_known: patterns scanned since the reset */ + +static void occupancy_scan(unsigned p) +{ + uintptr_t base = BANK_BASE + p * PATTERN_BYTES; + uint16_t bit = (uint16_t)(1u << p); + if (grid(p)) usable |= bit; else usable &= (uint16_t)~bit; + for (unsigned t = 0; t < TRACKS; ++t) { + unsigned any = 0; + for (unsigned i = 0; i < sizeof occ_bytes; ++i) any |= BYTE(base + t * TRACK_BYTES + occ_bytes[i]); + if (any) occ[t] |= bit; else occ[t] &= (uint16_t)~bit; + } + occ_known |= bit; +} + +static void occupancy_step(void) +{ + if (bank_read_active || BYTE(0x80000034u)) return; /* never read a bank stock is replacing */ + occupancy_scan(occ_next); + occ_next = (occ_next + 1) & 15u; +} + +static void occupancy_all(void) +{ + if (bank_read_active || BYTE(0x80000034u)) return; + for (unsigned p = 0; p < 16; ++p) occupancy_scan(p); +} + +static void occupancy_reset(void) +{ + for (unsigned t = 0; t < TRACKS; ++t) occ[t] = 0; + usable = 0; + occ_next = occ_known = 0; +} + +static uint32_t occupancy_sig(void) +{ + uint32_t s = (uint32_t)usable << 16 | occ_known; + for (unsigned t = 0; t < TRACKS; ++t) s = (s << 3 | s >> 29) ^ occ[t]; + return s; +} + +/* Until a pattern is scanned it counts as available: never hide material by default. */ +enum { SLOT_EMPTY, SLOT_AVAILABLE, SLOT_FOREIGN }; +static unsigned slot_state(unsigned t, unsigned p) +{ + if (!(occ_known >> p & 1u)) return SLOT_AVAILABLE; + if (!(usable >> p & 1u)) return SLOT_FOREIGN; + return occ[t & 7u] >> p & 1u ? SLOT_AVAILABLE : SLOT_EMPTY; +} +#endif + +/* These notifications bracket the stock card task's serialized bank reader. + * Only bank A is qualified. Never read its grid while stock replaces it. */ +#ifdef CLYPS_PERFORMANCE +static void suspend_bank(void) +{ + bank_uncertain = 1; + playing = requested = pending_row = last_row = 0; + ORIGIN_CLEAR(); + view = NATIVE; + mode = visible = locked = operation = row_view = 0; +} +#endif + +void clyps_bank_load(unsigned mask, uint32_t caller) +{ + (void)caller; + if (!(mask & 1u)) return; + unsigned sr = critical(); + bank_read_active = 1; +#ifdef CLYPS_PERFORMANCE + suspend_bank(); +#endif + restore(sr); +} + +unsigned clyps_bank_loaded(void) +{ + bank_read_active = 0; + return 0; +} + +/* Stock initializes project state on change and reload as well as on NEW. */ +void clyps_project_init(void) +{ + unsigned sr = critical(); +#ifdef CLYPS_PERFORMANCE + if (defined || playing || requested || pending_row || bank_read_active) + suspend_bank(); + view = NATIVE; + mode = operation = end_of_path = lock_note = was_window = 0; + last_view = CLIP; + seen_stock = TRACKS; + occupancy_reset(); + ORIGIN_CLEAR(); +#endif + playing = requested = 0; + src_list = src_cursor = 0; +#ifndef CLYPS_PERFORMANCE + defined = 0; +#endif + visible = locked = armed = row_view = refused = track = slot = 0; + /* Held edges retain their original owner across the UI transition. */ + last_row = pending_row = first_row = zoom = editing = draft = missing = 0; + restore(sr); +} + +void clyps_wrap(void) +{ + unsigned refs = requested; + if (bank_read_active || (!refs && !playing && !pending_row)) + return; + if (valid(refs) && RUNNING && !GRID_REC && !LIVE_REC && !REC_HELD) { + playing = refs; + ORIGIN_COMMIT(); + if (pending_row) last_row = pending_row; + } else { + playing = requested = last_row = 0; + ORIGIN_CLEAR(); + } + pending_row = 0; +} + +void clyps_audio_source(int *pattern, unsigned t, unsigned bank_word) +{ + unsigned refs = playing; + if (!refs || t >= TRACKS || *pattern != 0 || (bank_word & 255u) || !supported()) + return; + unsigned source = (refs >> (4 * t)) & 15u; + if (grid(source)) + *pattern = (int)source; +} + +#ifdef CLYPS_PERFORMANCE +/* lane TRACKS: every lane comes from `from`; otherwise only that lane does. */ +static void submit_from(unsigned refs, unsigned row, unsigned lane, unsigned from) +#else +static void submit(unsigned refs, unsigned row) +#endif +{ + refused = !valid(refs) || (refs && (GRID_REC || LIVE_REC || REC_HELD)); + if (refused) + return; + unsigned sr = critical(); +#ifdef CLYPS_PERFORMANCE + if (bank_uncertain) { + refused = 1; + restore(sr); + return; + } +#endif + pending_row = row; + requested = refs; +#ifdef CLYPS_PERFORMANCE + if (lane < TRACKS) set_origin(org_req, lane, from); + else org_req[0] = org_req[1] = from * 0x01010101u; +#endif + if (!RUNNING) { + playing = refs; + ORIGIN_COMMIT(); + if (row) last_row = row; + pending_row = 0; + } + restore(sr); +} +#ifdef CLYPS_PERFORMANCE +static void submit(unsigned refs, unsigned row) { submit_from(refs, row, TRACKS, row); } +#endif + +#ifndef CLYPS_HOST_TEST +static void redraw(void) +{ + ((void (*)(int))0x4004d948u)(-1); +} + +#endif + +static void submit_lane(unsigned lane, unsigned ref) +{ + unsigned shift = 4 * lane; +#ifdef CLYPS_PERFORMANCE + submit_from((requested & ~(15u << shift)) | (ref << shift), 0, lane, 0); +#else + submit((requested & ~(15u << shift)) | (ref << shift), 0); +#endif +} + +#ifndef CLYPS_PERFORMANCE +/* Suspend a stale list before handling the next input or display frame. */ +static void check_src_context(void) +{ + if ((visible && stock_window()) || + (src_list && (!stock_src_available() || BYTE(0x100b14ccu) != track))) { + /* Only YES in Row Edit publishes draft to rows[]. */ + editing = draft = armed = missing = row_view = 0; + src_list = visible = 0; + locked = !!(playing || requested); + } +} + +#endif +#ifdef CLYPS_PERFORMANCE +#include "performance_controls.h" +#else +#include "session_controls.h" +#endif + +void module_tick(struct modwerk_runtime_api *api) +{ +#ifdef CLYPS_PERFORMANCE + unsigned seen_track = track; + performance_context(); + /* Beat markers and BPM are drawn by CLYPS in Clip: refresh them with the music. */ + unsigned live = (BYTE(0x800065b5u) >> 2 & 3u) | LONG(0x8000181cu) << 2; + /* A stock popup (TEMPO, a toast) suspends CLYPS without leaving it: redraw when it closes. */ + unsigned window = !!stock_window(); + uint32_t seen_occ = occupancy_sig(); + if (mode) occupancy_step(); + if (visible && (track != seen_track || live != last_live || window != was_window || + seen_occ != occupancy_sig())) redraw(); + last_live = live; + was_window = window; +#else + check_src_context(); +#endif + if (!bank_read_active && (playing || requested || pending_row || last_row) && !supported()) { + playing = requested = last_row = pending_row = 0; + ORIGIN_CLEAR(); + refused = 1; + } + if (visible && (playing != last_seen_sources || last_row != last_seen_row || pending_row != last_seen_pending || RUNNING != last_run)) { + last_seen_sources = playing; + last_seen_row = last_row; + last_seen_pending = pending_row; + last_run = RUNNING; + redraw(); + } + api->value = 0xc0000000u | (visible << 27) | (row_view << 26) | + (armed << 25) | (refused << 24) | ((requested & 0xfffu) << 12) | (playing & 0xfffu); +} + +#include "session_view.h" +#ifdef CLYPS_PERFORMANCE +#include "performance_view.h" +#endif + +void module_draw(unsigned char *frame) +{ +#ifdef CLYPS_PERFORMANCE + performance_context(); + if (frame && !stock_window()) { + if (visible) performance_draw(frame); + else if (locked) lock_draw(frame); /* the stock page stays live under the edit lock */ + } + return; +#else + check_src_context(); +#endif + if (stock_window()) return; + if ((!visible && !locked) || !frame) + return; + if (!locked) { + if (src_list) src_draw(frame); + else session_draw(frame); + return; + } + uint32_t surface[7]; + const volatile uint32_t *stock = (const volatile uint32_t *)0x400bf10au; + for (unsigned i = 0; i < 7; ++i) + surface[i] = stock[i]; + surface[3] = (uint32_t)(uintptr_t)frame; + for (unsigned i = 0; i < 1024; ++i) + frame[i] = 0; + void (*text)(uint32_t, void *, int, int, int, const char *) = + (void (*)(uint32_t, void *, int, int, int, const char *))0x40012bd8u; + text(0x400ba876u, surface, 2, 52, -1, "NATIVE EDIT LOCKED"); + text(0x400ba876u, surface, 2, 36, -1, "ARR: BACK TO CLIPS"); + text(0x400ba876u, surface, 2, 20, -1, "STOP THEN YES"); + text(0x400ba876u, surface, 2, 4, -1, supported() ? "EDIT GLOBAL A01" : "CHECK BANK / CLOCK"); +} diff --git a/sdk/octatrack/modules/clyps/manifest.py b/sdk/octatrack/modules/clyps/manifest.py new file mode 100644 index 0000000000..15818b68b1 --- /dev/null +++ b/sdk/octatrack/modules/clyps/manifest.py @@ -0,0 +1,15 @@ +"""CLYPS private performance draft. Runtime events carry all stock-site ownership.""" +import os +from pathlib import Path + +from remix.schema import Category, Kind, Linked, Module, Proof + +HERE = Path(os.path.relpath(Path(__file__).resolve().parent)) +MODULE = Module( + name='clyps', key='CLYPS', kind=Kind.CF_PATCH, category=Category.MACHINES, + author='btzz5w8w5d-star', author_url='https://github.com/btzz5w8w5d-star', + doc='Launch track sequences and recall volatile performance rows on MKII.', + proof=Proof.UNTESTED, + proof_note='New candidate has no hardware qualification. Needs the private sequencer and panel capability.', + linked=(Linked('clyps_performance', str(HERE/'performance_core.s'), dram=True),), +) diff --git a/sdk/octatrack/modules/clyps/media/clip.png b/sdk/octatrack/modules/clyps/media/clip.png new file mode 100644 index 0000000000..508c0d6a78 Binary files /dev/null and b/sdk/octatrack/modules/clyps/media/clip.png differ diff --git a/sdk/octatrack/modules/clyps/media/first-arr.png b/sdk/octatrack/modules/clyps/media/first-arr.png new file mode 100644 index 0000000000..97028b7156 Binary files /dev/null and b/sdk/octatrack/modules/clyps/media/first-arr.png differ diff --git a/sdk/octatrack/modules/clyps/media/meta-row-focus.png b/sdk/octatrack/modules/clyps/media/meta-row-focus.png new file mode 100644 index 0000000000..5eeb519d81 Binary files /dev/null and b/sdk/octatrack/modules/clyps/media/meta-row-focus.png differ diff --git a/sdk/octatrack/modules/clyps/media/meta-track-solo.png b/sdk/octatrack/modules/clyps/media/meta-track-solo.png new file mode 100644 index 0000000000..c5568b3775 Binary files /dev/null and b/sdk/octatrack/modules/clyps/media/meta-track-solo.png differ diff --git a/sdk/octatrack/modules/clyps/media/row.png b/sdk/octatrack/modules/clyps/media/row.png new file mode 100644 index 0000000000..e313d1142f Binary files /dev/null and b/sdk/octatrack/modules/clyps/media/row.png differ diff --git a/sdk/octatrack/modules/clyps/media/setup.png b/sdk/octatrack/modules/clyps/media/setup.png new file mode 100644 index 0000000000..1c374b6e11 Binary files /dev/null and b/sdk/octatrack/modules/clyps/media/setup.png differ diff --git a/sdk/octatrack/modules/clyps/meta_focus.h b/sdk/octatrack/modules/clyps/meta_focus.h new file mode 100644 index 0000000000..483af91f8e --- /dev/null +++ b/sdk/octatrack/modules/clyps/meta_focus.h @@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: GPL-3.0-or-later */ +#ifndef CLYPS_META_FOCUS_H +#define CLYPS_META_FOCUS_H + +static inline int clyps_meta_track_key(unsigned key) +{ + return key >= 0x10 && key < 0x18; +} + +/* LEVEL edits the focused row or track. Clamp before addition for large deltas. */ +static inline unsigned clyps_focus_step(unsigned current, int delta, unsigned last) +{ + if (delta < -(int)current) return 0; + if (delta > (int)(last - current)) return last; + return (unsigned)((int)current + delta); +} +#endif diff --git a/sdk/octatrack/modules/clyps/native_view.h b/sdk/octatrack/modules/clyps/native_view.h new file mode 100644 index 0000000000..18049b37ac --- /dev/null +++ b/sdk/octatrack/modules/clyps/native_view.h @@ -0,0 +1,357 @@ +/* SPDX-License-Identifier: GPL-3.0-or-later + * CLYPS Design System v1 (D31): Clip View Native Frame and Panorama Full Grid. + * Port of the CLYPS Art Direction Refinement v1.4 reference renderer onto the candidate state. + * The frame arrives with the stock page already drawn. Clip keeps the stock track tabs, frame, + * top line and Scene/crossfader; Panorama keeps only Scene/crossfader, moved 11 px right. + * Column-major surface: byte x*8 + 7 - (y>>3), bit y&7. + */ +#include "ui_fonts.h" + +#define TEMPO24 LONG(0x8000181cu) /* BPM x 24, as AMIGA reads it */ +#define MASTER_STEP ((unsigned)BYTE(0x800065b4u) << 8 | BYTE(0x800065b5u)) /* u16 step now playing (Bar LED) */ +#define PLAY_BANK BYTE(0x800065bdu) +#define PLAY_PATTERN BYTE(0x800065beu) + +static void ui_px(unsigned char *f, int x, int y, int v) +{ + if ((unsigned)x >= 128 || (unsigned)y >= 64) return; + unsigned char *b = &f[x * 8 + 7 - (y >> 3)]; + unsigned char m = (unsigned char)(1u << (y & 7)); + if (v) *b |= m; else *b &= (unsigned char)~m; +} +/* Rectangles by column and band: one masked byte per 8-pixel band instead of one call per pixel. */ +static void ui_fill(unsigned char *f, int x, int y, int w, int h, int v) +{ + int x1 = x + w, y1 = y + h - 1; + if (x < 0) x = 0; + if (y < 0) y = 0; + if (x1 > 128) x1 = 128; + if (y1 > 63) y1 = 63; + if (x >= x1 || y > y1) return; + for (int band = y >> 3; band <= y1 >> 3; ++band) { + int lo = band * 8 > y ? 0 : y & 7, hi = band * 8 + 7 < y1 ? 7 : y1 & 7; + unsigned char m = (unsigned char)((0xffu << lo) & (0xffu >> (7 - hi))); + unsigned char *b = f + x * 8 + 7 - band; + for (int i = x; i < x1; ++i, b += 8) { + if (v) *b |= m; else *b &= (unsigned char)~m; + } + } +} +static void ui_hline(unsigned char *f, int x, int y, int w, int v) { ui_fill(f, x, y, w, 1, v); } +static void ui_vline(unsigned char *f, int x, int y, int h, int v) { ui_fill(f, x, y, 1, h, v); } +static void ui_rect(unsigned char *f, int x, int y, int w, int h) +{ + ui_hline(f, x, y, w, 1); ui_hline(f, x, y + h - 1, w, 1); ui_vline(f, x, y, h, 1); ui_vline(f, x + w - 1, y, h, 1); +} +/* Surface with the four corner pixels cut: the one plate shape of the language. */ +static void ui_plate(unsigned char *f, int x, int y, int w, int h) +{ + ui_fill(f, x, y, w, h, 1); + ui_px(f, x, y, 0); ui_px(f, x + w - 1, y, 0); ui_px(f, x, y + h - 1, 0); ui_px(f, x + w - 1, y + h - 1, 0); +} +static void ui_contour(unsigned char *f, int x, int y, int w, int h) /* pending */ +{ + ui_hline(f, x + 1, y, w - 2, 1); ui_hline(f, x + 1, y + h - 1, w - 2, 1); + ui_vline(f, x, y + 1, h - 2, 1); ui_vline(f, x + w - 1, y + 1, h - 2, 1); +} +static void ui_dotted(unsigned char *f, int x, int y, int w, int h) /* SET, phase from the origin */ +{ + for (int i = 1; i < w - 1; ++i) { + if (!((x + i + y) & 1)) ui_px(f, x + i, y, 1); + if (!((x + i + y + h - 1) & 1)) ui_px(f, x + i, y + h - 1, 1); + } + for (int j = 1; j < h - 1; ++j) { + if (!((x + y + j) & 1)) ui_px(f, x, y + j, 1); + if (!((x + w - 1 + y + j) & 1)) ui_px(f, x + w - 1, y + j, 1); + } +} +static void ui_corner(unsigned char *f, int cx, int cy, int dx, int dy, int v) +{ + ui_px(f, cx, cy, v); ui_px(f, cx + dx, cy, v); ui_px(f, cx, cy + dy, v); +} +static void ui_corners(unsigned char *f, int x, int y, int w, int h) /* focus */ +{ + int r = x + w - 1, b = y + h - 1; + ui_corner(f, x, y, 1, 1, 1); ui_corner(f, r, y, -1, 1, 1); ui_corner(f, x, b, 1, -1, 1); ui_corner(f, r, b, -1, -1, 1); +} +static const unsigned char *ui_glyph(const struct ui_font *font, char c) +{ + if (c >= '0' && c <= '9') /* every font starts with the digits */ + return font->data + (unsigned)(c - '0') * (1u + font->height); + for (unsigned i = 10; font->chars[i]; ++i) + if (font->chars[i] == c) return font->data + i * (1u + font->height); + return font->data; /* never reached for the strings below */ +} +/* One glyph column, rows 0..h-1 as bits 0..h-1, written into at most two band bytes. */ +static void ui_column(unsigned char *f, int x, int y, unsigned bits, int v) +{ + if ((unsigned)x >= 128 || y < 0) return; + unsigned long m = (unsigned long)bits << (y & 7); + for (int band = y >> 3; m && band < 8; ++band, m >>= 8) { + unsigned char *b = f + x * 8 + 7 - band, part = (unsigned char)(m & 0xffu); + if (v) *b |= part; else *b &= (unsigned char)~part; + } +} +static int ui_width(const struct ui_font *font, const char *s) +{ + int w = 0; + for (; *s; ++s) w += ui_glyph(font, *s)[0] + font->track; + return w ? w - font->track : 0; +} +static int ui_text(unsigned char *f, const char *s, int x, int y, const struct ui_font *font, int v) +{ + int x0 = x; + for (; *s; ++s) { + const unsigned char *g = ui_glyph(font, *s); + for (unsigned i = 0; i < g[0]; ++i) { + unsigned bits = 0; + for (unsigned r = 0; r < font->height; ++r) bits |= (g[1 + r] >> (g[0] - 1 - i) & 1u) << r; + if (bits) ui_column(f, x + (int)i, y, bits, v); + } + x += g[0] + font->track; + } + return x - font->track - x0; +} +static void ui_text_r(unsigned char *f, const char *s, int right, int y, const struct ui_font *font, int v) +{ + ui_text(f, s, right - ui_width(font, s) + 1, y, font, v); +} +static int ui_mark(unsigned char *f, enum ui_mark m, int x, int y, int v) +{ + const unsigned char *g = ui_mark_data; + for (int n = 0; n < (int)m; ++n) g += 2 + g[1]; + for (unsigned r = 0; r < g[1]; ++r) + for (unsigned i = 0; i < g[0]; ++i) + if (g[2 + r] >> (g[0] - 1 - i) & 1) ui_px(f, x + (int)i, y + (int)r, v); + return g[0]; +} +static void ui_two(char *s, unsigned n) { s[0] = (char)('0' + n / 10); s[1] = (char)('0' + n % 10); s[2] = 0; } +/* Slot content (D37.02, one model for every view): a source with no sequence on the track is a + * single dot where its number would be, a source that is not a 16-step grid (it cannot launch) + * a small x. Both stay reachable; a Panorama cell of an undefined Row keeps its dash. */ +static void ui_slot_mark(unsigned char *f, unsigned state, int cx, int cy, int v) +{ + if (state == SLOT_EMPTY) { ui_px(f, cx, cy, v); return; } + ui_px(f, cx - 1, cy - 1, v); ui_px(f, cx + 1, cy - 1, v); ui_px(f, cx, cy, v); + ui_px(f, cx - 1, cy + 1, v); ui_px(f, cx + 1, cy + 1, v); +} + +/* ---------------------------------------------------------------- shared reading of the state */ +struct ui_state { + uint32_t play, req, op[2], oq[2]; /* op/oq: provenance of playing/requested (D33) */ + unsigned pos, pend, next, run; /* rows one-based, 0 = none; run: 0 stop, 1 play, 2 pause */ +}; +static struct ui_state ui_snapshot(void) +{ + struct ui_state s; + unsigned sr = critical(); + s.play = playing; s.req = requested; s.pos = last_row; s.pend = pending_row; + s.op[0] = org_play[0]; s.op[1] = org_play[1]; s.oq[0] = org_req[0]; s.oq[1] = org_req[1]; + restore(sr); + s.run = RUNNING; + if (s.run > 2) s.run = 1; + s.next = 0; + for (unsigned i = s.pos; i < 16; ++i) /* the same forward scan as YES */ + if (defined & (1u << i)) { s.next = i + 1; break; } + return s; +} +static unsigned ui_from(const uint32_t *o, unsigned lane) { return (o[lane >> 2] >> (8 * (lane & 3))) & 255u; } +/* A lane overrides the path when it does not come from the position Row (by provenance, never by value). */ +static int ui_override(const struct ui_state *s, unsigned lane) +{ + return s->pos && ui_from(s->op, lane) != s->pos; +} +static int ui_changing(const struct ui_state *s, unsigned lane) +{ + return source(s->req, lane) != source(s->play, lane); +} +/* Pending for a lane: its source changes, or a Cell Launch moves its origin to another Row. + * Lanes of a pending Row transaction count only when their source changes (Design Lock v1.4). */ +static int ui_moving(const struct ui_state *s, unsigned lane) +{ + unsigned oq = ui_from(s->oq, lane); + return ui_changing(s, lane) || (oq != ui_from(s->op, lane) && (!oq || oq != s->pend)); +} + +/* Bar: CLYPS writes only the page-context part; the stock group stays live. */ +static void ui_bar(unsigned char *f, int x0, int x1, const char *a, int mark, const char *b, const char *c) +{ + ui_fill(f, x0, 57, x1 - x0 + 1, 7, 1); + int x = x0 + 2; + if (a) x += ui_text(f, a, x, 58, &UI_M3, 0) + 3; + if (mark >= 0) x += ui_mark(f, (enum ui_mark)mark, x, 58, 0) + 3; + if (b) x += ui_text(f, b, x, 58, &UI_M3, 0) + 3; + if (c) ui_text(f, c, x, 58, &UI_M3, 0); +} +static void ui_path(char *s, const struct ui_state *st) +{ + int n = 0; + if (st->pos) { s[n++] = 'R'; ui_two(s + n, st->pos); n += 2; } else { s[n++] = '-'; s[n++] = '-'; } + s[n++] = '>'; + if (st->next) { s[n++] = 'R'; ui_two(s + n, st->next); } else { s[n++] = 'E'; s[n++] = 'N'; s[n++] = 'D'; s[n] = 0; } +} + +/* ---------------------------------------------------------------- Clip View · Native Frame */ +static void clip_native_draw(unsigned char *f) +{ + struct ui_state st = ui_snapshot(); + /* Clear only the CLYPS area x 9-119, y 1-56; tabs, frame, top line and bar stay stock. */ + ui_fill(f, 9, 1, 111, 56, 0); + char path[8], word[8]; + unsigned focus = src_cursor, now = source(st.play, track), want = source(st.req, track); + int idle = focus != now && focus != want; /* the focus names a source that YES would launch */ + ui_path(path, &st); + if (idle && slot_state(track, focus) == SLOT_FOREIGN) { + word[0] = 'A'; ui_two(word + 1, focus + 1); ui_bar(f, 10, 63, word, -1, "NOT GRID", 0); + } else if (idle) { word[0] = 'Y'; word[1] = 'E'; word[2] = 'S'; word[3] = '>'; word[4] = 'A'; ui_two(word + 5, focus + 1); ui_bar(f, 10, 63, word, -1, 0, 0); } + else ui_bar(f, 10, 63, path, -1, 0, 0); + /* tempo plate, digits on the SRC page proportions */ + ui_plate(f, 11, 3, 28, 17); + unsigned t24 = TEMPO24, bpm = t24 / 24, dec = ((t24 % 24) * 10 + 12) / 24; + if (dec > 9) dec = 9; + char n[4]; n[0] = (char)('0' + bpm / 100); n[1] = (char)('0' + bpm / 10 % 10); n[2] = (char)('0' + bpm % 10); n[3] = 0; + ui_text_r(f, bpm >= 100 ? n : n + 1, 30, 5, &UI_B8, 0); + ui_px(f, 32, 12, 0); + char d[2] = {(char)('0' + dec), 0}; ui_text(f, d, 34, 8, &UI_M3, 0); + unsigned beat = (MASTER_STEP / 4) & 3; + for (int b = 0; b < 4; ++b) { + int x = 14 + 6 * b; + if (st.run && (unsigned)b == beat) ui_fill(f, x, 15, 5, 3, 0); else ui_hline(f, x, 17, 5, 0); + } + ui_mark(f, st.run == 1 ? MARK_PLAY : st.run == 2 ? MARK_PAUSE : MARK_STOP, 14, 24, 1); /* U1: pause is not play */ + ui_mark(f, GRID_REC || LIVE_REC ? MARK_DISC : MARK_RING, 30, 24, 1); + /* Sidebar (D43.02): the plate is the source this track plays now, committed at the boundary + * (filled while running, dotted stopped). The line under it is the source that waits for the + * next boundary (NXT, pulsing on the beat), else the native home pattern CLYPS never changes + * (HOM). The focus is only the grid corners and YES>Ann in the bar. */ + char src[4] = {'A', 0, 0, 0}; ui_two(src + 1, now + 1); + if (st.run) { ui_plate(f, 11, 35, 28, 11); ui_text(f, src, 17, 37, &UI_C7, 0); } + else { ui_dotted(f, 11, 35, 28, 11); ui_text(f, src, 17, 37, &UI_C7, 1); } + char low[4] = {'A', 0, 0, 0}; + if (want != now) { + /* Pending is always an outline, never filled (filled = playing). The gentle beat-locked + * pulse only adds a second outline around it on odd beats while running; no timer. */ + int pulse = st.run == 1 && (beat & 1); + ui_two(low + 1, want + 1); + ui_contour(f, 11, 49, 28, 7); + if (pulse) ui_contour(f, 10, 48, 30, 9); + ui_text(f, "NXT", 13, 50, &UI_M3, 1); ui_text_r(f, low, 37, 50, &UI_M3, 1); + } else { + low[0] = (char)('A' + (PLAY_BANK & 15)); ui_two(low + 1, (PLAY_PATTERN & 15) + 1); + ui_text(f, "HOM", 13, 50, &UI_M3, 1); ui_text_r(f, low, 37, 50, &UI_M3, 1); /* 25 px, as NXT */ + } + ui_vline(f, 42, 1, 56, 1); + unsigned home = ui_override(&st, track) ? source(rows[st.pos - 1], track) : 16; + for (unsigned i = 0; i < 16; ++i) { + int xb = 47 + 18 * (int)(i % 4), yb = 8 + 11 * (int)(i / 4); + unsigned content = slot_state(track, i); + char lab[3]; ui_two(lab, i + 1); + int fill = i == now && st.run; + if (fill) ui_plate(f, xb, yb, 15, 9); + else if (i == now) ui_dotted(f, xb, yb, 15, 9); + else if (i == want) ui_contour(f, xb, yb, 15, 9); + if (content == SLOT_AVAILABLE) ui_text(f, lab, xb + 2, yb + 1, &UI_C7, !fill); + else ui_slot_mark(f, content, xb + 7, yb + 4, !fill); + if (i == focus) ui_corners(f, xb - 2, yb - 1, 19, 11); + if (i == home) ui_vline(f, xb, yb + 1, 7, 1); + } +} + +/* ---------------------------------------------------------------- Panorama · Full Grid */ +#define UI_ROWS 5 +#define GX(i) (15 + 14 * (int)(i)) +#define CY(k) (7 + 10 * (int)(k)) +static void panorama_draw(unsigned char *f) +{ + struct ui_state st = ui_snapshot(); + /* Scene A/B and crossfader: the stock group at x 64-116, rows 57-63 of band 7, moves 11 px right + * (to end on the grid edge). Row 56 (bit 0) belongs to CLYPS and is not copied. */ + for (int x = 116; x >= 64; --x) { + unsigned char *dst = &f[(x + 11) * 8], src = f[x * 8]; + *dst = (unsigned char)((*dst & 1u) | (src & 0xfeu)); + } + ui_fill(f, 0, 0, 128, 57, 0); /* no F/S tabs: CLYPS owns x 0-127, y 0-56 */ + unsigned first = first_row > 16 - UI_ROWS ? 16 - UI_ROWS : first_row; + #define VISIBLE(r) ((r) && (r) - 1 >= first && (r) - 1 < first + UI_ROWS) + /* Exceptions (D33): a lane whose playing or pending origin has no visible cell. The header + * keeps T1-T8; the exception is its shape, the source of the focused lane is in the bar. */ + unsigned active = st.play | st.req | st.op[0] | st.op[1] | st.oq[0] | st.oq[1]; + unsigned play_exc = 0, pend_exc = 0; + for (unsigned i = 0; i < 8; ++i) { + unsigned op = ui_from(st.op, i), oq = ui_from(st.oq, i); + if (active && (!op || !VISIBLE(op))) play_exc |= 1u << i; + if (ui_moving(&st, i) && !(oq && VISIBLE(oq))) pend_exc |= 1u << i; + } + char path[8], bpm[4], detail[8] = {0}; + unsigned focus = slot + 1; + /* Contextual footer (artist decision, option C): BPM and transport always stay. The rest + * speaks about the focused Row. On the position Row it keeps the YES path R02>R03 (Row + * Advance stays a separate action); on another Row it names the Row and its state (WAIT + * pending, EMPTY undefined, NEXT on the YES path) or the TRIG that launches it. Nothing + * permanent is added to the grid. */ + if (focus == st.pos && focus != st.pend) { + ui_path(path, &st); + if (pend_exc >> track & 1) { detail[0] = '>'; detail[1] = 'A'; ui_two(detail + 2, source(st.req, track) + 1); } + else if (play_exc >> track & 1) { detail[0] = 'A'; ui_two(detail + 1, source(st.play, track) + 1); } + } else { + const char *word = focus == st.pend ? "WAIT" : !(defined >> slot & 1u) ? "EMPTY" : + focus == st.next ? "NEXT" : 0; + path[0] = 'R'; ui_two(path + 1, focus); + if (word) { unsigned n = 0; while (word[n]) { detail[n] = word[n]; ++n; } } + else { detail[0] = 'T'; detail[1] = 'R'; detail[2] = 'I'; detail[3] = 'G'; ui_two(detail + 4, focus); if (focus < 10) { detail[4] = detail[5]; detail[5] = 0; } } + } + unsigned b = TEMPO24 / 24; bpm[0] = (char)('0' + b / 100); bpm[1] = (char)('0' + b / 10 % 10); bpm[2] = (char)('0' + b % 10); bpm[3] = 0; + ui_bar(f, 0, 74, b >= 100 ? bpm : bpm + 1, st.run == 1 ? MARK_PLAY5 : st.run == 2 ? MARK_PAUSE5 : MARK_STOP5, path, detail[0] ? detail : 0); + for (int k = 0; k < UI_ROWS; ++k) ui_hline(f, 15, 6 + 10 * k, 113, 1); + for (int i = 0; i <= 8; ++i) ui_vline(f, GX(i), 6, 50, 1); + unsigned important = st.pend && !VISIBLE(st.pend) ? st.pend : st.next && !VISIBLE(st.next) ? st.next : + st.pos && !VISIBLE(st.pos) ? st.pos : !VISIBLE(slot + 1) ? slot + 1 : 0; + char two[3]; + if (important) { ui_mark(f, important - 1 > first ? MARK_DOWN : MARK_UP, 2, 2, 1); ui_two(two, important); ui_text(f, two, 8, 1, &UI_M3, 1); } + else ui_text(f, "R", 6, 1, &UI_K5, 1); + for (unsigned i = 0; i < 8; ++i) { + int x = GX(i) + 1, play = play_exc >> i & 1; + char t[3] = {'T', (char)('1' + i), 0}; + int tx = GX(i) + 4; + if (play && st.run) { /* playing from a Row out of view */ + ui_plate(f, x + 1, 0, 11, 6); ui_text(f, t, tx, 1, &UI_K5, 0); + if (!ui_from(st.op, i)) ui_hline(f, x + 5, 0, 3, 0); /* notch: no Row origin (override) */ + } else { + if (play) ui_dotted(f, x + 1, 0, 11, 6); + ui_text(f, t, tx, 1, &UI_K5, 1); + } + if (pend_exc >> i & 1) { ui_hline(f, x, 0, 13, 1); ui_vline(f, x, 0, 6, 1); ui_vline(f, x + 12, 0, 6, 1); } + } + for (unsigned k = 0; k < UI_ROWS; ++k) { + unsigned r = first + k + 1, def = !!(defined & (1u << (r - 1))); + int y = CY(k); + ui_two(two, r); + /* Row number column: plate = position Row, frame = pending Row, corners = focused Row. */ + if (r == st.pos) { ui_plate(f, 3, y + 1, 11, 7); ui_text(f, two, 4, y + 2, &UI_K5, 0); } + else ui_text(f, two, 4, y + 2, &UI_K5, 1); + if (r == st.pend) ui_rect(f, 2, y, 13, 9); + else if (r == focus) ui_corners(f, 2, y, 13, 9); + if (r == st.next) ui_mark(f, MARK_NEXT, 0, y + 2, 1); + for (unsigned i = 0; i < 8; ++i) { + int x = GX(i) + 1; + unsigned value = source(rows[r - 1], i), content = slot_state(i, value); + int lit = def && ui_from(st.op, i) == r; /* only the real origin lights */ + int pend = ui_from(st.oq, i) == r && ui_moving(&st, i); + int fill = lit && st.run && !pend; + if (fill) ui_plate(f, x + 1, y + 1, 11, 7); + else if (pend) ui_rect(f, x, y, 13, 9); + else if (lit) ui_dotted(f, x + 1, y + 1, 11, 7); + if (!def) ui_hline(f, x + 5, y + 4, 3, 1); + else if (content == SLOT_AVAILABLE) { ui_two(two, value + 1); ui_text(f, two, x + 2, y + 2, &UI_K5, !fill); } + else ui_slot_mark(f, content, x + 6, y + 4, !fill); + if (r == slot + 1 && i == track) { /* focus: the cell border opens */ + int bx = GX(i), by = y - 1; + ui_hline(f, bx + 3, by, 9, 0); if (by + 10 < 56) ui_hline(f, bx + 3, by + 10, 9, 0); + ui_vline(f, bx, by + 3, 5, 0); ui_vline(f, bx + 14, by + 3, 5, 0); + ui_corner(f, bx + 1, by + 1, 1, 1, 1); ui_corner(f, bx + 13, by + 1, -1, 1, 1); + ui_corner(f, bx + 1, by + 9, 1, -1, 1); ui_corner(f, bx + 13, by + 9, -1, -1, 1); + } + } + } + #undef VISIBLE +} diff --git a/sdk/octatrack/modules/clyps/octamod.module.json b/sdk/octatrack/modules/clyps/octamod.module.json new file mode 100644 index 0000000000..3d62e1b760 --- /dev/null +++ b/sdk/octatrack/modules/clyps/octamod.module.json @@ -0,0 +1,181 @@ +{ + "schemaVersion": 2, + "id": "clyps", + "key": "CLYPS", + "name": "CLYPS", + "version": "0.2.0-experimental", + "category": "system", + "compatibility": { + "firmware": "1.40C", + "effectId": null, + "location": "Project sequencer", + "conflicts": [ + "track-solo" + ], + "uiClaims": [ + "key:ARR", + "key:TRIG@CLYPS", + "key:TRACK@CLYPS", + "key:YES@CLYPS", + "key:NO@CLYPS", + "key:PAGE@CLYPS ROW", + "key:LEVEL@CLYPS", + "key:A@CLYPS SETUP", + "key:LEFT@CLYPS", + "key:RIGHT@CLYPS", + "key:UP@CLYPS", + "key:DOWN@CLYPS", + "screen:CLYPS ROW", + "screen:CLYPS CLIP", + "screen:CLYPS SETUP" + ], + "limitations": [ + "Experimental MKII, Bank A, home A01 and compatible sixteen-step pattern grids. Rows are volatile.", + "Needs the contributor development base 5c32cbacd and ABI 9 sequencer/panel capability; public integration is pending.", + "TRACK input is owned inside the overlay. Track Solo and Play Modes coexistence on this revision is unqualified.", + "Early modal edit interlock limits stock sound pages with foreign sources." + ] + }, + "nativeManifest": "manifest.py", + "author": { + "github": "btzz5w8w5d-star", + "credits": [ + "Zac Kyoti and the OT Kyoti FW contributors, original CLYPS sequencing work", + "Endrew, Modwerk adaptation" + ] + }, + "presentation": { + "label": "CLYPS", + "family": "Sequence performance", + "summary": "Launch local track sequences and recall combinations across eight audio tracks.", + "overview": "Private MKII performance overlay in development. The official public build is pending shared sequencer and panel services.", + "highlights": [ + "Row and Clip views", + "Quantized row advance through defined slots" + ], + "usage": [ + "ARR opens Row. ARR again opens Clip.", + "In Row use PAGE then YES to capture the playing tracks. YES in Row advances to the next defined row." + ] + }, + "controls": [], + "resources": { + "recorded": "2026-11-25", + "storage": { + "label": "Linked image", + "display": "6464 bytes image, 192 bytes BSS", + "value": 6464, + "unit": "bytes", + "method": "static", + "conditions": "Private candidate, m68k-elf GCC, build_candidate.py --performance", + "source": "PERFORMANCE_SPRINT01.md" + }, + "processing": { + "label": "Frame cost", + "display": "Unmeasured on MKII", + "value": null, + "unit": "percent-of-frame", + "method": "unmeasured", + "conditions": "No physical trial of this candidate", + "source": "PERFORMANCE_SPRINT01.md" + } + }, + "tests": { + "report": "PERFORMANCE_SPRINT01.md", + "summary": "Scoped host and ColdFire build checks. See dated evidence and limitations.", + "hardwareStatus": "untested", + "evidenceRevision": "d9909f52fd84e8af158b0adfb8e6a6ae059cc97f", + "gates": [ + "Official native build pending upstream services", + "Physical performance and coexistence unqualified" + ] + }, + "license": { + "spdx": "GPL-3.0-or-later", + "file": "LICENSE", + "declaration": "Modwerk adaptation under GPL-3.0-or-later. Kyoti attribution, MIT notice and exclusions in LICENSE.kyoti and PROVENANCE.md." + }, + "media": [ + { + "path": "media/first-arr.png", + "captureType": "emulator", + "caption": "Row on entry", + "alt": "Row on entry", + "credit": "Endrew, private MKII emulator session", + "license": "GPL-3.0-or-later", + "source": "original", + "otUi": { + "page": "Row on entry", + "shows": "location", + "firmware": "1.40C", + "moduleVersion": "0.2.0-experimental", + "imageSha256": "1f8e2e9ffd6919bafd6302fa4d61aeeab32e7349ee49ce159ab6a15d276f69d1", + "setup": "MKII on contributor base 5c32cbacd, composed display after module draw, synthetic GATE3 test card." + } + }, + { + "path": "media/row.png", + "captureType": "emulator", + "caption": "Row after the final advance", + "alt": "Row after the final advance", + "credit": "Endrew, private MKII emulator session", + "license": "GPL-3.0-or-later", + "source": "original", + "otUi": { + "page": "Row after the final advance", + "shows": "controls", + "firmware": "1.40C", + "moduleVersion": "0.2.0-experimental", + "imageSha256": "1f8e2e9ffd6919bafd6302fa4d61aeeab32e7349ee49ce159ab6a15d276f69d1", + "setup": "MKII on contributor base 5c32cbacd, composed display after module draw, synthetic GATE3 test card." + } + }, + { + "path": "media/clip.png", + "captureType": "emulator", + "caption": "Clip with T2 playing A02", + "alt": "Clip with T2 playing A02", + "credit": "Endrew, private MKII emulator session", + "license": "GPL-3.0-or-later", + "source": "original", + "otUi": { + "page": "Clip with T2 playing A02", + "shows": "controls", + "firmware": "1.40C", + "moduleVersion": "0.2.0-experimental", + "imageSha256": "1f8e2e9ffd6919bafd6302fa4d61aeeab32e7349ee49ce159ab6a15d276f69d1", + "setup": "MKII on contributor base 5c32cbacd, composed display after module draw, synthetic GATE3 test card." + } + }, + { + "path": "media/setup.png", + "captureType": "emulator", + "caption": "Row setup with Capture selected", + "alt": "Row setup with Capture selected", + "credit": "Endrew, private MKII emulator session", + "license": "GPL-3.0-or-later", + "source": "original", + "otUi": { + "page": "Row setup with Capture selected", + "shows": "controls", + "firmware": "1.40C", + "moduleVersion": "0.2.0-experimental", + "imageSha256": "1f8e2e9ffd6919bafd6302fa4d61aeeab32e7349ee49ce159ab6a15d276f69d1", + "setup": "MKII on contributor base 5c32cbacd, composed display after module draw, synthetic GATE3 test card." + } + } + ], + "access": { + "location": "Private contributor MKII development base, audio mode, Bank A / A01", + "steps": [ + "ARR opens Row. ARR again opens Clip.", + "In Row use PAGE then YES to capture the playing tracks. YES in Row advances to the next defined row." + ], + "screenshots": [ + "media/first-arr.png", + "media/row.png", + "media/clip.png", + "media/setup.png" + ] + } +} diff --git a/sdk/octatrack/modules/clyps/offline/bank_codec.py b/sdk/octatrack/modules/clyps/offline/bank_codec.py new file mode 100644 index 0000000000..36070d98aa --- /dev/null +++ b/sdk/octatrack/modules/clyps/offline/bank_codec.py @@ -0,0 +1,91 @@ +# SPDX-License-Identifier: GPL-3.0-or-later +"""Host-only CLYPS sidecar candidate. All integers are big endian.""" +from struct import Struct +from zlib import crc32 + +HEADER = Struct(">4sHH16sQ") +INDEX = Struct(">BBHH") +WORD = Struct(">H") +CRC = Struct(">I") +BANK_SIZE = 2 + 16 * 8 +SIZE = HEADER.size + 16 * (INDEX.size + BANK_SIZE) + CRC.size +STOP, HOLD = 16, 17 # 0..15 are CLIP references +EMPTY = (None,) * 16 +EMPTY_PROJECT = (EMPTY,) * 16 + + +class Unsupported(ValueError): + pass + + +def encode(identity, generation, banks): + if len(identity) != 16 or not 0 < generation < 2**64 or len(banks) != 16: + raise ValueError("invalid archive identity, generation or bank count") + data = bytearray(HEADER.pack(b"CLYP", 1, SIZE, identity, generation)) + for bank in range(16): + start = HEADER.size + 16 * INDEX.size + bank * BANK_SIZE + data.extend(INDEX.pack(bank, 16, start, BANK_SIZE)) + for rows in banks: + if len(rows) != 16: + raise ValueError("expected sixteen rows") + defined = sum(1 << i for i, row in enumerate(rows) if row is not None) + data.extend(WORD.pack(defined)) + for row in rows: + if row is None: + data.extend(bytes(8)) + elif len(row) == 8 and all(type(cell) is int and 0 <= cell <= HOLD for cell in row): + data.extend(row) + else: + raise ValueError("invalid row") + return bytes(data + CRC.pack(crc32(data))) + + +def decode(data, identity): + if len(data) < 6 or data[:4] != b"CLYP": + raise ValueError("invalid header") + if WORD.unpack_from(data, 4)[0] != 1: + raise Unsupported("unsupported archive version") + if len(data) != SIZE or crc32(data[:-4]) != CRC.unpack_from(data, SIZE - 4)[0]: + raise ValueError("length or integrity failure") + _, _, length, project, generation = HEADER.unpack_from(data) + if length != SIZE or project != identity or not generation: + raise ValueError("invalid length, project identity or generation") + banks = [] + for bank in range(16): + start = HEADER.size + 16 * INDEX.size + bank * BANK_SIZE + descriptor = INDEX.unpack_from(data, HEADER.size + bank * INDEX.size) + if descriptor != (bank, 16, start, BANK_SIZE): + raise ValueError("invalid bank descriptor") + defined = WORD.unpack_from(data, start)[0] + rows = [] + for i in range(16): + pos = start + 2 + i * 8 + cells = tuple(data[pos:pos + 8]) + if max(cells) > HOLD or (not defined & (1 << i) and any(cells)): + raise ValueError("invalid cell or undefined row") + rows.append(cells if defined & (1 << i) else None) + banks.append(tuple(rows)) + return generation, tuple(banks) + + +class Archive: + """Fake filesystem. Atomic replacement is an explicit host assumption.""" + + def __init__(self, identity): + self.identity = identity + self.files = {} + + def load(self, slot): + """Missing data starts undefined; present damaged data raises.""" + if slot not in ("working", "saved"): + raise ValueError("invalid slot") + if slot not in self.files: + return 0, EMPTY_PROJECT + return decode(self.files[slot], self.identity) + + def save(self, slot, banks, *, cut=None): + number, _ = self.load(slot) + new = encode(self.identity, number + 1, banks) + staged = new if cut is None else new[:cut] + decode(staged, self.identity) + self.files[slot] = staged diff --git a/sdk/octatrack/modules/clyps/offline/project_transition.py b/sdk/octatrack/modules/clyps/offline/project_transition.py new file mode 100644 index 0000000000..188b6587f6 --- /dev/null +++ b/sdk/octatrack/modules/clyps/offline/project_transition.py @@ -0,0 +1,48 @@ +# SPDX-License-Identifier: GPL-3.0-or-later +"""Host model for a proposed serialized stock project transaction.""" +from dataclasses import dataclass + + +@dataclass(frozen=True) +class Generation: + project: bytes + bank: int + rows: tuple + epoch: int + playing: int = 0 + queued: int = 0 + + + @property + def binding(self): + return (self.project, self.bank, self.epoch) + + +class Transition: + def __init__(self, committed): + self.committed = committed + self.serial = 0 + self.pending = None + self.available = True + + def begin(self, project): + self.serial += 1 + self.pending = project + self.available = False + return self.serial + + def finish(self, serial, stock_binding, staged=None): + """None means abort. Stock certifies which incarnation is usable again.""" + if self.pending is None or serial != self.serial: + raise ValueError("stale completion") + if staged is None: + self.available = stock_binding == self.committed.binding + elif stock_binding == staged.binding and self.pending == staged.project: + self.committed = staged + self.available = True + else: + raise ValueError("unqualified destination") + self.pending = None + + def selected(self): + return self.committed if self.available else None diff --git a/sdk/octatrack/modules/clyps/performance_controls.h b/sdk/octatrack/modules/clyps/performance_controls.h new file mode 100644 index 0000000000..910dd31b10 --- /dev/null +++ b/sdk/octatrack/modules/clyps/performance_controls.h @@ -0,0 +1,345 @@ +/* SPDX-License-Identifier: GPL-3.0-or-later + * Private panel adapter. The sequencer owns playing, requested and row commits. + * Reuse the stock timing boundary, the qualified input bus and the edit lock. + */ +enum { CAPTURE, CELL, RESTORE_HOME }; +enum { UP = 0x33, DOWN = 0x20, LEFT = 0x34, RIGHT = 0x21, PAGE_KEY = 0x1b }; +enum { SCENE_A = 0x19, SCENE_B = 0x1a, LEVEL_KNOB = 6 }; +enum { TEMPO_KEY = 0x18, FUNC_KEY = 0x2d }; +#define STOCK_TRACK (BYTE(0x100b14ccu) & 7u) /* the track the stock tabs highlight */ +static uint32_t stock_edges[2]; + +/* Physical rows hold exactly the keys a and b, nothing else (a held modifier included). */ +static int pair(unsigned a, unsigned b) +{ + for (unsigned row = 0; row < 8; ++row) { + unsigned allowed = (row == a / 8 ? 1u << (a % 8) : 0) | (row == b / 8 ? 1u << (b % 8) : 0); + if (BYTE(0x46100b18u + row) & ~allowed) + return 0; + } + return 1; +} + +static int held(unsigned key) +{ + return !!(BYTE(0x46100b18u + key / 8) & (1u << (key % 8))); +} + +/* The one track key held together with `key`, or TRACKS. */ +static unsigned held_track(unsigned key) +{ + for (unsigned t = 0; t < TRACKS; ++t) + if (held(0x10 + t) && pair(key, 0x10 + t)) + return t; + return TRACKS; +} + +/* Scene A/B alone, or a trig while one scene key is held: stock scene selection (D33). */ +static int scene_gesture(unsigned key) +{ + if (key == SCENE_A || key == SCENE_B) return alone(key); + return key < 16 && ((held(SCENE_A) && pair(key, SCENE_A)) || (held(SCENE_B) && pair(key, SCENE_B))); +} + +/* Selective Edit Lock (D33): while CLYPS sources play, the stock page edits the home pattern. + * Part sound (pages, tracks, scenes, crossfader, plain encoder turns) stays free; trigs, locks, + * recording, FUNC chords and pattern, part or bank changes stay held. */ +static int sound_key(unsigned key) +{ + if (scene_gesture(key)) return 1; + return alone(key) && ((key >= SRC && key <= SRC + 4) || clyps_meta_track_key(key)); +} + +/* FUNC + TRACK is the stock mute (D36.01, R1): the pair always reaches the stock. */ +static int mute_gesture(unsigned key) +{ + return clyps_meta_track_key(key) && held(FUNC_KEY) && pair(key, FUNC_KEY); +} + +/* Track focus is the stock selection (D33): TRACK keys reach the stock, CLYPS reads it back. + * FUNC + LEVEL may move the Panorama column on its own (D36.01); the next stock track change + * takes the focus back, and Clip View always shows the stock track. */ +static void follow_track(void) +{ + unsigned t = STOCK_TRACK; + if (t == seen_stock) return; + seen_stock = t; + if (t == track) return; + track = t; + if (view == CLIP) src_cursor = (requested >> (4 * t)) & 15; +} + +static void open_view(enum panel_view target) +{ + if (target == NATIVE && view != NATIVE) mem_track = track; + if (target == CLIP) { track = seen_stock = STOCK_TRACK; } + if (target != NATIVE && view == NATIVE) occupancy_all(); + if (target == ROW || target == CLIP) last_view = target; + view = target; + visible = target != NATIVE; + row_view = target == ROW; + locked = !visible && !!(playing || requested); + end_of_path = missing = refused = lock_note = 0; + if (target == CLIP) + src_cursor = (requested >> (4 * track)) & 15; +} + +/* View memory (D33, RAM only): back from the stock pages to the same view and Clip focus. */ +static void resume_view(void) +{ + unsigned keep = src_cursor, same = STOCK_TRACK == mem_track; + track = STOCK_TRACK; + open_view(last_view); + if (last_view == CLIP && same) src_cursor = keep; +} + +static void performance_context(void) +{ + /* A stock popup (TEMPO, a toast, a dialog) only suspends CLYPS: it keeps its view, its + * setup and every pending request, gives the popup every key and encoder, draws nothing + * while it is open and comes back when it closes (D43.04, Jannik 22/11 on Row Edit). */ + if (mode && (GRID_REC || LIVE_REC || REC_HELD || BYTE(0x80000015u) || !supported())) { + mode = 0; + open_view(NATIVE); + } + if (mode && view != SETUP && !stock_window()) follow_track(); +} + +static void cancel_pending(void) +{ + unsigned sr = critical(); + requested = playing; + org_req[0] = org_play[0]; + org_req[1] = org_play[1]; + pending_row = 0; + restore(sr); +} + +static void go_home(void) +{ + unsigned sr = critical(); + playing = requested = last_row = pending_row = 0; + ORIGIN_CLEAR(); + restore(sr); +} + +static void advance_path(void) +{ + if (pending_row) return; + /* last_row is one-based; it is the zero-based index of the next slot. */ + for (unsigned index = last_row; index < 16; ++index) { + if (defined & (1u << index)) { + submit(rows[index], index + 1); + return; + } + } + end_of_path = 1; +} + +/* Cell Launch (D33): one lane takes its source from Row n. The path position, the other lanes + * and the stored Row stay as they are; the stock wrap commits it like any request. */ +static void cell_launch(unsigned lane, unsigned n) +{ + end_of_path = 0; + missing = !(defined & (1u << n)); + if (missing) return; + unsigned shift = 4 * lane; + submit_from((requested & ~(15u << shift)) | (rows[n] & (15u << shift)), 0, lane, n + 1); +} + +static void setup_confirm(void) +{ + if (operation == RESTORE_HOME) { + if (RUNNING) { refused = 1; return; } + go_home(); + } else { + uint32_t refs = playing; + if (operation == CELL) { + if (!(defined & (1u << slot))) { missing = 1; return; } + unsigned shift = 4 * track; + refs = (rows[slot] & ~(15u << shift)) | (draft << shift); + } + if (!valid(refs)) { refused = 1; return; } + unsigned sr = critical(); + if (bank_uncertain) { + restore(sr); + refused = 1; + return; + } + rows[slot] = refs; + defined |= 1u << slot; + /* A lane that came from the edited cell no longer matches it. */ + if (operation == CELL) { + if (origin(org_play, track) == slot + 1) set_origin(org_play, track, 0); + if (origin(org_req, track) == slot + 1) set_origin(org_req, track, 0); + } + restore(sr); + } + open_view(ROW); +} + +static void set_operation(unsigned choice) +{ + operation = choice; + draft = (rows[slot] >> (4 * track)) & 15; +} + +static int performance_press(unsigned key, int early) +{ + if (key == STOP) { + cancel_pending(); + return 0; + } + if (key == PLAY) return 0; + /* FUNC is a modifier and never leaves CLYPS (D43.03); FUNC + TRACK mutes (R1 native mutes); + * TEMPO opens the stock tempo popup on the stock clock (D43.04). None of them edits a + * sequence, so they reach the stock in every view and under the edit lock. */ + if (key == FUNC_KEY || mute_gesture(key) || (key == TEMPO_KEY && alone(key))) { + if (locked && lock_note) { lock_note = 0; redraw(); } + return 0; + } + if (locked) { + if (alone(key) && key == ARR && supported()) { + mode = 1; + resume_view(); + } else if (alone(key) && key == YES && !RUNNING && supported()) { + go_home(); + mode = 0; + open_view(NATIVE); + } else if (sound_key(key)) { + if (lock_note) { lock_note = 0; redraw(); } + return 0; + } else lock_note = 1; + return 1; + } + if (!mode) { + if (early || key != ARR || !alone(key) || !supported() || + GRID_REC || LIVE_REC || REC_HELD || BYTE(0x80000015u)) return 0; + mode = 1; + resume_view(); + return 1; + } + if (key == 0x29 || key == 0x2e || key == 0x2f || key == 0x35) { + /* REC, PATTERN, BANK and MIDI open their stock modes: yield the complete chord at home. + * Keep foreign native edits interlocked. */ + mode = 0; + open_view(NATIVE); + return locked; + } + if (view != SETUP && scene_gesture(key)) return 0; /* Scenes stay live under CLYPS */ + if (key < 16 && view != SETUP) { + unsigned lane = held_track(key); + if (lane < TRACKS) { /* TRACK first, then TRIG */ + if (view == ROW) cell_launch(lane, key); + else if (view == CLIP) { submit_lane(lane, key); if (lane == track && !refused) src_cursor = key; } + return view != NATIVE; + } + } + if (!alone(key)) return visible; + if (key == ARR) { + open_view(view == ROW ? CLIP : ROW); + } else if (key == NO) { + if (view == SETUP) open_view(ROW); + else { + if (view == NATIVE) mode = 0; + open_view(NATIVE); + } + } else if (key >= SRC && key <= SRC + 4 && view != SETUP) { + open_view(NATIVE); + return 0; /* the sound page opens, lock or not */ + } else if (view == SETUP) { + if (key == YES) setup_confirm(); + if (key == UP || key == DOWN) + set_operation(clyps_focus_step(operation, key == UP ? -1 : 1, RESTORE_HOME)); + if (key < 16 && operation == CELL) draft = key; + } else if (clyps_meta_track_key(key)) { + /* The stock selects and CLYPS follows. The key also takes the Panorama column back + * when FUNC + LEVEL moved it away from a stock track that does not change. */ + track = key - 0x10; + return 0; + } else if (view == ROW && key == PAGE_KEY) { + open_view(SETUP); + set_operation(CAPTURE); + } else if (key < 16) { + if (view == ROW) { + end_of_path = 0; + missing = !(defined & (1u << key)); + if (!missing) submit(rows[key], key + 1); + } else { + submit_lane(track, key); + /* The hand that launched is where the eye looks: focus follows a TRIG launch. */ + if (view == CLIP && !refused) src_cursor = key; + if (view == NATIVE) open_view(NATIVE); + } + } else if (key == YES && view == ROW) { + advance_path(); + } else if (key == YES && view == CLIP) { + submit_lane(track, src_cursor); + } else if (view == ROW || view == CLIP) { + /* Panorama columns follow the TRACK keys only, so LEFT/RIGHT cannot split the + * CLYPS focus from the stock tab. */ + int step = (key == UP || key == LEFT) ? -1 : 1; + if (view == CLIP && (key == UP || key == DOWN || key == LEFT || key == RIGHT)) + src_cursor = clyps_focus_step(src_cursor, step, 15); + else if (view == ROW && (key == UP || key == DOWN)) + focus_row(clyps_focus_step(slot, step, 15)); + } else return 0; + return 1; +} + +int module_key(int code, int pressed) +{ + performance_context(); + int early = !!(code & 0x100); + unsigned key = (unsigned)code & ~0x100u; + if (key >= 64) return 0; /* crossfader: always the stock's (D33) */ + unsigned word = key >> 5; + uint32_t bit = 1u << (key & 31); + if (!pressed) { + int owned = !!(consumed[word] & bit); + consumed[word] &= ~bit; + stock_edges[word] &= ~bit; + return owned; + } + if (consumed[word] & bit) return 1; + if (stock_window()) stock_edges[word] |= bit; + if (stock_edges[word] & bit) return 0; + if (!performance_press(key, early)) return 0; + consumed[word] |= bit; + redraw(); + return 1; +} + +int module_enc(int encoder, int delta) +{ + performance_context(); + if (stock_window()) return 0; /* the TEMPO popup or a dialog owns the encoders */ + if (!visible) { + if (!locked) return 0; + /* A plain turn (with FUNC, a fine turn; with a scene key, a scene lock) edits the Part. + * With a trig held it would write a lock into the home pattern. */ + if ((alone(64) || alone(FUNC_KEY) || alone(SCENE_A) || alone(SCENE_B)) && !GRID_REC && !LIVE_REC && !REC_HELD) { + if (lock_note) { lock_note = 0; redraw(); } + return 0; + } + lock_note = 1; + redraw(); + return 1; + } + unsigned knob = (unsigned)encoder & ~0x100u; + /* FUNC + LEVEL moves the Panorama column (D36.01). Focus only: no launch, no source. */ + if (view == ROW && knob == LEVEL_KNOB && held(FUNC_KEY) && alone(FUNC_KEY)) { + track = clyps_focus_step(track, delta, TRACKS - 1); + redraw(); + return 1; + } + if (!alone(64)) return 1; + /* LEVEL navigates only: it never launches (D33). */ + if (view == ROW && knob == LEVEL_KNOB) focus_row(clyps_focus_step(slot, delta, 15)); + if (view == CLIP && knob == LEVEL_KNOB) src_cursor = clyps_focus_step(src_cursor, delta, 15); + if (view == SETUP && knob == LEVEL_KNOB) set_operation(clyps_focus_step(operation, delta, RESTORE_HOME)); + if (view == SETUP && knob == 0 && operation == CELL) + draft = clyps_focus_step(draft, delta, 15); + redraw(); + return 1; +} diff --git a/sdk/octatrack/modules/clyps/performance_core.s b/sdk/octatrack/modules/clyps/performance_core.s new file mode 100644 index 0000000000..e8128e3047 --- /dev/null +++ b/sdk/octatrack/modules/clyps/performance_core.s @@ -0,0 +1,4810 @@ +| Generated by generate_performance.py from the C sources. +#NO_APP + .file "live_module.c" + .text + .align 2 + .type clyps_focus_step, @function +clyps_focus_step: + move.l %d2,-(%sp) + move.l 12(%sp),%d1 + move.l 8(%sp),%a0 + move.l %a0,%d2 + move.l 16(%sp),%d0 + neg.l %d2 + cmp.l %d2,%d1 + jlt .L3 + move.l %d0,%a1 + sub.l %a0,%a1 + cmp.l %a1,%d1 + jgt .L2 + move.l %a0,%d0 + add.l %d1,%d0 +.L2: + move.l (%sp)+,%d2 + rts +.L3: + clr.l %d0 + jra .L2 + .size clyps_focus_step, .-clyps_focus_step + .align 2 + .type stock_window, @function +stock_window: + tst.l 1175264880 + jeq .L5 +.L7: + moveq #1,%d0 +.L4: + rts +.L5: + tst.l 1175263068 + jne .L7 + tst.l 1175351520 + jne .L7 + tst.l 1175346736 + jne .L7 + tst.l 1175346384 + sne %d0 + mvs.b %d0,%d0 + neg.l %d0 + jra .L4 + .size stock_window, .-stock_window + .align 2 + .type set_origin, @function +set_origin: + move.l %d2,-(%sp) + moveq #3,%d1 + move.l 12(%sp),%d0 + moveq #-4,%d2 + move.l 8(%sp),%a0 + and.l %d0,%d1 + and.l %d2,%d0 + move.l 16(%sp),%d2 + lsl.l #3,%d1 + add.l %d0,%a0 + move.l #255,%d0 + lsl.l %d1,%d0 + lsl.l %d1,%d2 + not.l %d0 + and.l (%a0),%d0 + or.l %d0,%d2 + move.l %d2,(%a0) + move.l (%sp)+,%d2 + rts + .size set_origin, .-set_origin + .align 2 + .type focus_row, @function +focus_row: + move.l 4(%sp),%d0 + move.l first_row,%d1 + move.l %d0,slot + cmp.l %d1,%d0 + jcc .L10 + move.l %d0,first_row + move.l %d0,%d1 +.L10: + addq.l #5,%d1 + cmp.l %d1,%d0 + jcs .L9 + subq.l #4,%d0 + move.l %d0,first_row +.L9: + rts + .size focus_row, .-focus_row + .align 2 + .type alone, @function +alone: + move.l %d3,-(%sp) + moveq #7,%d3 + move.l %d2,-(%sp) + move.l 12(%sp),%d0 + move.l %d0,%d2 + move.w #1,%a0 + lsr.l #3,%d2 + clr.l %d1 + and.l %d3,%d0 + move.l %a0,%d3 + lsl.l %d0,%d3 + move.l %d3,%a0 +.L15: + cmp.l %d2,%d1 + jne .L16 + move.l %a0,%d0 +.L13: + move.l %d1,%a1 + add.l #1175456536,%a1 + mvz.b (%a1),%d3 + not.l %d0 + and.l %d3,%d0 + tst.l %d0 + jne .L17 + addq.l #1,%d1 + moveq #8,%d0 + cmp.l %d1,%d0 + jne .L15 + moveq #1,%d0 +.L12: + move.l (%sp)+,%d2 + move.l (%sp)+,%d3 + rts +.L16: + clr.l %d0 + jra .L13 +.L17: + clr.l %d0 + jra .L12 + .size alone, .-alone + .align 2 + .type grid, @function +grid: + move.l %d2,-(%sp) + move.l #36568,%d1 + move.l 8(%sp),%d0 + muls.l %d1,%d0 + move.l %d0,%a0 + add.l #1074704432,%a0 + tst.b (%a0) + jeq .L20 +.L22: + clr.l %d0 +.L19: + move.l (%sp)+,%d2 + rts +.L20: + move.l %d0,%a0 + add.l #1074704433,%a0 + mvz.b (%a0),%d1 + moveq #16,%d2 + cmp.l %d1,%d2 + jne .L22 + mvz.b 1(%a0),%d1 + addq.l #1,%a0 + subq.l #2,%d1 + tst.l %d1 + jne .L22 + mvz.b 1(%a0),%d1 + addq.l #1,%a0 + moveq #16,%d2 + cmp.l %d1,%d2 + jne .L22 + mvz.b 1(%a0),%d1 + addq.l #1,%a0 + subq.l #2,%d1 + tst.l %d1 + jne .L22 + addq.l #1,%a0 + tst.b (%a0) + jne .L22 + move.b 2(%a0),%d0 + move.b 1074704439,%d1 + addq.l #2,%a0 + eor.l %d1,%d0 + tst.b %d0 + seq %d0 + mvs.b %d0,%d0 + neg.l %d0 + jra .L19 + .size grid, .-grid + .align 2 + .type supported, @function +supported: + tst.l bank_uncertain + jeq .L24 +.L26: + clr.l %d0 +.L23: + rts +.L24: + tst.l bank_read_active + jne .L26 + tst.b -2147483596.l + jne .L26 + tst.l 1175263980 + jne .L26 + tst.l -2147457722 + jne .L26 + move.b -2147483608,%d0 + btst #0,%d0 + jne .L26 + tst.b -2147457603.l + jne .L26 + tst.b -2147457602.l + jne .L26 + tst.b -2147457601.l + jne .L26 + tst.b -2147457600.l + jne .L26 + clr.l -(%sp) + jsr grid + addq.l #4,%sp + jra .L23 + .size supported, .-supported + .align 2 + .type occupancy_scan, @function +occupancy_scan: + lea (-24,%sp),%sp + move.l 28(%sp),%d0 + move.l #36568,%d1 + movem.l #3132,(%sp) + moveq #1,%d2 + muls.l %d0,%d1 + lsl.l %d0,%d2 + move.l %d0,-(%sp) + move.l %d1,%a2 + add.l #1074668000,%a2 + jsr grid + move.w usable,%d1 + addq.l #4,%sp + move.w %d2,%d3 + tst.l %d0 + jeq .L28 + or.l %d2,%d1 +.L29: + move.w %d1,usable + move.l %d3,%d4 + sub.l %a1,%a1 + lea occ,%a0 + not.l %d4 + lea occ_bytes,%a3 +.L30: + clr.l %d0 + clr.l %d1 +.L31: + mvz.b (%a3,%d0.l),%d5 + addq.l #1,%d0 + mvz.b (%a2,%d5.l),%d5 + or.l %d5,%d1 + moveq #12,%d5 + cmp.l %d0,%d5 + jne .L31 + move.w (%a0),%d0 + tst.l %d1 + jeq .L32 + or.l %d3,%d0 +.L33: + move.w %d0,(%a0)+ + addq.l #1,%a1 + lea (2330,%a2),%a2 + moveq #8,%d0 + cmp.l %a1,%d0 + jne .L30 + mvz.w %d2,%d2 + or.l %d2,occ_known + movem.l (%sp),#3132 + lea (24,%sp),%sp + rts +.L28: + move.l %d2,%d0 + not.l %d0 + and.l %d0,%d1 + jra .L29 +.L32: + and.l %d4,%d0 + jra .L33 + .size occupancy_scan, .-occupancy_scan + .align 2 + .type occupancy_sig, @function +occupancy_sig: + mvz.w usable,%d0 + move.l %d2,-(%sp) + lea occ,%a0 + swap %d0 + clr.w %d0 + or.l occ_known,%d0 +.L37: + move.l %d0,%d1 + moveq #29,%d2 + lsl.l #3,%d0 + lsr.l %d2,%d1 + add.l %d1,%d0 + mvz.w (%a0)+,%d1 + eor.l %d1,%d0 + cmp.l #occ+16,%a0 + jne .L37 + move.l (%sp)+,%d2 + rts + .size occupancy_sig, .-occupancy_sig + .align 2 + .type suspend_bank, @function +suspend_bank: + moveq #1,%d0 + move.l %d0,bank_uncertain + clr.l last_row + clr.l pending_row + clr.l requested + clr.l playing + clr.l org_req+4 + clr.l org_req + clr.l org_play+4 + clr.l org_play + clr.l view + clr.l row_view + clr.l operation + clr.l locked + clr.l visible + clr.l mode + rts + .size suspend_bank, .-suspend_bank + .align 2 + .type redraw, @function +redraw: + pea -1.w + jsr 1074059592 + addq.l #4,%sp + rts + .size redraw, .-redraw + .align 2 + .type pair, @function +pair: + lea (-16,%sp),%sp + clr.l %d1 + move.l 20(%sp),%d0 + movem.l #60,(%sp) + moveq #7,%d4 + and.l %d0,%d4 + move.l %d0,%d2 + moveq #1,%d0 + move.l 24(%sp),%d3 + lsr.l #3,%d2 + lsr.l #3,%d3 + move.l %d4,%a0 + move.l %d0,%d4 + move.l %a0,%d5 + lsl.l %d5,%d4 + moveq #7,%d5 + and.l 24(%sp),%d5 + lsl.l %d5,%d0 + move.l %d0,%a0 +.L45: + cmp.l %d2,%d1 + jne .L46 + move.l %d4,%d0 +.L42: + cmp.l %d3,%d1 + jne .L47 + move.l %a0,%a1 +.L43: + move.l %a1,%d5 + move.l %d1,%a1 + or.l %d5,%d0 + add.l #1175456536,%a1 + mvz.b (%a1),%d5 + not.l %d0 + and.l %d5,%d0 + tst.l %d0 + jne .L48 + addq.l #1,%d1 + moveq #8,%d0 + cmp.l %d1,%d0 + jne .L45 + moveq #1,%d0 +.L41: + movem.l (%sp),#60 + lea (16,%sp),%sp + rts +.L46: + clr.l %d0 + jra .L42 +.L47: + sub.l %a1,%a1 + jra .L43 +.L48: + clr.l %d0 + jra .L41 + .size pair, .-pair + .align 2 + .type open_view, @function +open_view: + lea (-12,%sp),%sp + movem.l #1036,(%sp) + move.l 16(%sp),%d2 + move.l view,%d1 + tst.l %d2 + jne .L51 + tst.l %d1 + jeq .L52 + lea track,%a0 + move.l (%a0),mem_track +.L52: + tst.l %d2 + sne %d0 + moveq #1,%d3 + move.l %d2,view + mvs.b %d0,%d0 + neg.l %d0 + move.l %d0,visible + cmp.l %d2,%d3 + seq %d0 + mvs.b %d0,%d0 + neg.l %d0 + move.l %d0,row_view + tst.l %d2 + jne .L58 + tst.l playing + jne .L59 + tst.l requested + sne %d0 + mvs.b %d0,%d0 + neg.l %d0 +.L56: + move.l %d0,locked + clr.l lock_note + clr.l refused + clr.l missing + subq.l #2,%d2 + tst.l %d2 + jne .L50 + move.l track,%d1 + move.l requested,%d0 + lsl.l #2,%d1 + lsr.l %d1,%d0 + moveq #15,%d1 + and.l %d0,%d1 + move.l %d1,src_cursor +.L50: + movem.l (%sp),#1036 + lea (12,%sp),%sp + rts +.L51: + moveq #2,%d0 + cmp.l %d2,%d0 + jne .L53 + move.b 269161676,%d0 + moveq #7,%d3 + and.l %d3,%d0 + move.l %d0,seen_stock + move.l %d0,track +.L53: + tst.l %d1 + jne .L54 + move.l bank_read_active,%d3 + tst.l %d3 + jne .L54 + tst.b -2147483596.l + jne .L54 + lea occupancy_scan,%a2 +.L55: + move.l %d3,-(%sp) + jsr (%a2) + addq.l #1,%d3 + addq.l #4,%sp + moveq #16,%d0 + cmp.l %d3,%d0 + jne .L55 +.L54: + move.l %d2,%d0 + subq.l #1,%d0 + lsr.l #1,%d0 + jne .L52 + move.l %d2,last_view + jra .L52 +.L58: + clr.l %d0 + jra .L56 +.L59: + moveq #1,%d0 + jra .L56 + .size open_view, .-open_view + .align 2 + .type resume_view, @function +resume_view: + move.l src_cursor,%d0 + move.l #269161676,%a0 + lea (-12,%sp),%sp + move.l mem_track,%d1 + move.l %d0,8(%sp) + move.b (%a0),3(%sp) + move.l %d1,4(%sp) + moveq #7,%d1 + move.b (%a0),%d0 + move.l last_view,-(%sp) + and.l %d0,%d1 + move.l %d1,track + jsr open_view + addq.l #4,%sp + moveq #2,%d0 + cmp.l last_view.l,%d0 + jne .L64 + move.b 3(%sp),%d0 + moveq #7,%d1 + and.l %d1,%d0 + cmp.l 4(%sp),%d0 + jne .L64 + move.l 8(%sp),%d0 + move.l %d0,src_cursor +.L64: + lea (12,%sp),%sp + rts + .size resume_view, .-resume_view + .align 2 + .type performance_context, @function +performance_context: + move.l %d3,-(%sp) + move.l %d2,-(%sp) + tst.l mode + jeq .L66 + tst.l 1175263030 + jeq .L68 +.L69: + clr.l -(%sp) + clr.l mode + jsr open_view + addq.l #4,%sp +.L66: + move.l (%sp)+,%d2 + move.l (%sp)+,%d3 + rts +.L68: + tst.l 1175263018 + jne .L69 + tst.l 1175263014 + jne .L69 + tst.b -2147483627.l + jne .L69 + jsr supported + tst.l %d0 + jeq .L69 + move.l view,%d2 + moveq #3,%d3 + cmp.l %d2,%d3 + jeq .L66 + jsr stock_window + tst.l %d0 + jne .L66 + move.b 269161676,%d0 + moveq #7,%d1 + and.l %d0,%d1 + cmp.l seen_stock.l,%d1 + jeq .L66 + move.l %d1,seen_stock + cmp.l track.l,%d1 + jeq .L66 + move.l %d1,track + subq.l #2,%d2 + tst.l %d2 + jne .L66 + lsl.l #2,%d1 + move.l requested,%d0 + lsr.l %d1,%d0 + moveq #15,%d1 + and.l %d0,%d1 + move.l %d1,src_cursor + jra .L66 + .size performance_context, .-performance_context + .align 2 + .type go_home, @function +go_home: +#APP +| 103 "live_module.c" 1 + move.w %sr,%d0 + move.w #0x2700,%sr +| 0 "" 2 +#NO_APP + clr.l pending_row + clr.l last_row + clr.l requested + clr.l playing + clr.l org_req+4 + clr.l org_req + clr.l org_play+4 + clr.l org_play +#APP +| 109 "live_module.c" 1 + move.w %d0,%sr +| 0 "" 2 +#NO_APP + rts + .size go_home, .-go_home + .align 2 + .type set_operation, @function +set_operation: + move.l track,%d0 + move.l %d0,%d1 + lsl.l #2,%d1 + lea (4,%sp),%a0 + move.l slot,%d0 + move.l (%a0),operation + lea rows,%a0 + move.l (%a0,%d0.l*4),%d0 + lsr.l %d1,%d0 + moveq #15,%d1 + and.l %d0,%d1 + move.l %d1,draft + rts + .size set_operation, .-set_operation + .align 2 + .type ui_fill, @function +ui_fill: + lea (-44,%sp),%sp + move.l 52(%sp),%d0 + movem.l #3324,(%sp) + move.l 56(%sp),%a0 + move.l %d0,%d3 + tst.l %d0 + jge .L79 + clr.l %d3 +.L79: + add.l 60(%sp),%d0 + cmp.l #128,%d0 + jle .L80 + move.l #128,%d0 +.L80: + cmp.l %d3,%d0 + jle .L78 + move.l %a0,%a1 + tst.l %a0 + jge .L82 + sub.l %a1,%a1 +.L82: + move.l 64(%sp),%a2 + moveq #63,%d2 + lea -1(%a0,%a2.l),%a2 + move.l %a2,%d1 + cmp.l %a2,%d2 + jge .L83 + moveq #63,%d1 +.L83: + cmp.l %a1,%d1 + jlt .L78 + move.l %d1,%d2 + asr.l #3,%d2 + move.l %a1,%d4 + asr.l #3,%d4 + move.l 48(%sp),%a2 + move.l %a1,%d7 + move.l #255,%d6 + move.l %d2,32(%sp) + mvz.w %d3,%d2 + move.l %d4,%a0 + moveq #7,%d4 + and.l %d4,%d7 + lsl.l #3,%d2 + and.l %d1,%d4 + lea 7(%a2,%d2.l),%a3 + move.l %d4,40(%sp) +.L84: + cmp.l 32(%sp),%a0 + jle .L90 +.L78: + movem.l (%sp),#3324 + lea (44,%sp),%sp + rts +.L90: + mvz.w %a0,%d2 + lsl.l #3,%d2 + cmp.l %a1,%d2 + jgt .L91 + move.l %d7,%d5 +.L85: + addq.l #7,%d2 + cmp.l %d1,%d2 + jlt .L92 + move.l 40(%sp),%d2 +.L86: + move.w #7,%a2 + move.l %d6,%d4 + sub.l %d2,%a2 + move.l %a2,%d2 + lsr.l %d2,%d4 + move.l %d6,%d2 + move.l %a3,%a2 + lsl.l %d5,%d2 + sub.l %a0,%a2 + move.l %d3,%d5 + and.l %d2,%d4 + move.l %d4,%d2 + not.l %d2 + move.l %d2,36(%sp) +.L89: + move.b (%a2),%d2 + tst.l 68(%sp) + jeq .L87 + or.l %d4,%d2 +.L88: + addq.l #1,%d5 + move.b %d2,(%a2) + addq.l #8,%a2 + cmp.l %d0,%d5 + jne .L89 + addq.l #1,%a0 + jra .L84 +.L91: + clr.l %d5 + jra .L85 +.L92: + moveq #7,%d2 + jra .L86 +.L87: + and.l 36(%sp),%d2 + jra .L88 + .size ui_fill, .-ui_fill + .align 2 + .type ui_hline, @function +ui_hline: + move.l 20(%sp),-(%sp) + pea 1.w + move.l 24(%sp),-(%sp) + move.l 24(%sp),-(%sp) + move.l 24(%sp),-(%sp) + move.l 24(%sp),-(%sp) + jsr ui_fill + lea (24,%sp),%sp + rts + .size ui_hline, .-ui_hline + .align 2 + .type ui_vline, @function +ui_vline: + move.l 20(%sp),-(%sp) + move.l 20(%sp),-(%sp) + pea 1.w + move.l 24(%sp),-(%sp) + move.l 24(%sp),-(%sp) + move.l 24(%sp),-(%sp) + jsr ui_fill + lea (24,%sp),%sp + rts + .size ui_vline, .-ui_vline + .align 2 + .type ui_rect, @function +ui_rect: + lea (-24,%sp),%sp + movem.l #31748,(%sp) + move.l 40(%sp),%a4 + move.l 32(%sp),%a2 + move.l 28(%sp),%d2 + move.l 36(%sp),%a3 + move.l 44(%sp),%a5 + pea 1.w + move.l %a4,-(%sp) + move.l %a3,-(%sp) + move.l %a2,-(%sp) + move.l %d2,-(%sp) + lea ui_hline,%a6 + jsr (%a6) + pea 1.w + move.l %a4,-(%sp) + pea -1(%a3,%a5.l) + move.l %a2,-(%sp) + move.l %d2,-(%sp) + lea -1(%a2,%a4.l),%a4 + jsr (%a6) + lea (40,%sp),%sp + pea 1.w + move.l %a5,-(%sp) + move.l %a3,-(%sp) + move.l %a2,-(%sp) + move.l %d2,-(%sp) + jsr ui_vline + move.l %a5,60(%sp) + move.l %a3,56(%sp) + move.l %a4,52(%sp) + move.l %d2,48(%sp) + moveq #1,%d0 + move.l %d0,64(%sp) + movem.l 20(%sp),#31748 + lea (44,%sp),%sp + jra ui_vline + .size ui_rect, .-ui_rect + .align 2 + .type ui_contour, @function +ui_contour: + lea (-32,%sp),%sp + movem.l #31772,(%sp) + move.l 40(%sp),%a4 + move.l %a4,%d3 + move.l 36(%sp),%d2 + addq.l #1,%d3 + move.l 48(%sp),%a5 + move.l %a5,%d4 + move.l 44(%sp),%a2 + subq.l #2,%d4 + move.l 52(%sp),%a3 + pea 1.w + move.l %d4,-(%sp) + move.l %a2,-(%sp) + move.l %d3,-(%sp) + move.l %d2,-(%sp) + lea ui_hline,%a6 + jsr (%a6) + pea 1.w + move.l %d4,-(%sp) + pea -1(%a2,%a3.l) + move.l %d3,-(%sp) + move.l %d2,-(%sp) + lea -1(%a4,%a5.l),%a5 + jsr (%a6) + lea (40,%sp),%sp + subq.l #2,%a3 + pea 1.w + move.l %a3,-(%sp) + addq.l #1,%a2 + move.l %a2,-(%sp) + move.l %a4,-(%sp) + move.l %d2,-(%sp) + jsr ui_vline + move.l %a3,68(%sp) + move.l %a2,64(%sp) + move.l %a5,60(%sp) + move.l %d2,56(%sp) + moveq #1,%d0 + move.l %d0,72(%sp) + movem.l 20(%sp),#31772 + lea (52,%sp),%sp + jra ui_vline + .size ui_contour, .-ui_contour + .align 2 + .type ui_two, @function +ui_two: + move.l %d2,-(%sp) + moveq #10,%d2 + move.l 12(%sp),%d1 + move.l 8(%sp),%a0 + remu.l %d2,%d0:%d1 + divu.l %d2,%d1 + add.l #48,%d0 + move.b %d0,1(%a0) + clr.b %d0 + add.l #48,%d1 + move.b %d1,(%a0) + move.b %d0,2(%a0) + move.l (%sp)+,%d2 + rts + .size ui_two, .-ui_two + .align 2 + .type ui_snapshot, @function +ui_snapshot: + lea (-28,%sp),%sp + move.l %d3,-(%sp) + move.l %d2,-(%sp) +#APP +| 103 "live_module.c" 1 + move.w %sr,%d0 + move.w #0x2700,%sr +| 0 "" 2 +#NO_APP + move.l playing,%d1 + move.l requested,%d2 + move.l last_row,%a1 + move.l pending_row,%d3 + move.l %d1,8(%sp) + move.l org_play,%d1 + move.l %d2,12(%sp) + move.l org_play+4,%d2 + move.l %d3,16(%sp) + move.l org_req,%d3 + move.l %d1,20(%sp) + move.l org_req+4,%d1 + move.l %d2,24(%sp) + move.l %d3,28(%sp) + move.l %d1,32(%sp) +#APP +| 109 "live_module.c" 1 + move.w %d0,%sr +| 0 "" 2 +#NO_APP + moveq #2,%d2 + move.l -2147457608,%d1 + cmp.l %d1,%d2 + jcc .L100 + moveq #1,%d1 +.L100: + mvz.w defined,%d2 + move.l %a1,%d0 +.L101: + moveq #15,%d3 + cmp.l %d0,%d3 + jcc .L103 + clr.l %d0 + jra .L102 +.L103: + move.l %d2,%d3 + lsr.l %d0,%d3 + addq.l #1,%d0 + btst #0,%d3 + jeq .L101 +.L102: + move.l 12(%sp),%d2 + move.l 20(%sp),%d3 + move.l 8(%sp),(%a0) + move.l %d2,4(%a0) + move.l 24(%sp),%d2 + move.l %d3,8(%a0) + move.l %d0,32(%a0) + move.l %d2,12(%a0) + move.l 28(%sp),%d3 + move.l %a0,%d0 + move.l %a1,24(%a0) + move.l %d1,36(%a0) + move.l %d3,16(%a0) + move.l 32(%sp),%d2 + move.l %d2,20(%a0) + move.l 16(%sp),%d3 + move.l (%sp)+,%d2 + move.l %d3,28(%a0) + move.l (%sp)+,%d3 + lea (28,%sp),%sp + rts + .size ui_snapshot, .-ui_snapshot + .align 2 + .type ui_from, @function +ui_from: + move.l 8(%sp),%d0 + move.l %d0,%d1 + lsr.l #2,%d1 + move.l 4(%sp),%a0 + move.l %d1,%a1 + moveq #3,%d1 + and.l %d1,%d0 + move.l %d0,%d1 + lsl.l #3,%d1 + move.l (%a0,%a1.l*4),%d0 + lsr.l %d1,%d0 + mvz.b %d0,%d0 + rts + .size ui_from, .-ui_from + .align 2 + .type ui_moving, @function +ui_moving: + lea (-12,%sp),%sp + movem.l #3076,(%sp) + move.l 16(%sp),%a2 + move.l (%a2),%d1 + move.l 4(%a2),%d0 + eor.l %d1,%d0 + mvz.w 22(%sp),%d1 + lsl.l #2,%d1 + lsr.l %d1,%d0 + moveq #15,%d1 + and.l %d1,%d0 + tst.l %d0 + jeq .L107 +.L109: + moveq #1,%d0 +.L106: + movem.l (%sp),#3076 + lea (12,%sp),%sp + rts +.L107: + move.l 20(%sp),-(%sp) + pea 16(%a2) + lea ui_from,%a3 + jsr (%a3) + addq.l #8,%sp + move.l 20(%sp),-(%sp) + pea 8(%a2) + move.l %d0,%d2 + jsr (%a3) + addq.l #8,%sp + cmp.l %d0,%d2 + jeq .L110 + tst.l %d2 + jeq .L109 + cmp.l 28(%a2),%d2 + sne %d0 + mvs.b %d0,%d0 + neg.l %d0 + jra .L106 +.L110: + clr.l %d0 + jra .L106 + .size ui_moving, .-ui_moving + .align 2 + .type ui_path, @function +ui_path: + move.l %a3,-(%sp) + move.l %a2,-(%sp) + move.l 16(%sp),%a3 + move.l 12(%sp),%a2 + tst.l 24(%a3) + jeq .L115 + move.l %a2,%a0 + move.b #82,(%a0)+ + move.l 24(%a3),-(%sp) + move.l %a0,-(%sp) + jsr ui_two + addq.l #8,%sp + moveq #3,%d0 +.L116: + moveq #62,%d1 + lea 1(%a2,%d0.l),%a1 + lea 2(%a2,%d0.l),%a0 + move.b %d1,(%a2,%d0.l) + tst.l 32(%a3) + jeq .L117 + move.b #82,(%a1) + move.l 32(%a3),16(%sp) + move.l %a0,12(%sp) + move.l (%sp)+,%a2 + move.l (%sp)+,%a3 + jra ui_two +.L115: + move.w #11565,(%a2) + moveq #2,%d0 + jra .L116 +.L117: + moveq #68,%d1 + move.b #69,(%a1) + move.b #78,(%a0) + move.b %d1,3(%a2,%d0.l) + clr.b %d1 + move.b %d1,4(%a2,%d0.l) + move.l (%sp)+,%a2 + move.l (%sp)+,%a3 + rts + .size ui_path, .-ui_path + .align 2 + .type valid, @function +valid: + lea (-12,%sp),%sp + movem.l #1036,(%sp) + move.l 16(%sp),%d3 + jsr supported + tst.l %d0 + jeq .L118 + moveq #8,%d2 + lea grid,%a2 +.L121: + moveq #15,%d0 + and.l %d3,%d0 + move.l %d0,-(%sp) + jsr (%a2) + addq.l #4,%sp + tst.l %d0 + jeq .L118 + lsr.l #4,%d3 + subq.l #1,%d2 + tst.l %d2 + jne .L121 +.L118: + movem.l (%sp),#1036 + lea (12,%sp),%sp + rts + .size valid, .-valid + .align 2 + .type submit_from, @function +submit_from: + move.l %d3,-(%sp) + move.l %d2,-(%sp) + move.l 12(%sp),%d2 + move.l %d2,-(%sp) + jsr valid + addq.l #4,%sp + tst.l %d0 + jeq .L130 + tst.l %d2 + jne .L131 +.L136: + clr.l refused +#APP +| 103 "live_module.c" 1 + move.w %sr,%d3 + move.w #0x2700,%sr +| 0 "" 2 +#NO_APP + tst.l bank_uncertain + jeq .L147 + moveq #1,%d1 + move.l %d1,refused +.L139: +#APP +| 109 "live_module.c" 1 + move.w %d3,%sr +| 0 "" 2 +#NO_APP + jra .L129 +.L131: + tst.l 1175263030 + jeq .L134 +.L130: + moveq #1,%d0 + move.l %d0,refused +.L129: + move.l (%sp)+,%d2 + move.l (%sp)+,%d3 + rts +.L134: + tst.l 1175263018 + jne .L130 + tst.l 1175263014 + jne .L130 + jra .L136 +.L147: + move.l 16(%sp),%a0 + moveq #7,%d0 + move.l %a0,pending_row + move.l %d2,requested + cmp.l 20(%sp),%d0 + jcs .L137 + move.l 24(%sp),-(%sp) + move.l 24(%sp),-(%sp) + pea org_req + jsr set_origin + lea (12,%sp),%sp +.L138: + tst.l -2147457608 + jne .L139 + move.l %d2,playing + lea org_req,%a0 + move.l (%a0),org_play + lea org_req+4,%a0 + move.l (%a0),org_play+4 + tst.l 16(%sp) + jeq .L140 + move.l 16(%sp),%d1 + move.l %d1,last_row +.L140: + clr.l pending_row + jra .L139 +.L137: + move.l 24(%sp),%d0 + move.l #16843009,%d1 + muls.l %d1,%d0 + move.l %d0,org_req+4 + move.l %d0,org_req + jra .L138 + .size submit_from, .-submit_from + .align 2 + .type submit_lane, @function +submit_lane: + move.l %d2,-(%sp) + move.l 8(%sp),%d0 + move.l %d0,%d1 + lsl.l #2,%d1 + clr.l -(%sp) + move.l %d0,-(%sp) + moveq #15,%d0 + clr.l -(%sp) + lsl.l %d1,%d0 + move.l %d1,%a0 + move.l %a0,%d2 + move.l 24(%sp),%d1 + lsl.l %d2,%d1 + not.l %d0 + and.l requested,%d0 + or.l %d1,%d0 + move.l %d0,-(%sp) + jsr submit_from + lea (16,%sp),%sp + move.l (%sp)+,%d2 + rts + .size submit_lane, .-submit_lane + .align 2 + .type slot_state, @function +slot_state: + move.l 8(%sp),%d1 + move.l occ_known,%d0 + btst %d1,%d0 + jeq .L151 + mvz.w usable,%d0 + btst %d1,%d0 + jeq .L152 + moveq #7,%d0 + and.l 4(%sp),%d0 + lea occ,%a0 + mvz.w (%a0,%d0.l*2),%d0 + asr.l %d1,%d0 + moveq #1,%d1 + and.l %d1,%d0 +.L149: + rts +.L151: + moveq #1,%d0 + jra .L149 +.L152: + moveq #2,%d0 + jra .L149 + .size slot_state, .-slot_state + .align 2 + .type scene_gesture, @function +scene_gesture: + move.l %d2,-(%sp) + move.l 8(%sp),%d2 + move.l %d2,%d0 + add.l #-25,%d0 + lsr.l #1,%d0 + jne .L154 + move.l %d2,8(%sp) + move.l (%sp)+,%d2 + jra alone +.L154: + moveq #15,%d0 + cmp.l %d2,%d0 + jcc .L155 +.L159: + clr.l %d0 +.L153: + move.l (%sp)+,%d2 + rts +.L155: + move.b 1175456539,%d0 + btst #1,%d0 + jne .L157 +.L160: + move.b 1175456539,%d0 + move.w %d0,%ccr + jne .L159 + pea 26.w + move.l %d2,-(%sp) + jsr pair + addq.l #8,%sp + jra .L153 +.L157: + pea 25.w + move.l %d2,-(%sp) + jsr pair + addq.l #8,%sp + tst.l %d0 + jne .L153 + jra .L160 + .size scene_gesture, .-scene_gesture + .align 2 + .type ui_px, @function +ui_px: + move.l %d2,-(%sp) + moveq #127,%d2 + move.l 12(%sp),%d0 + move.l 16(%sp),%d1 + cmp.l %d0,%d2 + jcs .L161 + moveq #63,%d2 + cmp.l %d1,%d2 + jcs .L161 + lsl.l #3,%d0 + move.l %d0,%a0 + move.l %d1,%d0 + asr.l #3,%d0 + addq.l #7,%a0 + sub.l %d0,%a0 + moveq #7,%d0 + and.l %d0,%d1 + add.l 8(%sp),%a0 + moveq #1,%d0 + lsl.l %d1,%d0 + move.b (%a0),%d1 + tst.l 20(%sp) + jeq .L163 + or.l %d1,%d0 +.L164: + move.b %d0,(%a0) +.L161: + move.l (%sp)+,%d2 + rts +.L163: + not.l %d0 + and.l %d1,%d0 + jra .L164 + .size ui_px, .-ui_px + .align 2 + .type ui_plate, @function +ui_plate: + lea (-24,%sp),%sp + movem.l #31748,(%sp) + move.l 44(%sp),%a6 + move.l 28(%sp),%d2 + move.l 32(%sp),%a2 + move.l 36(%sp),%a3 + move.l 40(%sp),%a5 + pea 1.w + move.l %a6,-(%sp) + move.l %a5,-(%sp) + move.l %a3,-(%sp) + move.l %a2,-(%sp) + move.l %d2,-(%sp) + jsr ui_fill + clr.l -(%sp) + move.l %a3,-(%sp) + move.l %a2,-(%sp) + move.l %d2,-(%sp) + lea ui_px,%a4 + jsr (%a4) + lea (36,%sp),%sp + clr.l (%sp) + lea -1(%a2,%a5.l),%a5 + move.l %a3,-(%sp) + lea -1(%a3,%a6.l),%a3 + move.l %a5,-(%sp) + move.l %d2,-(%sp) + jsr (%a4) + clr.l -(%sp) + move.l %a3,-(%sp) + move.l %a2,-(%sp) + move.l %d2,-(%sp) + jsr (%a4) + move.l %a3,68(%sp) + move.l %a5,64(%sp) + move.l %d2,60(%sp) + movem.l 32(%sp),#31748 + clr.l 72(%sp) + lea (56,%sp),%sp + jra ui_px + .size ui_plate, .-ui_plate + .align 2 + .type ui_dotted, @function +ui_dotted: + lea (-44,%sp),%sp + movem.l #15612,(%sp) + move.l 56(%sp),%a2 + moveq #1,%d3 + move.l 64(%sp),%a0 + move.l 48(%sp),%d2 + move.l 52(%sp),%a3 + move.l %a3,%d5 + lea -1(%a2,%a0.l),%a5 + move.l 60(%sp),%d0 + add.l %a2,%d5 + subq.l #1,%d0 + move.l %d0,40(%sp) + move.l %d5,%d4 + lea ui_px,%a4 +.L169: + move.l %d3,%d7 + move.l %d4,%d6 + add.l %a3,%d7 + addq.l #1,%d4 + btst #0,%d4 + jne .L167 + pea 1.w + move.l %a2,-(%sp) + move.l %d7,-(%sp) + move.l %d2,-(%sp) + jsr (%a4) + lea (16,%sp),%sp +.L167: + add.l 64(%sp),%d6 + btst #0,%d6 + jne .L168 + pea 1.w + move.l %a5,-(%sp) + move.l %d7,-(%sp) + move.l %d2,-(%sp) + jsr (%a4) + lea (16,%sp),%sp +.L168: + addq.l #1,%d3 + cmp.l 40(%sp),%d3 + jlt .L169 + move.l 60(%sp),%a0 + move.w #1,%a4 + move.l 64(%sp),%d3 + subq.l #1,%d3 + lea -1(%a3,%a0.l),%a0 + move.l 60(%sp),%d4 + add.l %d5,%d4 + lea ui_px,%a5 + move.l %a0,%d6 +.L172: + move.l %a4,%d0 + add.l %d5,%d0 + btst #0,%d0 + jne .L170 + pea 1.w + pea (%a4,%a2.l) + move.l %a3,-(%sp) + move.l %d2,-(%sp) + jsr (%a5) + lea (16,%sp),%sp +.L170: + btst #0,%d4 + jne .L171 + pea 1.w + pea (%a4,%a2.l) + move.l %d6,-(%sp) + move.l %d2,-(%sp) + jsr (%a5) + lea (16,%sp),%sp +.L171: + addq.l #1,%a4 + addq.l #1,%d4 + cmp.l %a4,%d3 + jgt .L172 + movem.l (%sp),#15612 + lea (44,%sp),%sp + rts + .size ui_dotted, .-ui_dotted + .align 2 + .type ui_mark, @function +ui_mark: + lea (-20,%sp),%sp + clr.l %d0 + movem.l #7180,(%sp) + lea ui_mark_data,%a2 +.L176: + cmp.l 28(%sp),%d0 + jne .L177 + clr.l %d2 + lea ui_px,%a4 +.L178: + mvz.b 1(%a2),%d0 + cmp.l %d0,%d2 + jcs .L182 + mvz.b (%a2),%d0 + movem.l (%sp),#7180 + lea (20,%sp),%sp + rts +.L177: + mvz.b 1(%a2),%d1 + addq.l #1,%d0 + lea 2(%a2,%d1.l),%a2 + jra .L176 +.L180: + mvz.b 2(%a2,%d2.l),%d1 + subq.l #1,%d0 + sub.l %a3,%d0 + btst %d0,%d1 + jeq .L179 + move.l 40(%sp),-(%sp) + move.l %d3,-(%sp) + move.l 40(%sp),%a0 + pea (%a0,%a3.l) + move.l 36(%sp),-(%sp) + jsr (%a4) + lea (16,%sp),%sp +.L179: + addq.l #1,%a3 +.L181: + mvz.b (%a2),%d0 + cmp.l %d0,%a3 + jcs .L180 + addq.l #1,%d2 + jra .L178 +.L182: + move.l 36(%sp),%d3 + sub.l %a3,%a3 + add.l %d2,%d3 + jra .L181 + .size ui_mark, .-ui_mark + .align 2 + .type ui_glyph, @function +ui_glyph: + lea (-12,%sp),%sp + move.b 23(%sp),%d1 + movem.l #1036,(%sp) + move.l 16(%sp),%a1 + moveq #9,%d3 + move.l 6(%a1),%d0 + add.l #-48,%d1 + mvz.b %d1,%d2 + cmp.l %d2,%d3 + jcc .L187 + move.w #10,%a0 + mvs.b 23(%sp),%d2 + move.l 2(%a1),%a2 +.L188: + move.b (%a2,%a0.l),%d1 + jeq .L186 + mvs.b %d1,%d1 + cmp.l %d1,%d2 + jne .L190 + mvz.b (%a1),%d1 + move.l %a0,%d2 + addq.l #1,%d1 + muls.l %d2,%d1 + jra .L192 +.L187: + mvz.b (%a1),%d2 + ext.w %d1 + addq.l #1,%d2 + mulu.w %d2,%d1 +.L192: + add.l %d1,%d0 +.L186: + movem.l (%sp),#1036 + lea (12,%sp),%sp + rts +.L190: + addq.l #1,%a0 + jra .L188 + .size ui_glyph, .-ui_glyph + .align 2 + .type ui_width, @function +ui_width: + lea (-16,%sp),%sp + movem.l #7172,(%sp) + move.l 20(%sp),%a2 + clr.l %d2 + move.l 24(%sp),%a3 + lea ui_glyph,%a4 +.L194: + move.b (%a3),%d0 + jne .L195 + tst.l %d2 + jeq .L193 + mvz.b 1(%a2),%d0 + sub.l %d0,%d2 +.L193: + move.l %d2,%d0 + movem.l (%sp),#7172 + lea (16,%sp),%sp + rts +.L195: + mvs.b %d0,%d0 + addq.l #1,%a3 + move.l %d0,-(%sp) + move.l %a2,-(%sp) + jsr (%a4) + mvz.b 1(%a2),%d1 + addq.l #8,%sp + move.l %d0,%a0 + mvz.b (%a0),%d0 + add.l %d1,%d0 + add.l %d0,%d2 + jra .L194 + .size ui_width, .-ui_width + .align 2 + .type ui_text, @function +ui_text: + lea (-52,%sp),%sp + moveq #7,%d1 + and.l 68(%sp),%d1 + movem.l #15612,(%sp) + move.l 72(%sp),%a2 + move.l 60(%sp),%a4 + move.l 64(%sp),%d2 + move.l 56(%sp),%d3 + addq.l #7,%d3 + lea ui_glyph,%a5 + move.l %d3,48(%sp) + move.l %d1,40(%sp) +.L201: + move.b (%a4),%d0 + jne .L211 + mvz.b 1(%a2),%d1 + move.l %d2,%d0 + movem.l (%sp),#15612 + sub.l %d1,%d0 + sub.l 64(%sp),%d0 + lea (52,%sp),%sp + rts +.L211: + mvs.b %d0,%d0 + move.l %d2,%d5 + addq.l #1,%a4 + lsl.l #3,%d5 + move.l %d0,-(%sp) + move.l %a2,-(%sp) + jsr (%a5) + addq.l #8,%sp + sub.l %a1,%a1 + move.l %d0,%a3 +.L202: + mvz.b (%a3),%d0 + cmp.l %d0,%a1 + jcc .L209 + mvz.b (%a2),%d1 + subq.l #1,%d0 + clr.l %d3 + sub.l %a1,%d0 + move.l %d1,44(%sp) + clr.l %d1 + jra .L210 +.L203: + move.l %d3,%d6 + addq.l #1,%d6 + moveq #1,%d7 + mvz.b (%a3,%d6.l),%d4 + asr.l %d0,%d4 + and.l %d7,%d4 + lsl.l %d3,%d4 + move.l %d6,%d3 + or.l %d4,%d1 +.L210: + cmp.l 44(%sp),%d3 + jcs .L203 + tst.l %d1 + jeq .L204 + move.l %a1,%d0 + add.l %d2,%d0 + lsr.l #7,%d0 + jne .L204 + move.l 40(%sp),%d4 + move.l 68(%sp),%d0 + asr.l #3,%d0 + move.l 48(%sp),%a0 + lsl.l %d4,%d1 + sub.l %d0,%a0 + add.l %d5,%a0 +.L205: + tst.l %d1 + jeq .L204 + moveq #8,%d7 + cmp.l %d0,%d7 + jne .L208 +.L204: + addq.l #1,%a1 + addq.l #8,%d5 + jra .L202 +.L208: + move.b (%a0),%d6 + tst.l 76(%sp) + jeq .L206 + or.l %d1,%d6 +.L207: + move.b %d6,(%a0) + lsr.l #8,%d1 + addq.l #1,%d0 + subq.l #1,%a0 + jra .L205 +.L206: + move.l %d1,%d3 + not.l %d3 + and.l %d3,%d6 + jra .L207 +.L209: + mvz.b 1(%a2),%d1 + add.l %d1,%d0 + add.l %d0,%d2 + jra .L201 + .size ui_text, .-ui_text + .align 2 + .type ui_text_r, @function +ui_text_r: + move.l %d3,-(%sp) + move.l %d2,-(%sp) + move.l 16(%sp),%d2 + move.l 28(%sp),%d3 + move.l %d2,-(%sp) + move.l %d3,-(%sp) + jsr ui_width + addq.l #8,%sp + move.l %d3,28(%sp) + move.l %d2,16(%sp) + move.l 20(%sp),%d1 + sub.l %d0,%d1 + addq.l #1,%d1 + move.l %d1,20(%sp) + move.l (%sp)+,%d2 + move.l (%sp)+,%d3 + jra ui_text + .size ui_text_r, .-ui_text_r + .align 2 + .type ui_bar, @function +ui_bar: + lea (-24,%sp),%sp + movem.l #3132,(%sp) + move.l 32(%sp),%a2 + move.l 40(%sp),%a3 + move.l 28(%sp),%d2 + move.l 44(%sp),%d5 + move.l 48(%sp),%d4 + move.l 52(%sp),%d3 + pea 1.w + pea 7.w + move.l 44(%sp),%a0 + sub.l %a2,%a0 + pea 1(%a0) + pea 57.w + move.l %a2,-(%sp) + move.l %d2,-(%sp) + jsr ui_fill + clr.l -(%sp) + pea UI_M3 + pea 58.w + addq.l #2,%a2 + move.l %a2,-(%sp) + move.l %a3,-(%sp) + move.l %d2,-(%sp) + lea ui_text,%a3 + jsr (%a3) + lea (48,%sp),%sp + lea 3(%a2,%d0.l),%a2 + moveq #-1,%d0 + cmp.l %d5,%d0 + jeq .L220 + clr.l -(%sp) + pea 58.w + move.l %a2,-(%sp) + move.l %d5,-(%sp) + move.l %d2,-(%sp) + jsr ui_mark + lea (20,%sp),%sp + lea 3(%a2,%d0.l),%a2 +.L220: + tst.l %d4 + jeq .L221 + clr.l -(%sp) + pea UI_M3 + pea 58.w + move.l %a2,-(%sp) + move.l %d4,-(%sp) + move.l %d2,-(%sp) + jsr (%a3) + lea (24,%sp),%sp + lea 3(%a2,%d0.l),%a2 +.L221: + tst.l %d3 + jeq .L219 + move.l %a2,36(%sp) + move.l #UI_M3,%d0 + move.l %d3,32(%sp) + move.l %d2,28(%sp) + movem.l (%sp),#3132 + move.l %d0,44(%sp) + moveq #58,%d0 + clr.l 48(%sp) + move.l %d0,40(%sp) + lea (24,%sp),%sp + jra ui_text +.L219: + movem.l (%sp),#3132 + lea (24,%sp),%sp + rts + .size ui_bar, .-ui_bar + .align 2 + .type ui_slot_mark, @function +ui_slot_mark: + lea (-32,%sp),%sp + movem.l #3324,(%sp) + move.l 36(%sp),%d3 + move.l 44(%sp),%d5 + move.l 48(%sp),%d2 + move.l 52(%sp),%d4 + tst.l 40(%sp) + jne .L230 + move.l %d4,48(%sp) + move.l %d2,44(%sp) + move.l %d5,40(%sp) + move.l %d3,36(%sp) + movem.l (%sp),#3324 + lea (32,%sp),%sp +.L231: + jra ui_px +.L230: + move.l %d4,-(%sp) + move.l %d2,%a3 + subq.l #1,%a3 + move.l %a3,-(%sp) + move.l %d5,%d7 + subq.l #1,%d7 + move.l %d7,-(%sp) + move.l %d3,-(%sp) + lea ui_px,%a2 + jsr (%a2) + move.l %d4,-(%sp) + move.l %a3,-(%sp) + move.l %d5,%d6 + addq.l #1,%d6 + move.l %d6,-(%sp) + move.l %d3,-(%sp) + jsr (%a2) + lea (28,%sp),%sp + move.l %d4,(%sp) + move.l %d2,-(%sp) + move.l %d5,-(%sp) + move.l %d3,-(%sp) + jsr (%a2) + move.l %d4,-(%sp) + addq.l #1,%d2 + move.l %d2,-(%sp) + move.l %d7,-(%sp) + move.l %d3,-(%sp) + jsr (%a2) + move.l %d4,80(%sp) + move.l %d2,76(%sp) + move.l %d6,72(%sp) + move.l %d3,68(%sp) + movem.l 32(%sp),#3324 + lea (64,%sp),%sp + jra .L231 + .size ui_slot_mark, .-ui_slot_mark + .align 2 + .type ui_corner.constprop.0, @function +ui_corner.constprop.0: + lea (-24,%sp),%sp + movem.l #7196,(%sp) + move.l 36(%sp),%d3 + move.l 28(%sp),%d2 + move.l 32(%sp),%a2 + move.l 44(%sp),%d4 + move.l 40(%sp),%a4 + pea 1.w + move.l %d3,-(%sp) + move.l %a2,-(%sp) + move.l %d2,-(%sp) + lea ui_px,%a3 + jsr (%a3) + pea 1.w + move.l %d3,-(%sp) + pea (%a2,%a4.l) + move.l %d2,-(%sp) + jsr (%a3) + add.l %d4,%d3 + move.l %d3,68(%sp) + move.l %a2,64(%sp) + move.l %d2,60(%sp) + moveq #1,%d0 + movem.l 32(%sp),#7196 + move.l %d0,72(%sp) + lea (56,%sp),%sp + jra ui_px + .size ui_corner.constprop.0, .-ui_corner.constprop.0 + .align 2 + .type ui_corners, @function +ui_corners: + lea (-24,%sp),%sp + movem.l #1148,(%sp) + move.l 32(%sp),%d5 + move.l %d5,%d3 + move.l 36(%sp),%d6 + move.l %d6,%d4 + move.l 28(%sp),%d2 + add.l 40(%sp),%d3 + add.l 44(%sp),%d4 + pea 1.w + pea 1.w + move.l %d6,-(%sp) + move.l %d5,-(%sp) + move.l %d2,-(%sp) + lea (ui_corner.constprop.0),%a2 + subq.l #1,%d3 + jsr (%a2) + pea 1.w + pea -1.w + move.l %d6,-(%sp) + move.l %d3,-(%sp) + move.l %d2,-(%sp) + jsr (%a2) + lea (40,%sp),%sp + subq.l #1,%d4 + pea -1.w + pea 1.w + move.l %d4,-(%sp) + move.l %d5,-(%sp) + move.l %d2,-(%sp) + jsr (%a2) + move.l %d4,56(%sp) + move.l %d3,52(%sp) + move.l %d2,48(%sp) + movem.l 20(%sp),#1148 + moveq #-1,%d0 + move.l %d0,64(%sp) + move.l %d0,60(%sp) + lea (44,%sp),%sp + jra (ui_corner.constprop.0) + .size ui_corners, .-ui_corners + .section .rodata.str1.1,"aMS",@progbits,1 +.LC0: + .string "EMPTY" +.LC1: + .string "WAIT" +.LC2: + .string "NEXT" +.LC3: + .string "R" + .text + .align 2 + .type panorama_draw, @function +panorama_draw: + link.w %fp,#-148 + movem.l #15612,(%sp) + move.l %fp,%d5 + add.l #-40,%d5 + move.l %d5,%a0 + jsr ui_snapshot + move.l -8(%fp),%d2 + move.l -12(%fp),%d1 + move.l 8(%fp),%a0 + move.l 8(%fp),%a1 + move.l %d1,-104(%fp) + move.l %d2,-100(%fp) + lea (1016,%a0),%a0 + lea (592,%a1),%a1 +.L235: + moveq #1,%d4 + moveq #-2,%d2 + subq.l #8,%a0 + move.b 8(%a0),%d0 + move.b -80(%a0),%d1 + and.l %d4,%d0 + and.l %d2,%d1 + or.l %d1,%d0 + move.b %d0,8(%a0) + cmp.l %a0,%a1 + jne .L235 + clr.l -(%sp) + moveq #11,%d4 + pea 57.w + pea 128.w + clr.l -(%sp) + clr.l -(%sp) + move.l 8(%fp),-(%sp) + jsr ui_fill + move.l first_row,%d2 + lea (24,%sp),%sp + cmp.l %d2,%d4 + jcc .L236 + moveq #11,%d2 +.L236: + move.l -36(%fp),%d4 + move.l %d2,%a3 + move.l -40(%fp),%d3 + move.l %d3,%d0 + clr.l %d6 + or.l %d4,%d0 + clr.l -92(%fp) + clr.l %d7 + lea (-32,%fp),%a4 + addq.l #5,%a3 + lea ui_from,%a2 + lea (-24,%fp),%a5 + or.l -32(%fp),%d0 + or.l -28(%fp),%d0 + or.l -24(%fp),%d0 + or.l -20(%fp),%d0 + move.l %d0,-96(%fp) +.L244: + move.l -104(%fp),%a0 + move.l -100(%fp),%a1 + move.l %a0,-12(%fp) + move.l %a1,-8(%fp) + tst.l -96(%fp) + jeq .L238 + move.l %d6,-(%sp) + move.l %a4,-(%sp) + jsr (%a2) + addq.l #8,%sp + tst.l %d0 + jeq .L239 + subq.l #1,%d0 + cmp.l %d0,%d2 + jhi .L239 + cmp.l %d0,%a3 + jhi .L238 +.L239: + moveq #1,%d0 + lsl.l %d6,%d0 + or.l %d0,%d7 +.L238: + move.l %d6,-(%sp) + move.l %d5,-(%sp) + jsr ui_moving + addq.l #8,%sp + tst.l %d0 + jeq .L243 + move.l %d6,-(%sp) + move.l %a5,-(%sp) + jsr (%a2) + addq.l #8,%sp + tst.l %d0 + jeq .L242 + subq.l #1,%d0 + cmp.l %d0,%d2 + jhi .L242 + cmp.l %d0,%a3 + jhi .L243 +.L242: + moveq #1,%d0 + lsl.l %d6,%d0 + or.l %d0,-92(%fp) +.L243: + addq.l #1,%d6 + moveq #8,%d0 + cmp.l %d6,%d0 + jne .L244 + move.l slot,%d1 + move.l %d1,%d6 + move.l -16(%fp),%a0 + addq.l #1,%d6 + clr.l -48(%fp) + clr.l -44(%fp) + move.l %d1,-96(%fp) + move.l %a0,-84(%fp) + cmp.l %a0,%d6 + jne .L245 + cmp.l -104(%fp),%a0 + jne .L246 +.L250: + lea .LC1,%a2 +.L247: + moveq #82,%d4 + move.l %d6,-(%sp) + pea -55(%fp) + lea ui_two,%a3 + move.b %d4,-56(%fp) + jsr (%a3) + addq.l #8,%sp + tst.l %a2 + jne .L293 + move.l %d6,-(%sp) + move.l #1414678855,%d5 + pea -44(%fp) + move.l %d5,-48(%fp) + jsr (%a3) + addq.l #8,%sp + moveq #9,%d0 + cmp.l %d6,%d0 + jcs .L249 + clr.b %d1 + move.b -43(%fp),-44(%fp) + move.b %d1,-43(%fp) + jra .L249 +.L246: + move.l %d5,-(%sp) + pea -56(%fp) + jsr ui_path + addq.l #8,%sp + move.l track,%d0 + move.l -92(%fp),%d1 + btst %d0,%d1 + jeq .L248 + lsl.l #2,%d0 + move.w #15937,%d5 + lsr.l %d0,%d4 + moveq #15,%d0 + move.w %d5,-48(%fp) + and.l %d0,%d4 + move.l %d4,%a0 + pea 1(%a0) + pea -46(%fp) +.L351: + jsr ui_two + addq.l #8,%sp +.L249: + moveq #24,%d4 + move.l #2400,%d5 + move.l -2147477476,%d1 + move.l %d1,%d0 + divu.l %d4,%d0 + move.l %d1,%d3 + divu.l %d5,%d3 + moveq #10,%d5 + moveq #10,%d4 + add.l #48,%d3 + move.b %d3,-60(%fp) + remu.l %d4,%d3:%d0 + divu.l %d4,%d0 + remu.l %d5,%d4:%d0 + clr.b %d0 + add.l #48,%d3 + move.b %d3,-58(%fp) + add.l #48,%d4 + move.b %d4,-59(%fp) + move.b %d0,-57(%fp) + tst.b -48(%fp) + jeq .L294 + lea (-48,%fp),%a0 +.L254: + move.l -4(%fp),%d4 + moveq #1,%d5 + move.l %d4,-80(%fp) + cmp.l %d4,%d5 + jeq .L295 + subq.l #2,%d4 + tst.l %d4 + jne .L296 + moveq #6,%d0 +.L255: + cmp.l #2399,%d1 + jhi .L297 + move.l %fp,%d1 + add.l #-59,%d1 +.L256: + move.l %a0,-(%sp) + moveq #6,%d3 + pea -56(%fp) + move.l %d0,-(%sp) + move.l %d1,-(%sp) + pea 74.w + clr.l -(%sp) + lea ui_hline,%a2 + move.l %a2,%a3 + move.l 8(%fp),-(%sp) + jsr ui_bar + lea (28,%sp),%sp +.L257: + pea 1.w + pea 113.w + move.l %d3,-(%sp) + pea 15.w + add.l #10,%d3 + move.l 8(%fp),-(%sp) + jsr (%a2) + lea (20,%sp),%sp + moveq #56,%d1 + cmp.l %d3,%d1 + jne .L257 + lea ui_vline,%a2 + moveq #15,%d3 + move.l %a2,%a4 +.L258: + pea 1.w + pea 50.w + pea 6.w + move.l %d3,-(%sp) + add.l #14,%d3 + move.l 8(%fp),-(%sp) + jsr (%a2) + lea (20,%sp),%sp + cmp.l #141,%d3 + jne .L258 + lea ui_text,%a2 + tst.l -104(%fp) + jeq .L259 + move.l -104(%fp),%d0 + subq.l #1,%d0 + cmp.l %d0,%d2 + jhi .L298 + move.l %d2,%d1 + addq.l #5,%d1 + cmp.l %d0,%d1 + jls .L299 +.L259: + tst.l -100(%fp) + jeq .L262 + move.l -100(%fp),%d0 + subq.l #1,%d0 + cmp.l %d0,%d2 + jhi .L300 + move.l %d2,%d1 + addq.l #5,%d1 + cmp.l %d0,%d1 + jls .L301 +.L262: + tst.l -84(%fp) + jeq .L263 + move.l -84(%fp),%d0 + subq.l #1,%d0 + cmp.l %d0,%d2 + jhi .L302 + move.l %d2,%d1 + addq.l #5,%d1 + cmp.l %d0,%d1 + jls .L303 +.L263: + moveq #-1,%d4 + cmp.l -96(%fp),%d4 + jeq .L264 + cmp.l -96(%fp),%d2 + jhi .L305 + move.l %d2,%d0 + addq.l #5,%d0 + cmp.l -96(%fp),%d0 + jhi .L264 + move.l -96(%fp),%d0 +.L261: + cmp.l %d2,%d0 + jls .L305 + moveq #9,%d0 +.L260: + pea 1.w + pea 2.w + pea 2.w + move.l %d0,-(%sp) + move.l %fp,%d3 + add.l #-66,%d3 + move.l 8(%fp),-(%sp) + jsr ui_mark + move.l %d6,-(%sp) + move.l %d3,-(%sp) + jsr ui_two + pea 1.w + pea UI_M3 + pea 1.w + pea 8.w + move.l %d3,-(%sp) + move.l 8(%fp),-(%sp) + jsr (%a2) + lea (52,%sp),%sp +.L265: + move.w #16,%a2 + move.l %fp,%d4 + move.l %fp,%d6 + clr.l %d3 + add.l #-63,%d4 + lea ui_text,%a5 + add.l #-32,%d6 +.L270: + move.l %d3,%d0 + add.l #49,%d0 + moveq #84,%d5 + move.b %d0,-62(%fp) + clr.b %d0 + move.b %d5,-63(%fp) + move.l %a2,%d5 + addq.l #3,%d5 + move.b %d0,-61(%fp) + btst %d3,%d7 + jeq .L266 + move.l %a2,%d0 + addq.l #1,%d0 + tst.l -80(%fp) + jeq .L267 + pea 6.w + pea 11.w + clr.l -(%sp) + move.l %d0,-(%sp) + move.l 8(%fp),-(%sp) + jsr ui_plate + clr.l -(%sp) + pea UI_K5 + pea 1.w + move.l %d5,-(%sp) + move.l %d4,-(%sp) + move.l 8(%fp),-(%sp) + jsr (%a5) + move.l -100(%fp),%d5 + move.l -104(%fp),%d1 + lea (40,%sp),%sp + move.l %d3,(%sp) + move.l %d6,-(%sp) + move.l %d1,-12(%fp) + move.l %d5,-8(%fp) + jsr ui_from + addq.l #8,%sp + tst.l %d0 + jne .L268 + clr.l -(%sp) + pea 3.w + clr.l -(%sp) + pea 5(%a2) + move.l 8(%fp),-(%sp) + jsr (%a3) + lea (20,%sp),%sp +.L268: + move.l -92(%fp),%d1 + btst %d3,%d1 + jeq .L269 + pea 1.w + pea 13.w + clr.l -(%sp) + move.l %a2,-(%sp) + move.l 8(%fp),-(%sp) + jsr (%a3) + pea 1.w + pea 6.w + clr.l -(%sp) + move.l %a2,-(%sp) + move.l 8(%fp),-(%sp) + jsr (%a4) + lea (40,%sp),%sp + pea 1.w + pea 6.w + clr.l -(%sp) + pea 12(%a2) + move.l 8(%fp),-(%sp) + jsr (%a4) + lea (20,%sp),%sp +.L269: + addq.l #1,%d3 + lea (14,%a2),%a2 + moveq #8,%d5 + cmp.l %d3,%d5 + jne .L270 + move.l %d2,%d6 + addq.l #1,%d6 + lea (-66,%fp),%a4 +.L288: + mvz.w defined,%d0 + moveq #1,%d1 + move.l %d6,-(%sp) + move.l %a4,-(%sp) + lsr.l %d2,%d0 + move.l %d3,%a5 + move.l %d3,%d7 + subq.l #1,%a5 + addq.l #1,%d7 + and.l %d0,%d1 + lea ui_text,%a2 + move.l %d1,-76(%fp) + jsr ui_two + addq.l #8,%sp + cmp.l -84(%fp),%d6 + jne .L271 + pea 7.w + pea 11.w + move.l %d3,-(%sp) + pea 3.w + move.l 8(%fp),-(%sp) + jsr ui_plate + clr.l -(%sp) + pea UI_K5 + move.l %d7,-(%sp) + pea 4.w + move.l %a4,-(%sp) + move.l 8(%fp),-(%sp) + jsr (%a2) + lea (44,%sp),%sp +.L272: + cmp.l -104(%fp),%d6 + jne .L273 + pea 9.w + pea 13.w + move.l %a5,-(%sp) + pea 2.w + move.l 8(%fp),-(%sp) + jsr ui_rect +.L352: + lea (20,%sp),%sp +.L274: + cmp.l -100(%fp),%d6 + jne .L275 + pea 1.w + move.l %d7,-(%sp) + clr.l -(%sp) + pea 8.w + move.l 8(%fp),-(%sp) + jsr ui_mark + lea (20,%sp),%sp +.L275: + move.w #18,%a2 + move.l %d3,%d5 + addq.l #3,%d5 + clr.l %d4 + move.l %d5,-72(%fp) +.L287: + mvz.w %d4,%d1 + lea (-2,%a2),%a0 + move.l %a0,-92(%fp) + lea rows,%a0 + lsl.l #2,%d1 + move.l (%a0,%d2.l*4),%d0 + lsr.l %d1,%d0 + moveq #15,%d1 + and.l %d0,%d1 + move.l %d1,-(%sp) + move.l %d4,-(%sp) + move.l %d1,-88(%fp) + jsr slot_state + addq.l #8,%sp + move.l %d0,%a3 + tst.l -76(%fp) + jeq .L306 + move.l -104(%fp),%d5 + move.l -100(%fp),%a0 + move.l %d4,-(%sp) + move.l %d5,-12(%fp) + pea -32(%fp) + move.l %a0,-8(%fp) + jsr ui_from + addq.l #8,%sp + cmp.l %d0,%d6 + seq %d5 + mvs.b %d5,%d5 + neg.l %d5 +.L276: + move.l -104(%fp),%a1 + move.l -100(%fp),%d1 + move.l %d4,-(%sp) + pea -24(%fp) + move.l %a1,-12(%fp) + move.l %d1,-8(%fp) + jsr ui_from + addq.l #8,%sp + cmp.l %d0,%d6 + jne .L277 + move.l %d4,-(%sp) + pea -40(%fp) + jsr ui_moving + addq.l #8,%sp + tst.l %d5 + jeq .L278 +.L290: + tst.l -80(%fp) + jeq .L279 + tst.l %d0 + jne .L280 + pea 7.w + pea 11.w + move.l %d3,-(%sp) + pea -1(%a2) + move.l 8(%fp),-(%sp) + jsr ui_plate + lea (20,%sp),%sp + moveq #1,%d0 +.L281: + tst.l -76(%fp) + jne .L282 + pea 1.w + pea 3.w + move.l -72(%fp),-(%sp) + pea 3(%a2) + move.l 8(%fp),-(%sp) + jsr ui_hline +.L354: + lea (20,%sp),%sp + jra .L283 +.L248: + btst %d0,%d7 + jeq .L249 + lsl.l #2,%d0 + moveq #15,%d4 + moveq #65,%d1 + lsr.l %d0,%d3 + move.b %d1,-48(%fp) + and.l %d4,%d3 + move.l %d3,%a0 + pea 1(%a0) + pea -47(%fp) + jra .L351 +.L245: + cmp.l -104(%fp),%d6 + jeq .L250 + mvz.w defined,%d0 + move.l -96(%fp),%d1 + btst %d1,%d0 + jeq .L291 + cmp.l -100(%fp),%d6 + jne .L292 + lea .LC2,%a2 + jra .L247 +.L291: + lea .LC0,%a2 + jra .L247 +.L292: + sub.l %a2,%a2 + jra .L247 +.L253: + move.b %d1,-48(%fp,%d0.l) + addq.l #1,%d0 +.L251: + move.b (%a2,%d0.l),%d1 + jne .L253 + jra .L249 +.L293: + clr.l %d0 + jra .L251 +.L294: + sub.l %a0,%a0 + jra .L254 +.L295: + moveq #5,%d0 + jra .L255 +.L296: + moveq #7,%d0 + jra .L255 +.L297: + move.l %fp,%d1 + add.l #-60,%d1 + jra .L256 +.L299: + move.l -104(%fp),%d6 + jra .L261 +.L301: + move.l -100(%fp),%d6 + jra .L261 +.L303: + move.l -84(%fp),%d6 + jra .L261 +.L298: + move.l -104(%fp),%d6 +.L305: + moveq #10,%d0 + jra .L260 +.L300: + move.l -100(%fp),%d6 + jra .L305 +.L302: + move.l -84(%fp),%d6 + jra .L305 +.L264: + pea 1.w + pea UI_K5 + pea 1.w + pea 6.w + pea .LC3 + move.l 8(%fp),-(%sp) + jsr (%a2) + lea (24,%sp),%sp + jra .L265 +.L267: + pea 6.w + pea 11.w + clr.l -(%sp) + move.l %d0,-(%sp) + move.l 8(%fp),-(%sp) + jsr ui_dotted + lea (20,%sp),%sp +.L266: + pea 1.w + pea UI_K5 + pea 1.w + move.l %d5,-(%sp) + move.l %d4,-(%sp) + move.l 8(%fp),-(%sp) + jsr (%a5) + lea (24,%sp),%sp + jra .L268 +.L271: + pea 1.w + pea UI_K5 + move.l %d7,-(%sp) + pea 4.w + move.l %a4,-(%sp) + move.l 8(%fp),-(%sp) + jsr (%a2) + lea (24,%sp),%sp + jra .L272 +.L273: + cmp.l -96(%fp),%d2 + jne .L274 + pea 9.w + pea 13.w + move.l %a5,-(%sp) + pea 2.w + move.l 8(%fp),-(%sp) + jsr ui_corners + jra .L352 +.L306: + clr.l %d5 + jra .L276 +.L282: + moveq #1,%d5 + eor.l %d0,%d5 + moveq #1,%d0 + cmp.l %a3,%d0 + jne .L284 + move.l -88(%fp),%a0 + pea 1(%a0) + move.l %a4,-(%sp) + jsr ui_two + move.l %d5,-(%sp) + pea UI_K5 + move.l %d7,-(%sp) + move.l %a2,-(%sp) + move.l %a4,-(%sp) + move.l 8(%fp),-(%sp) + jsr ui_text + lea (32,%sp),%sp +.L283: + cmp.l -96(%fp),%d2 + jne .L285 + cmp.l track.l,%d4 + jne .L285 + clr.l -(%sp) + pea 9.w + move.l %d3,%a3 + subq.l #2,%a3 + move.l %a3,-(%sp) + move.l %a2,-(%sp) + lea ui_hline,%a0 + move.l 8(%fp),-(%sp) + move.l %a0,-108(%fp) + jsr (%a0) + move.l %a2,%d5 + subq.l #3,%d5 + lea (20,%sp),%sp + move.l -108(%fp),%a0 + moveq #46,%d0 + cmp.l %a3,%d0 + jeq .L286 + clr.l -(%sp) + pea 9.w + move.l %d3,%a1 + pea 8(%a1) + move.l %a2,-(%sp) + move.l 8(%fp),-(%sp) + jsr (%a0) + lea (20,%sp),%sp +.L286: + clr.l -(%sp) + pea 5.w + move.l %d7,-(%sp) + move.l %d5,-(%sp) + lea ui_vline,%a3 + move.l %a2,%d5 + add.l #10,%d5 + move.l 8(%fp),-(%sp) + jsr (%a3) + clr.l -(%sp) + pea 5.w + move.l %d7,-(%sp) + pea 11(%a2) + move.l 8(%fp),-(%sp) + jsr (%a3) + lea (40,%sp),%sp + pea 1.w + pea 1.w + move.l %a5,-(%sp) + move.l -92(%fp),-(%sp) + lea (ui_corner.constprop.0),%a3 + move.l 8(%fp),-(%sp) + jsr (%a3) + pea 1.w + pea -1.w + move.l %a5,-(%sp) + move.l %d5,-(%sp) + move.l 8(%fp),-(%sp) + jsr (%a3) + lea (40,%sp),%sp + pea -1.w + pea 1.w + move.l %d3,%d0 + addq.l #7,%d0 + move.l %d0,-(%sp) + move.l -92(%fp),-(%sp) + move.l 8(%fp),-(%sp) + move.l %d0,-108(%fp) + jsr (%a3) + pea -1.w + pea -1.w + move.l -108(%fp),%d0 + move.l %d0,-(%sp) + move.l %d5,-(%sp) + move.l 8(%fp),-(%sp) + jsr (%a3) + lea (40,%sp),%sp +.L285: + addq.l #1,%d4 + lea (14,%a2),%a2 + moveq #8,%d0 + cmp.l %d4,%d0 + jne .L287 + addq.l #1,%d2 + addq.l #1,%d6 + add.l #10,%d3 + moveq #58,%d1 + cmp.l %d3,%d1 + jne .L288 + movem.l -148(%fp),#15612 + unlk %fp + rts +.L284: + move.l %d5,-(%sp) + move.l -72(%fp),-(%sp) + pea 4(%a2) + move.l %a3,-(%sp) + move.l 8(%fp),-(%sp) + jsr ui_slot_mark + jra .L354 +.L278: + tst.l %d0 + jeq .L281 +.L280: + pea 9.w + pea 13.w + move.l %a5,-(%sp) + move.l -92(%fp),-(%sp) + move.l 8(%fp),-(%sp) + jsr ui_rect + lea (20,%sp),%sp +.L353: + clr.l %d0 + jra .L281 +.L279: + tst.l %d0 + jne .L280 + pea 7.w + pea 11.w + move.l %d3,-(%sp) + pea -1(%a2) + move.l 8(%fp),-(%sp) + move.l %d0,-108(%fp) + jsr ui_dotted + lea (20,%sp),%sp + move.l -108(%fp),%d0 + jra .L281 +.L277: + tst.l %d5 + jeq .L353 + clr.l %d0 + jra .L290 + .size panorama_draw, .-panorama_draw + .align 2 + .globl clyps_bank_load + .type clyps_bank_load, @function +clyps_bank_load: + move.l %d2,-(%sp) + moveq #1,%d0 + and.l 8(%sp),%d0 + tst.l %d0 + jeq .L355 +#APP +| 103 "live_module.c" 1 + move.w %sr,%d2 + move.w #0x2700,%sr +| 0 "" 2 +#NO_APP + moveq #1,%d0 + move.l %d0,bank_read_active + jsr suspend_bank +#APP +| 109 "live_module.c" 1 + move.w %d2,%sr +| 0 "" 2 +#NO_APP +.L355: + move.l (%sp)+,%d2 + rts + .size clyps_bank_load, .-clyps_bank_load + .align 2 + .globl clyps_bank_loaded + .type clyps_bank_loaded, @function +clyps_bank_loaded: + clr.l %d0 + clr.l bank_read_active + rts + .size clyps_bank_loaded, .-clyps_bank_loaded + .align 2 + .globl clyps_project_init + .type clyps_project_init, @function +clyps_project_init: + move.l %d2,-(%sp) +#APP +| 103 "live_module.c" 1 + move.w %sr,%d2 + move.w #0x2700,%sr +| 0 "" 2 +#NO_APP + tst.w defined.l + jne .L362 + tst.l playing + jne .L362 + tst.l requested + jne .L362 + tst.l pending_row + jne .L362 + tst.l bank_read_active + jeq .L363 +.L362: + jsr suspend_bank +.L363: + moveq #2,%d0 + move.l %d0,last_view + moveq #8,%d0 + move.l %d0,seen_stock + clr.w %d0 + clr.l org_req+4 + clr.l org_req + clr.l org_play+4 + clr.l org_play + clr.l requested + clr.l playing + clr.l view + clr.l was_window + clr.l lock_note + clr.l operation + clr.l mode + clr.l occ + clr.l occ+4 + clr.l occ+8 + clr.l occ+12 + clr.l occ_known + clr.l occ_next + clr.l src_cursor + clr.l slot + clr.l track + clr.l refused + clr.l row_view + clr.l armed + clr.l locked + clr.l visible + clr.l missing + clr.l draft + clr.l first_row + clr.l pending_row + move.w %d0,usable + clr.l last_row +#APP +| 109 "live_module.c" 1 + move.w %d2,%sr +| 0 "" 2 +#NO_APP + move.l (%sp)+,%d2 + rts + .size clyps_project_init, .-clyps_project_init + .align 2 + .globl clyps_wrap + .type clyps_wrap, @function +clyps_wrap: + move.l %d2,-(%sp) + move.l requested,%d2 + tst.l bank_read_active + jne .L367 + tst.l %d2 + jne .L369 + tst.l playing + jne .L369 + tst.l pending_row + jeq .L367 +.L369: + move.l %d2,-(%sp) + jsr valid + addq.l #4,%sp + tst.l %d0 + jeq .L370 + tst.l -2147457608 + jeq .L370 + tst.l 1175263030 + jne .L370 + tst.l 1175263018 + jne .L370 + tst.l 1175263014 + jne .L370 + move.l %d2,playing + lea org_req,%a0 + move.l (%a0),org_play + lea org_req+4,%a0 + move.l (%a0),org_play+4 + tst.l pending_row + jeq .L371 + lea pending_row,%a0 + move.l (%a0),last_row +.L371: + clr.l pending_row +.L367: + move.l (%sp)+,%d2 + rts +.L370: + clr.l last_row + clr.l requested + clr.l playing + clr.l org_req+4 + clr.l org_req + clr.l org_play+4 + clr.l org_play + jra .L371 + .size clyps_wrap, .-clyps_wrap + .align 2 + .globl clyps_audio_source + .type clyps_audio_source, @function +clyps_audio_source: + move.l %d2,-(%sp) + move.l playing,%d2 + tst.l %d2 + jeq .L384 + moveq #7,%d0 + cmp.l 12(%sp),%d0 + jcs .L384 + move.l 16(%sp),%d0 + move.l 8(%sp),%a0 + mvz.b %d0,%d0 + or.l (%a0),%d0 + jne .L384 + jsr supported + tst.l %d0 + jeq .L384 + move.l 12(%sp),%d0 + lsl.l #2,%d0 + lsr.l %d0,%d2 + moveq #15,%d0 + and.l %d0,%d2 + move.l %d2,-(%sp) + jsr grid + addq.l #4,%sp + tst.l %d0 + jeq .L384 + move.l 8(%sp),%a0 + move.l %d2,(%a0) +.L384: + move.l (%sp)+,%d2 + rts + .size clyps_audio_source, .-clyps_audio_source + .align 2 + .globl module_key + .type module_key, @function +module_key: + lea (-36,%sp),%sp + movem.l #7420,(%sp) + move.l 40(%sp),%d6 + move.l %d6,%d2 + bclr #8,%d2 + jsr performance_context + moveq #63,%d0 + cmp.l %d2,%d0 + jcs .L396 + moveq #31,%d0 + moveq #1,%d4 + and.l %d6,%d0 + move.l %d2,%d5 + lsr.l #5,%d5 + lea consumed,%a2 + lsl.l %d0,%d4 + move.l (%a2,%d5.l*4),%d0 + move.l %d4,%d3 + and.l %d0,%d3 + tst.l 44(%sp) + jne .L397 + tst.l %d3 + sne %d3 + not.l %d4 + and.l %d4,%d0 + lea stock_edges,%a0 + and.l %d4,(%a0,%d5.l*4) + mvs.b %d3,%d3 + move.l %d0,(%a2,%d5.l*4) + neg.l %d3 +.L395: + move.l %d3,%d0 + movem.l (%sp),#7420 + lea (36,%sp),%sp + rts +.L397: + tst.l %d3 + jne .L399 + jsr stock_window + lea stock_edges,%a0 + tst.l %d0 + jeq .L400 + or.l %d4,(%a0,%d5.l*4) +.L400: + move.l %d4,%d0 + and.l (%a0,%d5.l*4),%d0 + tst.l %d0 + jne .L396 + moveq #39,%d1 + cmp.l %d2,%d1 + jne .L401 +#APP +| 103 "live_module.c" 1 + move.w %sr,%d0 + move.w #0x2700,%sr +| 0 "" 2 +#NO_APP + lea playing,%a0 + move.l (%a0),requested + lea org_play,%a0 + move.l (%a0),org_req + lea org_play+4,%a0 + move.l (%a0),org_req+4 + clr.l pending_row +#APP +| 109 "live_module.c" 1 + move.w %d0,%sr +| 0 "" 2 +#NO_APP +.L396: + clr.l %d3 + jra .L395 +.L401: + moveq #40,%d0 + cmp.l %d2,%d0 + jeq .L396 + moveq #45,%d1 + cmp.l %d2,%d1 + jeq .L402 + move.l %d2,%a3 + moveq #7,%d3 + lea (-16,%a3),%a3 + cmp.l %a3,%d3 + jcs .L403 + move.b 1175456541,%d0 + btst #5,%d0 + jeq .L404 + pea 45.w + move.l %d2,-(%sp) + jsr pair + addq.l #8,%sp +.L542: + tst.l %d0 + jeq .L404 +.L402: + tst.l locked + jeq .L396 +.L544: + tst.l lock_note + jeq .L396 + clr.l lock_note + jsr redraw + jra .L396 +.L403: + moveq #24,%d0 + cmp.l %d2,%d0 + jne .L404 + pea 24.w + jsr alone + addq.l #4,%sp + jra .L542 +.L404: + move.l locked,%d7 + tst.l %d7 + jeq .L405 + move.l %d2,-(%sp) + lea alone,%a4 + jsr (%a4) + addq.l #4,%sp + tst.l %d0 + jeq .L406 + moveq #31,%d1 + cmp.l %d2,%d1 + jne .L406 + jsr supported + tst.l %d0 + jeq .L406 +.L413: + moveq #1,%d3 + move.l %d3,mode + jsr resume_view +.L407: + or.l %d4,(%a2,%d5.l*4) + jsr redraw +.L399: + moveq #1,%d3 + jra .L395 +.L406: + move.l %d2,-(%sp) + jsr (%a4) + addq.l #4,%sp + tst.l %d0 + jeq .L408 + moveq #49,%d0 + cmp.l %d2,%d0 + jne .L408 + tst.l -2147457608 + jne .L408 + jsr supported + tst.l %d0 + jeq .L408 + jsr go_home +.L551: + clr.l mode + jra .L427 +.L408: + move.l %d2,-(%sp) + jsr scene_gesture + addq.l #4,%sp + tst.l %d0 + jne .L544 + move.l %d2,-(%sp) + jsr (%a4) + addq.l #4,%sp + tst.l %d0 + jeq .L410 + add.l #-34,%d2 + moveq #4,%d1 + cmp.l %d2,%d1 + jcc .L544 + moveq #7,%d3 + cmp.l %a3,%d3 + jcc .L544 +.L410: + moveq #1,%d0 + move.l %d0,lock_note + jra .L407 +.L405: + tst.l mode + jne .L412 + moveq #31,%d1 + cmp.l %d6,%d1 + jne .L396 + pea 31.w + jsr alone + addq.l #4,%sp + move.l %d0,%d3 + tst.l %d0 + jeq .L395 + jsr supported + move.l %d0,%d3 + tst.l %d0 + jeq .L395 + tst.l 1175263030 + jne .L396 + tst.l 1175263018 + jne .L396 + tst.l 1175263014 + jne .L396 + tst.b -2147483627.l + jne .L396 + jra .L413 +.L412: + move.l %d2,%d0 + moveq #12,%d3 + add.l #-41,%d0 + cmp.l %d0,%d3 + jcs .L414 + move.l #4193,%d1 + btst %d0,%d1 + jeq .L414 + clr.l -(%sp) + clr.l mode + jsr open_view + move.l locked,%d3 + addq.l #4,%sp +.L415: + tst.l %d3 + jne .L407 + jra .L395 +.L414: + move.l view,%d6 + moveq #3,%d0 + cmp.l %d6,%d0 + jeq .L416 + move.l %d2,-(%sp) + jsr scene_gesture + addq.l #4,%sp + move.l %d0,%d3 + tst.l %d0 + jne .L396 + moveq #15,%d0 + cmp.l %d2,%d0 + jcs .L416 + lea pair,%a4 +.L420: + mvz.b 1175456538,%d0 + btst %d7,%d0 + jeq .L418 + move.l %d7,%a0 + pea 16(%a0) + move.l %d2,-(%sp) + jsr (%a4) + addq.l #8,%sp + tst.l %d0 + jne .L419 +.L418: + addq.l #1,%d7 + moveq #8,%d0 + cmp.l %d7,%d0 + jne .L420 +.L416: + move.l %d2,-(%sp) + jsr alone + addq.l #4,%sp + tst.l %d0 + jne .L422 + move.l visible,%d3 + jra .L415 +.L541: + moveq #2,%d0 + cmp.l %d6,%d0 + jne .L421 + move.l %d2,-(%sp) + move.l %d7,-(%sp) + jsr submit_lane + addq.l #8,%sp + cmp.l track.l,%d7 + jne .L407 +.L550: + tst.l refused + jne .L407 + move.l %d2,src_cursor + jra .L407 +.L421: + tst.l %d6 + jne .L407 + jra .L395 +.L422: + moveq #31,%d1 + cmp.l %d2,%d1 + jne .L423 + subq.l #1,%d6 + tst.l %d6 + jne .L464 + moveq #2,%d0 +.L424: + move.l %d0,-(%sp) +.L552: + jsr open_view +.L545: + addq.l #4,%sp + jra .L407 +.L464: + moveq #1,%d0 + jra .L424 +.L423: + moveq #50,%d1 + cmp.l %d2,%d1 + jne .L425 + moveq #3,%d3 + cmp.l %d6,%d3 + jne .L426 +.L433: + pea 1.w + jra .L552 +.L426: + tst.l %d6 + jeq .L551 +.L427: + clr.l -(%sp) + jra .L552 +.L425: + move.l %d2,%d1 + moveq #4,%d3 + add.l #-34,%d1 + cmp.l %d1,%d3 + jcs .L428 + subq.l #3,%d6 + tst.l %d6 + jeq .L407 + clr.l -(%sp) + jsr open_view + addq.l #4,%sp + jra .L396 +.L428: + moveq #3,%d1 + cmp.l %d6,%d1 + jne .L429 + moveq #49,%d3 + cmp.l %d2,%d3 + jne .L430 + move.l operation,%d0 + moveq #2,%d1 + cmp.l %d0,%d1 + jne .L431 + tst.l -2147457608 + jeq .L432 +.L436: + moveq #1,%d3 + move.l %d3,refused + jra .L407 +.L432: + jsr go_home + jra .L433 +.L431: + move.l playing,%d2 + subq.l #1,%d0 + tst.l %d0 + jne .L434 + mvz.w defined,%d0 + move.l slot,%d1 + btst %d1,%d0 + jne .L435 + moveq #1,%d3 + move.l %d3,missing + jra .L407 +.L435: + move.l track,%d0 + moveq #15,%d2 + lea rows,%a0 + lsl.l #2,%d0 + lsl.l %d0,%d2 + not.l %d2 + and.l (%a0,%d1.l*4),%d2 + move.l draft,%d1 + lsl.l %d0,%d1 + or.l %d1,%d2 +.L434: + move.l %d2,-(%sp) + jsr valid + addq.l #4,%sp + tst.l %d0 + jeq .L436 +#APP +| 103 "live_module.c" 1 + move.w %sr,%d3 + move.w #0x2700,%sr +| 0 "" 2 +#NO_APP + tst.l bank_uncertain + jeq .L437 +#APP +| 109 "live_module.c" 1 + move.w %d3,%sr +| 0 "" 2 +#NO_APP + moveq #1,%d0 + move.l %d0,refused + jra .L407 +.L437: + move.l slot,%d0 + moveq #1,%d1 + lea rows,%a0 + move.l %d2,(%a0,%d0.l*4) + lsl.l %d0,%d1 + move.w defined,%d2 + or.l %d2,%d1 + move.w %d1,defined + moveq #1,%d1 + cmp.l operation.l,%d1 + jne .L438 + move.l track,%d6 + moveq #3,%d7 + moveq #-4,%d1 + move.l %d0,%d2 + addq.l #1,%d2 + and.l %d6,%d7 + and.l %d6,%d1 + lsl.l #3,%d7 + move.l %d1,%a0 + move.l %d1,%a3 + add.l #org_play,%a0 + move.l (%a0),%d1 + move.l %d1,%d0 + lsr.l %d7,%d0 + mvz.b %d0,%d0 + cmp.l %d2,%d0 + jne .L439 + clr.l -(%sp) + move.l %d6,-(%sp) + pea org_play + jsr set_origin + lea (12,%sp),%sp +.L439: + add.l #org_req,%a3 + move.l (%a3),%d0 + lsr.l %d7,%d0 + mvz.b %d0,%d0 + cmp.l %d2,%d0 + jne .L438 + clr.l -(%sp) + move.l %d6,-(%sp) + pea org_req + jsr set_origin + lea (12,%sp),%sp +.L438: +#APP +| 109 "live_module.c" 1 + move.w %d3,%sr +| 0 "" 2 +#NO_APP + jra .L433 +.L430: + moveq #51,%d3 + cmp.l %d2,%d3 + jeq .L465 + moveq #32,%d1 + cmp.l %d2,%d1 + jeq .L440 + moveq #15,%d3 + cmp.l %d2,%d3 + jcs .L407 + moveq #1,%d0 + cmp.l operation.l,%d0 + jne .L407 + move.l %d2,draft + jra .L407 +.L465: + moveq #-1,%d0 +.L440: + pea 2.w + move.l %d0,-(%sp) + move.l operation,-(%sp) + jsr clyps_focus_step + addq.l #8,%sp + move.l %d0,(%sp) + jsr set_operation + jra .L545 +.L429: + moveq #7,%d1 + cmp.l %a3,%d1 + jcs .L442 + move.l %a3,track + jra .L396 +.L442: + moveq #1,%d3 + cmp.l %d6,%d3 + jne .L443 + moveq #27,%d1 + cmp.l %d2,%d1 + jne .L444 + pea 3.w + jsr open_view + clr.l -(%sp) + jsr set_operation +.L547: + addq.l #8,%sp + jra .L407 +.L453: + mvz.w defined,%d0 + moveq #1,%d3 + lsr.l %d2,%d0 + not.l %d0 + and.l %d3,%d0 + move.l %d0,missing + tst.l %d0 + jne .L407 + move.l %d2,%d0 + addq.l #1,%d0 + move.l %d0,-(%sp) + pea 8.w + move.l %d0,-(%sp) + lea rows,%a0 + move.l (%a0,%d2.l*4),-(%sp) + jra .L546 +.L466: + move.l %d1,%d0 + jra .L446 +.L540: + moveq #2,%d1 + cmp.l %d6,%d1 + jne .L396 +.L461: + move.l %d2,%d1 + add.l #-51,%d1 + lsr.l #1,%d1 + jne .L448 + subq.l #2,%d6 + tst.l %d6 + jne .L536 + moveq #-1,%d0 + jra .L449 +.L448: + subq.l #2,%d6 + tst.l %d6 + jne .L537 + add.l #-32,%d2 + lsr.l #1,%d2 + jne .L407 +.L449: + pea 15.w + move.l %d0,-(%sp) + move.l src_cursor,-(%sp) + jsr clyps_focus_step + lea (12,%sp),%sp + move.l %d0,src_cursor + jra .L407 +.L444: + moveq #15,%d1 + cmp.l %d2,%d1 + jcc .L453 + moveq #49,%d3 + cmp.l %d2,%d3 + jne .L461 + tst.l pending_row + jne .L407 + mvz.w defined,%d2 + move.l last_row,%d0 +.L446: + moveq #15,%d1 + cmp.l %d0,%d1 + jcs .L407 + move.l %d0,%d1 + addq.l #1,%d1 + btst %d0,%d2 + jeq .L466 + move.l %d1,-(%sp) + pea 8.w + move.l %d1,-(%sp) + lea rows,%a0 + move.l (%a0,%d0.l*4),-(%sp) + jra .L546 +.L443: + moveq #15,%d3 + cmp.l %d2,%d3 + jcs .L539 + move.l %d2,-(%sp) + move.l track,-(%sp) + jsr submit_lane + addq.l #8,%sp + moveq #2,%d0 + cmp.l %d6,%d0 + jeq .L550 + tst.l %d6 + jeq .L427 + jra .L407 +.L537: + moveq #32,%d1 + cmp.l %d2,%d1 + jne .L407 +.L457: + pea 15.w + move.l %d0,-(%sp) + move.l slot,-(%sp) + jsr clyps_focus_step + addq.l #8,%sp + move.l %d0,(%sp) + jsr focus_row + jra .L545 +.L536: + moveq #-1,%d0 + moveq #51,%d3 + cmp.l %d2,%d3 + jeq .L457 + jra .L407 +.L539: + moveq #49,%d1 + cmp.l %d2,%d1 + jne .L540 + subq.l #2,%d6 + tst.l %d6 + jne .L396 + move.l src_cursor,-(%sp) + move.l track,-(%sp) + jsr submit_lane + jra .L547 +.L419: + moveq #1,%d0 + cmp.l %d6,%d0 + jne .L541 + mvz.w defined,%d0 + moveq #1,%d1 + lsr.l %d2,%d0 + not.l %d0 + and.l %d1,%d0 + move.l %d0,missing + tst.l %d0 + jne .L407 + move.l %d2,%a0 + moveq #15,%d0 + pea 1(%a0) + move.l %d7,-(%sp) + mvz.w %d7,%d7 + lea rows,%a0 + clr.l -(%sp) + move.l (%a0,%d2.l*4),%d2 + lsl.l #2,%d7 + move.l requested,%d1 + eor.l %d1,%d2 + lsl.l %d7,%d0 + and.l %d2,%d0 + eor.l %d1,%d0 + move.l %d0,-(%sp) +.L546: + jsr submit_from + lea (16,%sp),%sp + jra .L407 + .size module_key, .-module_key + .align 2 + .globl module_enc + .type module_enc, @function +module_enc: + lea (-20,%sp),%sp + movem.l #1084,(%sp) + move.l 28(%sp),%d3 + jsr performance_context + jsr stock_window + move.l %d0,%d2 + tst.l %d0 + jne .L568 + tst.l visible + jne .L555 + tst.l locked + jeq .L553 + pea 64.w + lea alone,%a2 + jsr (%a2) + addq.l #4,%sp + tst.l %d0 + jeq .L557 +.L560: + tst.l 1175263030 + jeq .L558 +.L559: + moveq #1,%d0 + move.l %d0,lock_note + jsr redraw +.L561: + moveq #1,%d2 + jra .L553 +.L557: + pea 45.w + jsr (%a2) + addq.l #4,%sp + tst.l %d0 + jne .L560 + pea 25.w + jsr (%a2) + addq.l #4,%sp + tst.l %d0 + jne .L560 + pea 26.w + jsr (%a2) + addq.l #4,%sp + tst.l %d0 + jne .L560 + jra .L559 +.L558: + tst.l 1175263018 + jne .L559 + tst.l 1175263014 + jne .L559 + tst.l lock_note + jeq .L553 + clr.l lock_note +.L576: + jsr redraw +.L553: + move.l %d2,%d0 + movem.l (%sp),#1084 + lea (20,%sp),%sp + rts +.L555: + move.l 24(%sp),%d4 + moveq #1,%d0 + move.l view,%d5 + lea alone,%a2 + bclr #8,%d4 + cmp.l %d5,%d0 + jne .L562 + moveq #6,%d0 + cmp.l %d4,%d0 + jne .L562 + move.b 1175456541,%d0 + btst #5,%d0 + jeq .L562 + pea 45.w + jsr (%a2) + addq.l #4,%sp + move.l %d0,%d2 + tst.l %d0 + jeq .L562 + pea 7.w + move.l %d3,-(%sp) + move.l track,-(%sp) + jsr clyps_focus_step + lea (12,%sp),%sp + move.l %d0,track + jra .L576 +.L562: + pea 64.w + jsr (%a2) + addq.l #4,%sp + move.l %d0,%d2 + tst.l %d0 + jeq .L561 + moveq #1,%d0 + cmp.l %d5,%d0 + jne .L564 + subq.l #6,%d4 + tst.l %d4 + jne .L576 + pea 15.w + move.l %d3,-(%sp) + move.l slot,-(%sp) + jsr clyps_focus_step + addq.l #8,%sp + move.l %d0,(%sp) + jsr focus_row +.L575: + addq.l #4,%sp + jra .L576 +.L564: + moveq #2,%d0 + cmp.l %d5,%d0 + jne .L566 + subq.l #6,%d4 + tst.l %d4 + jne .L576 + pea 15.w + move.l %d3,-(%sp) + move.l src_cursor,-(%sp) + jsr clyps_focus_step + lea (12,%sp),%sp + move.l %d0,src_cursor + jra .L576 +.L566: + subq.l #3,%d5 + tst.l %d5 + jne .L576 + moveq #6,%d0 + cmp.l %d4,%d0 + jne .L567 + pea 2.w + move.l %d3,-(%sp) + move.l operation,-(%sp) + jsr clyps_focus_step + addq.l #8,%sp + move.l %d0,(%sp) + jsr set_operation + jra .L575 +.L567: + tst.l %d4 + jne .L576 + moveq #1,%d0 + cmp.l operation.l,%d0 + jne .L576 + pea 15.w + move.l %d3,-(%sp) + move.l draft,-(%sp) + jsr clyps_focus_step + lea (12,%sp),%sp + move.l %d0,draft + jra .L576 +.L568: + clr.l %d2 + jra .L553 + .size module_enc, .-module_enc + .align 2 + .globl module_tick + .type module_tick, @function +module_tick: + lea (-24,%sp),%sp + movem.l #1084,(%sp) + move.l track,%d5 + jsr performance_context + move.b -2147457611,%d2 + move.l -2147477476,%d0 + lea occupancy_sig,%a2 + moveq #3,%d1 + lsl.l #2,%d0 + lsr.l #2,%d2 + and.l %d1,%d2 + or.l %d0,%d2 + jsr stock_window + move.l %d0,%d3 + jsr (%a2) + move.l %d0,20(%sp) + tst.l mode + jeq .L578 + tst.l bank_read_active + jne .L578 + tst.b -2147483596.l + jne .L578 + move.l occ_next,%d4 + move.l %d4,-(%sp) + jsr occupancy_scan + addq.l #1,%d4 + addq.l #4,%sp + moveq #15,%d0 + and.l %d4,%d0 + move.l %d0,occ_next +.L578: + tst.l visible + jeq .L579 + cmp.l track.l,%d5 + jne .L580 + cmp.l last_live.l,%d2 + jne .L580 + cmp.l was_window.l,%d3 + jne .L580 + jsr (%a2) + cmp.l 20(%sp),%d0 + jeq .L579 +.L580: + jsr redraw +.L579: + move.l %d2,last_live + move.l %d3,was_window + tst.l bank_read_active + jne .L581 + tst.l playing + jne .L582 + tst.l requested + jne .L582 + tst.l pending_row + jne .L582 + tst.l last_row + jeq .L581 +.L582: + jsr supported + tst.l %d0 + jne .L581 + clr.l pending_row + moveq #1,%d1 + clr.l last_row + clr.l requested + clr.l playing + clr.l org_req+4 + clr.l org_req + clr.l org_play+4 + clr.l org_play + move.l %d1,refused +.L581: + tst.l visible + jeq .L583 + move.l last_seen_sources,%d2 + cmp.l playing.l,%d2 + jne .L584 + move.l last_seen_row,%d3 + cmp.l last_row.l,%d3 + jne .L584 + move.l last_seen_pending,%a0 + cmp.l pending_row.l,%a0 + jne .L584 + move.l last_run,%d0 + cmp.l -2147457608.l,%d0 + jeq .L583 +.L584: + lea playing,%a0 + move.l (%a0),last_seen_sources + lea last_row,%a0 + move.l (%a0),last_seen_row + lea pending_row,%a0 + move.l (%a0),last_seen_pending + move.l #-2147457608,%a0 + move.l (%a0),last_run + jsr redraw +.L583: + moveq #27,%d2 + moveq #26,%d3 + move.l visible,%d0 + move.l requested,%d1 + lsl.l %d2,%d0 + move.l row_view,%d2 + move.l 28(%sp),%a0 + lsl.l %d3,%d2 + moveq #25,%d3 + or.l %d2,%d0 + moveq #12,%d2 + lsl.l %d2,%d1 + moveq #24,%d2 + and.l #16773120,%d1 + or.l %d1,%d0 + move.l armed,%d1 + lsl.l %d3,%d1 + or.l %d1,%d0 + move.l refused,%d1 + lsl.l %d2,%d1 + movem.l (%sp),#1084 + or.l %d1,%d0 + move.l playing,%d1 + and.l #4095,%d1 + or.l %d1,%d0 + or.l #-1073741824,%d0 + move.l %d0,(%a0) + lea (24,%sp),%sp + rts + .size module_tick, .-module_tick + .section .rodata.str1.1 +.LC4: + .string "STOP FIRST" +.LC5: + .string "SOURCE NOT GRID" +.LC6: + .string "CAPTURE ROW FIRST" +.LC7: + .string "YES STORE PLAYING" +.LC8: + .string "EMPTY: TRIG OR A" +.LC9: + .string "TRIG OR A YES SET" +.LC10: + .string "YES ALL HOME PATH" +.LC11: + .string "LOCK: ARR>CLYPS" +.LC12: + .string "LOCK: YES>HOME" +.LC13: + .string "NOT GRID" +.LC14: + .string "NXT" +.LC15: + .string "HOM" +.LC16: + .string "SETUP" +.LC17: + .string "STOP" + .text + .align 2 + .globl module_draw + .type module_draw, @function +module_draw: + link.w %fp,#-136 + movem.l #15612,(%sp) + move.l 8(%fp),%d7 + jsr performance_context + tst.l %d7 + jeq .L588 + jsr stock_window + tst.l %d0 + jne .L588 + tst.l visible + jeq .L590 + move.l view,%d3 + moveq #1,%d0 + cmp.l %d3,%d0 + jne .L591 + move.l %d7,8(%fp) + movem.l -136(%fp),#15612 + unlk %fp + jra panorama_draw +.L591: + moveq #2,%d1 + cmp.l %d3,%d1 + jne .L592 + move.l %fp,%d4 + add.l #-40,%d4 + move.l %d4,%a0 + jsr ui_snapshot + clr.l -(%sp) + pea 56.w + pea 111.w + pea 1.w + pea 9.w + move.l %d7,-(%sp) + lea ui_fill,%a3 + jsr (%a3) + lea (24,%sp),%sp + move.l %d4,-(%sp) + move.l track,%d5 + move.l %d5,%d6 + lsl.l #2,%d6 + move.l -40(%fp),%d0 + moveq #15,%d1 + add.l #-16,%d4 + move.l src_cursor,%d2 + move.l %d4,-(%sp) + move.l %d5,-92(%fp) + move.l %d2,-96(%fp) + moveq #15,%d2 + lea ui_bar,%a2 + lsr.l %d6,%d0 + and.l %d0,%d1 + move.l -36(%fp),%d0 + lsr.l %d6,%d0 + and.l %d0,%d2 + cmp.l -96(%fp),%d1 + sne %d0 + move.l %d1,-88(%fp) + move.l %d2,-84(%fp) + cmp.l -96(%fp),%d2 + sne %d2 + neg.l %d0 + neg.l %d2 + and.l %d0,%d2 + jsr ui_path + addq.l #8,%sp + tst.b %d2 + jeq .L593 + move.l -96(%fp),-(%sp) + move.l %d5,-(%sp) + jsr slot_state + move.l %fp,%d2 + addq.l #8,%sp + add.l #-48,%d2 + move.l -96(%fp),%d1 + addq.l #1,%d1 + lea ui_two,%a0 + subq.l #2,%d0 + tst.l %d0 + jne .L594 + moveq #65,%d5 + move.l %d1,-(%sp) + pea -47(%fp) + move.b %d5,-48(%fp) + jsr (%a0) + clr.l -(%sp) + pea .LC13 +.L659: + pea -1.w + move.l %d2,-(%sp) + pea 63.w + pea 10.w + move.l %d7,-(%sp) + jsr (%a2) + lea (36,%sp),%sp +.L595: + pea 17.w + moveq #24,%d2 + pea 28.w + pea 3.w + pea 11.w + move.l %d7,-(%sp) + lea ui_plate,%a2 + jsr (%a2) + lea (20,%sp),%sp + move.l -2147477476,%d1 + move.l %d1,%d5 + remu.l %d2,%d0:%d5 + divu.l %d2,%d5 + mulu.w #10,%d0 + move.l %d5,%a0 + move.l %d0,%d2 + add.l #12,%d2 + cmp.l #239,%d2 + jhi .L634 + moveq #24,%d4 + divu.l %d4,%d2 +.L596: + move.l #2400,%d5 + move.l %d1,%d0 + divu.l %d5,%d0 + moveq #10,%d4 + add.l #48,%d0 + move.b %d0,-68(%fp) + move.l %a0,%d0 + remu.l %d4,%d5:%d0 + divu.l %d4,%d0 + move.l %d5,%a0 + remu.l %d4,%d5:%d0 + clr.b %d0 + move.l %a0,%d4 + add.l #48,%d4 + move.b %d4,-66(%fp) + add.l #48,%d5 + move.b %d5,-67(%fp) + move.b %d0,-65(%fp) + move.l %fp,%d0 + cmp.l #2399,%d1 + jhi .L635 + add.l #-67,%d0 +.L597: + clr.l -(%sp) + moveq #3,%d4 + pea UI_B8 + moveq #14,%d5 + pea 5.w + pea 30.w + move.l %d0,-(%sp) + move.l %d7,-(%sp) + lea ui_text_r,%a2 + add.l #48,%d2 + jsr (%a2) + lea ui_text,%a4 + lea ui_hline,%a5 + move.b %d2,-73(%fp) + move.l %d7,%a0 + moveq #-17,%d1 + move.b 262(%a0),%d0 + clr.b %d2 + and.l %d1,%d0 + move.b %d2,-72(%fp) + move.b %d0,262(%a0) + clr.l -(%sp) + pea UI_M3 + pea 8.w + pea 34.w + pea -73(%fp) + move.l %d7,-(%sp) + jsr (%a4) + lea (48,%sp),%sp + move.b -2147457612,%d2 + mvz.b -2147457611,%d0 + mvz.b %d2,%d2 + lsl.l #8,%d2 + or.l %d0,%d2 + lsr.l #2,%d2 + and.l %d2,%d4 + move.l %d4,-80(%fp) + clr.l %d4 +.L600: + tst.l -4(%fp) + jeq .L598 + cmp.l -80(%fp),%d4 + jne .L598 + clr.l -(%sp) + pea 3.w + pea 5.w + pea 15.w + move.l %d5,-(%sp) + move.l %d7,-(%sp) + jsr (%a3) + lea (24,%sp),%sp +.L599: + addq.l #1,%d4 + addq.l #6,%d5 + moveq #4,%d0 + cmp.l %d4,%d0 + jne .L600 + move.l -4(%fp),%d0 + moveq #1,%d1 + cmp.l %d0,%d1 + jeq .L636 + subq.l #2,%d0 + tst.l %d0 + jne .L601 + moveq #1,%d3 +.L601: + pea 1.w + pea 24.w + pea 14.w + move.l %d3,-(%sp) + move.l %d7,-(%sp) + lea ui_mark,%a3 + jsr (%a3) + lea (20,%sp),%sp + tst.l 1175263030 + jne .L638 + tst.l 1175263018 + jne .L638 + moveq #3,%d0 +.L602: + pea 1.w + move.l #1090519040,%d5 + pea 24.w + pea 30.w + move.l %d0,-(%sp) + move.l %d7,-(%sp) + jsr (%a3) + move.l %d5,-64(%fp) + lea ui_two,%a3 + move.l %fp,%d3 + add.l #-64,%d3 + move.l -88(%fp),%a0 + lea ui_text,%a5 + pea 1(%a0) + pea -63(%fp) + jsr (%a3) + lea (28,%sp),%sp + tst.l -4(%fp) + jeq .L603 + pea 11.w + pea 28.w + pea 35.w + pea 11.w + move.l %d7,-(%sp) + jsr ui_plate + clr.l -(%sp) +.L660: + pea UI_C7 + pea 37.w + pea 17.w + move.l %d3,-(%sp) + move.l %d7,-(%sp) + jsr (%a5) + lea (44,%sp),%sp + move.l %fp,%d3 + add.l #-60,%d3 + move.l -84(%fp),%d4 + move.l #1090519040,%d0 + move.l %fp,%d1 + add.l #-59,%d1 + move.l %d0,-60(%fp) + cmp.l -88(%fp),%d4 + jeq .L605 + moveq #1,%d5 + cmp.l -4(%fp),%d5 + seq %d0 + move.l %d4,%a0 + pea 1(%a0) + move.l %d1,-(%sp) + mvs.b %d0,%d0 + neg.l %d0 + and.l %d0,%d2 + jsr (%a3) + pea 7.w + pea 28.w + pea 49.w + pea 11.w + move.l %d7,-(%sp) + lea ui_contour,%a3 + jsr (%a3) + lea (28,%sp),%sp + tst.l %d2 + jeq .L606 + pea 9.w + pea 30.w + pea 48.w + pea 10.w + move.l %d7,-(%sp) + jsr (%a3) + lea (20,%sp),%sp +.L606: + pea 1.w + pea UI_M3 + pea 50.w + pea 13.w + pea .LC14 + move.l %d7,-(%sp) + jsr (%a4) + pea 1.w + pea UI_M3 + pea 50.w + pea 37.w + move.l %d3,-(%sp) + move.l %d7,-(%sp) + jsr (%a2) + lea (48,%sp),%sp +.L607: + pea 1.w + pea 56.w + pea 1.w + pea 42.w + move.l %d7,-(%sp) + jsr ui_vline + lea (20,%sp),%sp + move.l -16(%fp),%d2 + tst.l %d2 + jeq .L608 + move.l -92(%fp),-(%sp) + pea -32(%fp) + jsr ui_from + addq.l #8,%sp + cmp.l %d2,%d0 + jne .L609 +.L608: + moveq #16,%d3 +.L610: + clr.l %d2 + lea (-71,%fp),%a4 +.L619: + moveq #3,%d0 + and.l %d2,%d0 + move.l %d2,-(%sp) + move.l -92(%fp),-(%sp) + move.l %d2,%d5 + muls.w #18,%d0 + move.l %d0,%d4 + move.l %d0,%a3 + move.l %d2,%d0 + lsr.l #2,%d0 + addq.l #1,%d2 + add.l #47,%d4 + muls.w #11,%d0 + move.l %d0,%a2 + jsr slot_state + addq.l #8,%sp + move.l %d2,-(%sp) + move.l %a4,-(%sp) + lea (8,%a2),%a5 + move.l %d0,%d6 + jsr ui_two + addq.l #8,%sp + cmp.l -88(%fp),%d5 + jne .L611 + tst.l -4(%fp) + jeq .L612 + pea 9.w + pea 15.w + move.l %a5,-(%sp) + move.l %d4,-(%sp) + move.l %d7,-(%sp) + jsr ui_plate + lea (20,%sp),%sp + moveq #1,%d0 +.L613: + moveq #1,%d1 + eor.l %d1,%d0 + cmp.l %d6,%d1 + jne .L615 + move.l %d0,-(%sp) + pea UI_C7 + pea 9(%a2) + pea 49(%a3) + move.l %a4,-(%sp) + move.l %d7,-(%sp) + jsr ui_text + lea (24,%sp),%sp +.L616: + cmp.l -96(%fp),%d5 + jne .L617 + pea 11.w + pea 19.w + pea 7(%a2) + pea 45(%a3) + move.l %d7,-(%sp) + jsr ui_corners + lea (20,%sp),%sp +.L617: + cmp.l %d3,%d5 + jne .L618 + pea 1.w + pea 7.w + pea 9(%a2) + move.l %d4,-(%sp) + move.l %d7,-(%sp) + jsr ui_vline + lea (20,%sp),%sp +.L618: + moveq #16,%d4 + cmp.l %d2,%d4 + jne .L619 +.L588: + movem.l -136(%fp),#15612 + unlk %fp + rts +.L594: + moveq #65,%d4 + move.l %d1,-(%sp) + move.l #1497715518,%d0 + pea -43(%fp) + move.l %d0,-48(%fp) + move.b %d4,-44(%fp) + jsr (%a0) + clr.l -(%sp) + clr.l -(%sp) + jra .L659 +.L593: + clr.l -(%sp) + clr.l -(%sp) + pea -1.w + move.l %d4,-(%sp) + pea 63.w + pea 10.w + move.l %d7,-(%sp) + jsr (%a2) + lea (28,%sp),%sp + jra .L595 +.L634: + moveq #9,%d2 + jra .L596 +.L635: + add.l #-68,%d0 + jra .L597 +.L598: + clr.l -(%sp) + pea 5.w + pea 17.w + move.l %d5,-(%sp) + move.l %d7,-(%sp) + jsr (%a5) + lea (20,%sp),%sp + jra .L599 +.L636: + clr.l %d3 + jra .L601 +.L638: + moveq #4,%d0 + jra .L602 +.L603: + pea 11.w + pea 28.w + pea 35.w + pea 11.w + move.l %d7,-(%sp) + jsr ui_dotted + pea 1.w + jra .L660 +.L605: + move.b -2147457603,%d0 + moveq #15,%d2 + and.l %d2,%d0 + add.l #65,%d0 + move.b %d0,-60(%fp) + move.b -2147457602,%d0 + and.l %d2,%d0 + move.l %d0,%a0 + pea 1(%a0) + move.l %d1,-(%sp) + jsr (%a3) + pea 1.w + pea UI_M3 + pea 50.w + pea 13.w + pea .LC15 + move.l %d7,-(%sp) + jsr (%a4) + lea (32,%sp),%sp + pea 1.w + pea UI_M3 + pea 50.w + pea 37.w + move.l %d3,-(%sp) + move.l %d7,-(%sp) + jsr (%a2) + lea (24,%sp),%sp + jra .L607 +.L609: + lea rows,%a0 + moveq #15,%d0 + move.l -4(%a0,%d2.l*4),%d3 + lsr.l %d6,%d3 + and.l %d0,%d3 + jra .L610 +.L612: + pea 9.w + pea 15.w + move.l %a5,-(%sp) + move.l %d4,-(%sp) + move.l %d7,-(%sp) + jsr ui_dotted +.L661: + lea (20,%sp),%sp +.L614: + clr.l %d0 + jra .L613 +.L611: + cmp.l -84(%fp),%d5 + jne .L614 + pea 9.w + pea 15.w + move.l %a5,-(%sp) + move.l %d4,-(%sp) + move.l %d7,-(%sp) + jsr ui_contour + jra .L661 +.L615: + move.l %d0,-(%sp) + pea 12(%a2) + pea 54(%a3) + move.l %d6,-(%sp) + move.l %d7,-(%sp) + jsr ui_slot_mark + lea (20,%sp),%sp + jra .L616 +.L592: + subq.l #3,%d3 + tst.l %d3 + jne .L588 + move.l %d7,-(%sp) + moveq #21,%d3 + jsr panorama_draw + clr.l -(%sp) + pea 44.w + pea 100.w + pea 7.w + pea 14.w + move.l %d7,-(%sp) + jsr ui_fill + pea 44.w + pea 100.w + pea 7.w + pea 14.w + move.l %d7,-(%sp) + jsr ui_rect + lea (48,%sp),%sp + pea 8.w + pea 96.w + pea 9.w + pea 16.w + move.l %d7,-(%sp) + lea ui_plate,%a3 + jsr (%a3) + lea ui_text,%a5 + lea ui_text_r,%a2 + moveq #82,%d0 + clr.w %d1 + move.w #8276,%d4 + move.l slot,%d2 + addq.l #1,%d2 + move.l %d2,-(%sp) + move.l track,%d5 + clr.l %d2 + pea -39(%fp) + lea (item.1),%a4 + move.b %d0,-40(%fp) + move.l %d5,%d0 + add.l #49,%d0 + move.w %d1,-34(%fp) + move.b %d0,-35(%fp) + jsr ui_two + move.w %d4,-37(%fp) + clr.l -(%sp) + pea UI_K5 + pea 10.w + pea 18.w + pea .LC16 + move.l %d7,-(%sp) + jsr (%a5) + lea (48,%sp),%sp + clr.l (%sp) + pea UI_K5 + pea 10.w + pea 109.w + pea -40(%fp) + move.l %d7,-(%sp) + jsr (%a2) + lea (24,%sp),%sp + move.l -2147457608,%d6 +.L628: + move.l operation,%d4 + moveq #2,%d0 + cmp.l %d2,%d0 + jne .L620 + tst.l %d6 + sne %d0 + move.w #16688,%d1 + clr.l -48(%fp) + mvs.b %d0,%d0 + move.w %d1,-48(%fp) + neg.l %d0 + move.l %d0,-92(%fp) + moveq #49,%d0 + move.b %d0,-46(%fp) +.L621: + cmp.l %d2,%d4 + jne .L639 + move.l %d3,%d0 + subq.l #2,%d0 + tst.l -92(%fp) + jne .L624 + pea 9.w + pea 96.w + move.l %d0,-(%sp) + pea 16.w + move.l %d7,-(%sp) + jsr (%a3) +.L662: + lea (20,%sp),%sp + move.l -92(%fp),%d0 +.L623: + move.l %d0,-(%sp) + pea UI_K5 + move.l %d3,-(%sp) + pea 19.w + move.l (%a4)+,-(%sp) + move.l %d7,-(%sp) + jsr (%a5) + lea (24,%sp),%sp + tst.l -92(%fp) + jeq .L626 + pea 1.w + pea UI_K5 + move.l %d3,-(%sp) + pea 109.w + pea .LC17 +.L663: + move.l %d7,-(%sp) + jsr (%a2) + lea (24,%sp),%sp + addq.l #1,%d2 + add.l #10,%d3 + moveq #3,%d1 + cmp.l %d2,%d1 + jne .L628 + tst.l refused + jeq .L629 + subq.l #2,%d4 + tst.l %d4 + jeq .L645 +.L644: + move.l #.LC5,%d0 + jra .L630 +.L620: + clr.l -48(%fp) + tst.l %d2 + jne .L622 + move.w #21057,%d1 + moveq #77,%d0 + move.w %d1,-48(%fp) + move.b %d0,-46(%fp) +.L633: + clr.l -92(%fp) + jra .L621 +.L624: + pea 9.w + pea 96.w + move.l %d0,-(%sp) + pea 16.w + move.l %d7,-(%sp) + jsr ui_dotted + jra .L662 +.L639: + moveq #1,%d0 + jra .L623 +.L626: + cmp.l %d2,%d4 + sne %d0 + mvs.b %d0,%d0 + neg.l %d0 + move.l %d0,-(%sp) + pea UI_K5 + move.l %d3,-(%sp) + pea 109.w + pea -48(%fp) + jra .L663 +.L629: + tst.l missing + jne .L641 + tst.l %d4 + jeq .L642 + subq.l #1,%d4 + tst.l %d4 + jne .L631 + move.l draft,-(%sp) + move.l %d5,-(%sp) + jsr slot_state + addq.l #8,%sp + tst.l %d0 + jeq .L643 + subq.l #2,%d0 + tst.l %d0 + jeq .L644 + move.l #.LC9,%d0 +.L630: + clr.l -(%sp) + clr.l -(%sp) + pea -1.w + move.l %d0,-(%sp) + pea 74.w + clr.l -(%sp) +.L664: + move.l %d7,-(%sp) + jsr ui_bar + lea (28,%sp),%sp + jra .L588 +.L631: + tst.l %d6 + jne .L645 + move.l #.LC10,%d0 + jra .L630 +.L641: + move.l #.LC6,%d0 + jra .L630 +.L642: + move.l #.LC7,%d0 + jra .L630 +.L643: + move.l #.LC8,%d0 + jra .L630 +.L645: + move.l #.LC4,%d0 + jra .L630 +.L590: + tst.l locked + jeq .L588 + pea (label.0) + pea UI_M3 + jsr ui_width + addq.l #8,%sp + pea 7.w + move.l %d0,%a0 + pea 8(%a0) + pea 49.w + pea 10.w + move.l %d7,-(%sp) + jsr ui_plate + clr.l -(%sp) + pea UI_M3 + pea 50.w + pea 14.w + pea (label.0) + move.l %d7,-(%sp) + jsr ui_text + lea (44,%sp),%sp + tst.l lock_note + jeq .L588 + tst.l -2147457608 + jeq .L646 + move.l #.LC11,%d0 +.L632: + clr.l -(%sp) + clr.l -(%sp) + pea -1.w + move.l %d0,-(%sp) + pea 78.w + pea 10.w + jra .L664 +.L646: + move.l #.LC12,%d0 + jra .L632 +.L622: + moveq #65,%d0 + move.l draft,%d1 + addq.l #1,%d1 + move.l %d1,-(%sp) + pea -47(%fp) + move.b %d0,-48(%fp) + jsr ui_two + addq.l #8,%sp + jra .L633 + .size module_draw, .-module_draw + .section .rodata + .type label.0, @object + .size label.0, 9 +label.0: + .string "SEQ LOCK" + .section .rodata.str1.1 +.LC18: + .string "CAPTURE ROW" +.LC19: + .string "CELL SOURCE" +.LC20: + .string "RESTORE ALL" + .section .rodata + .align 2 + .type item.1, @object + .size item.1, 12 +item.1: + .long .LC18 + .long .LC19 + .long .LC20 + .type ui_mark_data, @object + .size ui_mark_data, 83 +ui_mark_data: + .base64 "BAcIDA4PDgwIBQcbGxsbGxsbBQcAHx8fHx8ABwccIkFBQSIcBwccPn9/fz4cAwUEBgcGBAMFBQUFBQUDBQAHBwcAAwUEBgcGBAUDHw4EBQMEDh8=" + .section .rodata.str1.1 +.LC21: + .string "0123456789" + .section .rodata + .align 2 + .type UI_B8, @object + .size UI_B8, 10 +UI_B8: + .byte 8 + .byte 1 + .long .LC21 + .long ui_b8_data + .type ui_b8_data, @object + .size ui_b8_data, 90 +ui_b8_data: + .base64 "BQ4bGxsbGxsOBQYOBgYGBgYPBQ4bAwYMGBgfBR4DAw4DAxsOBQMHCxsfAwMDBR8YGB4DAxsOBQ4YGB4bGxsOBR8DAwYGDAwMBQ4bGw4bGxsOBQ4bGxsPAwMO" + .section .rodata.str1.1 +.LC22: + .string "0123456789A" + .section .rodata + .align 2 + .type UI_C7, @object + .size UI_C7, 10 +UI_C7: + .byte 7 + .byte 1 + .long .LC22 + .long ui_c7_data + .type ui_c7_data, @object + .size ui_c7_data, 88 +ui_c7_data: + .base64 "BQ4RExUZEQ4FBAwUBAQEHwUOEQECBAgfBR8CBAIBEQ4FAgYKEh8CAgUfEB4BAREOBQYIEB4REQ4FHwECBAgICAUOEREOEREOBQ4REQ8BAgwFDhERHxEREQ==" + .section .rodata.str1.1 +.LC23: + .string "0123456789ABCDEFGHIKLMNOPQRSTUVWXYZ -.:>*+=!" + .section .rodata + .align 2 + .type UI_M3, @object + .size UI_M3, 10 +UI_M3: + .byte 5 + .byte 1 + .long .LC23 + .long ui_m3_data + .type ui_m3_data, @object + .size ui_m3_data, 264 +ui_m3_data: + .base64 "AwcFBQUHAwIGAgIHAwYBAgQHAwYBAgEGAwUFBwEBAwcEBgEGAwMEBwUHAwcBAgICAwcFBwUHAwcFBwEGAwIFBwUFAwYFBgUGAwMEBAQDAwYFBQUGAwcEBgQHAwcEBgQEAwMEBQUDAwUFBwUFAwcCAgIHAwUFBgUFAwQEBAQHAwUHBwUFAwYFBQUFAwIFBQUCAwYFBgQEAwIFBQYDAwYFBgUFAwMEAgEGAwcCAgICAwUFBQUHAwUFBQUCAwUFBwcFAwUFAgUFAwUFAgICAwcBAgQHAQAAAAAAAwAABwAAAQAAAAABAQABAAEAAwQCAQIEAwAFAgUAAwACBwIAAwAH" + .base64 "AAcAAQEBAQAB" + .section .rodata.str1.1 +.LC24: + .string "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ -.:>*+/" + .section .rodata + .align 2 + .type UI_K5, @object + .size UI_K5, 10 +UI_K5: + .byte 5 + .byte 1 + .long .LC24 + .long ui_k5_data + .type ui_k5_data, @object + .size ui_k5_data, 264 +ui_k5_data: + .base64 "BAYJCw0GBAQMBAQOBA4BBggPBA4BBgEOBAkJDwEBBA8IDgEOBAYIDgkGBA8BAgQEBAYJBgkGBAYJBwEGBAYJDwkJBA4JDgkOBAcICAgHBA4JCQkOBA8IDggPBA8IDggIBAcICwkHBAkJDwkJAwcCAgIHBAEBAQkGBAkKDAoJBAgICAgPBREbFRERBAkNCwkJBAYJCQkGBA4JDggIBAYJCQoFBA4JDgoJBAcIBgEOAwcCAgICBAkJCQkGBRERCgoEBRERFRsRBAkJBgkJBREKBAQEBA8BBggPAgAAAAAAAwAABwAAAQAAAAABAQABAAEAAwQCAQIEAwAFAgUAAwAC" + .base64 "BwIABAECBgQI" + .local stock_edges + .comm stock_edges,8,2 + .local occ_known + .comm occ_known,4,2 + .local occ_next + .comm occ_next,4,2 + .local usable + .comm usable,2,2 + .local occ + .comm occ,16,2 + .type occ_bytes, @object + .size occ_bytes, 12 +occ_bytes: + .base64 "BgcODyYnLi82Nz4/" + .local last_seen_sources + .comm last_seen_sources,4,2 + .local last_live + .comm last_live,4,2 + .local bank_uncertain + .comm bank_uncertain,4,2 + .local last_seen_pending + .comm last_seen_pending,4,2 + .local last_seen_row + .comm last_seen_row,4,2 + .local last_run + .comm last_run,4,2 + .local org_req + .comm org_req,8,2 + .local org_play + .comm org_play,8,2 + .local missing + .comm missing,4,2 + .local draft + .comm draft,4,2 + .local first_row + .comm first_row,4,2 + .local was_window + .comm was_window,4,2 + .data + .align 2 + .type seen_stock, @object + .size seen_stock, 4 +seen_stock: + .long 8 + .local mem_track + .comm mem_track,4,2 + .local lock_note + .comm lock_note,4,2 + .local operation + .comm operation,4,2 + .local mode + .comm mode,4,2 + .align 2 + .type last_view, @object + .size last_view, 4 +last_view: + .long 2 + .local view + .comm view,4,2 + .local pending_row + .comm pending_row,4,2 + .local last_row + .comm last_row,4,2 + .local src_cursor + .comm src_cursor,4,2 + .local locked + .comm locked,4,2 + .local consumed + .comm consumed,8,2 + .local slot + .comm slot,4,2 + .local refused + .comm refused,4,2 + .local visible + .comm visible,4,2 + .local armed + .comm armed,4,2 + .local row_view + .comm row_view,4,2 + .local track + .comm track,4,2 + .local bank_read_active + .comm bank_read_active,4,2 + .local defined + .comm defined,2,2 + .local rows + .comm rows,64,2 + .local requested + .comm requested,4,2 + .local playing + .comm playing,4,2 + .ident "GCC: (GNU) 16.2.0" +#NO_APP + .file "marker.c" + .text + .globl clyps_modal + .section .rodata + .align 2 + .type clyps_modal, @object + .size clyps_modal, 4 +clyps_modal: + .long 1 + .ident "GCC: (GNU) 16.2.0" diff --git a/sdk/octatrack/modules/clyps/performance_view.h b/sdk/octatrack/modules/clyps/performance_view.h new file mode 100644 index 0000000000..de97183b1c --- /dev/null +++ b/sdk/octatrack/modules/clyps/performance_view.h @@ -0,0 +1,56 @@ +/* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "native_view.h" + +/* SETUP (D33): a native popup over the Panorama, Design System v1 primitives only. + * Rows live in RAM: nothing here writes the card. */ +static void setup_draw(unsigned char *f) +{ + static const char *const item[3] = {"CAPTURE ROW", "CELL SOURCE", "RESTORE ALL"}; + panorama_draw(f); + ui_fill(f, 14, 7, 100, 44, 0); ui_rect(f, 14, 7, 100, 44); + ui_plate(f, 16, 9, 96, 8); + char where[8] = {'R', 0, 0, ' ', 'T', (char)('1' + track), 0, 0}; + ui_two(where + 1, slot + 1); where[3] = ' '; + ui_text(f, "SETUP", 18, 10, &UI_K5, 0); + ui_text_r(f, where, 109, 10, &UI_K5, 0); + unsigned run = RUNNING; + for (unsigned i = 0; i < 3; ++i) { + int y = 20 + 10 * (int)i, on = i == operation, off = i == RESTORE_HOME && run; + char val[4] = {0}; + if (i == CAPTURE) { val[0] = 'R'; val[1] = 'A'; val[2] = 'M'; } + if (i == CELL) { val[0] = 'A'; ui_two(val + 1, draft + 1); } + if (i == RESTORE_HOME) { val[0] = 'A'; val[1] = '0'; val[2] = '1'; } + if (on && !off) ui_plate(f, 16, y - 1, 96, 9); + else if (on) ui_dotted(f, 16, y - 1, 96, 9); + ui_text(f, item[i], 19, y + 1, &UI_K5, !(on && !off)); + if (off) ui_text_r(f, "STOP", 109, y + 1, &UI_K5, 1); + else ui_text_r(f, val, 109, y + 1, &UI_K5, !on); + } + const char *hint = refused ? (operation == RESTORE_HOME ? "STOP FIRST" : "SOURCE NOT GRID") : + missing ? "CAPTURE ROW FIRST" : + operation == CAPTURE ? "YES STORE PLAYING" : + operation == CELL ? (slot_state(track, draft) == SLOT_EMPTY ? "EMPTY: TRIG OR A" : + slot_state(track, draft) == SLOT_FOREIGN ? "SOURCE NOT GRID" : + "TRIG OR A YES SET") : + run ? "STOP FIRST" : "YES ALL HOME PATH"; + ui_bar(f, 0, 74, hint, -1, 0, 0); +} + +/* Selective Edit Lock (D33): the stock page stays live. The pattern line says why trig edits are + * held, and a refused gesture names the way out in the page bar until the next free control. */ +static void lock_draw(unsigned char *f) +{ + /* SEQ LOCK (D37.05, proposed for the artist): the sequences are held, the sound is free. */ + static const char label[] = "SEQ LOCK"; + ui_plate(f, 10, 49, ui_width(&UI_M3, label) + 8, 7); + ui_text(f, label, 14, 50, &UI_M3, 0); + if (lock_note) ui_bar(f, 10, 78, RUNNING ? "LOCK: ARR>CLYPS" : "LOCK: YES>HOME", -1, 0, 0); +} + +static void performance_draw(unsigned char *frame) +{ + /* Design System v1 (D31): Panorama Full Grid and Clip View Native Frame. */ + if (view == ROW) panorama_draw(frame); + else if (view == CLIP) clip_native_draw(frame); + else if (view == SETUP) setup_draw(frame); +} diff --git a/sdk/octatrack/modules/clyps/reference_clipboard.h b/sdk/octatrack/modules/clyps/reference_clipboard.h new file mode 100644 index 0000000000..9db114c7d3 --- /dev/null +++ b/sdk/octatrack/modules/clyps/reference_clipboard.h @@ -0,0 +1,68 @@ +/* SPDX-License-Identifier: GPL-3.0-or-later + * Internal stopped-editor primitive. Caller owns one project's session and + * supplies its committed bank. No input callbacks or native pattern access. + */ +#ifndef CLYPS_REFERENCE_CLIPBOARD_H +#define CLYPS_REFERENCE_CLIPBOARD_H +#include + +enum clyps_object { CLYPS_EMPTY, CLYPS_ROW, CLYPS_CELL }; +struct clyps_location { + enum clyps_object kind; + unsigned bank, row, track; /* zero-based; track is ignored for rows */ +}; +struct clyps_clipboard { + struct clyps_location source; + uint32_t value; +}; + +static inline void clyps_clip_clear(struct clyps_clipboard *clip) +{ + *clip = (struct clyps_clipboard){0}; +} + +static inline int clyps_location_valid(struct clyps_location where) +{ + return where.bank < 16 && where.row < 16 && + (where.kind == CLYPS_ROW || (where.kind == CLYPS_CELL && where.track < 8)); +} + +static inline int clyps_clip_copy(struct clyps_clipboard *clip, + const uint32_t rows[16], uint16_t defined, + struct clyps_location from) +{ + clyps_clip_clear(clip); + if (!clyps_location_valid(from) || !(defined & (1u << from.row))) + return 0; + clip->source = from; + clip->value = rows[from.row]; + if (from.kind == CLYPS_CELL) + clip->value = (clip->value >> (4 * from.track)) & 15u; + return 1; +} + +/* Call only on actual paste/confirmation. No staged write on cancellation. + * The adapter must validate the resulting grid before publishing live rows. + * This function can operate on an editor's staging bank. */ +static inline int clyps_clip_paste(const struct clyps_clipboard *clip, + uint32_t rows[16], uint16_t *defined, + struct clyps_location to, int replace) +{ + if (!clyps_location_valid(to) || to.kind != clip->source.kind || + to.bank != clip->source.bank) + return 0; + unsigned bit = 1u << to.row; + if ((*defined & bit) && !replace) + return 0; + if (to.kind == CLYPS_ROW) { + rows[to.row] = clip->value; + *defined |= bit; + } else { + if (!(*defined & bit) || to.track != clip->source.track) + return 0; + unsigned shift = 4 * to.track; + rows[to.row] = (rows[to.row] & ~(15u << shift)) | (clip->value << shift); + } + return 1; +} +#endif diff --git a/sdk/octatrack/modules/clyps/runtime.json b/sdk/octatrack/modules/clyps/runtime.json new file mode 100644 index 0000000000..008e9deaf8 --- /dev/null +++ b/sdk/octatrack/modules/clyps/runtime.json @@ -0,0 +1,51 @@ +{ + "schema": 1, + "subscribe": [ + { + "event": "module_key", + "fn": "module_key" + }, + { + "event": "module_enc", + "fn": "module_enc" + }, + { + "event": "module_tick", + "fn": "module_tick" + }, + { + "event": "module_draw", + "fn": "module_draw" + }, + { + "event": "ev_bank_load", + "fn": "clyps_bank_load", + "order": 50 + }, + { + "event": "ev_bank_loaded", + "fn": "clyps_bank_loaded", + "order": 50 + }, + { + "event": "ev_project_new", + "fn": "clyps_project_init", + "order": 50 + }, + { + "event": "ev_seq_wrap", + "fn": "clyps_wrap", + "order": 50 + }, + { + "event": "ev_audio_seq_source", + "fn": "clyps_audio_source", + "order": 50 + }, + { + "event": "ot_modal_input", + "fn": "clyps_modal", + "order": 50 + } + ] +} diff --git a/sdk/octatrack/modules/clyps/session_controls.h b/sdk/octatrack/modules/clyps/session_controls.h new file mode 100644 index 0000000000..cdbbcf7990 --- /dev/null +++ b/sdk/octatrack/modules/clyps/session_controls.h @@ -0,0 +1,161 @@ +/* SPDX-License-Identifier: GPL-3.0-or-later + * Track-local SRC, ARR Meta, and modal editing input callbacks. Included by + * the module after its platform and sequencer adapters are defined. + */ +/* Stock can close its popup on key-down. Keep repeats and release with it. */ +static uint32_t popup_keys[2]; + +int module_key(int code, int pressed) +{ + /* Revision 2 of the private bus offers an early copy of each event. + * Opening ARR still goes through the ordinary base shortcut ordering. */ + check_src_context(); + int early = !!(code & 0x100); + code &= ~0x100; + if ((unsigned)code >= 64) + return !stock_window() && (visible || locked); + unsigned i = (unsigned)code >> 5; + uint32_t bit = 1u << ((unsigned)code & 31u); + if (!pressed) { + unsigned taken = consumed[i] & bit; + consumed[i] &= ~bit; + popup_keys[i] &= ~bit; + return !!taken; + } + if (consumed[i] & bit) + return 1; + if (stock_window()) { + popup_keys[i] |= bit; + return 0; + } + if ((popup_keys[i] & bit) || (early && !visible && !locked)) + return 0; + if (visible && !src_list && clyps_meta_track_key((unsigned)code)) + return 0; + if (code == PLAY || code == STOP) { + if ((locked || visible) && !alone(code)) { + consumed[i] |= bit; + return 1; + } + if (code == STOP) { + unsigned sr = critical(); + requested = playing; + pending_row = 0; + restore(sr); + } + return 0; + } + if (locked) { + consumed[i] |= bit; + if (!stock_window() && code == ARR && alone(ARR)) { + locked = 0; + visible = 1; + row_view = armed = 0; + } else if (code == YES && !RUNNING && alone(YES) && supported()) { + /* Explicit handoff: both current and pending sources are home + * before any subsequent input can reach a native edit handler. */ + requested = playing = last_row = pending_row = 0; + locked = visible = armed = 0; + } + redraw(); + return 1; + } + if (!visible && (code != ARR || ARRANGER || GRID_REC || LIVE_REC || REC_HELD || + stock_window() || BYTE(0x80000015u))) + return 0; + if (!visible && code == ARR && !alone(ARR)) return 0; + consumed[i] |= bit; + if (visible && !alone(code)) return 1; + missing = 0; + if (src_list) { + if (code == YES) submit_lane(track, src_cursor); + else if (code == ARR) src_list = 0; + else if (code == NO || code == SRC) { + src_list = visible = 0; + locked = !!(playing || requested); + } + redraw(); + return 1; + } + if (editing) { + if (code < 16) draft = (unsigned)code; + if (code == NO) editing = 0; + if (code == YES) { + unsigned shift = 4*track; + uint32_t refs = (rows[slot] & ~(15u << shift)) | (draft << shift); + refused = !valid(refs); + if (!refused) rows[slot] = refs; + editing = 0; + } + redraw(); + return 1; + } + if (code == NO) { + locked = !!(playing || requested); + visible = armed = 0; + } else if (code == ARR && !visible) { + if (!alone(ARR) || GRID_REC || LIVE_REC || REC_HELD) { + /* Leave the native editor in possession of its held releases. */ + return 1; + } + visible = 1; + zoom = 0; + row_view = armed = 0; + refused = !supported(); + } else if (code == SRC && stock_src_available() && supported()) { + unsigned selected = BYTE(0x100b14ccu); + if (selected < TRACKS) { + track = selected; + src_cursor = (requested >> (4 * track)) & 15u; + src_list = 1; + row_view = armed = 0; + } + } else if (code == 0x1b) { /* PAGE within the modal only */ + zoom ^= 1; + armed = 0; + } else if (code == ARR) { + row_view ^= 1; + armed = 0; + } else if (row_view && code == YES) { + if (zoom) { + missing = !(defined & (1u<> (4*track)) & 15u; + editing = 1; + } + } else armed ^= 1; + } else if (code < 16 && row_view) { + focus_row((unsigned)code); + if (armed) { + armed = 0; + refused = !valid(playing); + if (!refused) { + rows[slot] = playing; + defined |= 1u << slot; + } + } else if (defined & (1u << slot)) { + submit(rows[slot], slot+1); + } else { + missing = 1; + } + } else if (code < 16 && track < TRACKS) { + submit_lane(track, (unsigned)code); + } + redraw(); + return 1; +} + +int module_enc(int encoder, int delta) +{ + check_src_context(); + if (stock_window()) return 0; + if (visible && !editing && (encoder & ~0x100) == 6 && alone(64)) { + unsigned value = clyps_focus_step(src_list ? src_cursor : row_view ? slot : track, + delta, src_list || row_view ? 15 : 7); + if (src_list) src_cursor = value; + else if (row_view) focus_row(value); else track = value; + redraw(); + } + return visible || locked; +} diff --git a/sdk/octatrack/modules/clyps/session_view.h b/sdk/octatrack/modules/clyps/session_view.h new file mode 100644 index 0000000000..f82259304f --- /dev/null +++ b/sdk/octatrack/modules/clyps/session_view.h @@ -0,0 +1,143 @@ +/* SPDX-License-Identifier: GPL-3.0-or-later + * Aligned 8-pixel bands on the column-major MKII draw surface. + * Three-column, five-pixel glyphs with a one-pixel advance gap. + */ +static const unsigned char glyphs[][3] = { + {31,17,31},{18,31,16},{29,21,23},{21,21,31},{7,4,31}, + {23,21,29},{31,21,29},{1,1,31},{31,21,31},{23,21,31}, + {30,5,30},{31,21,10},{14,17,17},{31,17,14},{31,21,17}, + {31,5,1},{14,17,29},{31,4,31},{17,31,17},{8,16,15}, + {31,4,27},{31,16,16},{31,2,31},{31,1,30},{14,17,14}, + {31,5,2},{14,25,30},{31,5,26},{18,21,9},{1,31,1}, + {15,16,15},{7,24,7},{31,8,31},{27,4,27},{3,28,3}, + {25,21,19},{4,4,4},{0,0,0} +}; + +static void label(unsigned char *frame, unsigned x, unsigned band, const char *s) +{ + for (; *s && x <= 125; ++s, x += 4) { + unsigned c = (unsigned char)*s; + unsigned index = c >= '0' && c <= '9' ? c-'0' : + c >= 'A' && c <= 'Z' ? 10+c-'A' : c=='-' ? 36 : 37; + for (unsigned i = 0; i < 3; ++i) + frame[(x+i)*8 + 7-band] |= glyphs[index][i] << 1; + } +} + +static void number(unsigned char *frame, unsigned x, unsigned band, unsigned n) +{ + char pair[3] = {'0'+(n>=10), '0'+(n>=10 ? n-10 : n), 0}; + label(frame,x,band,pair); +} + +static unsigned source(uint32_t refs, unsigned lane) +{ + return (refs >> (4*lane)) & 15u; +} + +/* Five columns, seven pixels high for the Zoom cell labels. */ +static const unsigned char large[][5] = { + {62,65,73,65,62},{0,66,127,64,0},{98,81,73,73,70},{34,65,73,73,54}, + {24,20,18,127,16},{39,69,69,69,57},{60,74,73,73,48},{1,113,9,5,3}, + {54,73,73,73,54},{6,73,73,41,30},{126,9,9,9,126},{8,8,8,8,8} +}; + +static void zoom_source(unsigned char *frame, unsigned x, unsigned band, unsigned n) +{ + unsigned chars[3] = {10, n>=10, n>=10 ? n-10 : n}; + for (unsigned c=0; c<3; ++c) + for (unsigned i=0; i<5; ++i) + frame[(x+6*c+i)*8+7-band] |= large[n ? chars[c] : 11][i]; +} + +static void session_draw(unsigned char *frame) +{ + /* One snapshot for all four rows and both status strips. */ + unsigned sr = critical(); + uint32_t active = playing, next = requested; + unsigned last = last_row, queued = pending_row; + restore(sr); +#ifndef CLYPS_PERFORMANCE + /* Show a row only while its complete current definition matches. */ + if (last && (!(defined & (1u << (last-1))) || rows[last-1] != active)) + last = 0; +#endif + /* Paint the whole surface by contiguous columns. The row separators + * are already present when a cell is drawn. Only invert the focus. */ + for (unsigned x=0; x<128; ++x) { + unsigned char *column = frame+8*x; + column[0] = column[1] = column[7] = 0; + column[6] = 0x80; + unsigned char rule = x >= 8 ? 0x80 : 0; + column[2] = column[3] = column[4] = column[5] = rule; + } + label(frame,0,0,"CLYPS"); + label(frame,23,0,editing ? "EDIT" : row_view ? "ROW" : "CLIP"); + label(frame,42,0,"R"); + number(frame,46,0,slot+1); + label(frame,56,0,"T"); + number(frame,60,0,track+1); + label(frame,71,0,"L"); + if (last) number(frame,75,0,last); else label(frame,75,0,"--"); + if (refused || !supported()) label(frame,87,0,"GRID LOCK"); + else if (missing) label(frame,87,0,"NO ROW"); + else if (editing) { label(frame,87,0,"SET A"); number(frame,107,0,draft+1); } + else if (armed) label(frame,87,0,"STORE"); + else if (queued) { label(frame,87,0,"Q ROW"); number(frame,109,0,queued); } + else if (active || next) label(frame,87,0,"EDIT LOCK"); + + label(frame,0,1,"R"); + for (unsigned r=0; r<4; ++r) + number(frame,0,2+r,first_row+r+1); + label(frame,0,6,RUNNING ? "P" : "S"); + label(frame,0,7,"Q"); + unsigned count=zoom ? 4 : 8, width=zoom ? 30 : 15; + unsigned start=zoom ? (track & 4u) : 0; + for (unsigned col=0; colHH", 1, 2212) + self.a.identity + pack(">Q", 23) + index = b"".join(pack(">BBHH", i, 16, 128 + 130 * i, 130) for i in range(16)) + payload = bytearray(2080) + for i in (0, 1, 2, 7): + payload[i*130 + 1] = 8 + start = i*130 + 2 + 3*8 + payload[start:start+8] = bytes([i, 16, 17, 0, 1, 2, 3, 4]) + expected = header + index + payload + expected += pack(">I", crc32(expected)) + self.assertEqual(encode(self.a.identity, 23, self.rows), expected) + self.assertEqual(decode(expected, self.a.identity)[0], 23) + + def test_reentry_and_stored_reload(self): + self.assertEqual(self.a.load("saved"), (0, EMPTY_PROJECT)) + self.a.save("saved", self.rows) + self.rows[1][3][0] = 9 + self.a.save("working", self.rows) + # Recreate the host object using only the bytes that survived OFF. + reopened = Archive(self.a.identity) + reopened.files.update(self.a.files) + self.assertEqual(reopened.load("saved")[1][1][3][0], 1) + self.assertEqual(reopened.load("working")[1][1][3][0], 9) + reopened.files["saved"] = reopened.files["saved"][:-1] + with self.assertRaises(ValueError): + reopened.load("saved") + self.assertEqual(reopened.load("working")[1][1][3][0], 9) + + def test_failure_recovery(self): + self.a.save("working", self.rows) + original = self.a.files["working"] + for cut in range(SIZE): + with self.assertRaises(ValueError): + self.a.save("working", self.rows, cut=cut) + self.assertIs(self.a.files["working"], original) + with self.assertRaises(ValueError): + decode(original, b"B" * 16) + for offset, error in ((5, Unsupported), (34, ValueError), (-1, ValueError)): + corrupt = bytearray(original) + corrupt[offset] ^= 1 + if offset == 34: + corrupt[-4:] = CRC.pack(crc32(corrupt[:-4])) + self.a.files["working"] = bytes(corrupt) + with self.assertRaises(error): + self.a.save("working", self.rows) + self.assertEqual(self.a.files["working"], corrupt) + + +class ProjectFailure(unittest.TestCase): + def test_late_abort_and_committed_identity(self): + from offline.project_transition import Generation, Transition + a_rows = list(EMPTY_PROJECT[0]) + b_rows = a_rows.copy() + a_rows[3], b_rows[3] = (6,) * 8, (2,) * 8 + a = Generation(b"A" * 16, 0, tuple(a_rows), 7, 6, 4) + b = Generation(b"B" * 16, 0, tuple(b_rows), 12) + state = Transition(a) + old = state.begin(b.project) + self.assertIsNone(state.selected()) + state.finish(old, a.binding) + self.assertIs(state.selected(), a) + current = state.begin(b.project) + with self.assertRaises(ValueError): + state.finish(old, b.binding, b) + state.finish(current, None) + self.assertIsNone(state.selected()) + self.assertIs(state.committed, a) + for unverified in ((a.project, 7, a.epoch), (a.project, 0, a.epoch + 1)): + current = state.begin(b.project) + state.finish(current, unverified) + self.assertIsNone(state.selected()) + self.assertIs(state.committed, a) + current = state.begin(b.project) + with self.assertRaises(ValueError): + state.finish(current, a.binding, b) + self.assertIsNone(state.selected()) + state.finish(current, b.binding, b) + self.assertIs(state.selected(), b) diff --git a/sdk/octatrack/modules/clyps/test_performance.py b/sdk/octatrack/modules/clyps/test_performance.py new file mode 100644 index 0000000000..69e82f2111 --- /dev/null +++ b/sdk/octatrack/modules/clyps/test_performance.py @@ -0,0 +1,26 @@ +"""Compile the selected performance adapter with the same callbacks as the module.""" +from pathlib import Path +import subprocess +import tempfile +import unittest + + +class PerformancePanel(unittest.TestCase): + def test_row_advance_and_context(self): + here = Path(__file__).resolve().parent + sdk = next(p for p in here.parents if (p/'runtime/loader/modwerk_module.h').exists()) + with tempfile.TemporaryDirectory() as tmp: + exe = Path(tmp)/'performance-host' + subprocess.run(['cc','-std=c99','-Wall','-Wextra','-Werror','-I',sdk/'runtime/loader', + here/'tests/performance_host.c','-o',exe],check=True) + subprocess.run([exe],check=True) + subprocess.run([exe, 'fresh-session'],check=True) + for transport in ('stop', 'play'): + for read in ('eof', 'complete'): + for order in ('init-first', 'read-first'): + with self.subTest(transport=transport, read=read, order=order): + subprocess.run([exe, transport, read, order], check=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/octatrack/modules/clyps/test_renderer.py b/sdk/octatrack/modules/clyps/test_renderer.py new file mode 100644 index 0000000000..752da7a826 --- /dev/null +++ b/sdk/octatrack/modules/clyps/test_renderer.py @@ -0,0 +1,47 @@ +# SPDX-License-Identifier: GPL-3.0-or-later +import hashlib +from pathlib import Path +import shutil +import subprocess +import tempfile +import unittest + +ROOT = Path(__file__).resolve().parent +SOURCE = ROOT / "tests/render_fixture.c" +WARNINGS = ["-Wall", "-Wextra", "-Werror", "-std=c99"] + + +class RendererTests(unittest.TestCase): + def test_native_frame_digests(self): + with tempfile.TemporaryDirectory() as tmp: + exe = Path(tmp) / "fixture" + subprocess.run(["cc", *WARNINGS, SOURCE, "-o", exe], check=True) + frames = subprocess.check_output([exe]) + self.assertEqual(len(frames), 3 * 1024) + # The first two cover the complete Meta display. SRC owns six bands, + # leaving the original top and bottom bands to the stock composer. + for label, data, digest in [ + ("empty Panorama", frames[:1024], "4c69c264e6a1c86b85071c8067ba7d722331d1a0253166e8a8f84a6a4f221c50"), + ("T2 override", frames[1024:2048], "8b5a0fb0e3e3bde1d62118be83b8d976b98773ec125cfe47c677f87a8cdd3c3e"), + ("T2 queued A03", frames[2176:2944], "6193d63c112552e4fe07a2de3340f7c64b2d499d5f67093384981bc95521bd31"), + ]: + with self.subTest(view=label): + self.assertEqual(hashlib.sha256(data).hexdigest(), digest) + + def test_input_edges_and_requests(self): + with tempfile.TemporaryDirectory() as tmp: + exe = Path(tmp) / "input" + subprocess.run(["cc", *WARNINGS, ROOT / "tests/input_fixture.c", "-o", exe], check=True) + subprocess.run([exe], check=True) + + @unittest.skipUnless(shutil.which("m68k-elf-gcc"), "requires the ColdFire cross-compiler") + def test_coldfire_compile(self): + with tempfile.TemporaryDirectory() as tmp: + for src in (SOURCE, ROOT / "tests/input_fixture.c"): + subprocess.run(["m68k-elf-gcc", *WARNINGS, "-mcpu=54455", "-ffreestanding", + "-DCLYPS_COMPILE_ONLY", "-Os", "-c", src, + "-o", Path(tmp) / "renderer.o"], check=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/sdk/octatrack/modules/clyps/tests/compare_timing.py b/sdk/octatrack/modules/clyps/tests/compare_timing.py new file mode 100644 index 0000000000..35d59a8b8e --- /dev/null +++ b/sdk/octatrack/modules/clyps/tests/compare_timing.py @@ -0,0 +1,28 @@ +# SPDX-License-Identifier: GPL-3.0-or-later +"""Compare normalized eight-lane native traces. A different sampled state still fails.""" +import argparse +import json +from pathlib import Path + + +def compare(candidate, stock): + result = {} + for name in ("events", "writes", "states"): + left, right = candidate[name], stock[name] + if not left or len(left) != len(right): + raise ValueError(f"{name}: incomplete or unequal lengths") + different = [i for i, (a, b) in enumerate(zip(left, right)) if a != b] + result[name] = {"count": len(left), "different_indexes": different} + if name == "states": + result[name]["different_ticks"] = [left[i][0] for i in different] + return result + + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("candidate", type=Path) + parser.add_argument("stock", type=Path) + args = parser.parse_args() + report = compare(json.loads(args.candidate.read_text()), json.loads(args.stock.read_text())) + print(json.dumps(report, indent=2)) + raise SystemExit(int(any(v["different_indexes"] for v in report.values()))) diff --git a/sdk/octatrack/modules/clyps/tests/grade_boundary.py b/sdk/octatrack/modules/clyps/tests/grade_boundary.py new file mode 100644 index 0000000000..a9e746a444 --- /dev/null +++ b/sdk/octatrack/modules/clyps/tests/grade_boundary.py @@ -0,0 +1,64 @@ +"""Compare a near-wrap panel run with the matching native stock composite.""" +import argparse +import json +from pathlib import Path + +parser = argparse.ArgumentParser(description=__doc__) +parser.add_argument('phase', choices=('early', 'late')) +parser.add_argument('candidate', type=Path) +parser.add_argument('reference', type=Path) +args = parser.parse_args() +if not __debug__: + parser.error('Assertions required') +candidate, reference = (json.loads(p.read_text()) for p in (args.candidate, args.reference)) +early = args.phase == 'early' +# Captured stock coverage for these two fixed NORMAL-16 replays, including tick zero. +call_count, write_count = (576, 560) if early else (848, 816) +select_edge, restore_edge, restore_observed = (89, 185, 185) if early else (91, 187, 188) +assert reference['panel_requests'] == [] +first = 90 if early else 186 +last = first + 96 +assert candidate['wraps'] == reference['wraps'] == list(range(90, last+1, 96)) + +events = candidate['events'] +assert len(events) == len(reference['events']) == call_count, 'incomplete native call stream' +assert [e[:5] for e in events] == [e[:5] for e in reference['events']] +for event, control in zip(events, reference['events']): + if event[1] == 0x400a536c: # stock trig dispatch + assert len(event) == len(control) == 4 + else: + assert event[1] in (0x4009d1e8, 0x4009cf4c) + assert len(event) == len(control) == 6, 'missing builder source' + tick, pc, _, track, _, source = event + assert control[5] == (tick >= first) + (tick >= last) + foreign = pc == 0x4009d1e8 and track < 3 and tick >= first and (track != 1 or tick < last) + assert source == int(foreign), (tick, track, source) + +def writes(trace): + return [(pc, addr, width, val) for _, pc, addr, val, width in trace['writes'] + if any(base <= addr < base+96 for base in (0x80001904, 0x80001984))] + +actual, stock = writes(candidate), writes(reference) +assert len(actual) == len(stock) == write_count, 'incomplete native timestamp stream' +offset = (actual[0][3] - stock[0][3]) & 0xffffffff +for a, b in zip(actual, stock): + assert a[:3] == b[:3] and (a[3]-b[3]) & 0xffffffff == offset +assert len(candidate['states']) == len(reference['states']) == last+16 +for tick, (a, b) in enumerate(zip(candidate['states'], reference['states']), 1): + assert a[0] == b[0] == tick and a[2:] == b[2:] + assert len(a[1]) == len(b[1]) == 3 + for left, right in zip(a[1], b[1]): + assert len(left) == len(right), (tick, left, right) + for (tr, slot, val), (other, pos, target) in zip(left, right): + assert (tr, slot) == (other, pos) and (val-target) & 0xffffffff == offset +# The first queue sample after the wrap includes three simultaneous step-1 trigs. +# T2 is straight. T1 must precede it and the swung T3 must follow it. +step = candidate['states'][first][1][0] +deadlines = {tr: val for tr, slot, val in step if slot == 0} +assert deadlines[1] - deadlines[0] == 5292000 and deadlines[2] - deadlines[1] == 5080320 +print(args.phase, len(events), 'ordered calls including tick zero,', len(actual), + 'timestamp writes,', len(candidate['states']), 'ticks; deadlines', deadlines) +assert candidate['panel_requests'] == [ + dict(edge=select_edge, observed=select_edge, playing=0, pending=0x111), + dict(edge=restore_edge, observed=restore_observed, playing=0x111, pending=0x101), +], 'missing or incorrect pending selection evidence' diff --git a/sdk/octatrack/modules/clyps/tests/grade_midi_wire.py b/sdk/octatrack/modules/clyps/tests/grade_midi_wire.py new file mode 100644 index 0000000000..8a651077c5 --- /dev/null +++ b/sdk/octatrack/modules/clyps/tests/grade_midi_wire.py @@ -0,0 +1,70 @@ +# SPDX-License-Identifier: GPL-3.0-or-later +"""Compare UART transmit bytes and timing. Fail on empty or hanging notes.""" +import json +import sys +from collections import Counter +from pathlib import Path + + +def decode(stream): + active = set() + count = Counter() + cc_values = set() + messages = [] + status = None + data = [] + for sample, byte in stream: + if byte >= 0xf8: + messages.append((sample, (byte,))) + continue + if byte & 0x80: + if data or byte >= 0xf0: + raise ValueError("incomplete or unsupported MIDI message") + status = byte + continue + if status is None: + raise ValueError("missing MIDI status") + data.append(byte) + kind = status >> 4 + if len(data) < (1 if kind in (12, 13) else 2): + continue + key = (status & 15, data[0]) + if kind == 9 and data[1]: + if key in active: + raise ValueError(f"duplicate note-on {key}") + count[key] += 1 + active.add(key) + elif kind == 8 or (kind == 9 and not data[1]): + if key not in active: + raise ValueError(f"unpaired note-off {key}") + active.remove(key) + elif kind == 11 and key == (1, 1): + cc_values.add(data[1]) + messages.append((sample, (status, *data))) + data.clear() + if data or active or not {(0, 48), (1, 67)} <= count.keys(): + raise ValueError(f"incomplete two-channel note fixture: {count}, active={active}") + if not {34, 42} <= cc_values: + raise ValueError(f"missing step-locked CC values: {cc_values}") + return count, messages + + +def grade(left, right): + counts, actual = decode(left) + _, reference = decode(right) + same_messages = [m for _, m in actual] == [m for _, m in reference] + print(f"Decoded messages {len(actual)}/{len(reference)}, identical={same_messages}; note counts {counts}") + if same_messages: + deviation = max(abs((x-actual[0][0]) - (y-reference[0][0])) + for (x,_), (y,_) in zip(actual,reference)) + print(f"Maximum relative message-end deviation {deviation:.3f} samples") + if [b for _, b in left] != [b for _, b in right]: + raise ValueError("wire bytes differ") + delta = max(abs((a-left[0][0]) - (b-right[0][0])) for (a,_), (b,_) in zip(left,right)) + print(f"{len(left)} wire bytes; note-on counts {counts}; maximum relative deviation {delta:.3f} samples") + if delta > 0.100001: + raise ValueError("relative UART timestamps differ at capture precision") + + +if __name__ == "__main__": + grade(*(json.loads(Path(name).read_text()) for name in sys.argv[1:])) diff --git a/sdk/octatrack/modules/clyps/tests/grade_slice.py b/sdk/octatrack/modules/clyps/tests/grade_slice.py new file mode 100644 index 0000000000..3442b527cf --- /dev/null +++ b/sdk/octatrack/modules/clyps/tests/grade_slice.py @@ -0,0 +1,20 @@ +"""Compare independent stock and SRC traces from the same pinned emulator base.""" +import argparse +import json +from pathlib import Path + +parser = argparse.ArgumentParser(description=__doc__) +parser.add_argument('candidate', type=Path) +parser.add_argument('stock', type=Path) +args = parser.parse_args() +candidate, stock = (json.loads(path.read_text()) for path in (args.candidate, args.stock)) +for trace in (candidate, stock): + if not trace['events'] or not trace['writes'] or len(trace['wraps']) != 1: + raise SystemExit('Incomplete trace') + if trace['initial_pool'] != trace['final_pool']: + raise SystemExit('Retired extent remains allocated') +for key in stock: + if candidate.get(key) != stock[key]: + raise SystemExit(f'{key} differs from stock') +print(f"Wrap {stock['wraps'][0]}, {len(stock['events'])} ordered calls, " + f"{len(stock['writes'])} relative timestamp writes, pool {stock['final_pool']}.") diff --git a/sdk/octatrack/modules/clyps/tests/grade_wide.py b/sdk/octatrack/modules/clyps/tests/grade_wide.py new file mode 100644 index 0000000000..d61f154a17 --- /dev/null +++ b/sdk/octatrack/modules/clyps/tests/grade_wide.py @@ -0,0 +1,34 @@ +"""Grade the fixed eight-track candidate against the stock composite.""" +import argparse +from copy import deepcopy +import json +from pathlib import Path + + +def grade(candidate, stock): + assert candidate == stock, 'stock mismatch' + assert len(stock['events']) == 624 and len(stock['writes']) == 608 + assert len(stock['states']) == 219 and all(len(s[1]) == 3 for s in stock['states']) + steps = {lane: time for lane, slot, time in stock['states'][90][1][0] if slot == 0} + assert set(steps) == set(range(8)) + assert steps[1]-steps[0] == 5292000 and steps[2]-steps[1] == 5080320 + + +if __name__ == '__main__': + p = argparse.ArgumentParser(description=__doc__) + for name in ('candidate', 'stock'): + p.add_argument(name, type=Path) + args = p.parse_args() + if not __debug__: + p.error('Assertions required') + candidate, stock = (json.loads(f.read_text()) for f in (args.candidate, args.stock)) + grade(candidate, stock) + for field in ('events', 'writes', 'states'): + damaged = deepcopy(candidate) + damaged[field].pop() + try: + grade(damaged, stock) + except AssertionError: + continue + raise AssertionError(field) + print('Eight-lane stock composite matched; three truncated streams rejected.') diff --git a/sdk/octatrack/modules/clyps/tests/input_fixture.c b/sdk/octatrack/modules/clyps/tests/input_fixture.c new file mode 100644 index 0000000000..ca11a765f3 --- /dev/null +++ b/sdk/octatrack/modules/clyps/tests/input_fixture.c @@ -0,0 +1,58 @@ +/* SPDX-License-Identifier: GPL-3.0-or-later + * Record the adapter requests issued by the production UI callbacks. + * No clock, queue, firmware memory or audio generator is emulated here. + */ +#include +#include "../meta_focus.h" +enum { TRACKS=8, ARR=0x1f, SRC=0x22, STOP=0x27, PLAY=0x28, YES=0x31, NO=0x32 }; +static unsigned visible, locked, src_list, editing, row_view, armed, refused; +static unsigned track, slot, zoom, src_cursor, draft, missing, defined, last_row, pending_row; +static uint32_t playing, requested, consumed[2], rows[16]; +static unsigned ARRANGER, GRID_REC, LIVE_REC, REC_HELD, RUNNING; +static unsigned selected, held, submits, last_lane, last_source; +static unsigned BYTE(uint32_t address) { return address==0x100b14ccu ? selected : 0; } +static void check_src_context(void) {} +static void redraw(void) {} +static unsigned critical(void) { return 0; } +static void restore(unsigned sr) { (void)sr; } +static int stock_window(void) { return 0; } +static int supported(void) { return 1; } +static int stock_src_available(void) { return 1; } +static int alone(unsigned code) { (void)code; return !held; } +static int valid(uint32_t refs) { (void)refs; return 1; } +static void focus_row(unsigned index) { slot=index; } +static void submit_lane(unsigned lane,unsigned source) { ++submits; last_lane=lane; last_source=source; } +static void submit(uint32_t refs,unsigned row) { (void)refs; (void)row; ++submits; } +#include "../session_controls.h" + +#ifndef CLYPS_COMPILE_ONLY +#include +static void tap(int key) +{ + assert(module_key(key,1)); + assert(module_key(0x100|key,0)); +} +int main(void) +{ + selected=1; + tap(ARR); + for (int key=16;key<24;++key) { + for (held=0;held<=1;++held) { + assert(!module_key(key|0x100,1) && !module_key(key,1)); + assert(!module_key(key|0x100,0) && !module_key(key,0)); + } + } + held=0; + assert(module_enc(6,3) && track==3); + tap(ARR); + assert(module_enc(6,2) && slot==2 && track==3 && !submits); + tap(SRC); + assert(src_list && track==1 && !submits); + assert(module_enc(6,2) && src_cursor==2 && !submits); + tap(YES); + assert(submits==1 && last_lane==1 && last_source==2); + tap(NO); + assert(!module_key(SRC,1) && !module_key(SRC,0) && !module_enc(6,1)); + return 0; +} +#endif diff --git a/sdk/octatrack/modules/clyps/tests/inspect_queue.py b/sdk/octatrack/modules/clyps/tests/inspect_queue.py new file mode 100644 index 0000000000..e14e14021f --- /dev/null +++ b/sdk/octatrack/modules/clyps/tests/inspect_queue.py @@ -0,0 +1,47 @@ +# SPDX-License-Identifier: GPL-3.0-or-later +"""Report strict differences and the flag-clear time relative to first observation.""" +import json +from pathlib import Path +import argparse + +MASK = 0x46c7fe44 + + +def witness(path, tick): + rows = [json.loads(line) for line in path.read_text().splitlines()] + window = [r for r in rows if tick-1 <= r['tick'] <= tick+1] + samples = [r for r in window if r['tick'] == tick] + first, second = samples[:2] + builders = [raw.split(':')[1] for r in samples for raw in r['hits']] + counts = {pc: builders.count(pc) for pc in ('400a2d60', '4009d1e8', '4009cf4c')} + writes = [] + for r in window: + for raw in r['writes']: + sample, pc, address, value, width, _ = raw.split(':') + lane = int(address, 16) - MASK + if 0 <= lane < 8: + writes.append(dict(lane=lane, pc=pc, value=int(value,16), width=int(width,16), + deltaSamples=round(float(sample)-first['sample'],3))) + return dict(firstSample=first['sample'], firstMask=first['queue'], + nextSample=second['sample'], nextMask=second['queue'], + selectorReturnsAndBuilders=counts, mutations=writes) + + +def compare(candidate, stock): + result = {} + for key in ('events', 'writes', 'states'): + a,b = candidate[key], stock[key] + diff = [i for i in range(min(len(a),len(b))) if a[i] != b[i]] + result[key] = dict(candidate=len(a), stock=len(b), differentIndices=diff, + overlapCompared=min(len(a),len(b))) + return result + + +if __name__ == '__main__': + parser = argparse.ArgumentParser(description=__doc__) + for name in ('candidate','stock','candidate_clock','stock_clock'): + parser.add_argument(name, type=Path) + args = parser.parse_args() + result = compare(json.loads(args.candidate.read_text()), json.loads(args.stock.read_text())) + result['tick193'] = [witness(path,193) for path in (args.candidate_clock,args.stock_clock)] + print(json.dumps(result, indent=2)) diff --git a/sdk/octatrack/modules/clyps/tests/make_fixture.py b/sdk/octatrack/modules/clyps/tests/make_fixture.py new file mode 100644 index 0000000000..bb4d58fd55 --- /dev/null +++ b/sdk/octatrack/modules/clyps/tests/make_fixture.py @@ -0,0 +1,68 @@ +"""Build an emulator-only GATE3 card from a local disposable OS 1.40C project.""" +import argparse +from pathlib import Path +import re +import shutil +import sys +import tempfile +import wave + +parser = argparse.ArgumentParser(description=__doc__) +for name in ('octabam', 'seed_project', 'output'): + parser.add_argument(name, type=Path) +args = parser.parse_args() +sys.path[:0] = [str(args.octabam.resolve() / directory) for directory in ('tools/hw', 'tools/emu')] +import emu_card +import ot_bank +import ot_project +import ot_spec + +with tempfile.TemporaryDirectory() as tmp: + tree = Path(tmp) + project = tree / 'MODWERK/GATE3' + audio = tree / 'MODWERK/AUDIO' + project.mkdir(parents=True) + audio.mkdir() + for name in ['project', 'markers', *(f'arr{i:02}' for i in range(1, 9)), + *(f'bank{i:02}' for i in range(1, 17))]: + shutil.copyfile(args.seed_project / (name + '.work'), project / (name + '.work')) + track = dict(length=16, scale='1X', trigs='clear', locks={'all': 'clear'}) + ot_spec.apply(project, dict(banks='A', patterns={i: dict(tracks={'all': track}) for i in ('1', '2')})) + for pattern in (0, 1): + ot_project.set_pattern_scale(project, 1, pattern, 16, '1X', guard=False) + ot_project.set_tempo(project, 120) + + def configure(data): + for pat, masks in enumerate(((0x1008, 0x2041, 0x8204), (0x4081, 0x1109, 0x4811))): + for lane, mask in enumerate(masks): + ot_bank.set_mask(data, pat, lane, mask) + patterns = [m.start() for m in re.finditer(b'PTRN', data)] + tracks = [m.start() for m in re.finditer(b'TRAC', data)] + if len(patterns) != 16 or len(tracks) != 128: + raise ValueError('Unknown bank layout') + data[patterns[2]:patterns[3]] = data[patterns[1]:patterns[2]] + data[tracks[17]:tracks[18]] = data[tracks[1]:tracks[2]] + + ot_project._bank_write(project, 1, configure, guard=False) + proj = project / 'project.work' + raw, count = re.subn(rb'(?m)^MASTER_TRACK=[01]\r', b'MASTER_TRACK=0\r', proj.read_bytes()) + if count != 1: + raise ValueError('Expected a project master-track setting') + proj.write_bytes(raw) + arr = project / 'arr01.work' + data = bytearray(arr.read_bytes()) + if (data[8:16] != b'DPS1ARRA' or len(data) != 11336 or data[0x17] or + sum(data[16:-2]) % 65536 != int.from_bytes(data[-2:], 'big')): + raise ValueError('Supply a disposable OS 1.40C project with an empty arrangement 1') + # One stock 16-step A01 row, with its default tempo and no mute overrides. + data[0x17] = data[0x29] = 1 + data[0x32:0x34] = bytes.fromhex('ffff') + data[0x37] = 16 + data[-2:] = (sum(data[16:-2]) % 65536).to_bytes(2, 'big') + arr.write_bytes(data) + arr.with_suffix('.strd').write_bytes(data) + with wave.open(str(audio / 'fixture.wav'), 'wb') as stream: + stream.setparams((1, 2, 44100, 0, 'NONE', 'not compressed')) + stream.writeframes(bytes(2048)) + with args.output.open('xb') as out: + out.write(emu_card.build_image(tree)) diff --git a/sdk/octatrack/modules/clyps/tests/mkii_panel.py b/sdk/octatrack/modules/clyps/tests/mkii_panel.py new file mode 100644 index 0000000000..8cd4875c57 --- /dev/null +++ b/sdk/octatrack/modules/clyps/tests/mkii_panel.py @@ -0,0 +1,35 @@ +"""Interactive MKII emulator transport from the CLYPS fixture.""" +from contextlib import contextmanager +from subprocess import PIPE, Popen + + +@contextmanager +def panel(emulator, main, card, extra=()): + args = [emulator, '--image', main, '--interactive', '--max', '400000000000', + '--mkii', '--mount', '--set', 'MODWERK', '--project', 'GATE3', + '--card', card, '--load-ms', '20000', '--frame', '--internal-clock', + '--rtc', '1000000000', *extra] + with Popen(args, stdin=PIPE, stdout=PIPE, text=True) as process: + try: + for line in process.stdout: + if line.startswith('ready '): + break + else: + raise RuntimeError('Emulator exited before panel initialization') + + def command(line): + process.stdin.write(line + '\n') + process.stdin.flush() + reply = process.stdout.readline().strip() + if not reply or reply.startswith('err') or ('stop=' in reply and 'stop=time' not in reply): + raise RuntimeError(f'{line}: {reply}') + return reply + + yield command + finally: + if process.poll() is None: + process.terminate() + + +def peek(command, address, size): + return bytes.fromhex(command(f'peek {address:#x} {size}').split()[1]) diff --git a/sdk/octatrack/modules/clyps/tests/native_profile.py b/sdk/octatrack/modules/clyps/tests/native_profile.py new file mode 100644 index 0000000000..2926a813cb --- /dev/null +++ b/sdk/octatrack/modules/clyps/tests/native_profile.py @@ -0,0 +1,151 @@ +"""Measure stock MAIN and instrumented sequencer spans in an MKII emulator.""" +import argparse +import json +from pathlib import Path +import shutil +import tempfile + +from mkii_panel import panel, peek + +parser = argparse.ArgumentParser(description=__doc__) +for name in ('emulator', 'main', 'symbols', 'synthetic_card', 'output'): + parser.add_argument(name, type=Path) + +parser.add_argument('--performance-overlay', action='store_true', help='Select dense sources through Clip View') +args = parser.parse_args() +if not __debug__: + parser.error('Assertions are required') +symbols = json.loads(args.symbols.read_text()) +TICK, WRAP, AUDIO, MIDI = 0x400a3fdc, 0x400a43a0, 0x4009d1e8, 0x4009cf4c +bank, stride, lane_bytes = 0x400e21e0, 0x8ed8, 0x91a +module = 0x34e1e379 +with tempfile.TemporaryDirectory() as tmp: + card = Path(tmp) / 'disposable.img' + shutil.copyfile(args.synthetic_card, card) + with panel(args.emulator, args.main, card, ['--card-rw', '--names-early', '--dsp']) as cmd: + def word(addr): + return int.from_bytes(peek(cmd, addr, 4), 'big') + + def call(name, *values): + for attempt in range(200): + try: + response = cmd('call ' + ' '.join(hex(v) for v in [symbols[name], *values])) + return int(response.split('d0=')[1].split()[0], 16) + except RuntimeError as error: + if "not main's spin" not in str(error): + raise + cmd('run 3') + raise RuntimeError('Main task busy') + + def switch(on): + assert call('modwerk_modset_switch', module, on) == 1 + for attempt in range(100): + cmd('run 15') + status = word(symbols['modwerk_modset_switch_result']) + if status != 1: + break + assert status == 0, (on, status) + cmd('run 1500' if not on else 'run 100') + + def tap(code): + for state in [1 << (code % 8), 0]: + cmd(f'key {32 + code // 8} {state}') + advance(35) + + def advance(ms): + cmd(f'run {ms}') + + def level(): + return list(peek(cmd, 0x80000035, 2)) # MAIN and CUE project settings + + def master(): + starting = level() + cmd('key 37 32') + advance(80) + stages = [starting] + for delta in (-8, 8): + cmd(f'knob 0x36 {delta}') + advance(150) + stages.append(level()) + cmd('key 37 0') + advance(120) + return stages + + def window(expected_source=None): + starts = {WRAP: 'boundary', 0x400a2d5a:'source'} + ends = {WRAP+6: 'boundary', 0x400a2d60:'source'} + cmd('watch ' + ','.join(hex(pc) for pc in (*starts, *ends, AUDIO))) + cmd('hits') + metrics = ['mw_frame_skips','mw_frame_sheds','mw_frame_busy','mw_frame_count'] + before = [word(symbols[name]) for name in metrics] + observed_sources = set() + current = {} + spans = {name:[] for name in starts.values()} + for _ in range(300): + advance(10) + for raw in cmd('hits').split()[2:]: + hit = [int(x,16) for x in raw.split(':')] + stamp, pc = hit[:2] + if pc == AUDIO and hit[7] == 0x400a2d82: + observed_sources.add((hit[8], hit[10])) + if pc in starts: + current[starts[pc]] = stamp + elif pc in ends and ends[pc] in current: + name = ends[pc] + spans[name].append(stamp-current.pop(name)) + after = [word(symbols[name]) for name in metrics] + result = dict(zip(metrics,[(b-a)&0xffffffff for a,b in zip(before,after)])) + result['instruction_spans'] = {name:dict(count=len(v),minimum=min(v,default=None), + maximum=max(v,default=None)) for name,v in spans.items()} + result['frame_peak_timer_counts_since_boot'] = word(symbols['mw_frame_max']) + result['audio_lane_sources'] = sorted(observed_sources) + if expected_source is not None: + assert observed_sources == {(lane, expected_source) for lane in range(8)}, observed_sources + return result + + for ms, key in [(3000,0x32),(3000,0x32),(500,0x31)]: + advance(ms) + tap(key) + advance(2000) + tap(0x11) + tap(0x22) + result = {} + for name in ('empty','installed'): + if name == 'installed': + switch(1) + result[name+'-master'] = master() + result[name+'-stopped'] = window() + tap(0x28) + result[name+'-light'] = window(0) + tap(0x27) + # Assign all eight lanes to a dense A02 in ordinary Normal-16 time. + for t in range(8): + cmd(f'poke {bank+stride+t*lane_bytes:#x} 000000000000ffff') + cmd(f'poke {bank+stride+0x8e50:#x} {peek(cmd,bank+0x8e50,8).hex()}') + tap(0x1f) + if args.performance_overlay: + tap(0x1f) # Row to Clip. + else: + cmd('knob 0x36 -7') + advance(75) + for t in range(8): + if args.performance_overlay: + tap(0x10+t) + elif t: + cmd('knob 0x36 1') + advance(75) + tap(1) + tap(0x28) + assert word(symbols['modwerk_runtime_api']) & 0xfff == 0x111 + result['installed-dense'] = window(1) + tap(0x27) + switch(0) + # Independent stock global A02 uses the same eight dense track records. + tap(0x28) + cmd('poke 0x800065c0 01') + advance(2300) + result['empty-dense'] = window(1) + tap(0x27) + args.output.write_text(json.dumps(result,indent=2)) + a,b=result['empty-master'],result['installed-master'] + assert a == b and a[0] == a[2] and a[1][0] < a[0][0] and a[1][1] == a[0][1], (a,b) diff --git a/sdk/octatrack/modules/clyps/tests/native_refusal.py b/sdk/octatrack/modules/clyps/tests/native_refusal.py new file mode 100644 index 0000000000..98cf0d55c6 --- /dev/null +++ b/sdk/octatrack/modules/clyps/tests/native_refusal.py @@ -0,0 +1,64 @@ +"""Check pre-publication refusal on a candidate-sized base missing the feature.""" +import argparse +import json +from pathlib import Path +import shutil +import tempfile + +from mkii_panel import panel, peek + +parser = argparse.ArgumentParser(description=__doc__) +for name in ('emulator', 'base', 'symbols', 'synthetic_card', 'receipt'): + parser.add_argument(name, type=Path) +parser.add_argument('--public-registry', action='store_true', help='Probe only registered lifecycle rows on the public base') +args = parser.parse_args() +if not __debug__: + parser.error('Assertions are required') +symbols = json.loads(args.symbols.read_text()) +with tempfile.TemporaryDirectory() as tmp: + scratch = Path(tmp) / 'disposable.img' + shutil.copyfile(args.synthetic_card, scratch) + with panel(args.emulator, args.base, scratch, ['--card-rw', '--names-early', '--dsp']) as cmd: + def word(addr): + return int.from_bytes(peek(cmd, addr, 4), 'big') + + def call(name, *args): + for attempt in range(200): + try: + reply = cmd('call ' + ' '.join(hex(v) for v in (symbols[name], *args))) + return int(reply.split('d0=')[1].split()[0], 16) + except RuntimeError as error: + if "not main's spin" not in str(error): + raise + cmd('run 3') + raise RuntimeError('Main task busy') + + def inventory(): + # The control has the same registry and 66 slots as the candidate. + rows = [word(word(symbols['modwerk_runtime_event_row'] + 4*(n-4))) for n in ((42,40,41) if args.public_registry else (42,40,41,63,64,65))] + return dict(callbacks=rows, active=call('modwerk_runtime_active'), + pool=call('modwerk_runtime_free', 0), owners=word(symbols['core:owners'])) + + module = 0x34e1e379 + for ms, key in [(3000,0x32),(3000,0x32),(500,0x31)]: + cmd(f'run {ms}') + for value in (1 << (key % 8), 0): + cmd(f'key {32+key//8} {value}') + cmd('run 35') + cmd('run 2000') + before = inventory() + assert before['active'] == before['owners'] == 0 and not any(before['callbacks']) + assert call('modwerk_modset_is_off', module) + assert call('modwerk_modset_switch', module, 1) == 1 + for attempt in range(100): + cmd('run 15') + status = word(symbols['modwerk_modset_switch_result']) + if status != 1: + break + # The public table ends at 62. Its length check precedes feature + # admission: MALFORMED (1), versus CONFLICT (3) on an equal-width twin. + expected = 0x101 if args.public_registry else 0x103 + assert status == expected, (expected, status) + after = inventory() + assert before == after and call('modwerk_modset_is_off', module) + args.receipt.write_text(json.dumps(dict(refusal=status, before=before, after=after))) diff --git a/sdk/octatrack/modules/clyps/tests/native_rows.py b/sdk/octatrack/modules/clyps/tests/native_rows.py new file mode 100644 index 0000000000..7c090477a3 --- /dev/null +++ b/sdk/octatrack/modules/clyps/tests/native_rows.py @@ -0,0 +1,692 @@ +"""Replay the historical composite or 16x8 lane matrix on the candidate MKII base.""" +import argparse +import hashlib +import json +from pathlib import Path +import shutil +import struct +import sys +import tempfile + +from mkii_panel import panel, peek + +TICK, WRAP, TRIG, AUDIO, MIDI = 0x400a3fdc, 0x400a43a0, 0x400a536c, 0x4009d1e8, 0x4009cf4c +ARR, NO, YES, STOP, PLAY = 0x1f, 0x32, 0x31, 0x27, 0x28 +parser = argparse.ArgumentParser(description=__doc__) +for field in ('emulator', 'base', 'card', 'symbols', 'output'): + parser.add_argument(field, type=Path) +parser.add_argument('--octabam', type=Path, required=True) +parser.add_argument('--reference', action='store_true') +parser.add_argument('--performance-overlay', action='store_true', help='Drive the wide fixture through Row/Clip') +parser.add_argument('--lane-matrix', action='store_true') +parser.add_argument('--project-reload', choices=('stored', 'missing')) +parser.add_argument('--project-change', action='store_true') +parser.add_argument('--row-popup', action='store_true') +parser.add_argument('--scene-select', action='store_true') +parser.add_argument('--crossfader', action='store_true', help='Compare stock fader position and morph weights') +parser.add_argument('--arranger-recovery', action='store_true') +parser.add_argument('--observe-queue', action='store_true') +parser.add_argument('--home-control', choices=('home', 'stop')) +parser.add_argument('--clock-witness', type=Path, help='Additional JSONL observations on the wide replay') +parser.add_argument('--boundary', choices=('early','late')) +parser.add_argument('--package', type=Path) +parser.add_argument('--symbols-module', type=Path) +args = parser.parse_args() +if (args.project_change or args.project_reload) and not (args.package and args.symbols_module): + parser.error('Project change requires package and matching module symbols') +if args.boundary and (args.lane_matrix or not args.reference and not (args.symbols_module and args.package)): + parser.error('Boundary candidate requires its MWRM and matching linked symbol map') +if not __debug__ or args.lane_matrix and args.reference: + parser.error('Assertions required; the matrix needs a candidate') +MODULE = 0x34e1e379 +syms = json.loads(args.symbols.read_text()) +with tempfile.TemporaryDirectory() as tmp: + scratch = Path(tmp) / 'test.img' + shutil.copyfile(args.card, scratch) + if args.project_change or args.project_reload: + sys.path.insert(0, str(args.octabam.resolve() / 'tools/emu')) + import emu_card + tree = Path(tmp) / 'fixture' + tree.mkdir() + emu_card.extract_image(args.card.read_bytes(), tree) + seed = tree / 'MODWERK/GATE3' + if args.project_change: + second = tree / 'MODWERK/GATE4' + shutil.copytree(seed, second) + work = second / 'project.work' + elif args.project_reload == 'stored': + for work_file in seed.glob('*.work'): + shutil.copyfile(work_file, work_file.with_suffix('.strd')) + work = seed / 'project.strd' + else: + for stored in seed.glob('*.strd'): + stored.unlink() # Temporary fixture only. + if args.project_change or args.project_reload == 'stored': + data = work.read_bytes() + assert data.count(b'\nBANK=0\r') == 1 + work.write_bytes(data.replace(b'\nBANK=0\r', b'\nBANK=1\r')) + scratch.write_bytes(emu_card.build_image(tree)) + + def project(card): + sys.path.insert(0, str(args.octabam.resolve() / 'tools/emu')) + import emu_card + return {k: hashlib.sha256(v).hexdigest() for k,v in + emu_card.extract_image(card.read_bytes()).items() if k.startswith('MODWERK/GATE3/')} + + with panel(args.emulator, args.base, scratch, ['--card-rw','--names-early','--dsp']) as cmd: + def num(addr, size=4): + return int.from_bytes(peek(cmd, addr, size), 'big') + + def call(name, *values): + for _ in range(200): + try: + reply = cmd('call ' + ' '.join(hex(i) for i in (syms[name], *values))) + return int(reply.split('d0=')[1].split()[0], 16) + except RuntimeError as exc: + if "not main's spin" not in str(exc): + raise + cmd('run 3') + raise RuntimeError('Main task did not become idle') + + def switch_once(on, target, polls=100): + assert call('modwerk_modset_switch', target, on) == 1 + for _ in range(polls): + cmd('run 15') + actual = num(syms['modwerk_modset_switch_result']) + if actual != 1: + break + return actual + + def switch(on, polls=100): + result = switch_once(on, MODULE, polls) + assert result == 0, (on, result) + cmd('run 100' if on else 'run 1200') + + def block(addr, size): + h = hashlib.sha256() + for off in range(0, size, 2048): + h.update(peek(cmd, addr + off, min(2048, size-off))) + return h.hexdigest() + + def bank_parts(): + return [block(0x400e21e0, 3*0x8ed8), block(0x400e21e0+0x8ed80, 4*0x18b2), + block(0x400e21e0+0x9504a, 4*0x18b2)] + + def callbacks(): + words = [num(syms['modwerk_runtime_event_row'] + 4*(k-4)) for k in (42,40,41,63,64,65)] + return [num(a) for a in words] + + def tap(code): + for val in (1 << (code%8), 0): + cmd(f'key {32+code//8} {val}') + advance(35) + + def move_focus(delta): + cmd(f'knob 0x36 {delta}') + advance(70) + + def start_trace(): + global tick, events, wraps, writes, recording + cmd('hits') + cmd('writes') + tick, events, wraps, writes, recording = 0, [], [], [], True + + def advance(ms): + global tick + quantum = 1 if args.observe_queue and recording and sampling and 190 <= tick <= 195 else 5 + if recording and sampling and ms > quantum: + for offset in range(0, ms, quantum): + advance(min(quantum, ms-offset)) + return + old_tick = tick + clock = cmd(f'run {ms}') + if not recording: + return + hits = cmd('hits').split()[2:] + for raw in hits: + h = [int(v, 16) for v in raw.split(':')] + pc = h[1] + if pc == TICK: + tick += 1 + elif pc == WRAP: + wraps.append(tick) + elif pc == TRIG or (pc in (AUDIO, MIDI) and h[7] in (0x400a2d82, 0x400a39ca)): + events.append([tick, pc, h[7], h[8], *([] if pc == TRIG else [h[11],h[10]])]) + if args.observe_queue and sampling and 191 <= tick <= 195: + with args.output.with_suffix('.phase').open('a') as witness: + print(tick, ms, peek(cmd,0x46c7fe44,8).hex(), file=witness) + if sampling and tick != old_tick: + assert tick == old_tick+1 + state = [] + for table, mask in ((0x80001904,0x46c7fe44),(0x80001984,0x46c7fe8c),(0x46c76a26,0x46c77be2)): + times = struct.unpack('>24I', peek(cmd,table,96)) + flags = peek(cmd,mask,8) + state.append([[t, slot, times[slot*8+t]] for t in range(8) + for slot in range(3) if flags[t] & (1<= target: + return + advance(10) + raise AssertionError(('stalled', tick, target, num(0x800065b8), num(0x10000016,2), num(0x80006698))) + + def arr_run(): + global recording + # FUNC+ARR, then stock playback for a complete row and its downbeat. + cmd('key 37 32') + advance(50) + tap(ARR) + cmd('key 37 0') + advance(50) + assert num(0x460d1aec) == 1 + start_trace() + tap(PLAY) + row_at_start = num(0x80006698) + until(120) + assert row_at_start == 0 and num(0x80006698) == 1, ('stock rows',row_at_start,num(0x80006698)) + record = dict(events=list(events), wraps=list(wraps), writes=list(writes), row=num(0x80006698)) + recording = False + tap(STOP) + cmd('key 37 32') + advance(50) + tap(ARR) + cmd('key 37 0') + advance(50) + assert num(0x460d1aec) == 0 and num(0x800065b8) == 0 + return record + + recording = sampling = False + tick = 0 + states = [] + sites = [TICK, WRAP, TRIG, AUDIO, MIDI] + if args.clock_witness: + sites.extend([syms['modwerk_site_400a2d5a'], 0x400a2d60]) + args.clock_witness.open('x').close() + cmd('watch ' + ','.join(hex(i) for i in sites)) + cmd('watchmem 0x80001904 256') + if args.observe_queue: + cmd('watchmem 0x46c7fe44 8') + print('boot active',call('modwerk_runtime_active'),'shelved',call('modwerk_modset_is_off',MODULE),flush=True) + assert call('modwerk_runtime_active') == 0 + if not args.reference: + assert call('modwerk_modset_is_off', MODULE) + free = call('modwerk_runtime_free',0) + # On the clean UI fixture, dismiss the native missing-modules / clock + # windows using panel input before requesting module ownership. + cmd('run 3000') + tap(NO) + cmd('run 3000') + tap(NO) + cmd('run 500') + tap(YES) + cmd('run 2000') + print('clean start',hex(num(0x460d1e70)),hex(num(0x460d175c)),flush=True) + assert not num(0x460d1e70) and not num(0x460d175c) + if args.project_change or args.project_reload: + switch(1) + if args.performance_overlay: + tap(ARR); tap(6); tap(ARR) # Clip View first (D39.02) + for _ in range(3): tap(0x20) + tap(0x1b); tap(YES) + else: + tap(ARR); tap(1); tap(ARR); tap(YES); tap(3) + witness = json.loads(args.symbols_module.read_text()) + assert hashlib.sha256(args.package.read_bytes()).hexdigest() == witness['sha256'] + origin = callbacks()[0] - witness['offsets']['clyps_project_init'] + defined_at = origin + witness['offsets']['defined'] + assert num(defined_at, 2) == 8 and num(0x80000002, 1) == 0 + if args.performance_overlay: + rows_at = origin + witness['offsets']['rows'] + rows_before = peek(cmd, rows_at, 64) + assert int.from_bytes(rows_before[12:16], 'big') == 6 + tap(ARR); tap(0); tap(NO) # Yield stock controls at home. + heads = callbacks()[:3] + cmd('watch ' + ','.join(hex(pc) for pc in heads)) + cmd('hits') + if args.project_change: + # Mirror loadProjectLive: post the work to the stock engine. + syms['post_project_load'] = 0x40023c7c + name = 0x100f8378 + cmd(f'poke {name:#x} ' + b'GATE4\0'.hex()) + call('post_project_load', name) + else: + # Stock PROJECT menu, first category, third action (RELOAD). + for key in [0x1c, 0x34, *([0x33]*4), 0x21, *([0x33]*8), 0x20, 0x20, YES]: + tap(key) + advance(150) + advance(600) + assert num(0x460e5cd0), 'stock reload confirmation did not open' + tap(YES) + seen = set() + for _ in range(160): + advance(100) + seen.update(int(hit.split(':')[1], 16) for hit in cmd('hits').split()[2:]) + if args.performance_overlay and args.project_reload == 'stored': + # B's display identity can change before the masked reader returns. + for _ in range(120): + if heads[2] in seen: break + advance(1000) + seen.update(int(hit.split(':')[1], 16) for hit in cmd('hits').split()[2:]) + assert heads[2] in seen, 'stock masked reader did not return' + heads = callbacks() + receipt = dict(bank=num(0x80000002, 1), defined=num(defined_at, 2), + active=call('modwerk_runtime_active'), + observed=[pc in seen for pc in heads[:3]]) + if args.performance_overlay: + assert rows_before == peek(cmd, rows_at, 64) + receipt['rows_sha256'] = hashlib.sha256(rows_before).hexdigest() + receipt['uncertain'] = num(origin + witness['offsets']['bank_uncertain']) + assert receipt['uncertain'] == int(args.project_reload != 'missing') + args.output.write_text(json.dumps(receipt)) + assert receipt['active'] == 1 and heads[0] == origin + witness['offsets']['clyps_project_init'] + if args.project_reload == 'missing': + assert receipt['bank'] == 0 and receipt['defined'] == 8, receipt + else: + assert receipt['bank'] == 1 and receipt['defined'] == (8 if args.performance_overlay else 0), receipt + if args.performance_overlay: + tap(ARR) + assert num(origin + witness['offsets']['mode']) == 0 + assert num(origin + witness['offsets']['playing']) == 0 + switch(0, polls=2000) # Let the stock card task finish first. + assert call('modwerk_runtime_free',0) == free + receipt['off_pool'] = free + args.output.write_text(json.dumps(receipt)) + sys.exit(0) + if args.row_popup: + switch(1) + tap(ARR) + if args.performance_overlay: + move_focus(3) + tap(0x1b) + tap(YES) # Capture R04. + tap(0x1b) + tap(0x20) # Cell Source, same focused slot. + else: + tap(ARR) + tap(YES) + tap(3) # Save home references as R04. + tap(0x1b) + tap(YES) + tap(1) # Stage A02. + # Open the stock timed message with the current project name. + syms['stock_toast'] = 0x4005a2b8 + call('stock_toast', 0x100f8378, 0x60) + advance(40) + assert num(0x460d1e70), 'stock message failed to open' + assert not num(syms['modwerk_runtime_api']) & (1 << 27) + for _ in range(100): + advance(50) + if not num(0x460d1e70): + break + assert not num(0x460d1e70), 'stock message still open' + tap(ARR) + assert num(syms['modwerk_runtime_api']) & (1 << 27), 'ARR did not reopen' + if args.performance_overlay: + tap(ARR) # Clip view after re-entry. + tap(1) # Set T1=A02, then recall R04 to prove A01 survived. + assert num(syms['modwerk_runtime_api']) & 0xfff == 1 + tap(ARR) + tap(3) + assert num(syms['modwerk_runtime_api']) & 0xffffff == 0 + switch(0) + assert call('modwerk_runtime_free',0) == free + args.output.write_text(json.dumps(dict(reopened=True, r04=0, pool=free))) + sys.exit(0) + if args.scene_select or args.crossfader: + # Part 1's two active scene bytes are adjacent. Exercise both physical + # selectors, including rollback, with and without the module. + part = 0x400e21e0 + 0x8ed80 + def scenes(): + return list(peek(cmd, part+0x10, 2)) + def choose(key, slot): + cmd(f'key 35 {1 << (key % 8)}') + advance(100) + tap(slot) + cmd('key 35 0') + advance(100) + return scenes() + receipt = {} + for role in ('stock','installed'): + if role == 'installed': + switch(1) + before = scenes() + a, b = (before[0]+5)%16, (before[1]+7)%16 + sequence = [before,choose(0x19,a),choose(0x1a,b), + choose(0x19,before[0]),choose(0x1a,before[1])] + if args.crossfader: + fader = [] + for adc in (1, 128, 255, 1): + cmd(f'key 0x40 {adc}') + advance(120) + fader.append([num(0x460d16c8), peek(cmd, 0x80003c60, 40).hex()]) + receipt[role + '_fader'] = fader + assert [item[0] for item in fader] == [0, 64, 127, 0], fader + assert len({item[1] for item in fader}) == 3 and fader[0] == fader[-1] + receipt[role] = sequence + args.output.write_text(json.dumps(receipt)) + assert sequence == [before,[a,before[1]],[a,b],[before[0],b],before], sequence + switch(0) + assert receipt['stock'] == receipt['installed'] + if args.crossfader: + assert receipt['stock_fader'] == receipt['installed_fader'] + sys.exit(0) + if args.boundary: + # Apply identical source edits to the stock A03 composite and A02. + for pattern in (1, 2): + t1 = 0x400e21e0 + pattern * 0x8ed8 + t3 = t1 + 2 * 0x91a + micro = num(t1 + 0x89a, 2) + assert micro & 0x1f80 == 0 + cmd(f'poke {t1 + 0x89a:#x} {micro | ((-8 & 63) << 7):04x}') + mask = num(t3 + 0x40, 8) + cmd(f'poke {t3 + 0x40:#x} {mask | 1:016x}') + cmd(f'poke {t3 + 0x52:#x} 10') + if args.boundary or args.arranger_recovery: + # Add the second A01 row using stock EDIT in RAM before either trial. + assert num(0x10000016,2) == 1 + tap(ARR) + tap(YES) + cmd('key 37 32') + advance(50) + tap(0x20) + cmd('key 37 0') + advance(50) + tap(NO) + tap(NO) + assert num(0x10000016,2) == 2 + arr_before = arr_run() + print('stock Arranger before',len(arr_before['events']),'calls',flush=True) + if args.arranger_recovery: + initial = callbacks(), bank_parts(), block(0x400e21e0, 16 * 0x8ed8) + switch(1) + tap(ARR) + if args.performance_overlay: + tap(ARR) + tap(1) + assert num(syms['modwerk_runtime_api']) & 0xf == 1 + switch(0) + after = arr_run() + def signature(row): + writes = [(pc, addr, width, val) for _, pc, addr, val, width in row['writes'] + if any(base <= addr < base + 96 for base in (0x80001904, 0x80001984))] + assert len(writes) == len(row['events']) == 336 + return [row['events'], row['wraps'], row['row'], + [[pc, addr, width, (val-writes[0][3]) & 0xffffffff] for pc, addr, width, val in writes]] + control = signature(arr_before) + assert signature(after) == control + assert initial == (callbacks(), bank_parts(), block(0x400e21e0, 16 * 0x8ed8)) + assert call('modwerk_runtime_free',0) == free and num(syms['core:owners']) == 0 + assert 'errors=0' in cmd('card flush') and project(args.card) == project(scratch) + args.output.write_text(json.dumps(dict(events=336,writes=336,row=after['row'],pool=free, + sha256=hashlib.sha256(json.dumps(control).encode()).hexdigest()))) + sys.exit(0) + if args.boundary: + if not args.reference: + switch(1) + witness = json.loads(args.symbols_module.read_text()) + assert hashlib.sha256(args.package.read_bytes()).hexdigest() == witness['sha256'] + origin = callbacks()[0] - witness['offsets']['clyps_project_init'] + def diag(): + return num(syms['modwerk_runtime_api']) + + def expect(active, queued): + assert diag() & 0xffffff == queued << 12 | active + expect(0,0) + tap(ARR) + for t in range(3): + if t: move_focus(1) + tap(1) + refs = (0x111 & ((1 << (4*(t+1)))-1)) + expect(refs,refs) + tap(ARR) + tap(YES) + tap(4) + tap(ARR) + move_focus(-2) + for t in range(3): + if t: move_focus(1) + tap(0) + expect(0,0) + tap(ARR) + sampling = True + # Read the running firmware's fixture. Patterns must be distinguishable, + # and A03 must resolve each track to the independent mixed stock oracle. + masks = [[num(0x400e21e0 + pat*0x8ed8 + t*0x91a,8) for t in range(3)] for pat in range(3)] + assert masks == [[0x1008,0x2041,0x8204],[0x4081,0x1109,0x4811],[0x4081,0x2041,0x4811]] + start_trace() + tap(PLAY) + # Start the panel press on the last tick before wrap or first after. + first = 89 if args.boundary == 'early' else 91 + commit = 90 if first == 89 else 186 + panel_requests = [] + def request(code, pattern, committed, pending, at): + until(at) + assert tick == at + if args.reference: + cmd(f'poke 0x800065c0 {pattern:02x}') + else: + cmd(f'key {32 + code//8} {1 << (code%8)}') + observations = [] + for elapsed in range(1,21): + advance(1) + observations.append(dict(ms=elapsed, tick=tick, + playing=num(origin+witness['offsets']['playing']), + requested=num(origin+witness['offsets']['requested']), + diag=diag() & 0xffffff, wraps=wraps[:])) + args.output.with_suffix('.phase-'+str(at)+'.json').write_text(json.dumps(observations)) + if diag() & 0xffffff == pending << 12 | committed: + break + expect(committed, pending) + # The published diagnostic is refreshed by module_tick. + # Record the observed refresh separately from the panel edge. + panel_requests.append(dict(edge=at, observed=tick, playing=committed, pending=pending)) + advance(35) + if not args.reference: + cmd(f'key {32 + code//8} 0') + advance(35) + request(4, 1, 0, 0x111, first) + if not args.reference: + tap(ARR) + move_focus(-1) + # The UI diagnostic is refreshed by module_tick after dispatch. + until(commit + 1) + if not args.reference: + expect(0x111, 0x111) + request(0, 2, 0x111, 0x101, first + 96) + until(commit + 96 + 16) + if not args.reference: + expect(0x101, 0x101) + args.output.write_text(json.dumps(dict(events=events, wraps=wraps, writes=writes, states=states, + panel_requests=panel_requests))) + # Keep the strict historical diagnostic check after recording the + # musical trace so a display-cadence change remains diagnosable. + for request in panel_requests: + edge = request['edge'] + refresh = 188 if args.boundary == 'late' and edge == 187 else edge + assert request['observed'] == refresh, ('diagnostic refresh',edge,request) + sys.exit(0) + if args.home_control: + # Same home pattern in both runs. Reference leaves the shelf OFF. + if not args.reference: + switch(1) + sampling = True + start_trace() + tap(PLAY) + until(190 if args.home_control == 'stop' else 219) + tap(STOP) + assert not num(0x800065b8) + sampling = recording = False + assert events and all(event[-1] == 0 for event in events if event[1] in (AUDIO, MIDI)) + if not args.reference: + switch(0) + assert call('modwerk_runtime_free', 0) == free and num(syms['core:owners']) == 0 + origin = next(w[3] for w in writes if w[2] == 0x80001904) + for _, domains, _, _ in states: + for domain in domains: + for entry in domain: + entry[2] = (entry[2] - origin) & 0xffffffff + args.output.write_text(json.dumps(dict(events=events, states=states, wraps=wraps))) + sys.exit(0) + if not args.lane_matrix: + bank, stride, track_size = 0x400e21e0, 0x8ed8, 0x91a + assert not num(0x80000034,1) + sources = list(range(4,12)) + for lane, source in enumerate(sources): + addr = bank + lane*track_size + data = bytearray(peek(cmd,addr,1024) + peek(cmd,addr+1024,track_size-1024)) + home = bytes(data) + data[:8] = (1 | (1 << (lane+2))).to_bytes(8,'big') + if lane == 0: + micro = int.from_bytes(data[0x89a:0x89c],'big') + data[0x89a:0x89c] = (micro | (56 << 7)).to_bytes(2,'big') + if lane == 2: + data[0x47] |= 1 + data[0x52] = 16 + for pat, record in [(source,data),(1,data),(2,home if lane==7 else data)]: + for pos in range(0,track_size,128): + cmd(f'poke {addr + pat*stride + pos:#x} {record[pos:pos+128].hex()}') + cmd(f'poke {bank+pat*stride+0x8e50:#x} {peek(cmd,bank+0x8e50,8).hex()}') + initial = block(bank,16*stride), bank_parts(), project(args.card) + if args.performance_overlay and not args.reference: + switch(1) + tap(ARR) + tap(ARR) + for t, source in enumerate(sources): + tap(0x10+t) + tap(source) + tap(ARR) + move_focus(4) + tap(0x1b) + tap(YES) + tap(ARR) + for t in range(8): + tap(0x10+t) + tap(0) + tap(ARR) + elif not args.reference: + switch(1) + tap(ARR) + for t, source in enumerate(sources): + if t: move_focus(1) + tap(source) + tap(ARR) + tap(YES) + tap(4) + tap(ARR) + move_focus(-7) + for t in range(8): + if t: move_focus(1) + tap(0) + tap(ARR) + sampling = True + start_trace() + tap(PLAY) + until(32) + if args.reference: + cmd('poke 0x800065c0 01') + elif args.performance_overlay: + tap(YES) + else: + tap(ARR) + tap(15) + tap(15) + tap(ARR) + tap(4) + until(124) + if args.reference: + cmd('poke 0x800065c0 02') + else: + tap(ARR) + tap(0) + until(219) + sampling = recording = False + assert wraps == [90,186] + for tick_no, pc, _, lane, *rest in events: + if pc in (AUDIO,MIDI): + expected = (tick_no >= 90) + (tick_no >= 186) if args.reference else ( + sources[lane] if tick_no >= 90 and pc == AUDIO and (lane != 7 or tick_no < 186) else 0) + assert rest[-1] == expected, (tick_no,lane,rest,expected) + tap(STOP) + if not args.reference: + switch(0) + assert call('modwerk_runtime_free',0)==free and num(syms['core:owners'])==0 + assert 'errors=0' in cmd('card flush') + assert initial==(block(bank,16*stride),bank_parts(),project(scratch)) + # Compare musical data after independently asserting each builder's source. + times = [(pc,addr,width,val) for _,pc,addr,val,width in writes + if any(a <= addr < a+96 for a in (0x80001904,0x80001984))] + if args.observe_queue: + args.output.with_suffix('.flags.json').write_text(json.dumps( + [w for w in writes if 0x46c7fe44 <= w[2] < 0x46c7fe4c])) + origin = times[0][-1] + stream = [[pc,addr,width,(val-origin)&0xffffffff] for pc,addr,width,val in times] + for _,domains,_,_ in states: + for domain in domains: + for entry in domain: + entry[2] = (entry[2]-origin)&0xffffffff + args.output.write_text(json.dumps(dict(events=[e[:5] for e in events], writes=stream, states=states))) + sys.exit(0) + if args.lane_matrix: + # Define the fixture before taking integrity hashes. + bank, stride = 0x400e21e0, 0x8ed8 + assert not num(0x80000034,1) + trailer = peek(cmd, bank+0x8e50, 8).hex() + for pattern in range(16): + addr = bank + stride*pattern + cmd(f'poke {addr+0x8e50:#x} {trailer}') + for lane in range(8): + mask = 1 | ((1 + 8*pattern + lane) << 1) + cmd(f'poke {addr+lane*0x91a:#x} {mask:016x}') + original = block(bank, stride*16), bank_parts(), project(args.card) + def sample(sources): + start_trace() + tap(PLAY) + until(30) + for kind, expected in [(AUDIO,sources), (MIDI,[0]*8)]: + observed = {(e[3],e[5]) for e in events if len(e)==6 and e[1]==kind} + assert observed == set(enumerate(expected)), (kind,observed,expected) + recording_stop() + tap(STOP) + def recording_stop(): + global recording + recording = False + before = callbacks() + switch(1) + tap(ARR) + rows = [[(r+t)%16 for t in range(8)] for r in range(16)] + for slot, sources in enumerate(rows): + move_focus(-7) + for lane, pat in enumerate(sources): + if lane: move_focus(1) + tap(pat) + tap(ARR) + tap(YES) + tap(slot) + tap(ARR) + tap(ARR) + for slot in reversed(range(16)): + tap(slot) + sample(rows[slot]) + cmd('poke 0x80000034 01') + advance(100) + tap(15) + sample([0]*8) + cmd('poke 0x80000034 00') + switch(0) + assert callbacks()==before and call('modwerk_runtime_free',0)==free + assert num(syms['core:owners'])==0 + assert 'errors=0' in cmd('card flush') + assert original==(block(bank,stride*16),bank_parts(),project(scratch)) + args.output.write_text(json.dumps(dict(rows=rows,pool=free,owners=0))) + sys.exit(0) diff --git a/sdk/octatrack/modules/clyps/tests/native_slice.py b/sdk/octatrack/modules/clyps/tests/native_slice.py new file mode 100644 index 0000000000..214c485278 --- /dev/null +++ b/sdk/octatrack/modules/clyps/tests/native_slice.py @@ -0,0 +1,227 @@ +"""Replay a T2 SRC request or its independent stock composite on a synthetic MKII card.""" +import argparse +import hashlib +import json +from pathlib import Path +import shutil +import tempfile + +from mkii_panel import panel, peek + +parser = argparse.ArgumentParser(description=__doc__) +for name in ('emulator', 'main', 'symbols', 'synthetic_card', 'output'): + parser.add_argument(name, type=Path) +parser.add_argument('--stock', action='store_true') +parser.add_argument('--midi-wire', type=Path, help='Record UART0 transmit writes on a two-channel fixture') +parser.add_argument('--stock-midi-home', action='store_true', + help='Keep stock global A01 throughout as a MIDI-only control') +args = parser.parse_args() +if args.stock_midi_home and not (args.stock and args.midi_wire): + parser.error('--stock-midi-home requires --stock and --midi-wire') +if not __debug__: + parser.error('Assertions are required') +symbols = json.loads(args.symbols.read_text()) +TICK, WRAP, AUDIO, MIDI = 0x400a3fdc, 0x400a43a0, 0x4009d1e8, 0x4009cf4c +bank, stride, lane_bytes = 0x400e21e0, 0x8ed8, 0x91a +module = 0x34e1e379 +with tempfile.TemporaryDirectory() as tmp: + card = Path(tmp) / 'disposable.img' + shutil.copyfile(args.synthetic_card, card) + with panel(args.emulator, args.main, card, ['--card-rw', '--names-early', '--dsp']) as cmd: + def word(addr): + return int.from_bytes(peek(cmd, addr, 4), 'big') + + def call(name, *values): + for attempt in range(200): + try: + response = cmd('call ' + ' '.join(hex(v) for v in [symbols[name], *values])) + return int(response.split('d0=')[1].split()[0], 16) + except RuntimeError as error: + if "not main's spin" not in str(error): + raise + cmd('run 3') + raise RuntimeError('Main task busy') + + def switch(on): + assert call('modwerk_modset_switch', module, on) == 1 + for attempt in range(100): + cmd('run 15') + status = word(symbols['modwerk_modset_switch_result']) + if status != 1: + break + assert status == 0, (on, status) + cmd('run 1500' if not on else 'run 100') + + def tap(code): + for state in [1 << (code % 8), 0]: + cmd(f'key {32 + code // 8} {state}') + advance(35) + + events, writes, wraps = [], [], [] + wire = [] + tick = 0 + recording = False + + def advance(ms): + global tick + for start in range(0, ms, 5): + cmd(f'run {min(5, ms-start)}') + if not recording: + continue + for raw in cmd('hits').split()[2:]: + hit = [int(value, 16) for value in raw.split(':')] + pc = hit[1] + if pc == TICK: + tick += 1 + elif pc == WRAP: + wraps.append(tick) + elif pc in (AUDIO, MIDI) and hit[7] in (0x400a2d82, 0x400a39ca): + events.append([tick, pc, hit[8], hit[11], hit[10]]) + for raw in cmd('writes').split()[2:]: + sample, pc, addr, value, width, _ = raw.split(':') + if args.midi_wire and int(addr, 16) == 0xfc06000c: + wire.append([float(sample), int(value, 16)]) + writes.append([int(pc,16), int(addr,16), int(width), int(value,16)]) + + def until(target): + for attempt in range(1500): + if tick >= target: + return + advance(5) + raise RuntimeError(('clock stalled', tick)) + + def state(): + return word(symbols['modwerk_runtime_api']) & 0xffffff + + def storage(): + result = hashlib.sha256() + for base, size in [(bank, 16*stride), (bank+0x8ed80, 4*0x18b2), (bank+0x9504a, 4*0x18b2)]: + for pos in range(0, size, 1024): + result.update(peek(cmd, base+pos, min(1024, size-pos))) + return result.hexdigest() + + def row_heads(): + return [word(word(symbols['modwerk_runtime_event_row'] + 4*(slot-4))) for slot in (42,40,41,63,64,65)] + + # Read the last stock LCD composer plane independently of module state. + def lettering(x, band, groups): + frame = peek(cmd, word(0x400b970c), 1024) + return all(((frame[(x + 4*i + j)*8 + 7-band] >> 1) & 31) == column + for i, glyph in enumerate(groups) for j, column in enumerate(glyph)) + + play = [(31,5,2),(31,16,16),(30,5,30),(3,28,3)] + queued = [(14,25,30),(15,16,15),(31,21,17),(15,16,15),(31,21,17),(31,17,14)] + zero, one, two = (31,17,31), (18,31,16), (29,21,23) + assert call('modwerk_runtime_active') == 0 + initial_heads = row_heads() + pool = call('modwerk_runtime_free', 0) + for ms, key in [(3000,0x32),(3000,0x32),(500,0x31)]: + cmd(f'run {ms}') + tap(key) + cmd('run 2000') + tap(0x11) + tap(0x22) + if args.midi_wire: + # OS 1.40C STEP_LOCKS and MIDI_TRACKS layouts (Octabam). + for lane, mask, note in ((0, 0x1111, 48), (1, 0x0404, 67)): + record = bank + 0x48d0 + lane * 0x8b0 + cmd(f'poke {record:#x} {mask:016x}') + for step in range(16): + if mask & (1 << step): + cmd(f'poke {record+0x30+32*step:#x} {note:02x}') + if lane == 1: + cmd(f'poke {record+0x30+32*step+21:#x} {32+step:02x}') + for part in range(4): + setup = bank + 0x8f262 + part * 0x18b2 + lane * 0x24 + cmd(f'poke {setup:#x} {lane + 1:02x}') + if lane == 1: + cmd(f'poke {setup+0x15:#x} 01') + enables = bank + 0x8f162 + part * 0x18b2 + lane * 32 + 30 + cmd(f'poke {enables:#x} 3c') + cmd('poke 0x8000000c 00000000') + cmd('poke 0x46c78d6a 0000') + cmd('watchmem 0xfc06000c 1') + # Compose stock A02 from A01, changing only T2's trigger mask. + # Both runs get identical synthetic pattern bytes before PLAY. + for pos in range(0, stride, 128): + data = peek(cmd, bank+pos, min(128, stride-pos)) + cmd(f'poke {bank+stride+pos:#x} {data.hex()}') + home_mask = peek(cmd, bank+lane_bytes, 8) + assert home_mask != bytes.fromhex('0000000000001109') + cmd(f'poke {bank+stride+lane_bytes:#x} 0000000000001109') + initial_storage = storage() + if not args.stock: + switch(1) + assert all(row_heads()) + tap(0x1f) + tap(0x22) + cmd('knob 0x36 1') + cmd('run 65') + cmd('watch ' + ','.join(hex(address) for address in (TICK, WRAP, AUDIO, MIDI))) + cmd('watchmem 0x80001904 256') + cmd('hits') + cmd('writes') + recording = True + tap(0x28) + until(30) + if args.stock: + if not args.stock_midi_home: + cmd('poke 0x800065c0 01') + else: + tap(0x31) + assert state() == 0x010000, hex(state()) + assert lettering(70, 3, queued) and lettering(32, 2, play), 'SRC queue display' + until(142) + recording = bool(args.midi_wire) + assert len(wraps) == 1 and 30 < wraps[0] < 142, wraps + for clock, pc, lane, step, source in events: + expected = int(not args.stock_midi_home and clock >= wraps[0] and (args.stock or (pc == AUDIO and lane == 1))) + assert source == expected, (clock, pc, lane, source, expected) + for phase in (False, True): + assert {e[2] for e in events if e[1] == AUDIO and (e[0] >= wraps[0]) == phase} == set(range(8)) + if not args.stock: + assert state() == 0x010010, hex(state()) + assert lettering(32, 3, play), 'SRC playing display' + cmd('knob 0x36 -1') + if args.midi_wire: + advance(65) + else: + cmd('run 65') + tap(0x31) + assert state() == 0x10, hex(state()) + if args.midi_wire: + until(158) # Both UART witnesses stop at the same stock tick. + tap(0x27) + if args.midi_wire: + advance(250) + recording = False + args.midi_wire.write_text(json.dumps(wire)) + if not args.stock: + assert state() == 0x010010, hex(state()) + tap(0x1f) + assert all(lettering(12+15*t, 6, (zero, two if t == 1 else one)) for t in range(8)), 'ARR sources' + switch(0) + assert initial_heads == row_heads() + assert initial_storage == storage() + assert call('modwerk_runtime_active') == 0 + result = dict(wraps=wraps, events=[e[:4] for e in events], writes=[], initial_pool=pool, + final_pool=call('modwerk_runtime_free', 0)) + times = [w for w in writes if any(a <= w[1] < a+96 for a in (0x80001904,0x80001984))] + assert times + for pc, addr, width, value in times: + result['writes'].append([pc, addr, width, (value-times[0][3]) & 0xffffffff]) + args.output.write_text(json.dumps(result)) + assert result['final_pool'] == pool, result['final_pool'] + + if args.midi_wire: + # One further transport on the unloaded base, after the slice checks. + cmd('hits') + cmd('writes') + tick = 0 + wire.clear() + recording = True + tap(0x28) + until(158) + tap(0x27) + advance(250) + args.midi_wire.with_suffix('.off.json').write_text(json.dumps(wire)) diff --git a/sdk/octatrack/modules/clyps/tests/performance_host.c b/sdk/octatrack/modules/clyps/tests/performance_host.c new file mode 100644 index 0000000000..67e2508fef --- /dev/null +++ b/sdk/octatrack/modules/clyps/tests/performance_host.c @@ -0,0 +1,322 @@ +/* SPDX-License-Identifier: GPL-3.0-or-later */ +#include +#include +#include +#define CLYPS_HOST_TEST +#define CLYPS_PERFORMANCE +#include "../live_module.c" +static unsigned char content[16][8]; /* nonzero: that track of that pattern has a trig */ +static unsigned running, popup, midi, record, live_record, bank, pattern_chain, bad_grid, held_key = 64, held_key2 = 64, stock_track; + +static uint32_t host_long(uintptr_t addr) +{ + if (addr == 0x800065b8u) return running; + if (addr == 0x460d1e70u) return popup; + if (addr == 0x460d172au) return live_record; + if (addr == 0x80006546u) return pattern_chain; + if (addr == 0x460d1736u) return record; + return 0; +} +static unsigned grid_reads; +static uint8_t host_byte(uintptr_t addr) +{ + if (addr == 0x80000034u) return bank; + if (addr == 0x80000015u) return midi; + if (addr == 0x100b14ccu) return (uint8_t)stock_track; + if (addr >= 0x46100b18u && addr < 0x46100b20u) { + unsigned row = addr - 0x46100b18u, bits = 0; + if (held_key < 64 && row == held_key/8) bits |= 1u << (held_key%8); + if (held_key2 < 64 && row == held_key2/8) bits |= 1u << (held_key2%8); + return (uint8_t)bits; + } + if (addr >= BANK_BASE && addr < BANK_BASE+16*PATTERN_BYTES) { + ++grid_reads; + unsigned offset = (addr-BANK_BASE)%PATTERN_BYTES; + if (offset == 0x8e51 || offset == 0x8e53) + return bad_grid && addr >= BANK_BASE+PATTERN_BYTES ? 32 : 16; + if (offset == 0x8e52 || offset == 0x8e54) return 2; + if (offset < 8 * TRACK_BYTES && offset % TRACK_BYTES == 0x07) /* steps 1-8 of the trig mask */ + return content[(addr-BANK_BASE)/PATTERN_BYTES][offset / TRACK_BYTES]; + } + return 0; +} +static void tap(unsigned key) +{ + assert(module_key(key,1)); + assert(module_key(key,0)); +} +/* TRACK keys belong to the stock: it selects, CLYPS follows (D33). */ +static void select_track(unsigned t) +{ + assert(!module_key(0x10 + t,1)); + stock_track = t; + assert(!module_key(0x10 + t,0)); +} +static unsigned org(const volatile uint32_t *o, unsigned lane) { return origin(o, lane); } +/* A fresh install: since the bank guard (Codex 06-B), project_init with rows defined suspends + * CLYPS for the instance, so a new scenario starts from cleared module memory. */ +static void host_fresh(void) +{ + bank_uncertain = 0; defined = 0; playing = requested = 0; pending_row = last_row = 0; + for (unsigned i = 0; i < 16; ++i) rows[i] = 0; + clyps_project_init(); + assert(!bank_uncertain); +} +/* Codex 06-B: stock returns the same callback after EOF and after a completed read. Rows, + * values and mask survive; the sources go back to the stock and CLYPS stays suspended. */ +static void bank_case(int active, int success, int init_first) +{ + tap(ARR); assert(view == CLIP); tap(6); tap(ARR); assert(view == ROW); + for (unsigned i = 0; i < 3; ++i) tap(DOWN); + tap(PAGE_KEY); tap(YES); tap(3); + assert(defined == 8 && rows[3] == 6 && playing == 6); + uint32_t snapshot[16]; + memcpy(snapshot, rows, sizeof rows); + running = active; + if (active) { tap(3); assert(pending_row == 4); } + clyps_bank_load(2, 0); /* an unrelated bank changes nothing */ + clyps_bank_loaded(); + assert(defined == 8 && playing == 6 && pending_row == (active ? 4u : 0u)); + if (init_first) clyps_project_init(); + clyps_bank_load(1, 0); + unsigned before = grid_reads; + int source = 0; + clyps_audio_source(&source, 0, 0); + clyps_wrap(); + (void)success; /* the module cannot tell EOF from success */ + clyps_bank_loaded(); + bank = 1; clyps_project_init(); bank = 0; + clyps_bank_loaded(); /* an extra notification cannot certify A */ + clyps_audio_source(&source, 0, 0); + clyps_wrap(); + for (unsigned n = 0; n < 20; ++n) module_tick(&(struct modwerk_runtime_api){0}); + assert(!supported() && !module_key(ARR, 1)); + assert(grid_reads == before && source == 0); /* occupancy never reads a suspended bank */ + assert(!playing && !requested && !pending_row && !last_row); + assert(!org_play[0] && !org_play[1] && !org_req[0] && !org_req[1]); + assert(defined == 8 && !memcmp(snapshot, rows, sizeof rows)); +} +static void alpha2_session(void) +{ + midi=1; + assert(!module_key(ARR,1)); + midi=0; record=1; + assert(!module_key(ARR,1)); + record=0; live_record=1; + assert(!module_key(ARR,1)); live_record=0; + pattern_chain=1; + assert(!module_key(ARR,1)); pattern_chain=0; + bank=1; + assert(!module_key(ARR,1)); bank=0; + held_key=0x2d; + assert(!module_key(ARR,1)); + held_key=64; + tap(ARR); assert(view == CLIP); /* Clip View first (D39.02) */ + tap(ARR); assert(view == ROW); tap(YES); + assert(end_of_path && !pending_row && !last_row); + tap(DOWN); tap(PAGE_KEY); tap(YES); + tap(ARR); select_track(1); tap(2); + tap(ARR); tap(DOWN); tap(DOWN); tap(DOWN); tap(PAGE_KEY); tap(YES); + assert(defined==18 && slot==4 && playing==0x20); + running=1; + assert(module_key(YES,1) && module_key(YES,1)); + assert(pending_row==2 && last_row==0 && slot==4); + assert(module_key(YES,0)); + tap(YES); + assert(pending_row==2 && playing==0x20); + clyps_wrap(); + assert(last_row==2 && !pending_row && !playing); + tap(YES); + assert(pending_row==5 && !module_key(STOP,1)); + clyps_wrap(); + assert(last_row==2 && !playing && !pending_row); + tap(4); tap(0); /* Undefined row cannot erase the confirmed pending launch. */ + assert(pending_row==5 && last_row==2); + clyps_wrap(); + tap(ARR); select_track(1); tap(3); clyps_wrap(); + assert(playing==0x30 && last_row==5); + tap(ARR); tap(YES); assert(end_of_path && !pending_row); + tap(PAGE_KEY); tap(DOWN); tap(9); tap(YES); + assert(rows[4]==0x90 && playing==0x30); + bad_grid=1; tap(4); assert(refused && !pending_row); bad_grid=0; + popup=1; /* a stock popup suspends, never closes, CLYPS */ + assert(!module_key(YES,1)); assert(!module_enc(LEVEL_KNOB,1)); popup=0; assert(!module_key(YES,1)); assert(!module_key(YES,0)); + assert(mode && view == ROW && visible && playing == 0x30 && last_row == 5); + tap(NO); assert(view == NATIVE && locked); + running=0; tap(YES); + assert(!locked && !playing && !last_row); + tap(ARR); tap(YES); + assert(last_row==2); + assert(module_key(DOWN,1)); popup=1; + assert(module_key(DOWN,0)); /* Release stays with the initial owner. */ + popup=0; + tap(ARR); + clyps_bank_load(1,0); + assert(!module_key(ARR,1) && !mode); + clyps_bank_loaded(); + clyps_project_init(); /* Codex 06-B: rows kept, CLYPS suspended */ + assert(!mode && defined == 18 && !last_row && !playing && !supported()); + host_fresh(); + + /* D33 · A1: the stock tab and CLYPS name the same track in every view. */ + stock_track = 2; + tap(ARR); assert(view == CLIP && track == 2); + tap(ARR); assert(view == ROW && track == 2); + tap(RIGHT); tap(LEFT); assert(track == 2); /* no silent split from the stock tab */ + select_track(5); assert(module_key(DOWN,1) && module_key(DOWN,0)); assert(track == 5); + tap(ARR); assert(view == CLIP && track == 5); + select_track(0); tap(UP); assert(track == 0); + + /* A2: the crossfader and Scene gestures reach the stock while CLYPS is on screen. */ + assert(!module_key(64,1) && !module_key(64,0)); + assert(!module_key(SCENE_A,1)); + held_key = SCENE_A; assert(!module_key(3,1)); assert(!module_key(3,0)); held_key = 64; + assert(!module_key(SCENE_A,0)); + assert(view == CLIP && !playing && !requested); + + /* C1/C2: Panorama TRACK + TRIG launches one cell; the path and the other lanes stay. */ + host_fresh(); stock_track = 0; + tap(ARR); tap(ARR); tap(PAGE_KEY); tap(YES); /* R01 = home */ + tap(DOWN); tap(DOWN); tap(PAGE_KEY); tap(YES); + tap(PAGE_KEY); tap(DOWN); tap(7); tap(YES); /* R03: T1 = A08 */ + select_track(2); tap(DOWN); tap(PAGE_KEY); tap(YES); + tap(PAGE_KEY); tap(DOWN); tap(5); tap(YES); /* R04: T3 = A06 */ + assert(defined == 0xd && rows[2] == 0x7 && rows[3] == 0x500); + tap(0); /* stopped Row launch R01 */ + assert(last_row == 1 && org(org_play,0) == 1 && org(org_play,7) == 1); + running = 1; + held_key = 0x12; assert(!module_key(0x12,1)); /* hold T3 (stock selects it) */ + stock_track = 2; + held_key2 = 3; assert(module_key(3,1)); assert(module_key(3,0)); held_key2 = 64; + assert(!module_key(0x12,0)); held_key = 64; + assert(requested == 0x500 && playing == 0 && !pending_row && last_row == 1); + assert(org(org_req,2) == 4 && org(org_play,2) == 1 && org(org_req,0) == 1); + assert(rows[3] == 0x500 && rows[0] == 0); /* stored Rows unchanged */ + assert(!module_key(STOP,1) && !module_key(STOP,0)); /* STOP cancels source and origin */ + assert(requested == 0 && org(org_req,2) == 1); + held_key = 0x12; held_key2 = 3; assert(module_key(3,1)); assert(module_key(3,0)); held_key = held_key2 = 64; + clyps_wrap(); + assert(playing == 0x500 && org(org_play,2) == 4 && org(org_play,0) == 1 && last_row == 1); + held_key = 0x10; held_key2 = 2; assert(module_key(2,1)); assert(module_key(2,0)); held_key = held_key2 = 64; + clyps_wrap(); /* T1 from R03: A08 */ + assert(playing == 0x507 && org(org_play,0) == 3 && last_row == 1); + tap(YES); assert(pending_row == 3); clyps_wrap(); /* Row Advance stays independent */ + assert(last_row == 3 && playing == 0x7 && org(org_play,2) == 3); + held_key = 0x11; held_key2 = 9; assert(module_key(9,1)); held_key = held_key2 = 64; + assert(missing && requested == 0x7); /* undefined Row: nothing launches */ + assert(module_key(9,0)); + tap(2); clyps_wrap(); /* duplicate: R03 again keeps R03 origin */ + assert(org(org_play,0) == 3); + + /* B1: Selective Edit Lock. Sound is free, sequence edits are held. */ + tap(NO); assert(view == NATIVE && locked); + assert(!module_key(0x23,1) && !module_key(0x23,0)); /* AMP page */ + assert(!module_key(0x14,1)); stock_track = 4; assert(!module_key(0x14,0)); + assert(!module_enc(0, 3) && !module_enc(LEVEL_KNOB, -2)); /* plain turns edit the Part */ + held_key = SCENE_B; assert(!module_enc(1, 1)); assert(!module_key(4,1)); assert(!module_key(4,0)); held_key = 64; + assert(module_key(5,1) && lock_note); assert(module_key(5,0)); /* trig edit held */ + held_key = 6; assert(module_enc(0, 1)); held_key = 64; /* p-lock held */ + assert(!module_key(0x2d,1)); /* FUNC is a modifier (D43.03) */ + held_key = 0x2d; assert(!module_enc(0, 1)); /* FUNC + knob: a fine Part edit */ + assert(!module_key(0x13,1) && !module_key(0x13,0)); /* FUNC + TRACK: stock mute */ + assert(module_key(5,1) && module_key(5,0)); held_key = 64; /* FUNC + TRIG stays held */ + assert(!module_key(0x2d,0)); + assert(module_key(0x2e,1) && module_key(0x2e,0)); /* PATTERN */ + assert(!module_key(0x24,1) && !lock_note); assert(!module_key(0x24,0)); + assert(!module_key(64,1)); + assert(playing == 0x7 && last_row == 3); + + /* B2: ARR returns to the remembered view; the Clip focus survives on the same track. */ + tap(ARR); assert(view == ROW && track == 4); + tap(ARR); assert(view == CLIP); + tap(DOWN); unsigned kept = src_cursor; + assert(!module_key(0x25,1) && !module_key(0x25,0) && view == NATIVE); + tap(ARR); assert(view == CLIP && src_cursor == kept); + tap(NO); select_track(0); tap(ARR); assert(view == CLIP && track == 0 && src_cursor == 7); + + /* C3: LEVEL navigates and never launches. */ + tap(ARR); assert(view == ROW); + unsigned before = requested; + assert(module_enc(LEVEL_KNOB, 3)); assert(slot == 6 && requested == before); + tap(PAGE_KEY); assert(module_enc(LEVEL_KNOB, 2) && operation == RESTORE_HOME); + tap(YES); assert(refused && playing == 0x7); /* Restore All refuses during play */ + running = 0; tap(YES); assert(!playing && !last_row && !org(org_play,0)); + + /* Sprint 06-A · WP-A1: FUNC, TEMPO and mutes never leave CLYPS. */ + host_fresh(); stock_track = 0; + tap(ARR); assert(view == CLIP); + assert(!module_key(0x2d,1) && !module_key(0x2d,0) && view == CLIP && mode); + held_key = 0x2d; assert(!module_key(0x11,1)); assert(!module_key(0x11,0)); held_key = 64; + assert(view == CLIP && mode && track == 0); + assert(!module_key(0x18,1)); /* TEMPO reaches the stock */ + popup = 1; assert(!module_key(0x18,0)); assert(!module_enc(LEVEL_KNOB, 4)); assert(!module_key(NO,1)); + assert(mode && view == CLIP && src_cursor == 0); /* suspended, not closed */ + assert(!module_key(NO,0)); popup = 0; + assert(module_enc(LEVEL_KNOB, 1) && src_cursor == 1); + + /* WP-A1 sidebar: a TRIG launch moves the focus with it, so plate, grid and bar agree. */ + running = 1; tap(2); assert(requested == 2 && src_cursor == 2 && !playing); + clyps_wrap(); assert(playing == 2); + assert(!module_key(STOP,1) && !module_key(STOP,0)); running = 0; + + /* WP-A3: FUNC + LEVEL moves the Panorama column only; the next stock track takes it back. */ + tap(ARR); assert(view == ROW && track == 0); + unsigned req = requested, s0 = slot; + held_key = 0x2d; assert(module_enc(LEVEL_KNOB, 3)); held_key = 64; + assert(track == 3 && stock_track == 0 && requested == req && slot == s0); + assert(module_enc(LEVEL_KNOB, 2) && slot == s0 + 2 && track == 3); + select_track(6); assert(track == 6); + tap(ARR); assert(view == CLIP && track == 6); /* Clip View always shows the stock track */ + select_track(0); tap(ARR); + + /* The TRACK key of the unchanged stock track also takes the column back (emulator, 27/11). */ + held_key = 0x2d; assert(module_enc(LEVEL_KNOB, 2)); held_key = 64; + assert(track == 2 && stock_track == 0); + select_track(0); assert(track == 0); + + /* SETUP survives a stock popup (Jannik 22/11): the draft and the view come back. */ + tap(PAGE_KEY); assert(view == SETUP); tap(DOWN); assert(operation == CELL); + popup = 1; assert(!module_key(YES,1)); assert(!module_key(YES,0)); popup = 0; + assert(view == SETUP && operation == CELL && visible); + tap(NO); assert(view == ROW); + + /* WP-A2: one occupancy model. Unscanned counts as available; then trigs decide. */ + host_fresh(); + assert(slot_state(0, 5) == SLOT_AVAILABLE); + content[0][0] = 1; content[1][2] = 0x80; content[4][7] = 4; + tap(ARR); /* entry scans every pattern */ + assert(slot_state(0, 0) == SLOT_AVAILABLE && slot_state(1, 0) == SLOT_EMPTY); + assert(slot_state(2, 1) == SLOT_AVAILABLE && slot_state(7, 4) == SLOT_AVAILABLE && slot_state(7, 3) == SLOT_EMPTY); + bad_grid = 1; occupancy_all(); assert(slot_state(2, 1) == SLOT_FOREIGN && slot_state(0, 0) == SLOT_AVAILABLE); bad_grid = 0; + content[1][2] = 0; for (unsigned n = 0; n < 16; ++n) module_tick(&(struct modwerk_runtime_api){0}); + assert(slot_state(2, 1) == SLOT_EMPTY); /* an edit shows within one rolling pass */ + tap(5); assert(requested == 5 || playing == 5); /* an empty slot is still launchable as before */ + + /* Sprint 06-C: Capture stores the real reference of every lane, empty ones included, and a + * Row launch plays exactly those references. A dot is drawing only: no STOP, HOLD or skip. */ + host_fresh(); + for (unsigned p = 0; p < 16; ++p) for (unsigned t = 0; t < 8; ++t) content[p][t] = 0; + content[0][0] = content[2][0] = content[2][1] = 1; /* A01 T1, A03 T1-T2 hold trigs */ + tap(ARR); tap(2); select_track(1); tap(2); select_track(4); tap(2); select_track(0); + assert(playing == 0x20022); /* T1, T2, T5 on A03; T5 has no sequence */ + assert(slot_state(4, 2) == SLOT_EMPTY && slot_state(1, 2) == SLOT_AVAILABLE); + tap(ARR); tap(PAGE_KEY); tap(YES); /* Capture R01 */ + assert(defined == 1 && rows[0] == 0x20022); /* the empty lane keeps its index, A03 */ + tap(YES); assert(playing == 0x20022); /* stopped YES path relaunches R01 */ + tap(DOWN); tap(PAGE_KEY); tap(YES); + tap(0); /* direct Row launch, stopped */ + assert(playing == 0x20022 && last_row == 1); /* T5 plays A03 (silent), never held or stopped */ + running = 1; tap(1); clyps_wrap(); + assert(playing == 0x20022 && last_row == 2); /* running: the wrap commits every lane alike */ + running = 0; +} + +int main(int argc, char **argv) +{ + if (argc == 1 || !strcmp(argv[1], "fresh-session")) alpha2_session(); + else { + assert(argc == 4); + bank_case(!strcmp(argv[1], "play"), !strcmp(argv[2], "complete"), !strcmp(argv[3], "init-first")); + } + return 0; +} diff --git a/sdk/octatrack/modules/clyps/tests/performance_replay.py b/sdk/octatrack/modules/clyps/tests/performance_replay.py new file mode 100644 index 0000000000..8dba367ccd --- /dev/null +++ b/sdk/octatrack/modules/clyps/tests/performance_replay.py @@ -0,0 +1,394 @@ +"""Exercise the private performance overlay via MKII panel edges on a disposable card.""" +import argparse +import hashlib +import json +from pathlib import Path +import shutil +import sys +import tempfile + +from mkii_panel import panel, peek + +parser = argparse.ArgumentParser(description=__doc__) +for name in ('emulator', 'base_dir', 'card', 'module', 'module_symbols', 'octabam', 'output'): + parser.add_argument(name, type=Path) + +parser.add_argument('--stock-controls',action='store_true',help='Also compare native sound, Scenes and mode selection') +parser.add_argument('--sprint03',action='store_true',help='Also observe live stock data, pause, the selective edit lock, Cell Launch and view memory') +parser.add_argument('--alpha2',action='store_true',help='Sprint 06-A: Clip View first, occupancy, FUNC, TEMPO, FUNC+TRACK mutes, 2D focus, footer') +args = parser.parse_args() +if not __debug__: + parser.error('Assertions must be enabled') +sys.path.insert(0, str(args.octabam.resolve() / 'tools/emu')) +import lcd_view as lcd + +args.output.mkdir(parents=True, exist_ok=True) +symbols = json.loads((args.base_dir/'symbols.json').read_text()) +module = json.loads(args.module_symbols.read_text()) +assert hashlib.sha256(args.module.read_bytes()).hexdigest() == module['sha256'] +receipt = {'module': module['sha256'], 'observations': []} +with tempfile.TemporaryDirectory() as tmp: + card = Path(tmp)/'test.img' + frame_hashes = {} + shutil.copyfile(args.card, card) + with panel(args.emulator, args.base_dir/'MAIN.raw', card, + ['--card-rw','--dsp','--names-early']) as cmd: + def num(addr, size=4): + return int.from_bytes(peek(cmd,addr,size),'big') + + def call(name,*values): + for _ in range(200): + try: + result=cmd('call '+' '.join(hex(v) for v in (symbols[name],*values))) + return int(result.split('d0=')[1].split()[0],16) + except RuntimeError as error: + if "not main's spin" not in str(error): + raise + cmd('run 3') + raise RuntimeError(name+' did not reach idle') + + def switch(on): + assert call('modwerk_modset_switch',0x34e1e379,on)==1 + for _ in range(100): + cmd('run 15') + status=num(symbols['modwerk_modset_switch_result']) + if status!=1: break + assert status==0,status + cmd('run 1200') + + def tap(*keys): + for key in keys: + for val in (1 << (key%8),0): + cmd(f'key {32+key//8} {val}') + cmd('run 35') + + def check(event, **expected): + observed={k:num(origin+module['offsets'][k],2 if k=='defined' else 4) + for k in expected} + print(event,observed,flush=True) + assert observed==expected,(event,observed,expected) + receipt['observations'].append([event,observed]) + + def shot(name): + # The base copies the composed panel frame *after* module draw. + # The emulator --lcd plane contains the earlier stock renderer. + frame = peek(cmd,symbols['core:screen']+0x08000000+4,1024) + assert len(frame)==1024 and any(frame), 'missing composed frame' + digest=hashlib.sha256(frame).hexdigest() + assert digest not in frame_hashes.values(), (name,'unchanged frame') + frame_hashes[name]=digest + lcd.png(lcd.pixels(frame),args.output/(name+'.png')) + + def stock_controls(): + # Compare the same physical edges on the same disposable project. + def edge(key,pressed): + cmd(f'key {32+key//8} {(1 << (key%8)) if pressed else 0}') + cmd('run 60') + tap(0x10,0x23) # T1 and stock AMP. + part = 0x400e21e0 + 0x8ed80 + def part_digest(): + data = b''.join(peek(cmd,part+i,min(1024,0x18b2-i)) for i in range(0,0x18b2,1024)) + return hashlib.sha256(data).hexdigest() + start=part_digest() + cmd('knob 0x30 7'); cmd('run 120') + moved=part_digest() + cmd('knob 0x30 249'); cmd('run 120') + assert start != moved and part_digest()==start, 'expected reversible stock AMP knob' + scenes = peek(cmd,part+0x10,2) + edge(0x19,True); tap((scenes[0]+3)%16); edge(0x19,False) + chosen = peek(cmd,part+0x10,2) + assert chosen==bytes([(scenes[0]+3)%16,scenes[1]]) + edge(0x19,True); tap(scenes[0]); edge(0x19,False) + assert peek(cmd,part+0x10,2)==scenes + fader=[] + for adc in (1,128,255,1): + cmd(f'key 64 {adc}'); cmd('run 120') + fader.append(num(0x460d16c8)) + assert fader==[0,64,127,0] + initial=num(0x460d16f0) + edge(0x2d,True); tap(0x20,0x20); edge(0x2d,False) + cmd('run 1200') + after=num(0x460d16f0) + assert initial!=after,(initial,after) + edge(0x2d,True); tap(0x33,0x33); edge(0x2d,False) + cmd('run 1200') + assert num(0x460d16f0)==initial + return dict(amp=[start,moved],scene=[scenes.hex(),chosen.hex()],fader=fader,trig_mode=[initial,after,initial]) + + def edge(key,pressed,ms=60): + cmd(f'key {32+key//8} {(1 << (key%8)) if pressed else 0}') + cmd(f'run {ms}') + + def frame(): + return peek(cmd,symbols['core:screen']+0x08000000+4,1024) + + def region(f,x0,x1,band): + return bytes(f[x*8+7-band] for x in range(x0,x1+1)) + + def digest(addr,size): + return hashlib.sha256(b''.join(peek(cmd,addr+i,min(1024,size-i)) for i in range(0,size,1024))).hexdigest() + + def sprint03(): + obs={} + part=0x400e21e0+0x8ed80 + home=lambda: digest(0x400e21e0,0x8ed8) + tap(arr) + check('S03 ARR returns to the remembered Panorama',view=1,mode=1,locked=0) + # A2: the crossfader reaches the stock under CLYPS and the moved group stays live. + fader,groups=[],[] + for adc in (1,128,255,1): + cmd(f'key 64 {adc}'); cmd('run 160') + fader.append(num(0x460d16c8)); groups.append(region(frame(),75,127,7).hex()) + assert fader==[0,64,127,0],fader + assert groups[0]!=groups[1]!=groups[2] and groups[3]==groups[0],'crossfader group not live' + check('S03 crossfader under Panorama',view=1) + obs['crossfader']=fader + scenes=peek(cmd,part+0x10,2) + edge(0x19,True); tap((scenes[0]+3)%16); edge(0x19,False) + chosen=peek(cmd,part+0x10,2) + assert chosen==bytes([(scenes[0]+3)%16,scenes[1]]),(scenes,chosen) + check('S03 Scene A under Panorama, no launch',view=1,playing=0,requested=0) + shot('s03-scene') + edge(0x19,True); tap(scenes[0]); edge(0x19,False) + assert peek(cmd,part+0x10,2)==scenes + obs['scene']=[scenes.hex(),chosen.hex()] + # A2: beat markers move with play (Clip sidebar, y 15-17). + tap(arr) + check('S03 Clip',view=2) + tap(0x28); cmd('run 300'); a=frame(); cmd('run 520'); b=frame() + beats=[region(a,14,37,2).hex(),region(b,14,37,2).hex()] + assert num(0x800065b8)==1 and beats[0]!=beats[1],('beat markers static',beats) + obs['beats']=beats + shot('s03-clip-playing') + # A3: PAUSE holds every request; the next boundary after resume commits it. + tap(arr,0x28); cmd('run 200') + run_word=num(0x800065b8) + print('transport after PLAY during play',run_word,flush=True) + assert run_word==2,('expected pause',run_word) + tap(4); cmd('run 2500') + check('S03 pause keeps the pending Row',view=1,pending_row=5,playing=0,last_row=0) + shot('s03-pause') + tap(0x28); cmd('run 2600') + check('S03 resume commits at the next boundary',pending_row=0,last_row=5,playing=0x10) + # C1/C2: TRACK + TRIG launches one cell; the path stays on R05 (requests held in pause). + tap(0x28); cmd('run 200'); assert num(0x800065b8)==2 + edge(0x12,True); tap(1); edge(0x12,False) + check('S03 T3 + TRIG 2: cell from R02',requested=0x10,org_req=0x05020505,pending_row=0,last_row=5) + edge(0x11,True); tap(1); edge(0x11,False) + check('S03 T2 + TRIG 2: second cell pending',requested=0,playing=0x10,org_req=0x05020205,org_play=0x05050505,last_row=5) + shot('s03-cell-pending') + tap(0x28); cmd('run 2600') + check('S03 cells commit, path unchanged',playing=0,org_play=0x05020205,last_row=5,pending_row=0) + tap(yes) + check('S03 Row Advance ends after R05',last_row=5,pending_row=0) + # B1: the edit lock frees sound and holds the sequence. + edge(0x11,True); tap(4); edge(0x11,False); cmd('run 2600') + check('S03 T2 A02 from R05',playing=0x10) + tap(no) + check('S03 native with foreign sources',view=0,locked=1) + pattern=home(); before=digest(part,0x18b2) + edge(0x23,True); edge(0x23,False) + check('S03 AMP page passes',locked=1,lock_note=0) + cmd('knob 0x30 7'); cmd('run 160'); moved=digest(part,0x18b2) + cmd('knob 0x30 249'); cmd('run 160') + assert moved!=before and digest(part,0x18b2)==before,'AMP knob did not edit the Part' + tap(4) + check('S03 trig edit held under the lock',lock_note=1,playing=0x10) + shot('s03-lock-note') + edge(4,True); cmd('knob 0x30 7'); cmd('run 160'); edge(4,False) + tap(0x2d) + assert home()==pattern,'home pattern changed under the lock' + obs['lock']=dict(part=[before,moved],pattern=pattern) + # B2: ARR returns to the remembered view. + tap(arr,arr) + check('S03 Clip remembered',view=2) + edge(0x23,True); edge(0x23,False) + check('S03 AMP page from Clip',view=0,locked=1) + tap(arr) + check('S03 ARR back to Clip',view=2) + tap(0x27,no,yes) + check('S03 stop and restore home',playing=0,requested=0,last_row=0,mode=0) + return obs + + def alpha2(): + obs={} + regions=[(0x80000000,0x8000),(0x460d1000,0x1000)] + def snap(): + out={} + for b,n in regions: + data=b''.join(peek(cmd,b+i,min(256,n-i)) for i in range(0,n,256)) + assert len(data)==n,(hex(b),len(data)) + out[b]=data + return out + def diff(a,b): + return {base+i:(a[base][i],b[base][i]) for base in a for i in range(len(a[base])) if a[base][i]!=b[base][i]} + def mute(t): + edge(0x2d,True); tap(0x10+t); edge(0x2d,False); cmd('run 300') + # FUNC + TRACK reference with CLYPS off screen (mode 0, home, stopped). + check('A2 reference at home',mode=0,playing=0,requested=0) + s0=snap(); cmd('run 300'); s1=snap(); noise=set(diff(s0,s1)) + def at(sn,a): + base=next(b for b,n in regions if b<=aI', len(package)) + digest(package) + package +record += bytes(-len(record) % 4) +shelf = struct.pack('>4sIIII', b'MWOF', 1, 1, 52 + len(record), 1) + digest(record) + record +empty = struct.pack('>4sIIII', b'MWST', 2, 1, 0, 84) + identity + digest(b'') +with tempfile.TemporaryDirectory() as tmp: + tree = Path(tmp) + emu_card.extract_image(args.synthetic_card.read_bytes(), tree) + if not (tree / 'MODWERK/GATE3/project.work').is_file(): + parser.error('Expected the synthetic GATE3 project') + (tree / 'MODWERK0.SET').write_bytes(empty.ljust(512, b'\0') + shelf + bytes(-len(shelf) % 512)) + with args.output.open('xb') as target: + target.write(emu_card.build_image(tree)) diff --git a/sdk/octatrack/modules/clyps/tests/reference_clipboard.c b/sdk/octatrack/modules/clyps/tests/reference_clipboard.c new file mode 100644 index 0000000000..ea771f26ce --- /dev/null +++ b/sdk/octatrack/modules/clyps/tests/reference_clipboard.c @@ -0,0 +1,53 @@ +/* SPDX-License-Identifier: GPL-3.0-or-later */ +#include +#include +#include "../reference_clipboard.h" + +int main(void) +{ + struct clyps_clipboard clip = {0}; + uint32_t rows[16] = {0x08421630, [7] = 0x76543210}; + uint16_t defined = 0x81; + struct clyps_location row1 = {CLYPS_ROW, 0, 0, 0}; + struct clyps_location row5 = {CLYPS_ROW, 0, 4, 0}; + assert(!clyps_clip_paste(&clip, rows, &defined, row5, 1)); + assert(clyps_clip_copy(&clip, rows, defined, row1)); + assert(clyps_clip_paste(&clip, rows, &defined, row5, 0)); + assert(defined == 0x91 && rows[4] == 0x08421630); + struct clyps_location cell = {CLYPS_CELL, 0, 7, 2}; + assert(clyps_clip_copy(&clip, rows, defined, cell)); + cell.row = 4; + assert(clyps_clip_paste(&clip, rows, &defined, cell, 1)); + assert(rows[0] == 0x08421630 && rows[4] == 0x08421230); + + cell.row = 0; + assert(clyps_clip_copy(&clip, rows, defined, cell)); + cell.row = 7; + assert(clyps_clip_paste(&clip, rows, &defined, cell, 1)); + assert(rows[7] == 0x76543610 && rows[0] == 0x08421630); + + uint32_t before[16]; + memcpy(before, rows, sizeof rows); + assert(!clyps_clip_paste(&clip, rows, &defined, cell, 0)); + assert(!clyps_clip_paste(&clip, rows, &defined, row5, 1)); + struct clyps_location invalid[] = { + {CLYPS_CELL, 0, 3, 2}, {CLYPS_CELL, 0, 4, 1}, {CLYPS_CELL, 7, 4, 2}, + {CLYPS_CELL, 16, 4, 2}, {CLYPS_CELL, 0, 16, 2}, {CLYPS_CELL, 0, 4, 8} + }; + for (unsigned i = 0; i < sizeof invalid / sizeof invalid[0]; ++i) + assert(!clyps_clip_paste(&clip, rows, &defined, invalid[i], 1)); + clyps_clip_clear(&clip); + assert(!clyps_clip_paste(&clip, rows, &defined, cell, 1)); + assert(defined == 0x91 && !memcmp(rows, before, sizeof rows)); + + /* Source is a snapshot; a later edit must not change repeated pastes. */ + assert(clyps_clip_copy(&clip, rows, defined, row1)); + rows[0] = 0; + assert(!clyps_clip_paste(&clip, rows, &defined, row5, 0)); + assert(rows[4] == 0x08421230); + assert(clyps_clip_paste(&clip, rows, &defined, row5, 1)); + assert(rows[4] == 0x08421630 && rows[0] == 0); + row1.row = 15; + assert(!clyps_clip_copy(&clip, rows, defined, row1)); + assert(!clyps_clip_paste(&clip, rows, &defined, row5, 1)); +} diff --git a/sdk/octatrack/modules/clyps/tests/render_cost.c b/sdk/octatrack/modules/clyps/tests/render_cost.c new file mode 100644 index 0000000000..8f5cec1d74 --- /dev/null +++ b/sdk/octatrack/modules/clyps/tests/render_cost.c @@ -0,0 +1,54 @@ +/* SPDX-License-Identifier: GPL-3.0-or-later + * Host wall time per draw on a fully populated page. This is not a device meter. + * The opaque compiler barrier makes each complete 1024-byte frame observable. + */ +#include +#include +#define CLYPS_HOST_TEST +#include "../live_module.c" + +static uint8_t host_byte(uintptr_t a) +{ + if (a < BANK_BASE || a >= BANK_BASE+16*PATTERN_BYTES) return 0; + switch ((a-BANK_BASE)%PATTERN_BYTES) { + case 0x8e51: case 0x8e53: return 16; + case 0x8e52: case 0x8e54: return 2; + default: return 0; + } +} +static uint32_t host_long(uintptr_t a) { (void)a; return 0; } + +static uint64_t now(void) +{ + struct timespec ts; + clock_gettime(CLOCK_MONOTONIC,&ts); + return (uint64_t)ts.tv_sec*1000000000u+(unsigned)ts.tv_nsec; +} +int main(void) +{ + unsigned char frame[1024]; + defined=65535; + for (unsigned i=0; i<16; ++i) rows[i]=0x76543210u+i; + visible=row_view=1; +#ifdef CLYPS_PERFORMANCE + mode=1; + const enum panel_view views[]={ROW,CLIP,SETUP}; + const char *names[]={"row","clip","setup"}; +#else + const char *names[]={"legacy-row"}; +#endif + for (unsigned i=0; i +#include +#include "../meta_focus.h" + +static uint32_t playing, requested, rows[16]; +static unsigned track, slot, first_row, defined, last_row, pending_row, armed; +static unsigned editing, row_view, refused, missing, draft, zoom, src_cursor, RUNNING; +static unsigned critical(void) { return 0; } +static void restore(unsigned sr) { (void)sr; } +static int supported(void) { return 1; } +#include "../session_view.h" + +void render_fixture(unsigned char *frame, unsigned mode) +{ + track = mode == 0 ? 0 : 1; + src_cursor = 2; + RUNNING = mode != 0; + playing = mode == 1 ? 32 : 0; + requested = mode == 0 ? 0 : 32; + if (mode == 2) src_draw(frame); + else session_draw(frame); +} + +#ifndef CLYPS_COMPILE_ONLY +#include +#include +int main(void) +{ + for (unsigned key = 0; key < 64; ++key) + assert(clyps_meta_track_key(key) == (key >= 16 && key < 24)); + for (unsigned pos = 0; pos < 8; ++pos) { + assert(clyps_focus_step(pos, INT_MIN, 7) == 0); + assert(clyps_focus_step(pos, INT_MAX, 7) == 7); + assert(clyps_focus_step(pos, 0, 7) == pos); + } + for (unsigned mode = 0; mode < 3; ++mode) { + unsigned char frame[1024] = {0}; + render_fixture(frame, mode); + /* The panel transfers one band across all columns at a time. */ + for (unsigned band = 0; band < 8; ++band) + for (unsigned col = 0; col < 128; ++col) + if (putchar(frame[8*col + band]) == EOF) return 1; + } + return 0; +} +#endif diff --git a/sdk/octatrack/modules/clyps/tests/reproduce_alpha.py b/sdk/octatrack/modules/clyps/tests/reproduce_alpha.py new file mode 100644 index 0000000000..f2094685bb --- /dev/null +++ b/sdk/octatrack/modules/clyps/tests/reproduce_alpha.py @@ -0,0 +1,39 @@ +"""Run the late EOF on source exported from the immutable Hardware Alpha 1 commit.""" +from pathlib import Path +import subprocess +import tarfile +import tempfile + +root = Path(__file__).resolve().parents[4] +with tempfile.TemporaryDirectory() as tmp: + export = Path(tmp) / "alpha.tar" + with export.open("wb") as output: + subprocess.run(["git", "archive", "7f3432005785619af213957c03062cd9968d3b6a", + "sdk/drafts/clyps", "sdk/runtime/loader"], cwd=root, stdout=output, check=True) + with tarfile.open(export) as archive: + archive.extractall(tmp, filter="data") + sdk = Path(tmp) / "sdk" + tests = sdk / "drafts/clyps/tests" + probe = tests / "before.c" + fixture = (tests / "performance_host.c").read_text().split("int main(void)")[0] + probe.write_text(fixture + """ +#include +int main(void) +{ + tap(ARR); tap(ARR); tap(6); tap(ARR); + for (unsigned i = 0; i < 3; ++i) tap(DOWN); + tap(PAGE_KEY); tap(YES); tap(3); + assert(defined == 8 && rows[3] == 6 && playing == 6); + clyps_bank_load(2, 0); clyps_bank_loaded(); + assert(defined == 8 && rows[3] == 6); + FILE *file = tmpfile(); assert(file); + clyps_project_init(); clyps_bank_load(1, 0); + assert(fgetc(file) == EOF && feof(file)); clyps_bank_loaded(); + printf("after late EOF: mask=%u R04=%u playing=%u\\n", defined, rows[3], playing); + assert(defined == 0 && rows[3] == 6 && playing == 0); + return fclose(file); +} +""") + exe = Path(tmp) / "before" + subprocess.run(["cc", "-I", sdk / "runtime/loader", probe, "-o", exe], check=True) + subprocess.run([exe], check=True) diff --git a/sdk/octatrack/modules/clyps/tests/shared_state.c b/sdk/octatrack/modules/clyps/tests/shared_state.c new file mode 100644 index 0000000000..e4574aca25 --- /dev/null +++ b/sdk/octatrack/modules/clyps/tests/shared_state.c @@ -0,0 +1,299 @@ +/* Compile the actual UI and S1 handlers with synthetic OS reads. */ +#include +#include +#include +#define CLYPS_HOST_TEST +#include "../live_module.c" +static unsigned selected, run, popup, pool, page, midi, scene, record, message, setup, dialog; +/* A bank image may replace the grid of the saved source at slot A07. */ +static unsigned incompatible_a07; +static uint32_t host_long(uintptr_t a) +{ + switch (a) { + case 0x800065b8: return run; + case 0x460e5e30: return popup; + case 0x460d1e70: return message; + case 0x460d175c: return setup; + case 0x460e5cd0: return dialog; + case 0x460e70e0: return pool; + case 0x460d1736: return record; + default: return 0; + } +} +static uint8_t host_byte(uintptr_t a) +{ + if (a == 0x100b14cc) return selected; + if (a == 0x46c7d8d8) return page; + if (a == 0x80000015) return midi; + if (a == 0x46100b1b) return scene; + if (a >= BANK_BASE && a < BANK_BASE + 16*PATTERN_BYTES) { + if (incompatible_a07 && a == BANK_BASE + 6*PATTERN_BYTES + 0x8e51) return 32; + unsigned offset = (a-BANK_BASE) % PATTERN_BYTES; + if (offset==0x8e51 || offset==0x8e53) return 16; + if (offset==0x8e52 || offset==0x8e54) return 2; + } + return 0; +} +static void tap(int code) +{ + assert(module_key(code,1)); + assert(module_key(0x100 | code,0)); +} +/* Requests on either side of a native wrap callback, using real SRC/ARR handlers. */ +static void row_boundary(void) +{ + clyps_project_init(); + run=0; + tap(ARR); + for (unsigned t=0;t<8;++t) { + if (t) assert(module_enc(6,1)); + tap((int)t+1); + } + const uint32_t all = 0x87654321u; + assert(playing==all && requested==all); + tap(ARR); tap(YES); tap(15); /* save row 16 */ + assert(defined==(1u<<15) && rows[15]==all); + tap(ARR); tap(0); /* restore T8 at stop */ + assert(playing==0x07654321u); + run=1; + clyps_wrap(); + tap(ARR); tap(15); /* just after wrap: still queued */ + assert(playing==0x07654321u && requested==all && pending_row==16); + clyps_wrap(); + assert(playing==all && !pending_row && last_row==16); + tap(ARR); tap(1); tap(2); /* latest request wins */ + assert(requested==0x27654321u && playing==all); + assert(!module_key(STOP,1) && !module_key(STOP,0)); + assert(requested==all); + clyps_wrap(); + assert(playing==all); + int home=0, foreign=4; + clyps_audio_source(&home,8,0); + clyps_audio_source(&home,7,1); + clyps_audio_source(&foreign,7,0); + assert(home==0 && foreign==4); + tap(NO); + assert(locked); + tap(YES); + assert(locked && playing==all); + run=0; tap(YES); + assert(!locked && !requested && !playing); + clyps_project_init(); + assert(!defined); +} +static void interrupted_editor(void) +{ + tap(ARR); tap(ARR); tap(YES); tap(3); + tap(0x1b); tap(YES); tap(1); + assert(editing && draft == 1 && rows[3] == 0); + struct modwerk_runtime_api api = {0}; + popup = 1; + module_tick(&api); + assert(!visible); + popup = 0; + tap(ARR); + assert(visible && !editing && !locked && rows[3] == 0 && defined == 8); + clyps_project_init(); + + tap(ARR); tap(2); tap(ARR); tap(YES); tap(3); /* R04 = A03 */ + tap(0x1b); tap(YES); tap(4); tap(YES); /* confirmed A05 */ + assert(rows[3] == 4 && !editing); + popup = 1; + module_tick(&api); + assert(!visible && !module_key(NO, 1) && !module_key(NO, 0)); + popup = 0; + tap(ARR); tap(ARR); /* Reopen, then focus row navigation. */ + assert(visible && row_view && !editing && (defined & 8) && rows[3] == 4); + run = 1; + tap(3); /* R04 queued while A03 plays */ + for (unsigned repeat = 0; repeat < 3; ++repeat) { + tap(YES); + assert(editing); + assert(module_key(6, 1)); /* unconfirmed A07, held through popup */ + unsigned *window = repeat == 1 ? &dialog : &popup; + *window = 1; + assert(!module_enc(6, 1)); + assert(!module_key(0x140, 0)); /* base modal-ownership query */ + assert(!module_key(YES, 1) && !module_key(YES, 0)); + assert(!visible && !editing && !armed && !src_list); + assert(module_key(0x106, 0)); + assert(!module_key(ARR, 1)); + *window = 0; + assert(!module_key(ARR, 1)); /* stock-owned repeat after close */ + assert(!module_key(ARR, 0)); + tap(ARR); + assert(visible && !editing && rows[3] == 4 && (defined & 8)); + assert(playing == 2 && requested == 4 && pending_row == 4); + tap(ARR); + if (!zoom) tap(0x1b); + } + clyps_wrap(); + assert(playing == 4 && !pending_row && last_row == 4); +} + +/* One byte models the stored grid at slot 7. An empty file fails the read. + * Stock's API gives the result to its caller only; the post hook has no args. */ +static int read_test_bank(unsigned mask, FILE *file) +{ + BANK_PRE(mask, 0); + assert(defined == 8 && rows[3] == 6); + int pattern = 0; + clyps_audio_source(&pattern, 0, 0); + assert(pattern == ((mask & 1) ? 0 : 6)); + if (mask & 1) { + struct modwerk_runtime_api api = {0}; + module_tick(&api); + clyps_wrap(); + } + unsigned char grid_length; + int complete = fread(&grid_length, 1, 1, file) == 1; + if (complete && (mask & 1)) incompatible_a07 = grid_length != 16; + BANK_POST(); + return complete; +} + +static void bank_events(int fail_first) +{ + tap(ARR); tap(6); tap(ARR); tap(YES); tap(3); + assert(defined == 8 && rows[3] == 6); + FILE *file = tmpfile(); + assert(file); + if (fail_first) { + assert(!read_test_bank(1, file) && feof(file)); + assert(defined == 8 && rows[3] == 6 && playing == 6); + } + assert(fputc(32, file) != EOF); + rewind(file); + assert(read_test_bank(2, file)); /* The incompatible grid belongs to B. */ + assert(!incompatible_a07 && defined == 8 && rows[3] == 6 && playing == 6); + + RELOAD_PRE(); + BANKS_PRE(); + assert(!read_test_bank(1, file)); /* EOF, with R04 already defined. */ + assert(feof(file) && !incompatible_a07); + BANKS_POST(); + RELOAD_POST(); + int during = 0; + clyps_audio_source(&during, 0, 0); + assert(during == 6 && defined == 8 && rows[3] == 6 && requested == playing); + + rewind(file); + assert(read_test_bank(1, file)); /* Same slot in A now has an unsupported grid. */ + assert(incompatible_a07 && fclose(file) == 0); + tap(3); + assert(refused && defined == 8 && rows[3] == 6); + int pat = 0; + clyps_audio_source(&pat, 0, 0); + assert(pat == 0); /* Never redirect into the newly unsupported grid. */ + incompatible_a07 = 0; + tap(3); + assert(!refused && playing == 6 && last_row == 4); + PROJECT_INIT(); + assert(!defined && !requested && !playing && !visible); + tap(ARR); tap(ARR); tap(3); + assert(missing && playing == 0); +} + +/* Inject a destination read failure after stock has delivered project init. + * This characterizes the current failure. No abort result reaches CLYPS. */ +static void late_project_failure(void) +{ + tap(ARR); tap(6); tap(ARR); tap(YES); tap(3); + assert(defined == 8 && rows[3] == 6 && playing == 6); + FILE *destination = tmpfile(); + assert(destination); + PROJECT_INIT(); + BANK_PRE(1, 0); + assert(fgetc(destination) == EOF && feof(destination)); + BANK_POST(); + assert(fclose(destination) == 0); + int source = 0; + clyps_audio_source(&source, 0, 0); + assert(source == 0 && !defined && !playing && !requested); +} + +/* A Bank H notification may coincide with a popup in a stopped row edit. */ +static void interrupted_bank_edit(void) +{ + tap(ARR); tap(6); tap(ARR); tap(YES); tap(3); + tap(0x1b); tap(YES); tap(2); + assert(editing && draft == 2 && rows[3] == 6); + BANK_PRE(1u << 7, 0); + popup = 1; + assert(!module_key(NO, 1)); + BANK_POST(); + popup = 0; + assert(!module_key(NO, 0)); + tap(ARR); + assert(visible && !editing && !armed); + assert(defined == 8 && rows[3] == 6 && requested == 6 && playing == 6); +} + +int main(int argc, char **argv) +{ + if (argc == 2) { + if (strcmp(argv[1], "popup") == 0) interrupted_editor(); + else if (strcmp(argv[1], "popup-bank") == 0) interrupted_bank_edit(); + else if (strcmp(argv[1], "late-failure") == 0) late_project_failure(); + else bank_events(strcmp(argv[1], "failed-bank") == 0); + return 0; + } + row_boundary(); + unsigned char frame[1024]; + tap(ARR); + for (int t=0; t<8; ++t) { + assert(!module_key(0x110+t,1) && !module_key(0x10+t,1)); + assert(!module_key(0x110+t,0) && !module_key(0x10+t,0)); + assert(!requested && !playing && track==0); + } + assert(module_enc(6,7) && track==7); + tap(ARR); + assert(module_enc(6,15) && slot==15 && track==7); + tap(NO); + + for (unsigned lane=0; lane<8; ++lane) { + selected=lane; + clyps_project_init(); + run=1; + assert(!module_key(SRC,1) && !module_key(SRC,0)); + tap(ARR); tap(SRC); + assert(src_list && track==lane); + for (unsigned ref=0; ref<16; ++ref) { + if (ref) assert(module_enc(6,1)); + assert(src_cursor==ref && requested==playing); + uint32_t before=playing; + tap(YES); + assert(playing==before && requested==(ref<<(4*lane))); + memset(frame,0xa5,sizeof frame); + module_draw(frame); + for (unsigned x=0;x<128;++x) + assert(frame[x*8]==0xa5 && frame[x*8+7]==0xa5); + clyps_wrap(); + for (unsigned t=0;t<8;++t) { + int pattern=0; + clyps_audio_source(&pattern,t,0); + assert(pattern==(int)(t==lane ? ref : 0)); + } + } + tap(ARR); + assert(visible && !src_list); + tap(NO); + assert(locked && !visible); + run=0; tap(YES); + assert(!locked && !playing && !requested && !visible); + } + for (unsigned i=0;i<8;++i) { + clyps_project_init(); selected=1; + tap(ARR); tap(SRC); + assert(src_list); + unsigned *condition[]={&popup,&pool,&page,&midi,&scene,&record,&message,&setup}; + *condition[i]=(i==4 ? 2 : 1); + memset(frame,0x69,sizeof frame); + module_draw(frame); + assert(!src_list && !visible); + for (unsigned j=0;j*+/", ui_k5_data}; +static const unsigned char ui_m3_data[] = {3,7,5,5,5,7,3,2,6,2,2,7,3,6,1,2,4,7,3,6,1,2,1,6,3,5,5,7,1,1,3,7,4,6,1,6,3,3,4,7,5,7,3,7,1,2,2,2,3,7,5,7,5,7,3,7,5,7,1,6,3,2,5,7,5,5,3,6,5,6,5,6,3,3,4,4,4,3,3,6,5,5,5,6,3,7,4,6,4,7,3,7,4,6,4,4,3,3,4,5,5,3,3,5,5,7,5,5,3,7,2,2,2,7,3,5,5,6,5,5,3,4,4,4,4,7,3,5,7,7,5,5,3,6,5,5,5,5,3,2,5,5,5,2,3,6,5,6,4,4,3,2,5,5,6,3,3,6,5,6,5,5,3,3,4,2,1,6,3,7,2,2,2,2,3,5,5,5,5,7,3,5,5,5,5,2,3,5,5,7,7,5,3,5,5,2,5,5,3,5,5,2,2,2,3,7,1,2,4,7,1,0,0,0,0,0,3,0,0,7,0,0,1,0,0,0,0,1,1,0,1,0,1,0,3,4,2,1,2,4,3,0,5,2,5,0,3,0,2,7,2,0,3,0,7,0,7,0,1,1,1,1,0,1}; +static const struct ui_font UI_M3 = {5, 1, "0123456789ABCDEFGHIKLMNOPQRSTUVWXYZ -.:>*+=!", ui_m3_data}; +static const unsigned char ui_c7_data[] = {5,14,17,19,21,25,17,14,5,4,12,20,4,4,4,31,5,14,17,1,2,4,8,31,5,31,2,4,2,1,17,14,5,2,6,10,18,31,2,2,5,31,16,30,1,1,17,14,5,6,8,16,30,17,17,14,5,31,1,2,4,8,8,8,5,14,17,17,14,17,17,14,5,14,17,17,15,1,2,12,5,14,17,17,31,17,17,17}; +static const struct ui_font UI_C7 = {7, 1, "0123456789A", ui_c7_data}; +static const unsigned char ui_b8_data[] = {5,14,27,27,27,27,27,27,14,5,6,14,6,6,6,6,6,15,5,14,27,3,6,12,24,24,31,5,30,3,3,14,3,3,27,14,5,3,7,11,27,31,3,3,3,5,31,24,24,30,3,3,27,14,5,14,24,24,30,27,27,27,14,5,31,3,3,6,6,12,12,12,5,14,27,27,14,27,27,27,14,5,14,27,27,27,15,3,3,14}; +static const struct ui_font UI_B8 = {8, 1, "0123456789", ui_b8_data}; +enum ui_mark {MARK_PLAY, MARK_PAUSE, MARK_STOP, MARK_RING, MARK_DISC, MARK_PLAY5, MARK_PAUSE5, MARK_STOP5, MARK_NEXT, MARK_DOWN, MARK_UP}; +static const unsigned char ui_mark_data[] = {4,7,8,12,14,15,14,12,8, + 5,7,27,27,27,27,27,27,27, + 5,7,0,31,31,31,31,31,0, + 7,7,28,34,65,65,65,34,28, + 7,7,28,62,127,127,127,62,28, + 3,5,4,6,7,6,4, + 3,5,5,5,5,5,5, + 3,5,0,7,7,7,0, + 3,5,4,6,7,6,4, + 5,3,31,14,4, + 5,3,4,14,31}; diff --git a/sdk/octatrack/modules/clyps/verify.py b/sdk/octatrack/modules/clyps/verify.py new file mode 100644 index 0000000000..f11b21da88 --- /dev/null +++ b/sdk/octatrack/modules/clyps/verify.py @@ -0,0 +1,39 @@ +"""Compile and link the coldFire draft and run the same handlers on the host.""" +import json +from pathlib import Path +import subprocess +import sys +import tempfile + +HERE = Path(__file__).resolve().parent +SDK = next(parent for parent in HERE.parents if (parent / 'runtime/loader/build.py').is_file()) +sys.path.insert(0, str(SDK / 'runtime' / 'loader')) +sys.path.insert(0, str(SDK / 'runtime')) +import build +import m68k_codegen + +with tempfile.TemporaryDirectory() as tmp: + work = Path(tmp) + obj = work / 'clyps.o' + subprocess.run(['m68k-elf-gcc', *build.CFLAGS, *m68k_codegen.FLAGS, + '-c', 'live_module.c', '-o', obj], cwd=HERE, check=True) + m68k_codegen.check_mcf54455([obj], 'm68k-elf-objdump') + image, symbols, bss, relocations = build.link_units([obj], 'm68k-elf-', 0, work) + required = [*build.HANDLERS, 'clyps_wrap', 'clyps_audio_source', 'clyps_bank_load', + 'clyps_bank_loaded', 'clyps_project_init'] + if any(name not in symbols for name in required): + raise RuntimeError('Missing CLYPS entry point') + print(f'ColdFire image {len(image)} bytes, BSS {bss}, relocations {len(relocations)}') + test = work / 'shared_state' + callbacks = {entry['event']: entry['fn'] for entry in + json.loads((HERE / 'contracts/runtime.proposed.json').read_text())['subscribe']} + defines = [f"-D{macro}={callbacks[event]}" if event in callbacks else f"-D{macro}(...)=((void)0)" + for macro, event in [('BANK_PRE', 'ev_bank_load'), ('BANK_POST', 'ev_bank_loaded'), + ('PROJECT_INIT', 'ev_project_new'), ('BANKS_PRE', 'ev_banks_load'), + ('BANKS_POST', 'ev_banks_loaded'), ('RELOAD_PRE', 'ev_project_reload'), + ('RELOAD_POST', 'ev_project_reloaded')]] + subprocess.run(['cc', *defines, '-Wall', '-Wextra', '-Werror', '-I', SDK / 'runtime/loader', + HERE / 'tests/shared_state.c', '-o', test], check=True) + for case in ([], ['popup'], ['bank'], ['failed-bank'], ['popup-bank'], ['late-failure']): + subprocess.run([test, *case], check=True) + print('Host callbacks passed for 8 lanes x 16 sources and eight ownership transitions.') diff --git a/src/community/module-changelogs/clyps.json b/src/community/module-changelogs/clyps.json new file mode 100644 index 0000000000..8b1d6baba8 --- /dev/null +++ b/src/community/module-changelogs/clyps.json @@ -0,0 +1,48 @@ +[ + { + "version": "0.5.1-experimental", + "date": "2026-11-27", + "changes": [ + "If a bank or project load cannot be confirmed, your Rows are kept and the Octatrack plays its own patterns; CLYPS stays closed until the next power cycle (protection, not the final behaviour).", + "The waiting line under the playing source stays an outline; on the beat a second outline appears instead of filling it." + ] + }, + { + "version": "0.5.0-experimental", + "date": "2026-11-27", + "changes": [ + "CLYPS opens in Clip View; the big plate shows the source that plays, the line below the one waiting for the bar (pulsing) or the home pattern.", + "Empty slots show a dot instead of a number in Clip View and in the Panorama; they stay reachable.", + "FUNC, FUNC + TRACK mutes and TEMPO reach the Octatrack without leaving CLYPS; a stock popup pauses CLYPS and it comes back.", + "In the Panorama, FUNC + LEVEL moves the column and the footer names the focused Row, its TRIG or its state." + ] + }, + { + "version": "0.4.0-experimental", + "date": "2026-11-26", + "changes": [ + "The Octatrack's track tab now follows CLYPS: TRACK keys select the same track in both.", + "Sound stays playable over CLYPS sources: pages, encoders, Scenes and the crossfader work; trig edits stay locked to protect the home pattern.", + "Hold TRACK and press TRIG in Row to launch one cell; ARR returns to the view you left." + ] + }, + { + "version": "0.3.0-experimental", + "date": "2026-11-26", + "changes": [ + "Row is now a full grid: eight tracks, five rows, playing cells filled, waiting cells outlined, the cursor shown as open corners.", + "Clip keeps the Octatrack's own frame: track tabs, Scene A/B and crossfader stay visible beside the tempo, transport and focused source.", + "Pause now shows as pause instead of play." + ] + }, + { + "version": "0.2.0-experimental", + "date": "2026-11-25", + "changes": [ + "In the private MKII overlay, ARR alternates Row and Clip.", + "In Row, YES advances through captured rows at the next supported boundary.", + "Capture and edit a volatile row through PAGE.", + "A stock popup no longer throws you out of Row edit, and your rows survive ordinary bank reads." + ] + } +]