- VARY (EUCLID melodic KNOB 4, MODES' VARY on a kit): above 0 the pattern is
four turns of the cycle (as many as fit in 64 steps), each moved anew
(A A' A'' B: the first a third of VARY, the last half as much again, a kit's
last turn ending in rolls on the snare and hats). Hits move one to three
steps; HITS stays exact in each turn. A melody's later turns keep the first
turn's degrees hit by hit or take new ones, by VARY. VARY 0: one turn.
- SEQ > MUTATE (EUCLID . MODES . MUTATE, ids ID_MU0 0xE4..): EVERY OFF 1 2 4 8
16 bars, AMOUNT, MODE ORBIT (from the anchor) / DRIFT (from the last) /
PULSE (a mutation and the anchor by turns), WHAT GROOVE (a new seed) /
RHYTHM (+ HITS or DENSITY, ROTATE) / FEEL (+ the MODES, VARY) / ALL.
ui_euclid.c eu_tick (every UI frame): playing, not in a song's chain, the
bar's last beat (seq.c bar_n, beat_n, beat_pos), the pattern new from the
next bar; no UNDO point. The anchor (eu_z, the settings vary .. l[]) is
what is dialled: any EUCLID / MODES knob, OCT+ / OCT- there, EVERY on. On
MUTATE OCT+ mutates now, OCT- returns to the anchor. A DRUM-X lane picked
mutates alone. The ring's corner: MUT n, the bars to the next.
- MUTATE's hint: EVERY: MUTATE ON THE BAR / OCT+ MUTATE OCT- ANCHOR.
- Tests: ui_test test_eumutate (the turns on a kit and a melody, MUTATE on
the bar, once a bar, none stopped or in a chain, ORBIT / DRIFT / PULSE,
OCT+ / OCT-); the SEQ chain's tests and the 14 tasks (+1) for the page.
App 567,540 B of 584,336 (16,796 B free); RAM .data+.bss 95,820 B.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh
docs/BLE_FEASIBILITY.md section 10.
- LY_EN_DICT (13,346 B) and LY_EN_IDX (524 B) in the segment (gen_lyrics.py
emits LY_DICT_SEC; sing.c makes it .btapp.rodata in the firmware), inside its
CRC-32.
- The segment is checked in fm1_main before felucca_init (whose sing_init reads
the dictionary), under the splash: the plain XIP window, the CRC-32;
sing.c ly_en_ok from it. The reads (sy_en_find / ly_at only: the main loop,
and the audio for a word not resolved there) are plain XIP data reads, as of
the app's flash.
- Without the segment (NO SEG): sy_en_find returns before any read; English
words by the letter rules (sy_en_rules), the generator's too; VOICE sings on.
- tests/voice_test.c: without it, all 2,095 words exactly as the rules read
them, sing_init again; with it back, the dictionary's.
- tools/audio_layout.txt repinned (FELUCCA_REPIN=keep).
App 567,760 B of 584,336 (16,576 B free); RAM .data+.bss 95,564 B; pool spare
9,536 B; segment 47,128 B (12 of 18 sectors).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh
docs/BLE_FEASIBILITY.md stage 2 step 6 (section 9 added: as built).
- The RSSI word of every good packet on the link (ble_hw_wl82.c hw_rx_service:
one hook, BLE_HW_RX_RSSI) into a 16-word ring in the segment (bt_seg_rssi).
- bt.c bt_prox_step (main loop, in the segment): level = (w & 63) + (w >> 8 &
63), median of five, one pole (~50-70 ms); held without packets; eased to 0
(~0.3 s) without a central or with BLUETOOTH OFF. FAR / NEAR in
favorites.factory[6][22..23] (always 0 before: not calibrated, PROX 0), mapped
to 0..1, clamped, either direction.
- mod.c MS_PROX ("PROX" after NOISE, unipolar): every SRC list, the web editor.
- MENU > SYSTEM > BLUETOOTH ON (radio running): OCT+ opens PROX's page (a meter,
%, the level and the raw word, FAR / NEAR); OCT- stores FAR, OCT+ NEAR; SELECT
back. The lens keeps the menu's tabs and cards for it (ui.c lz_on / lz_fam).
- ABOUT's AUDIO LOAD block in the segment too (about_load).
- tools/build.py: FELUCCA_REPIN=keep (the order recorded before, addresses anew:
the sound stays within ~0.7 KB of V10.12's instead of the compiler's new order
moving the engines up to 37 KB); a REPIN records the sound's tables after the
UI's left .rodata. tools/audio_layout.txt so repinned.
- Tests: ui_test (PROX's level, page, calibration, map, outlier, gap,
disconnect), mod_test (PROX on CUT), ui_render (menu_prox, menu_prox_off).
App 581,616 B of 584,336 (2,720 B free); RAM .data+.bss 95,564 B; pool spare
9,536 B; segment 33,260 B (9 sectors).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh
docs/BLE_FEASIBILITY.md stage 2 step 5 (section 8 added: as built).
- In: what a central writes, decoded by the stack (ble_midi.c), goes into the
one MIDI input ring as USB's does (firmware/bt/bt_midi.h bt_midi_accept:
channel messages, F8 FA FB FC; no SysEx), source 1 = USB: notes, CC, PC,
bend, CLK USB, LEARN, ROUT, MIDI MAP alike. src/bt.c bt_midi_rx enqueues with
the interrupts off (the BLE interrupts at priority 2 are preempted by TIMER5,
the ring's other producer). No change to the sound's code for input.
- Out: usb.c midi_out_event (everything MENU > CONTROL > MIDI OUT lets out)
also fills bt_oq (64) while a central listens; the stack packs it each
connection event (header, timestamps from TIMER4, running status). The sound's
code moved 64 B (tools/audio_layout.txt repinned).
- Flash: the app's cold constants / code can live in the segment (bt.c
BTAPP_RO / BTAPP_FN, app.ld .btapp.* inside the segment's CRC-32), checked once
at power-on (bt_boot, after the splash). MENU > ABOUT's THE PROJECT, CREDITS
and LICENSES moved there; NO SEG: ABOUT without them.
- MENU's overview tiles (the slide between tabs): a bottom tile shows seven rows
(SYSTEM's eighth, from V10.12, ran off the panel: 595 ui_render lint findings).
- Tests: tests/ble_midi_test.c (fm1-base's codec test, credited in LICENSING.md),
tests/bt_midi_test.c (packets as apps send them, the out ring and its packets),
tests/ui_test.c (ABOUT's lines); run_tests.sh runs the two new ones.
App 582,140 B of 584,336 (2,196 B free); RAM .data+.bss 95,564 B (+284); pool
spare 9,568 B; segment 30,660 B (8 sectors).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh
docs/BLE_FEASIBILITY.md route C2, stage 2 step 3 (section 7 added: as built).
- firmware/bt/: Optimist's BLE stack (Henri David; the hardware-tested copy in
charlesvestal/fm1-base bt/ble 4039a8b, GPL-3.0-only OR MPL-2.0, unchanged,
headers kept) and bt_seg.c, its glue, built as a unit of its own. Peripheral
only: advertises "JIANT FM-1" with the BLE-MIDI service UUID, connectable; no
scanner, no central, no SMP pairing, no LL encryption, BLE_DIAG 0, 27-octet
PDUs (as Melodee). MIDI is not routed yet (dropped / nothing sent).
- hal/fm1_ble.h, fm1_ble_rf.h: Melodee's (Kerem Kilic, GPL-3.0-only: the
iterative start-up replay, the crystal ramp's burst in .ram_text);
hal/fm1_rf_cal.h and ble_rf_tables_v15.h: felucca-bsp's (Apache-2.0).
hal/fm1_irq.h: FM1_IRQ_EXTERN for the second unit (the crash record and the
fault entry stay the app's).
- app.ld: BTSEG at XIP 0x020E6000 = flash 0xEA000 (72 KiB) for the segment's
header + code + constants (27,344 B, 7 sectors); its RAM in the pool (3,336 B)
but the 1,508 B baseband block (the radio's DMA) in .bss; .noinit.* after
.noinit (no record moves). The PC guard's window reaches _bt_end.
- tools/build.py: compiles bt_seg.c, writes build/bt.bin (header: magic, length,
CRC-32) and the same length / CRC-32 into the app's bt_want; refuses
initialised data in the segment and a ramp burst outside .ram_text; the
package carries bt.bin; the layout recorder ignores the segment.
- src/bt.c: MENU > SYSTEM > BLUETOOTH OFF (default) / ON, saved in TRIO's
retired favourites row ([6][24..31]: a mark, ON, the static random address
made once at the first start). ON only while stopped ("STOP FIRST"), at once
or at power-on when saved; the value reads ADV / CONN and the connections since
power-on, NO SEG (segment missing or of another build), FAILED. OFF stops
advertising and closes a link. Boot guard: bt_crumb (.noinit) set across the
start; a reset in it, or a crash / watchdog reset while it ran, turns it OFF
at the next power-on with a message.
- src/bt_hw.c: the plain XIP window set (fl_plain_window_init, JIANT never set
it), the segment's header and CRC-32 checked, then the start with the
interrupts off, the second core parked and the audio buffer silent: the
vectors (IRQ 45 / 29 at priority 2, below ALNK0 3 and TIMER5 4), the live
calibration (records 106-108 the SDK board's constants, 187 measured), the
stack, advertising.
- MENU > ABOUT's credits, LICENSING.md, LICENSES/MPL-2.0.txt: Optimist, Melodee,
felucca-bsp, JieLi.
- tests/ui_test.c: SYSTEM has 8 rows (31 in all); the BLUETOOTH row, STOP
FIRST, the saved bytes, NO SEG on the host, the boot guard.
- tools/audio_layout.txt: repinned (the UI code before the sound grew).
App 584,208 B of 584,336 (+1,096 B, 128 B free); RAM .data+.bss 95,280 B
(+1,524); pool spare 9,568 B (-3,360).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh
- tools/fm1pkg_make.py: an optional third UFW entry, "bt.bin" (type 200), after
ota.bin (whatever reads the first two finds them where they were); checked
for its header ("JBT1", its length) and for update-record look-alikes at
every 4K - 256 slot, as the app image is.
- firmware/loader/ldr_core.c: with that entry, the segment is checked in step
2b with the rest before anything is erased (the entry's CRC16, the header's
magic, a CRC16 per sector, the last sector's tail 0xFF), then written after
the app area at [0xEA000, 0xEA000 + len) sector by sector, skip-if-equal,
verified (the app area's per-sector code, now ldr_sector, shared). A package
without one leaves the region as it is. The record sweep already skips
0xEA000..0xFBFFF (V10.11).
- tests/ldr_test.c: the segment written and equal to bt.bin, a damaged one
refused with nothing erased, writes allowed in [0xEA000, 0xFC000).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh
- hal/fm1_power.h: the supplies as stock V15 sets them (LDO13 -> DCDC13, the
analog bytes, VDDIO 3.2 V, VDC14 1.60 V, SYSVDD 1.38 V last), ported from
Melodee (Kerem Kilic, GPL-3.0-only). main.c runs it at boot before
fm1_rails_boot (which then finds the rails set). MENU > ABOUT shows "DC"
when it took. The radio's prerequisite (docs/BLE_FEASIBILITY.md stage 2).
- 0xEA000..0xFBFFF (72 KiB) reserved for the Bluetooth segment (FL_EXT_*):
outside FL_RANGE_OK already; the update loader's record sweep skips it.
- Emulator: stubs for the new supply setup.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh
- Update loader: a stock update record found in 0xE7000..0xE9FFF (the JieLi VM:
the radio's RF trims and the Bluetooth address, the record at 0xE8F00) no
longer erases the whole sector: it is read, erased and written back but the
record's last 256 B (a page at a time). ldr_test checks the VM is kept.
- Editor command VM_READ (80), read-only: 256 B of 0xE7000 + 256 x i (i < 48)
as nibbles, for web/btcheck over Web MIDI (Android Chrome has no USB serial).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh
- GEN: BASS / CHORDS set OFF stay off (the "never fewer than two voices" rule
now only fills in parts left on AUTO).
- GEN keeps the GENRE picked between visits (was EXPLORE each time it opened).
- SEQ > STEP KNOB 4 is VEL: 1..127 (a turn stops at 127), then ACC, SLD, A+S.
- Delay TIME: 1/4D, 1/8D, 1/16D, appended (stored values unchanged), placed by
length in the knob's order.
- Generators: the random macros never route to PITCH; EXPLORE's pitched delay
1 in 10 and octaves only, less glide / vibrato / detune; the FX dice's
pitched delay 1 in 10, octaves.
- "STOP TO EDIT" now reads "SONG PLAYS: STOP IT TO EDIT" (the cause: a song or
quick chain playing).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh
- EUCLID: VARY only moves hits a step now (it added a pickup and dropped
some: HITS 3 sounded 4); HITS is the number that sounds, drums and melodies.
- REC held past HOLD and let go with nothing else touched (no key, knob,
button, OCT): UNDO; held again: REDO. With anything else used it stays the
REC layer as before; a tap still arms.
- SEQ + SELECT on a kit: a throw with almost no hits (AMBIENT's energy) is
thrown again with another map.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh
- SEQ > EUCLID on DRUM-X: LANE starts at ALL, where DENSITY (1..8), STEPS and
ROTATE make a whole usable kit (kick, backbeat snare, hats with the open one
choking the closed, sparse percussion; ROTATE turns the kick and percussion).
A lane picked writes that lane alone; the other lanes stay as they were.
- EDIT held + PRESETS: the first sound of the next / previous engine (not
during a MOMENTARY tweak).
- SEQ + SELECT on a kit: a genre without drums (NEO CLASSIC) or AMBIENT's
sparse map gave an almost empty pattern; it now picks a map that plays.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh
EUCLID (ui_euclid.c): KNOB 1 HITS, 2 STEPS, 3 ROTATE spread the hits evenly;
KNOB 4 a DRUM track's LANE (each of the eight its own euclid, the pattern
their least common length up to 64), a melodic track's VARY. MODES: four
amounts added to what is generated: DRUM ACCENT GHOST RATCHET VARY, melodic
MOTION HARMONY OCTAVE SLIDE. VARY loosens the even grid (hits a step off
towards the offbeat, the second half answering the first, pickups, a hit
left out; notes held over the gap). A melodic track's notes: its SCL, else
the key the other tracks' notes fit best (FROM Tn), else a NEW key of the
seed; the register kept from the first turn. Turning writes the pattern
again (an UNDO point per gesture); OCT+ a new variation, OCT- the one before.
The page draws the pattern as it is: a ring of its steps, the kit's lanes or
the key and the notes.
Gone: MUTATE (its engine, anchor, REVERT, GLO A4 FREEZE / B4 REVERT ALL, SEQ
D5 REVERT, HOME's mutation flash, GEN's MUTATE), SEQ TOOLS' C4 RANDOM, D4 COOK,
E4 BEAT and C5 lane RANDOM. Flash 3492 B free (was 20), the pool 3.8 KB more.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh
- A record can be a RAMP (bit 13 against the sign, unused until now: old
projects read as before): the value glides step by step from the record
before (none: from step 0 and the sound's value).
- What a recording drew is thinned in the main loop: at the stop, and while
recording once over 56 of the 64 are used. From each record kept a stretch
goes as long as it holds its value or runs along a line (within 1/32 of the
range): a hold or a RAMP; a last record repeating the value goes. Locks and
the DJ FILTER are never touched. A 64-step sweep: 2 records.
- AUTO LIST shows RAMP as a kind.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh
- TIMELINE: the 2 px black line between lanes back (V10.1 had removed it with
the gaps between rows); only the rows touch.
- SAVE's chain: SONG (TIMELINE, SECTIONS) . PROJECT (PROJECTS, ARRANGE, TOOLS)
. SOUND (USER, PRESETS). SAVE from HOME at power-on opens TIMELINE; the
page left still comes back (USER from elsewhere still armed: SAVE . OCT+ .
OCT+). Tests follow the new order (the panel race: 106 -> 108 actions).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh
The SEC / T1..T6 labels started 2 px left of the graph's card (lint: 'spills
out of its cell', on ARRANGE and TIMELINE); they start at x 5 now. ui_render
gets a save_timeline scene (a track from another section, a mute, HALF, THIN).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh
M-VAVE's V16 (2026-10-21) keeps V15's update loader but has another flash
head (its own SPL, 320 MHz, power rails). The entry only let the official
loader in when the package's head equalled the device's, so a JIANT FM-1
installed over V15 refused V16 (-5, nothing written). It now also takes a
package whose head is V15's or V16's, by two fingerprints (CRC16 + FNV-1a
over the 16 KiB head): JIANT -> official V16 straight from the web
installer (Return to official) or M-UPGRADE. Any other head still -5.
ota_test: an official package over a device with another head: V15 / V16
taken, a head changed by one byte refused, our own loader unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh
The song left to right, its bars the width: a lane for the rows (SEC: the
row's section and bars) and one per track (FROM, VAR). A track that follows
its row is dim, one from another section bright with its letter, a muted
one an empty frame, a variation its short name. KNOB 1 the row, KNOB 2 the
lane, KNOB 3 / 4 the lane's two values; a playhead while the song plays.
The same data as beta4 (song index version 4): nothing to convert.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh
KNOB 4 on SAVE > ARRANGE 2 picks a track's variation for that row only:
MUTE, THIN, FILL, HALF, REV, SHIFT, OCT+, OCT-, VAR 1..4 (seeded by song,
row and track: the same row always plays the same). Applied as the row is
staged (song_main.c row_vary); MUTE over the row's scene. The graph shows
the row's six tracks (their section's colour and letter, their VAR).
The song index goes to version 4 (+512 B, a uint32_t per row, 4 bits a
track); versions 1..3 in flash and version 2/3 backups load with no
variations. The variation scratch buffer lives in the pool.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh
A song row can take any track from another of its song's four sections:
KNOB 1 the row, KNOB 2 the track, KNOB 3 FROM (the row's own, A..D), KNOB 4
left resets the row; MIX shows where the six come from. A track brings its
sound, steps, FM6 patch and automation (DRUM its kit); the row's section
keeps the globals (punch-in lane, SLICER). Quick chains and live jumps play
whole sections as before.
The song index goes to version 3 (+512 B: a uint32_t per row, 3 bits a
track); version 1 and 2 indexes in flash and version 2 backups load with
every track on its row's section. Row add / delete / SONG REC / CLEAR SONG /
NEW PROJECT keep the map in step. Tests: persistence (the mixed staging,
v2 migration), backup (v3 and v2 restores), startup (the map through boot),
ui (ARRANGE 2's knobs, the SAVE chain with the page).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh