The editor gets a USB button that asks the device for the playback
counters and shows them in a pop-up:
- command 89 USBDIAG: version 1, the playback alt setting, playing,
then nine 5-byte counters (7 bits, LSB first): SET_INTERFACE to the
playback interface, EP3 interrupts, packets received, frames stored,
packets dropped, dry blocks, frames dropped and repeated by the
rate follow, and the ring's fill. Read only; zeros without
FELUCCA_UAC_OUT.
- usb.c counts the playback SET_INTERFACE and the EP3 interrupts.
- editor_test.c checks the reply's layout and its zero counters before
any playback.
- EDITOR_PROTOCOL.md: the row for command 89.
Command 89 is new, so the INFO reply and the older commands do not
change.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
A high-pass output: (1 - LP)^4 of the ladder's own four stages, 24 dB/oct,
on the same loop (the EMPHASIS feedback is still the low-pass one). The
switch is a field of the FILT page (CC 72, free), drawn left of the
response; the response graph and its caption follow the choice
(FMINI_GRAPH_HP, generated by tools/fmini_filter.py; the LP table is
unchanged). fmini_sanitize keeps SW2 up to 7 (it kept 3). Settings layout
0x51 (the controls grew by one). Patches saved before have the bit clear:
LP, as before. Test: a C2 is cut 18.6 dB and a C7 passes +14 dB (a saw's
harmonics pass the high-pass; the bar is 14 dB). The full suite: only the
known failures. Protocol note in web/EDITOR_PROTOCOL.md. Emulator
regenerated (docs/emu2).
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
The TEMPO is now part of the FMINI patch (two 7-bit bytes, 40..240 BPM, 0 = none: a
loaded patch keeps the song's tempo). Loading a patch with a tempo sets the song's BPM
for the selected track; changing the tempo in ARP, SEQ or TAP TEMPO writes it back into
the patch. The ARP, the SEQ and the delay share it. Factory patches carry 120; 015 carries
162. The patch is 24 bytes now (FG_NUM 24); the editor protocol notes the new bytes.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
- The knob sets the detune in cents, -700 .. +700, one cent a step with the
usual acceleration; 0.00 at the middle. The screen shows +4.05 style.
- The cents are stored in patch bytes 18..21 (DET 2 at 18..19, DET 3 at 20..21),
as sign and magnitude in two 7-bit bytes (the patch travels as 7-bit sysex).
No SW2 bit: a zero byte is 0 cents.
- A CC still sets the coarse byte (64 = 0, 11 cents a step), and the cents to
(value - 64) * 11, so MIDI gets the coarse law: -704 .. +693.
- The coarse byte follows the knob's cents to the nearest step, for the editor.
- The factory bank writes the cents of its coarse bytes, so every factory
patch sounds as before (goldens unchanged). The bank's stamp changes, so the
saved slots are cleared at the first boot, as 1.14.9 does.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
The fine law of 1.10 and 1.11 (SW2 value 4, a code 0..180, the encoder's
steps of 0.1 and 0.05 semitone) is removed. DET 2 / 3 are the coarse law again
(64 = 0, 11 cents a step, +-7 semitones), with the encoder's acceleration as
before 1.11, and a CC is written as it is. The sanitiser keeps SW2 up to 3 and
clears the old bit; patches saved with it sound with the coarse law.
The other 1.11.0 changes (SEQ pop-up, MIDI CC scroll bar and learn, idle light
show, key LEDs) stay.
Goldens: unchanged (no factory patch uses the fine law).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
INFO carries the firmware version (tag 0x49, three bytes, 5 bytes before the
FMINI patch-size block). The version now lives in firmware/src/core.h
(FMINI_VER_MAJ/MIN/PATCH and FMINI_VERSION); build.py, build_wasi.sh and the
installer workflow read it from there.
The web editor reads the version on connect. When the device runs an older
firmware (or one without the tag), it opens a pop-up that links to the
installer on the site. FW_LATEST in editor_fmini.html must match core.h.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
The second hundred of the factory bank, in the same ten groups as the first
(110-119 hard leads, 120-129 soft leads, 130-139 basses with OCT-1, 140-149
pads, 150-159 brass, 160-169 plucks, 170-179 keys, 180-189 atmospheres,
190-199 effects; 100-109 showcase). About a quarter with the arpeggiator on
(55 of 200). Nothing is INIT now: the saved slots are unchanged.
- eng_fmini: FMINI_NFACTORY 200; generated header 200 patches (the first 100
byte-identical).
- editor: a factory GET takes the index in two 7-bit bytes past 127 (3 bytes:
reply target, lo, hi, rc, patch). Web editor: FACTORY RESET covers 200.
- regress: job table 1024; hostsim sets P_E7 for FMINI (the preset's SLOT is
int8 in the engine, so 128+ wrapped to silence). 100 golden lines added.
Not tested on a real FM-1. Presets 100-199 use the default LEVEL (not calibrated).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
The PRESETS tab keeps the backup and restore buttons. The 200-card list
and the factory-bank export go; a FACTORY RESET section takes their place:
"Restore all factory presets" (slots 000..099, with a browser confirm) and
a list of the 200 presets with a "Restore" button (one preset, with a
confirm).
Firmware: cmd 88 FMINI_RESET forgets a slot's saved preset, so it reads its
factory preset again (INIT for 100..199). The page sends it once per
slot; no device question (the page asks first).
tests/editor_test.c checks the reset; web/test_editor_fmini.py resets slot 7
and then all the factory presets after a restore of a changed file.
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
Backup: the web editor reads all 200 presets (cmd 85, the whole record)
and saves them in one .bkp file (JSON, records in hex).
Restore: cmd 87 asks the device first. The device shows OVERWRITE ALL 200
PRESETS? with NO selected: ALGORITHM turns it to YES, SAVE accepts; SAVE
on NO or any page button refuses; no answer for 60 s refuses. Only then
does cmd 86 write each record (rc 2 before the YES and after the end).
The restore question sits above the other pop-ups; the preset and tempo
pop-ups stay hidden under it. Protocol 4: the web editor needs it.
tests/editor_test.c walks the handshake and the record round trip;
tests/fmini_app_test.c drives the question on the panel and renders it;
web/test_editor_fmini.py backs up, restores a changed file and puts the
original back (the bridge answers the question: FM_RESTORE_ANSWER).
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
The LIBRARY tab (U01-U32, UP_* commands) is gone from the FMini editor:
FMini-1 has no U bank. The tab lists the 200 slots (NAMES) and loads them
(PRESET); SAVE is on the device. The factory bank export stays.
PRESET takes the preset number as two 7-bit bytes (low first) when it is
128 or more, so the page reaches slots 128..199; the one-byte form still
works. MIDI Program Change reaches 0..127 only (documented).
The web test drives the new tab (200 cards, load 007 and 150, no save or
erase); tests/editor_test.c passes; firmware 1.14.0 builds; installer
regenerated.
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
The 200 slots are the presets, all handled the same way: a RAM table of
200 preset_t (fmini_pre) built at power-on from the records (names and
knob bytes), pointed to by the FMINI engine with npresets 200 (fits the
uint8_t count). PRESETS walks 0..199 and loads the slot's patch from
flash; the extras (arpeggiator, LFO, FX, octave) come from the slot's
record (fb_extra). SAVE writes the playing sound into the slot being
played (fa_save_slot -> fb_write) and updates the RAM entry. The U bank
is no longer used by FMini.
apply_preset_to sets SLOT from the preset index for FMINI, so the
generic browse path and the PRESETS knob load the same way. Categories:
INIT slots (100..199) are OTHER.
Editor protocol 3: NAMES count as two 7-bit bytes (200 does not fit in
one), reply buffer 2816 bytes. Web: 200 names, 3-digit labels, the
factory export stops at slot 99.
Tests: fmini_app_test, editor_test, ui_test, editor_bridge and the web
test follow the 200-slot behaviour. Host builds keep saved records in
RAM (no flash).
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
The preset bank has 200 slots instead of 256: 0..99 factory, 100..199
INIT, and OWN is 200. 200 keeps the count in uint8_t and frees two
flash objects' worth of space (13 objects, 104 KB, instead of 16).
Editor protocol 3 documents SLOT 0..199 and OWN = 200.
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
The three engines and their 126 KB of factory IMA samples are gone, with the
sample slots (80 KiB x 3 in flash), the SLICES page, the sample waveform, the
web editor's sample protocol and the slice store. Their engine numbers stay
(4, 8, 13): a track, a project or a user preset that names one is silent and
is never offered, through a stub like DIGITAL's (ENG_RETIRED, engines.c).
Image 536.6 KB -> 394.9 KB; RAM .data+.bss 65.9 KB -> 60.1 KB. The sample
flash region 0xA0000..0xDBFFF is free for user presets.
Protocol: SMP_BEGIN/WRITE/END/ERASE (11..14) get no reply; SMP_INFO answers 0
slots so the editor hides its Samples tab; backup ids 32..34 are gone. The
PERC conversion (SAMPLE PERC -> DRUM) stays. See web/EDITOR_PROTOCOL.md.
Tests: sample_test, slice_test, fuzz_smp removed; the others follow. Golden
renders of the retired engines removed; target budgets for their functions
removed and the ISR / mix_part costs updated on purpose.
Known, unchanged failures: fm4, union_test, the regress hashes of Felucca's
engines (66 changed at 1.12 too), web mock tables.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
- DET 2 / 3: one encoder detent is one step of a fine law (0.1 semitone,
0.05 from 4 to 6, 0.1 from 6 to 7), no acceleration. The law is SW2 value 4
(FT_DETFINE): a patch saved before 1.11 keeps its coarse law until a DET
knob or CC is turned; the factory bank is unchanged. The sanitiser keeps
the fine codes (up to 180) and SW2 up to 7. Display: +4.05 ST.
- SEQ: the pop-up is the width of the other pop-ups and the full height of
the screen; 8x8 rounded squares with a wider gap; no title. Opening SEQ
shows the word SEQUENCER for 0.5 s.
- MIDI CC: a scroll bar in place of the n/total counter. MIDI LEARN: the
line listens for the next free CC (reserved ones are refused); a CC the
other lines had is moved off them.
- Idle light show (MENU > ANIM IDLE, ui_input.c idle_leds) on at boot:
after a minute with no input the key LEDs run the power-on show.
- Key LEDs: all 27 keys glow dimly, as the buttons do.
- Tests: fmini_app_test covers the DET law and encoder steps, MIDI LEARN,
pitch bend and mod wheel from USB and TRS, and the take of 64.
- web/EDITOR_PROTOCOL.md: the fine law and its switch value. The web editor
still shows DET as the coarse law: check SW2 value 4 before trusting it.
Not tested on a real FM-1.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
Bug report: with the oscillators off, EMPHASIS full and CONTOUR 0, a note struck at velocity 112 or more sang a different pitch
from one struck softer; the cutoff followed the amplitude envelope in every stage.
Cause: voice.c has Felucca's "accent" for its own engines: a note-on above 110 (a key, MIDI, the arp, a step accented at 127) added
the loudness contour to the cutoff (m.cutoff += envq15 * 24 >> 7, about 1.7 octaves at full level) before e->render. FMINI read
that value like any other cutoff modulation. A Minimoog-style ladder wants velocity as loudness only. The accent now skips
ENG_FMINI; Felucca's other engines keep it (their goldens do not move).
Measured (tests/fmini_filter_test.c, new section 3a: mixer silent, CUTOFF 64, EMPHASIS 127, CONTOUR 0, A.ENV attack 30, decay 60,
sustain 90, KBD 0 and 127): velocity 100 sang 1109.8 Hz and velocities 111 to 127 sang 2566.3 Hz (+1451 cents); with the fix the
change from velocity 20 to 127 is 0.0 cents. The test fails on the old code.
Goldens: tests/regress.c plays a note at velocity 120 in every preset, so the 100 FMINI lines of tests/golden.txt move (only
those: the 76 stale ones of the other engines are untouched, before and after). A patch played above velocity 110 is darker than
on 1.7.2 and older. Nothing stored changes meaning; the target budget is unchanged. Notes: web/EDITOR_PROTOCOL.md (1.7.3),
CLAUDE.md (rule), DEVELOPING.md (gotcha).
Site: docs/emu and docs/index.html rebuilt for v1.7.3; the splash pictures show the new version.
Host suite: the same seven sections fail as before (fm4, ui_render, three regress, union_test, web pages) with the same counts
(regress 76 / 117 / 76). Not tested on a real FM-1.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
Two problems of the web editor, found by the owner:
- Names stopped at preset 72. The firmware's reply buffer (ed_out) held 664 bytes and the NAMES reply of FMINI (100 names, 1326
bytes) was cut there without an error. The buffer is 1408 bytes now. tests/editor_test.c (names_complete) checks every
engine's NAMES reply whole, in the default, the one-core and the ASan builds. The editor tells when a firmware (up to 1.7.1)
sent fewer names than it counts ("update available").
- The device answered late when a control was moved. The editor queued a request per change (every ~30 ms) behind the device,
which takes one request per pass of its main loop, so a drag piled up requests and the device followed old positions for
seconds after the mouse stopped. Now one round is in flight at a time and carries the latest value of every control changed
meanwhile (queue / flush in editor_fmini.html). web/test_editor_fmini.py drags for 2 s against a device that answers in 70 ms:
the last value arrived 547 ms after the release before, about one round trip (75 to 110 ms) now.
No change to the sound, the stored data or the commands. Reply buffer: pool 348840 B of 368640 (was 348096).
Docs: EDITOR_PROTOCOL.md (NAMES row, 1.7.2 note), DEVELOPING.md (two gotchas), CLAUDE.md (suite heading).
Site: docs/emu and docs/index.html rebuilt for v1.7.2; the splash pictures show the new version.
Host suite: the same seven sections fail as before (fm4, ui_render, three regress, union_test, web pages) and nowhere else.
Not tested on a real FM-1.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
The project's first name, FMUG, is gone. Nothing about the sound or the stored data changes.
- Files: eng_fmini.c, fmini_app.c, ui_fmini.c, editor_fmini.c, eng_fmini_filter.h, eng_fmini_presets.h, the tests, the
tools (fmini_bank.py, fmini_filter.py, fmini_retune.py, fmini_levels.json, gen_fmini_presets.py) and
web/make_fmini_installer.py.
- Identifiers: fmug_ / FMUG_ / FELUCCA_FMUG_ONLY became fmini_ / FMINI_ / FELUCCA_FMINI_ONLY; the editor commands are
FMINI_GET / FMINI_PUT / FMINI_PRESET (numbers 82-84 unchanged). The engine reports the name "FMINI" (was "FMUG") on the
device and in the editor's engine list; the editor still accepts "FMUG" from firmware up to 1.7.0.
- Short forms fmg_ / GR_FMG0..6 and FG_* are left as they are.
- Tables: tests/golden.txt and tests/target_budget.txt only had their keys renamed.
- Docs: CLAUDE.md and DEVELOPING.md say there is one branch (main) and record the rename; the test-suite notes now describe
the second regress section (FELUCCA_CPU2=0: 41 FMINI patches differ from the golden, as on 1.7.0).
- Site: docs/emu and docs/index.html rebuilt for v1.7.1; the splash pictures show the new version.
Checked: the firmware's instructions are identical to 1.7.0 (only the addresses of string literals move); the 100 FMINI golden
hashes are unchanged; every screen of the README shots is pixel-identical except the splash; the preset lab's metrics for the
100 patches are identical; the host suite fails in the same seven sections as before (fm4, ui_render, three regress, union_test,
web pages) and nowhere else. Not tested on a real FM-1.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
- filter: eng_fmug.c renders a trapezoidal ZDF ladder with a saturating stage each and the lag pole of the circuit; it self-oscillates as a
sine when EMPHASIS passes 8 (singing pitch = 1.578 x the corner, exact), tracks the keyboard 1 V/oct at KBD 127 (0 V at F), and its
passband loss and resonance peak follow the hardware. Fixed point (Q8 states so quiet ladders start singing), no 64-bit in the sample loop.
Laws and tables come from tools/fmug_filter.py (eng_fmug_filter.h, generated); constants from the CA-72 circuit notes (CREDITS.md)
- knobs: CUTOFF reads the dial -5.0 .. +5.0 (fmt MCUT), EMPHASIS 0.0 .. 10.0 (MEMP); FILT page draws the filter's real response and where it sings
- presets: all 100 matched to the old filter by their log-magnitude responses (tools/fmug_retune.py; bank cutoff= is the -3 dB corner at middle C,
emph= the dial); levels re-trimmed (tools/fmug_levels.json); goldens of the 100 FMUG renders registered
- tests: fmug_filter_test (singing pitch / THD / 1 V/oct over the keys / KBD 0 / dial positions / passband loss and peak / no runaway),
fmug_app_test and editor_test fixed (stale cutoffs, a 1-byte overflow), target budget fmug_render 170 -> 227
- web: editor shows the dials, protocol doc (fmt 14, 15; patches made before 1.7.0 keep their raw numbers), site texts, screenshots
- v1.7.0 emulator and installer rebuilt
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
- firmware: FMUG_GET target 3 (a user preset's patch), the octave on 82 / 83, cmd 84 (tempo, octave and FX globals a preset keeps), INFO tag 48 01 01
- web/editor_fmini.html: LIBRARY tab (save / load / export / erase per slot, export and import the whole library as a file, export the factory bank), Randomize with an amount, A/B compare, OCTAVE control; sound files keep every parameter, the octave and the FX settings
- tests: editor_test (user preset patch, octave, FMUG_PRESET), test_editor_fmini.py (library, files, A/B, randomize, factory bank against the real C handler)
- protocol doc, v1.6.1 emulator and installer rebuilt
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
- firmware: editor_fmug.c, FMUG_GET / FMUG_PUT (the 32-byte patch of a track or a factory patch), INFO tag 47 01 32
- web/editor_fmini.html: one self-contained page (Web MIDI + SysEx): CTRL OSC MIX FILT F.ENV A.ENV FX ARP, patch list, save / open sound files, polling of changes made on the FM-1
- tests: editor_test (fmug_patches), tests/editor_bridge.c + web/test_editor_fmini.py (the page in Chromium against the real C handler)
- site: Editor link in the nav; Installer workflow publishes editor/; protocol doc; v1.6.0 emulator and installer rebuilt
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
MENU > LARGE keeps one size per knob (#251): each knob shows all its
values in the size its longest value fits, so a value no longer jumps
between sizes while it is turned. No new fonts.
Updates check the package's size on the device: the update entry and the
update loader take only a package whose firmware area is exactly the
FM-1's. Another device's package is refused before anything is erased
(the update screen shows FAILED -15; the loader answers -14).
Second core (beta, PR #247): MENU > SYSTEM > 2ND CORE, OFF by default.
ON (BETA) applies from the next power-on: the second core renders some
of the four parts of each block, bit for bit the one-core sound. A unit
whose second core misreads goes on with one core and sets it back to
OFF. FELUCCA_CPU2=0 builds none of it. Start, mailbox and guards from
X0X (with Melodee's dual-core findings), the split and hardening after
Jangada.
Felucca-Engines: ANALOG, LOFI, TRIO, WHEEL and NOISE, the engine
interface, the shared DSP helpers and their table generator move to
https://github.com/hugelton/Felucca-Engines under the MIT licence,
included as the git submodule firmware/engines. The firmware stays
GPL-3.0-only; clone with --recurse-submodules. The sound is unchanged
(the same golden renders); the engines' own tests run with Felucca's.
Co-authored-by: Кирилл Сапфиров <gospodindilly@gmail.com>