Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
7e4d969
Songbook setlists (local): setlist data in arrlists.work, CUE + YES a…
Nov 23, 2026
6ff5bd1
Songbook setlists (local): LIST n box at the bottom right of ARR > CH…
Nov 23, 2026
8e4e957
Songbook setlists (local): SETLSTS replaces the Arranger menu's CHAIN…
Nov 23, 2026
184fc88
Merge branch 'module/arr-setlists' into module/songbook-setlists
Nov 23, 2026
f115d4e
Songbook setlists (local): playing a setlist through stock's CHAIN, e…
Nov 23, 2026
cd4abc9
Merge branch 'module/arr-setlists' into module/songbook-setlists
Nov 23, 2026
5c86f5c
Songbook setlists (local): two move checks measure the move alone und…
Nov 23, 2026
8d09f1d
Songbook setlists (local): the chain kept set every frame, the setlis…
Nov 23, 2026
5179cb9
Songbook setlists (local): the screen drawn again when the chain is s…
Nov 23, 2026
dec9908
Songbook setlists (local): the SETLSTS page opens on the song playing…
Nov 23, 2026
de48f2f
Songbook setlists (local): a new memory mark for the new layout
Nov 23, 2026
cd415ab
Songbook setlists (local): after an install into an open project, the…
Nov 23, 2026
acb89c0
Songbook setlists (local): entries copied byte by byte (a struct copy…
Nov 23, 2026
2bf0dc9
Songbook setlists (local): the chain row names the next song and is d…
Nov 23, 2026
42ce7d5
Songbook setlists (local): stopped on the end's HALT, the last song i…
Nov 23, 2026
eac37e2
Songbook setlists (local): the memory mark checks the state's size to…
Nov 23, 2026
a438ec7
Songbook setlists (local): installed while a setlist plays, the book …
Nov 23, 2026
055870b
Songbook setlists (local): the last song ends as stock ends an arrang…
Nov 23, 2026
d3a8ace
Songbook setlists (local): the list icon; the chain text stops before…
Nov 23, 2026
e0e428e
Songbook setlists (local): CUE + YES shows the playing setlist and ch…
Nov 23, 2026
6f7dc61
Songbook setlists (local): CUE + NO shows the playing setlist; UP/DOW…
Nov 23, 2026
3ced4e8
Songbook setlists (local): CUE + YES opens the playing setlist, a fur…
Nov 23, 2026
d4eb5d3
Songbook setlists (local): the playing-setlist window follows a song …
Nov 23, 2026
1cd6dee
Songbook setlists (local): the Arranger menu's CHANGE item reads BOOKS
Nov 23, 2026
a5d4855
Songbook setlists (local): the chain row reads the module's own text …
Nov 23, 2026
11c6b97
Songbook setlists (local): YES in the playing-setlist window puts the…
Nov 23, 2026
b163eab
Songbook setlists (local): setlists get names (FUNC + YES, stock's na…
Nov 23, 2026
0d4fbd3
Songbook setlists (local): the playing-setlist mark sits in the Part …
Nov 23, 2026
c61b997
Songbook setlists (local): while a setlist plays, its name takes the …
Nov 23, 2026
404098d
Songbook setlists (local): the setlist's name takes the Part box's fi…
Nov 23, 2026
bfd7916
Songbook setlists (local): the playing setlist's name over both Part-…
Nov 23, 2026
5ddc675
Songbook setlists (local): the Arranger menu's title reads SONG n:NAM…
Nov 23, 2026
9663306
Songbook setlists (local): the menu title reads ARR book:arr:name, or…
Nov 23, 2026
89ac059
Songbook setlists (local): the menu title keeps at least 7 characters…
Nov 23, 2026
2163502
Songbook setlists (local): a single arrangement's menu title reads AR…
Nov 23, 2026
a4997b8
Songbook setlists (local): a project left in a setlist comes back int…
Nov 23, 2026
a542bc4
Songbook setlists (local): a reload or new project lets go of a playi…
Nov 23, 2026
f21648f
Songbook setlists (local): a power cycle in a setlist comes back into…
Nov 23, 2026
5a67c18
Songbook setlists (local): the battery record alone says slots 7 and …
Nov 23, 2026
065d1bd
Songbook setlists (local): after a power cycle in a setlist (no load …
Nov 23, 2026
7a53e26
Songbook setlists (local): the playing song is marked with a filled t…
Nov 23, 2026
ceb2638
Songbook 0.2.0-experimental (local): README, TESTING (the unit result…
Nov 23, 2026
e2edffb
Songbook setlists (local): a LOAD reads the new project's arrbook/arr…
Nov 23, 2026
68eca37
Merge branch 'module/arr-setlists' into module/songbook-setlists
Nov 23, 2026
be24ed9
Songbook setlists (local): the three LOAD fixes from #1737 (another p…
Nov 23, 2026
2bf33b3
Songbook setlists (local): the SETLSTS page, the BOOKS labels and LEF…
Nov 23, 2026
d23b2fe
Songbook setlists (local): the SETLSTS page takes a key's release onl…
Nov 23, 2026
d80a496
Songbook setlists (local): FUNC no longer closes the SETLSTS page (th…
Nov 23, 2026
183c3c1
Songbook setlists (local): records of the LOAD, CUE, PROJECT > CHANGE…
Nov 23, 2026
3186f43
Songbook setlists (local): a project going back into a setlist after …
Nov 23, 2026
6860a08
Songbook setlists (local): a load's return to a project left in a set…
Nov 23, 2026
331dd45
Songbook setlists (local): after a LOAD of another project, the job t…
Nov 23, 2026
1e39763
Songbook setlists (local): records of the one-job return after a LOAD…
Nov 23, 2026
1923323
Merge branch 'module/arr-setlists' into module/songbook-setlists
Nov 23, 2026
50436cf
Songbook setlists (local): README for BOOKS, the message and the one-…
Nov 23, 2026
2904cc4
Songbook setlists (local): an unnamed setlist is SETLIST n in stock's…
Nov 23, 2026
b8eaf9d
Songbook setlists (local): after a switch, the list's choice (what YE…
Nov 23, 2026
09fefe9
Merge branch 'module/arr-setlists' into module/songbook-setlists
Nov 24, 2026
64a4c23
Songbook setlists (local): a power cycle in a setlist comes back into…
Nov 26, 2026
6a10daf
Songbook setlists (local): books switch after an old project's load, …
Nov 26, 2026
8c01ee7
Songbook setlists (local): the SETLSTS page's cursor follows the song…
Nov 26, 2026
4af076c
Songbook setlists (local): a setlist started on, or a song chosen as,…
Nov 26, 2026
206c988
Merge remote-tracking branch 'upstream/main' into module/songbook-set…
Nov 26, 2026
5e4faeb
Songbook setlists: after the move out of drafts, generate.py finds sd…
Nov 26, 2026
b6068bf
Songbook setlists: trig keys choose the book in BOOKS and the setlist…
Nov 29, 2026
9ef4959
Songbook setlists: trigs pressed together told apart by time, not by …
Nov 29, 2026
2c289ca
Songbook setlists (trial): the count right of the name on the main sc…
Nov 29, 2026
23d75a2
Revert "Songbook setlists (trial): the count right of the name on the…
Nov 29, 2026
bdf2b32
Songbook setlists (trial): the arranger position (row:bar:beat) right…
Nov 29, 2026
79a5ad3
Songbook setlists: in a setlist the main screen's name bar runs to it…
Nov 29, 2026
af5be7a
Songbook setlists: a setlist started while stopped begins at its firs…
Nov 29, 2026
e5a8efb
Songbook setlists: the trig LEDs show the book in BOOKS and the setli…
Nov 29, 2026
78e52db
Songbook 0.2.0 release notes: trig keys, full names, empty songs, the…
Nov 29, 2026
fce4a05
Songbook 0.2.0: the name runs to 12 letters in a setlist; a thumbnail…
Nov 29, 2026
73a2f84
Songbook 0.2.0: in a setlist the main screen shows the arrangement's …
Nov 29, 2026
924b7d0
Merge remote-tracking branch 'upstream/main' into module/songbook-set…
Nov 29, 2026
1a509fc
Songbook 0.2.0: CPU price 0, measured at rest on the final build (8f9…
Nov 29, 2026
24cde08
Songbook 0.2.0: the catalog pins 0.2.0-experimental
Nov 29, 2026
f9313fb
Songbook 0.2.0: packages built from source (USB package 8f9c50a6, the…
Nov 29, 2026
1e23308
Songbook 0.2.0: performance record for 0.2.0 (book switch 13.94 M ins…
Nov 29, 2026
6a06219
Songbook 0.2.0: qualification from the test procedure on the MKI (pac…
Nov 29, 2026
1d7519b
Merge remote-tracking branch 'upstream/main' into module/songbook-set…
Nov 30, 2026
77a7ac5
Songbook 0.2.0: build metadata after merging main (package unchanged,…
Nov 30, 2026
63ab071
Merge remote-tracking branch 'upstream/main' into module/songbook-set…
Nov 30, 2026
443e546
Songbook 0.2.0: build metadata after merging main (package unchanged,…
Nov 30, 2026
5aa8a3a
Merge remote-tracking branch 'upstream/main' into module/songbook-set…
Dec 1, 2026
47c4f7b
Songbook 0.2.0: arrangements 7 and 8 backed up before a setlist borro…
Dec 1, 2026
f490503
Songbook 0.2.0: songbook_core.s regenerated from songbook.c (the slot…
Dec 1, 2026
3bd3525
Songbook 0.2.0: the lent note in arrlend.work (Songbook 0.1.0 rewrite…
Dec 1, 2026
bc91b90
Songbook 0.2.0: packages rebuilt (the slot 7/8 backup)
Dec 1, 2026
21b4480
Songbook 0.2.0: build metadata for package 1c1d4549
Dec 1, 2026
0505762
Songbook 0.2.0: performance record remeasured on package 1c1d4549 (bo…
Dec 1, 2026
3909bf2
Songbook 0.2.0: qualification rehashed before the unit procedure on 1…
Dec 1, 2026
4a5e203
Songbook 0.2.0: ARR > BOOKS names rows 7 and 8 by the book's own arra…
Dec 1, 2026
a43d941
Songbook 0.2.0: packages rebuilt (BOOKS rows 7 and 8)
Dec 1, 2026
a5aca2c
Songbook 0.2.0: qualification rehashed for package c8eb7186
Dec 1, 2026
7d1e11f
Songbook 0.2.0: performance record on package c8eb7186 (book switch 1…
Dec 1, 2026
c4a72f0
Songbook 0.2.0: qualification and TESTING for package c8eb7186 (proce…
Dec 1, 2026
aa11951
Merge remote-tracking branch 'upstream/main' into module/songbook-set…
Dec 1, 2026
149942f
Songbook 0.2.0: build metadata after merging main (package c8eb7186 u…
Dec 1, 2026
6d36ccd
Songbook 0.2.0: the update in place from 0.1.0 on book 2, on the deve…
Dec 1, 2026
1257939
Songbook 0.2.0: arrangements 7 and 8 restored only while arrNN.work s…
Dec 1, 2026
9fbc033
Songbook 0.2.0: packages rebuilt (the fingerprinted give-back)
Dec 1, 2026
3a0b10d
Songbook 0.2.0: performance record on package e06c9f98
Dec 1, 2026
48ab592
Songbook 0.2.0: qualification and TESTING for package e06c9f98 (proce…
Dec 1, 2026
54c32a4
Songbook 0.2.0: TESTING.md under 40 KB (the superseded 8f9c50a6 proce…
Dec 1, 2026
19b9b9f
Songbook 0.2.0: README names the one case where the backup wins (a co…
Dec 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion sdk/catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@
},
{
"id": "songbook",
"version": "0.1.0-experimental",
"version": "0.2.0-experimental",
"addedAt": "2026-11-24T09:10:19Z"
},
{
Expand Down
2 changes: 1 addition & 1 deletion sdk/machines/octatrack/battery-ram.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"ranges": [
{"from": "0x100f85a0", "to": "0x100f85e8", "owner": "kits", "what": "'KCS1': which Kit each of the 64 Part slots holds, and a sum that starts from the project's id"},
{"from": "0x100f8600", "to": "0x100f8f06", "owner": "playmodes", "what": "'PMNV': each pattern's play mode, 256 rows of 9 bytes and a 16-bit sum"},
{"from": "0x100f8f10", "to": "0x100f8f24", "owner": "songbook", "what": "'ASB1': which book of arrangements the 8 slots hold, whether a backup of book 1 exists, whether that book was read only in part, a fingerprint of the slots, the serial of the copy that wrote it last, and its last eight project events"},
{"from": "0x100f8f10", "to": "0x100f8f24", "owner": "songbook", "what": "'ASB1': which book of arrangements the 8 slots hold, whether a backup of book 1 exists, whether that book was read only in part, whether a setlist plays from slots 7 and 8, a fingerprint of the slots, the serial of the copy that wrote it last, and its last eight project events"},
{"from": "0x100f9000", "to": "0x100f9044", "owner": "base", "what": "settings.c's 'MWS1': the choice kept for each of eight module settings (PROJ > MODWERK > SETTINGS), by the hash of its label"},
{"from": "0x100f9044", "to": "0x100f91c8", "owner": "base", "what": "setting_presets.h MWP1 stores panel overrides for up to 32 imported module presets"},
{"from": "0x100f9200", "to": "0x100f970c", "owner": "base", "what": "status.c's 'MWER': what each measured module adds to the frame share in use, on waking and at rest, from the site's last MWMS v2 set (set_package.h)"},
Expand Down
106 changes: 85 additions & 21 deletions sdk/octatrack/modules/songbook/README.md
Original file line number Diff line number Diff line change
@@ -1,57 +1,110 @@
# Songbook

128 arrangements per project, as 16 books of 8, every one an ordinary stock arrangement file. Setlists of up to 16
songs from any book follow in a later version. OS 1.40C, MKI and MKII.
128 arrangements per project, as 16 books of 8, every one an ordinary stock arrangement file, and 16 setlists of up to
16 songs from any book, played one after the other without a gap. OS 1.40C, MKI and MKII.

## Overview

Stock keeps 8 arrangements per project, in `arr01.work` to `arr08.work`. Songbook makes them book 1 of 16
books of 8: book 2 is `arr09` to `arr16`, book 3 `arr17` to `arr24`, and so on up to book 16, `arr121` to `arr128`.
In ARR > CHANGE, with the transport stopped, LEFT and RIGHT step to the book before or after, and BOOK 2 (and so on)
shows at the screen's top right; the list shows the new book's names at once. Inside a book, every stock arrangement function works as usual: edit, ARR SAVE,
In ARR > BOOKS (stock's CHANGE, renamed), with the transport stopped, LEFT and RIGHT step to the book before or after,
and BOOK 2 (and so on) shows at the screen's top right; the list shows the new book's names at once. Inside a book, every stock arrangement function works as usual: edit, ARR SAVE,
RELOAD, COPY, CLEAR, chaining and playback.

The Octatrack's own code writes and reads every one of these files, so they are stock arrangement files in every
byte. A project saved with the module opens on a unit without it with book 1 as it was, and an arrangement from a
later book can be moved into book 1 on a computer by renaming its file (`arr37.work` to `arr03.work`, say).

A setlist plays songs from any book in a chosen order. Songbook keeps its songs in memory and plays them through
two of the open book's arrangement slots, 7 and 8, chaining each to the next with stock's own CHAIN, so each song
follows the last without a gap. While a setlist plays, the main screen shows it: the setlist's name in the Part box,
the song's place (`|≡ 2/6`) under it, and the next song's name after the playing song's last row.

## Controls

| Where | Keys | What it does |
| --- | --- | --- |
| ARR > CHANGE, stopped | RIGHT | Write the current book to the card, then load the next one (up to 16) |
| ARR > CHANGE, stopped | LEFT | The same, to the book before (down to 1) |
| ARR > CHANGE, playing | LEFT / RIGHT | Nothing changes; it says STOP TO CHANGE BOOK |
| ARR > BOOKS (stock's CHANGE, renamed), stopped | RIGHT | Write the current book to the card, then load the next one (up to 16) |
| ARR > BOOKS, stopped | LEFT | The same, to the book before (down to 1) |
| ARR > BOOKS, playing | LEFT / RIGHT | Nothing changes; it says STOP TO CHANGE BOOK |
| ARR > BOOKS | CUE + YES | Add the arrangement under the cursor to the end of the open setlist (B2 5 ADDED TO LIST 3) |
| ARR > BOOKS, stopped | CUE + LEFT / RIGHT | Move the arrangement under the cursor one place up or down in its book |
| Arranger menu | SETLSTS (stock's CHAIN, replaced) | Open the setlists page |
| SETLSTS page | LEFT / RIGHT | The setlist before or after (1 to 16) |
| SETLSTS page | UP / DOWN | Move the cursor |
| SETLSTS page, stopped | YES | Start the setlist from the song under the cursor (PLAY then plays it) |
| SETLSTS page | CUE + LEFT / RIGHT | Move the song under the cursor up or down |
| SETLSTS page | FUNC + PLAY | Take the song out of the setlist (the arrangement stays in its book) |
| SETLSTS page | FUNC + REC / CUE + FUNC + REC | Copy the song / the whole setlist |
| SETLSTS page | FUNC + STOP | Paste after the cursor |
| SETLSTS page | FUNC + YES | Name the setlist (stock's name editor, 15 characters) |
| SETLSTS page | NO | Close it |
| Main screen, a setlist playing | hold CUE, press YES | Show the setlist: the playing song ▶, the next one >; UP/DOWN move the cursor, YES makes the song under it the next one at once; releasing CUE closes it |
| ARR > BOOKS, stopped | (opening it) | Ends a setlist: songs edited while it played are written to their own files, the book comes back |

A book never used starts as 8 empty arrangements. Each book comes back on the arrangement you last chose in it (a
book not visited yet on arrangement 1), with the list's cursor on it; after a power cycle or a project load every book
but the one in use starts on arrangement 1 again. Switching takes about as long as stock's SYNC TO CARD and ends with
its NOW SAFE TO EJECT! message. Without a project loaded it says NO PROJECT; while the card is busy, CARD BUSY. If an
but the one in use starts on arrangement 1 again. Switching takes about as long as stock's SYNC TO CARD, whose job it
borrows; its NOW SAFE TO EJECT! message is closed as it opens. Without a project loaded it says NO PROJECT; while the card is busy, CARD BUSY. If an
arrangement file does not read, it says BOOK FILE ERROR, that arrangement shows empty, and its file is left as it is
unless you edit that arrangement.

## Usage

1. Stop the transport.
2. Open ARR > CHANGE. MKII: ARR, then CHANGE. MKI: FUNC + PATTERN switches arrangement mode on, FUNC + BANK opens the
arranger menu, then CHANGE.
2. Open ARR > BOOKS (stock's CHANGE). MKII: ARR, then BOOKS. MKI: FUNC + PATTERN switches arrangement mode on, FUNC +
BANK opens the arranger menu, then BOOKS.
3. Press RIGHT or LEFT. The label at the top right shows the book, for example BOOK 3.
4. Choose one of its 8 arrangements as usual.

### Setlists

1. In ARR > BOOKS, put the cursor on an arrangement and press CUE + YES: it is added to the open setlist (LIST 1 at
the bottom right). Add songs from any book this way.
2. Open SETLSTS in the arranger menu: the setlist, its songs as `book.arrangement NAME`. Move them with CUE +
LEFT/RIGHT, name the setlist with FUNC + YES.
3. Put the cursor on the first song, press YES, close the menu with NO, and press PLAY. Each song is followed by the
next; the last ends as any arrangement ends.
4. Opening ARR > BOOKS (stopped) ends the setlist and brings the book back.

### Quick tutorial

1. In ARR > CHANGE, press RIGHT: BOOK 2, with 8 empty arrangements.
1. In ARR > BOOKS, press RIGHT: BOOK 2, with 8 empty arrangements.
2. Choose arrangement 1, open the editor and add a few rows.
3. Back in ARR > CHANGE, press LEFT: BOOK 1, your original arrangements.
3. Back in ARR > BOOKS, press LEFT: BOOK 1, your original arrangements.
4. Press RIGHT again: book 2's rows are back.
5. Press LEFT to return to book 1 before you finish.

## Compatibility and limitations

- **Takes:** LEFT and RIGHT in ARR > CHANGE (stock does nothing with them there), the top right corner of that list
- **Setlists borrow the open book's arrangements 7 and 8.** While a setlist is active, slots 7 and 8 hold copies of
setlist songs, and nothing writes them to the book's files; ARR > BOOKS still names rows 7 and 8 by the book's own
arrangements. Before a setlist starts, the module copies the book's own arrangements 7 and 8 into `arrNN.sl` files
and notes in `arrlend.work` what the setlist's copies look like. If the module was not there to stop it (a trial
ended by a power cycle, the module removed) and stock saved those copies over arrangements 7 and 8, installing
Songbook again and opening that project puts them back from `arrNN.sl`; anything else saved there in between is
kept. A copy edited there without the module but not renamed still counts as a copy, and the backup comes back
over it. Still, **end a setlist (open ARR > BOOKS) before removing the module.**
- **Edits during a show** are written to each song's own file when the setlist ends (opening ARR > BOOKS, stopped).
A RELOAD or a power cycle drops edits not yet written, as stock does for unsaved changes. A song renamed while a
setlist plays keeps its old name.
- **A project comes back into its setlist.** LOAD and RELOAD PROJECT return to the setlist and song saved with the
project, a power cycle to the song playing; the Part box shows the setlist while it comes back. Without the module the
project opens on book 1.
- **Changes to stock flows (only while the module is installed):** the arranger menu reads BOOKS for CHANGE and
SETLSTS for CHAIN (CHAIN itself is replaced: a two-song setlist does its job, across books too); the menu's title
reads `ARR B2:3:NAME` (book, arrangement, name) or, in a setlist, `STL:<setlist>:<song no>:<song name>`; the
arranger rows' chain line reads `>` and the next song's name; while a setlist plays, the main screen's Part box and
pattern line show the setlist instead of the Part and the pattern. CUE + YES on the main screen is taken only while a
setlist plays (stock does nothing with it there).

- **Takes:** LEFT and RIGHT in ARR > BOOKS (stock does nothing with them there), the top right corner of that list
for the label, and stock's arrangement writer, which it steps into at its entry: on book 1 stock writes arr01 to
arr08 exactly as always, on another book that book's 8 files are written instead. No other module or base hook uses
that site (`npm run modules:compat`).
arr08 exactly as always, on another book that book's 8 files are written instead. For setlists: the arranger menu's
CHANGE and CHAIN entries (their names, CHAIN's routine and icon), the operands of the menu title's index and format
and of the arranger rows' chain line (pointed at the module's own text; stock's strings stay untouched), CUE + YES
and CUE + LEFT/RIGHT in ARR > BOOKS, and CUE + YES on the main screen while a setlist plays. No other module or base
hook uses these sites (`npm run modules:compat`).
- **A change to a stock flow: LOAD PROJECT and arranger mode.** Stock's LOAD (PROJECT > CHANGE) opens a project in
pattern mode, while RELOAD keeps the mode. With the module, a project that was left (switched, synced or saved) in
arranger mode opens in arranger mode again, after its book and arrangement are restored; one left in pattern mode
Expand All @@ -64,8 +117,9 @@ unless you edit that arrangement.
- **A project comes back where it was left.** A power cycle keeps the book in use (the Octatrack keeps its
arrangements in battery memory). LOAD PROJECT returns to the book and arrangement of the last switch, SYNC TO CARD
or SAVE PROJECT, and RELOAD PROJECT to those of the last SAVE PROJECT, as stock does for its own files: the module
keeps them in `arrbook.work` (and `arrbook.strd`). Stock first loads book 1; on another book the module then
switches as LEFT/RIGHT do, about two seconds after stock's load has finished. Without the module a project opens on
keeps them in `arrbook.work` (and `arrbook.strd`). Stock first loads book 1; once stock's load has finished, one card
job of the module's reads where the project was left and switches as LEFT/RIGHT do (and starts its setlist). Loading
another project, stock names the new project only once its load is over, so that job comes after the whole load. Without the module a project opens on
book 1.
- **Switch back to book 1 before removing the module.** Without the module, stock's next save writes whatever book is
in its 8 slots into arr01 to arr08. Leaving book 1 always keeps a backup of it (`arr01.bak` to `arr08.bak`, stock
Expand All @@ -74,7 +128,9 @@ unless you edit that arrangement.
- **Saved with the project.** SAVE PROJECT copies arr09 to arr128 to their `.strd` copies as stock does for arr01 to
arr08, and RELOAD PROJECT copies them back. Stock's own project copy functions copy book 1 only; copying the project
folder copies every book.
- **Battery RAM:** 16 bytes at 0x100f8f10 (sdk/machines/octatrack/battery-ram.json) remember which book the slots hold.
- **Battery RAM:** 20 bytes at 0x100f8f10 (sdk/machines/octatrack/battery-ram.json) remember which book the slots
hold, whether it was read in full, and whether slots 7 and 8 hold a setlist's songs (and which song plays).
- **Memory:** about 98 KB, most of it the setlist's songs (16 arrangements).

## Tests and measurements

Expand All @@ -86,9 +142,17 @@ Original module by Andrey Sidorkin, MIT (LICENSE). No firmware, stock code or st

## Screens and audio

![ARR > CHANGE on book 1](media/ot-change-book.png)
![ARR > BOOKS on book 1](media/ot-books-list.png)

![CUE + YES in ARR > BOOKS adds the arrangement to the open setlist](media/ot-books-added.png)

![The SETLSTS page](media/ot-setlists-page.png)

![The main screen while a setlist plays: its name in the Part box, its place on the pattern line, the next song on the chain line](media/ot-setlist-main.png)

![CUE + YES on the main screen: the setlist, the playing song and the next one](media/ot-setlist-window.png)

Emulator capture (ot_emu), not the unit. No audio: the module makes no sound.
Emulator captures (ot_emu), not the unit. No audio: the module makes no sound.

## Develop

Expand Down
35 changes: 35 additions & 0 deletions sdk/octatrack/modules/songbook/RESEARCH.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,38 @@ pending switch then backs up book 1 when leaving it and reads the next book's fi
backup and marks all 8 changed, so stock's next write repairs arr01-08. A file that does not read leaves its slot
empty and is never written back unless that arrangement is edited. Which book the slots hold survives a reinstall in
the battery record, valid only while a fingerprint of the slots still matches; a project load always means book 1.

## Setlists (0.2.0)

- **CHAIN:** stock's chain target is `0x80006694` (-1 none, taken once). The arranger step takes it past an
arrangement's last row (`0x4004a7e2`): index (`0x80000005`, `0x100b14d1`) and pointer (`0x10000000`) to that slot, row
0, playing on; the start routine (`0x400a0230`) takes it when it starts an arrangement with no rows. Past the last row
with no chain the arranger ends (`0x4004a75e`). Playing a setlist is a chain from slot 7 to 8 and back, the module
putting the song after next into the freed slot; stock clears the chain only when taking it, but the module sets it
again every frame.
- **The arranger menu:** descriptor `0x400be7e6` (2 rows of 4), entries of 16 bytes `{name[8], icon, routine}` from
`0x400be766`: CHANGE `0x400be786` (routine `0x40058abc`), CHAIN `0x400be796` (icon `0x400be5c2`, routine
`0x40058b38`). Names are drawn with `%s` (`0x400488c4`), so 7 letters at most; an icon is two pictures of
`{27, 13, 1, image, mask}`, 27 columns of a word each, the top row in bit 31.
- **The menu title** is `sprintf("ARR %d:%s", index + 1, name)` at `0x40057f1c`: the index from `0x80000005`
(operand at `0x40057f48`), the format `0x400b47e6` (operand at `0x40057f54`).
- **The chain line** in the arranger rows is drawn from `"CHAIN ARR. %d"` (`0x400b4652`, operands at `0x40048eb8` and
`0x400496e6`). Its `"%d"` at `0x400b465d` is stock's shared number format (76 users: tempo, MIDI channel, bank);
writing it blanked them all. Writing into a declared stock change at run time also makes the loader's check of its
bytes fail, and every later install is refused as busy (refusal 5) until a power cycle. The module points the
operands at its own text instead.
- **Redrawing the rows:** stock posts token `0x400c0c41` to the UI queue `0x460d17ae` (`0x40000c3c`) as it takes a
chain; posting it again draws the rows with a chain set after stock's own drawing.
- **Key routing:** the handler of each key code at `0x46c7d8de + code * 0x18`. YES on the main screen `0x4005e4c8`,
in the arranger menu `0x4003395c`, in the editor `0x40058f34`; with CUE held stock routes YES elsewhere
(`0x400402ec`), so the module notes the screen when CUE goes down. CUE + BANK opens stock's SELECT BANK and CUE + NO
its DISARM ALL on the main screen; CUE + YES and CUE + UP/DOWN do nothing there (ot_emu).
- **The name editor:** `0x4007e664(length, title, buffer, 1, done(ok))`, as RENAME (`0x40049c88`) calls it.
- **Text in stock's font:** `0x40012bd8(0x400ba876, surface, x, 59 - top, -1, text)` on a copy of the surface at
`0x400bf10a` aimed at the module's frame (as pattern-sample-locks does).
- **0x1001614c** is set by edits and by stock's arrangement writer after it writes a slot (`0x40091748`); the writer
chooses slots by its mask or a missing file (`0x40091680`), never by this byte.
- **Loads and slots 7 and 8:** about 10 s into a RELOAD, stock reads arr01-arr08 into the slots (ot_emu); after a power
cycle the slots keep what they held (battery RAM) and the module comes up after stock's project load, so no load hook
reaches it. The module keeps "slots 7 and 8 hold setlist songs" and the playing song in its battery record (byte 7),
cleared only once the book is read back from its files.
Loading
Loading