Commit Graph
152 Commits
Author SHA1 Message Date
Claude c51c6974dd FX and voice: state in locals, loop-invariant tests out of the loops
Same sound, checked bit for bit:
- fmini_render: the voice's amplitude ramp by a running sum (amp_at's
  x = (amp1 - amp0) * i, one add a sample) instead of a multiply a sample.
- mix_part: the part's level and pan in one loop, each send on its own loop
  (a send at 0 is no loop, and no test per sample).
- track_dist: the states in locals; the TUBE and the plain clipper as two loops.
- ins_drive / ins_swept: states in locals; CRUSH vs the rest, and CHORUS vs
  FLANGER, one loop each (the kind is one a block).
- cho_block: one loop per chorus TYPE, the state in locals.
- rev_room (FMini-1, stereo): the combs' and allpasses' indices and low-passes
  in locals for the block.

tests/target_budget.txt: updated on purpose. The static count sums each loop's
code, so the loop bodies that are now one per TYPE (cho_block +39, ins_swept
+72) count more, while only one of them runs in a block. Reduced: mix_part
-529, ins_drive -93, dly_block -19, track_dist -6, fmini_render -1.

Checked:
- FX harness, 105 configurations (delay x chorus x reverb types, sends and
  parameters moving): identical hashes.
- track_dist and the INSERT types (0..8, TUBE on and off, fades): 108
  configurations identical to the previous code.
- tests/regress: all 288 golden hashes identical to main.
- union_test output identical to main.
- The full suite: only the known failures (fm4, ui_render, the regressions,
  union_test) fail; nothing new.

Not done: the master chain (its block version showed no gain on the host and
moved the ISR's static count), the PLATE and HALL reverbs, the perform layer.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-12 20:30:57 -03:00
Claude 5380984880 Site for the FM-1 and the SMK-37: both installers, two emulators
- Site text (pt, en) covers both keyboards; new SMK-37 section; the hero film
  shrinks the Minimoog into the FM-1's and the SMK-37's screens.
- Installer: embeds the FM-1 package and the SMK-37 Pro, Elite and MKE-P37
  ones, picks the package by the identity found and says which device it
  detected after step 1; when none is found by name it asks for the MIDI
  input and the device. Details lists every .fwsc.
- "Try in browser" opens a menu: FM-1 (emu/) or SMK-37 (emu/smk/).
- SMK-37 emulator: felucca_web.c with BOARD_SMK37 (web/emu/smk_web_input.h),
  its own worklet and page, the panel adapted from Felucca SMK's simulator
  (Chance Roth, GPL-3.0; credited). The FM-1 wasm is unchanged.
- Installer workflow builds the three SMK-37 packages and publishes them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-11 11:05:27 -03:00
Claude b51ea70f7f SMK-37 v2.5.12: PRESET SETTINGS > VELOCITY SENS. (main's v2.5.5)
OFF (every factory preset): the sound plays every note at 127, the 37 keys included;
ON: as played. MIDI OUT always sends the velocity.

The branch's FM-1 build is main's v2.5.5, byte for byte.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-09 22:10:12 -03:00
Claude 13b764c790 SMK-37 v2.5.11: GLOBAL > FACTORY RESET (main's v2.5.3 and v2.5.4)
FACTORY RESET above SUPPORT FMINI-1: every saved preset back to the factory's and GLOBAL's
settings as they come (on the SMK-37 also MIDI OUT ALL, MIDI OUT CH 1); the question with
the SMK's names (K4: YES / NO, BT: OK). GLO held opens ABOUT on its row.

The branch's FM-1 build is main's v2.5.4, byte for byte.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-09 21:46:18 -03:00
Claude 5932e44f71 SMK-37 v2.5.10: 000 MINI LEAD as on the FM-1 (v2.5.2); picker pads dim blue, the loaded preset bright white
- main's f969bd3 (FM-1 v2.5.2): 000 MINI LEAD MONO, PITCH BEND +/-2, F.ENV SUSTAIN 7.9.
- The preset picker pads: dim blue, the loaded one bright white (the owner's; they were
  all orange in 2.5.9).

The branch's FM-1 build is main's v2.5.2, byte for byte.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-09 21:06:42 -03:00
Claude 0c888fa4cc SMK-37 v2.5.6: the encoders count fast turns
The stock decoder wanted each quadrature state to hold two frames (3.2 ms) and three valid
states in a row: a quick spin (above ~75 states a second) lost whole detents, or all of
them. Now a plain state machine: every new state counts at once (bounce cancels), a missed
state counts two the way the knob was going, four counts make a detent, and back at the
rest state the remainder rounds so the count stays on the clicks.
tests/smk_encoder_test.c (registered): slow, fast, missed states, bounce, half a detent.

Everything is behind BOARD_SMK37: the FM-1 build is main's v2.5.1, byte for byte.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-09 19:03:08 -03:00
Claude 00b9f78ad4 FMini-1 v2.5.1 on the SMK-37 branch (SMK-37 v2.5.4): SAVE keeps the name, OVERWRITE shows the lost preset large
The change of main's 65f123d (FM-1 v2.5.1), and on the SMK-37 a pad picked in the SAVE
dialog moves only the slot too. The branch's FM-1 build is main's v2.5.1, byte for byte.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-09 18:41:58 -03:00
Claude 0723e354e8 SMK-37 v2.5.3: MIDI OUT sends the pads, the eight knobs and the four faders
- Pads: notes 36..43 (bottom row) and 44..51 (top row) on channel 10, with velocity and
  note-off (smk_input.h queues the UI-owned pads' hits and releases); they still pick
  presets.
- K1..K8: CC 102..109, faders: CC 110..113, on MIDI OUT CH, fixed whatever the control
  does in FMini-1. The encoders keep a value 0..127 each (from 64); K1 sends the MASTER.
- The main loop's messages reach midi_out_event through a queue drained by the audio
  ISR (its one producer). The keys already went out with the octave.
- tests/smk_midi_out_test.c: the knob CCs and the pad notes.

Everything is behind BOARD_SMK37: the FM-1 build is byte-identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-09 18:14:34 -03:00
Claude a70a5e3f1a SMK-37: TRS MIDI OUT, MIDI SETTINGS for the SMK, the wheel by the preset's bend range, K names in the hints
- The pitch wheel bends by the preset's PITCH BEND range (fm_bend_mode), the same
  path as an incoming MIDI bend (midi_expression).
- MIDI OUT on the TRS jack (UART1 TX on PC7): hal/smk_uart_tx.h and src/smk_midi_out.c,
  the fm1-to-smk37 kit's pattern (USB-MIDI packets to bytes, a ring of whole messages,
  one byte a TIMER5 tick, quiet after 4 bytes not gone). Not yet tried on a unit.
- GLO > MIDI SETTINGS on the SMK-37: MIDI OUT (ALL, USB, TRS), MIDI OUT CH (1..16,
  default 1), MIDI IN CH (ANY, 1..16), MIDI IN CC, MIDI CLOCK (OFF, USB), MIDI IN
  MONITOR. MIDI IN is always USB (no row).
- The screen's hints name the SMK knobs: K2 (PRESETS), K3 (SELECT), K4 (ALGO);
  HARDWARE CALIBRATION asks for the SMK's printed knob and button names.
- tests/smk_midi_out_test.c (registered in run_tests.sh).

Everything is behind BOARD_SMK37: the FM-1 build is byte-identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-09 16:30:29 -03:00
Claude f265ae9f69 SMK-37 port: FMini-1's preset slots in the SMK store, FMINI data family, LEDs sized for both
- storage.c (BOARD_SMK37): the 200 preset slots (13 A/B pairs, 26 sectors)
  do not fit FL_DATA's spare room; FMini-1 has no sample engine, so they take
  USRFLASH from 0xC2000 (0xC2000..0xDBFFF, inside FL_SMP; st_erase releases
  the stock mapping's marker before the first erase there). The store owner
  tag is "SMK37DATAFMINI" (FMini-1's own family). Under another tag, only the
  preset copies holding an FMini-1 commit record are erased: an intact stock
  mapping or another firmware's samples stay as they are.
- fmini_app.c: the LED picture is built in LED_BUF with LED_KEY0 (FM1_NCOL
  and 14 on the FM-1, unchanged) and goes to the SMK's button LEDs and pads
  through ui_input.c's smk_leds (the pads still as the white keys: the
  picker and the SEQ steps come with the mapping).
- Tests: smk_flash_test places the preset slots in FL_SMP; smk_owner_test
  takes the FMINI tag and checks the preset-slot rule; run_tests.sh uses this
  version's FM-1 files and FMini-1's SMK package names.
- BOARD=smk37 builds the Pro, Elite and MKE packages; the FM-1 build stays
  byte-identical to 2.5.0. The SMK flash map, owner, package, OTA (three
  models) and loader tests pass, as do the FM-1 OTA and loader tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-09 12:51:16 -03:00
Claude 1b0b5c6b1c SMK-37 port: the board layer (genkigenki/Felucca smk37, b67312c) on FMini-1
The SMK-37 target from github.com/genkigenki/Felucca branch smk37 (commit
b67312c on Felucca 1.6.1, = hugelton/Felucca#237; the fm1-to-smk37 kit's
Felucca layer), applied to FMini-1, whose firmware/hal and firmware/loader are
Felucca 1.6.1's:

- BOARD=smk37 / MODEL=pro|elite|mke (tools/build.py, build.sh), the SMK flash
  map with its protected ranges (fm1_flash_map.h), the update path and its
  size checks (ota.c, ldr_core.c), the SMK input HAL, LCD and pad LEDs, the
  owner tag of the store, installers and tests.
- Conflicts resolved for FMini-1: packages fmini-1-fm1-<version>.fwsc and
  fmini-1-smk37[-elite|-mke]-<version>.fwsc; FL_JEDEC_OK keeps the UC25HQ80
  (0xB36014) on the FM-1 and accepts it on the SMK too; the official V16
  length stays FM-1 only; the sample slots stay gone (FMini-1 has no SAMPLE
  engine: the layer's eng_sample.c and editor sample hunks are not taken);
  main.c keeps FMini-1's UI_* hooks with the SMK calls around them.
- The FM-1 build is byte-identical to 2.5.0 (app, package and loader
  hashes). The SMK build does not link yet: FMini-1's preset objects need
  places in the SMK store, and fmini_app.c's LED code is FM-1 sized.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-09 12:46:23 -03:00
Claude daf3ac62fc FMini-1 2.5.0: newer FM-1s with the UC25HQ80 flash save and update
- Firmware: persist_boot accepts the UC25HQ80 (JEDEC 0xB36014) beside the
  Puya P25Q80 (0x856014), through FL_JEDEC_OK (firmware/hal/fm1_flash.h).
  On those units the firmware took the flash for unknown: saves stayed in
  RAM ("flash error") and the M-UPGRADE update was ignored (main.c runs
  ota_session only with flash_ok), so the installer could not update them.
  The update loader reads no JEDEC id and is unchanged.
- Version 2.5.0 (core.h, the editor's FW_LATEST).
- Emulator: felucca_web.c defines FL_JEDEC_OK beside its fl_jedec_ram stub
  (it does not include fm1_flash.h; the emulator did not build without it).
  docs/emu and the installer page (docs/index.html) rebuilt.
- Tests: ui_test's FMINI panel check expected WAVE 2 to stop at 5; it runs to
  6 since SIN (2.2.18). The whole suite fails only in its known sections.

Not tested on a real FM-1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-09 12:04:21 -03:00
Claude 7619d903fa Add NOTE PRIORITY to GLOBAL: LOW (default), HIGH, LAST (2.2.19)
- GLOBAL gets NOTE PRIORITY below TRANSPOSE; SUPPORT and ABOUT move down one row.
- The mono part plays the note the stack picks: LOW (the lowest held, as before),
  HIGH (the highest), LAST (the last key played). It is global and saved with the GLOBAL settings.
  An erased setting reads LOW.
- Tests: the GLOBAL rows, and the note each priority plays.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-06 11:01:08 -03:00
Claude dabca1b1c2 Add SIN to the OSC waves; PRESET VOLUME shown 0..10 (2.2.18)
- The wave bytes (FG_W1..FG_W3) were clamped to 5 by the patch
  sanitizer, so SIN (6) was never stored on the OSC page. Their limit is 6 now.
- The OSC page draws SIN in its wave box.
- PRESET SETTINGS: VOLUME shows 0..10; turning it steps the level in
  tenths of 0..127 (stored value unchanged until it is turned). Presets keep their sound.
- Tests: SIN is set and drawn; VOLUME range 0..10 is checked.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-06 10:57:30 -03:00
Claude c95a51648c FMini-1 2.2.17: SIN, a sine oscillator waveform (the last OSC wave)
- Wave 6 SIN in eng_fmini.c reads the sine table (osc_sine, dsp.c):
  no harmonics, so no polyBLEP. Waves 0..5 are unchanged; the goldens
  are the same set as before.
- The OSC wave selectors stop at 6 (the range selectors stay at 5).
- Editor: SIN in the wave list. Test: the name, the selector's range
  and a sine peak.
- Version 2.2.17 (core.h, FW_LATEST); emulator and installer regenerated.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-06 09:33:51 -03:00
Claude 348b0db6cb FMini-1 2.2.13: separate RELEASE from DECAY (amp and filter)
- The loudness RELEASE (P_REL) is its own knob, A.ENV's LEVEL slot
  (was the DECAY time: voice.c's "no REL knob" is gone in FMINI builds).
- The filter contour's RELEASE is F.ENV's AMOUNT slot (was a copy of
  CONTOUR). It is t->frel: bit 7 = explicit, 0 = as the DECAY.
- Both RELEASEs have the DECAY's range (the same ENV_EXP table).
- Presets: the FR_PSET block carries four bytes now (bend, wheel,
  filter release, loudness release). Older records (2 bytes or none)
  get the DECAY for both, so their sound does not change. Factory
  presets store their DECAY for both: the same sound as before.
- Goldens: the 66 changed renders are the same set as at HEAD (no
  FMini render changed). Tests updated for the new release behaviour.
- Version 2.2.13 (core.h, FW_LATEST); emulator and installer regenerated.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-05 22:50:57 -03:00
Claude 670c8b3b74 FMini-1 2.2.12: PRESET SETTINGS is a list pop-up, not a page
- No PRESET tab: the page cycle is back to seven tabs. EDIT on FILT
  opens PRESET SETTINGS as a GLOBAL-style list: VOLUME, MODE,
  PITCH BEND, MOD WHEEL (SELECT moves, ALGORITHM changes, EDIT closes).
- A.ENV's LEVEL knob has no function; its CC 7 sets VOLUME.
- Version 2.2.12 (core.h, FW_LATEST in web/editor_fmini.html);
  emulator and installer regenerated.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-05 22:33:25 -03:00
Claude 5329aeab75 FMini-1 2.2.11: PRESET SETTINGS page and pop-up
- New page after FX (SELECT goes on to it) and a pop-up when EDIT is
  pressed again on FILT: VOLUME (the LEVEL that was A.ENV's, same
  per-preset values), MODE (MONO/POLY, as CTRL's VOICES), PITCH BEND
  (moved out of GLOBAL, per preset) and MOD WHEEL position (0..127, the
  preset's stored position, moved by CC1 or the knob, saved with the
  preset).
- A.ENV's LEVEL knob has no function; its CC 7 now sets VOLUME.
- PITCH BEND range and MOD WHEEL are stored in a new FR_PSET block of
  each preset record (factory presets: 0 and 0); the old layout is
  unchanged.
- fm_bend_mode is a global declared in core.h (the UI reads it).
- FX pop-ups move to FMG pages 8..11; help hint and tests updated.
- Version 2.2.11 (core.h, FW_LATEST in web/editor_fmini.html);
  emulator and installer regenerated.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-05 18:07:59 -03:00
Claude d9f1addd09 FMini-1: v2.2.10 (FX page: SELECT stops at the four knobs, no EDIT positions)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-05 17:08:51 -03:00
Claude c681479c54 FMini-1: v2.2.8 (MIDI monitor keeps receiving past 25 and redraws; SELECT scroll redraws)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-05 14:08:57 -03:00
Claude 8ee633ebf7 FMini-1: v2.2.7 (SUPPORT FMINI-1 above ABOUT; the QR screen's text fits the width)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-05 13:55:38 -03:00
Claude 7d46e43324 FMini-1: v2.2.6 (GLOBAL: SUPPORT FMINI-1!! with the Ko-fi QR code)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-05 13:23:49 -03:00
Claude 186df1c9b0 FMini-1: v2.2.5 (MIDI monitor: 25 messages, scroll bar, SELECT scrolls, cleared on close)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-05 13:02:50 -03:00
Claude 3bb860589f FMini-1: test the MIDI monitor through the USB EP1 path
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-05 12:51:49 -03:00
Claude c9a76f3747 FMini-1: MIDI MONITOR no MIDI SETTINGS
Popup listing the last 8 MIDI messages in (USB and TRS, before any
filter), newest first. Any key or ALGORITHM goes back to MIDI SETTINGS.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-05 12:29:17 -03:00
Claude 9b6fba7f36 FMini-1: PITCH BEND sai do MIDI SETTINGS para o GLOBAL
GLOBAL: MIDI SETTINGS, TUNING, TRANSPOSE, PITCH BEND, ABOUT.
MIDI SETTINGS: MIDI IN, MIDI CHANNEL, MIDI CC, MIDI CLOCK.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-05 12:21:28 -03:00
Claude 7b94b73228 FMini-1: agrupa opcoes MIDI em MIDI SETTINGS no GLOBAL
Novo submenu MIDI SETTINGS (GLOBAL > MIDI SETTINGS) com MIDI IN, MIDI
CHANNEL, MIDI CC, MIDI CLOCK e PITCH BEND. GLO volta um nivel.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-05 12:18:04 -03:00
Claude 013c226d58 MIDI bank select: CC0 ignored; the bank is CC32 (0 = bank 0, any other value = bank 1)
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-05 10:30:50 -03:00
Claude a470729260 USB audio out: split the overrun and data-error counters (USBDIAG 11 counters)
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-04 22:18:38 -03:00
Claude bce05793ad USB audio out: count packets with overrun / data-error bits (USBDIAG counter 10)
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-04 22:04:06 -03:00
Claude 5a4a2f4cf7 USB audio out: interpolating reader with a continuous rate (no drop or repeat)
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-04 21:54:41 -03:00
Claude 6ea2b6264e USB audio out: blend the slow-host stretch instead of a repeated frame
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-04 21:47:04 -03:00
Claude dfe115f263 FMini-1 USB audio out: diagnostics in the editor (command 89)
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
2026-11-04 21:13:50 -03:00
Claude 2297425dd2 FMini-1 USB audio out, step 3: play the computer's audio through the DAC
The audio ISR now plays the playback ring (usb_play_mix, audio.c):

- After the USB input and USB LEVEL FIXED, before the click, the frames
  are added to the DAC's signal at MASTER's level (song.master_q12) and
  saturated at +-32767. They are not added to the USB input (uac_tap):
  the host would record its own output back.
- Prebuffer: 128 frames before the first sound. The ring's fill is
  followed against TARGET 256 +- BAND 128: one frame is dropped above
  the band, one repeated below it (the host's clock is adaptive, so the
  device follows it; there is no feedback endpoint). A dry ring goes
  silent for the rest of the block and primes again.
- The stream's reset (SET_INTERFACE, configuration, bus reset) sets a
  flag; the reader moves its own index. The audio ISR can nest TIMER5,
  so the writer never touches pb_r.
- The playback format is 44.1 kHz only: the reader does not resample.
  Windows converts for applications that play at 48 kHz.

tests/uac_out_test.c: the reader's blocks (prime, MASTER level, sums
with saturation, drop and repeat, a dry ring, the flag, alt 0) and a
10 s run with the host 0.04 % slow: no dry ring, about 176 repeats.
usb_desc_test.c: the playback format is 44.1 kHz only.

Not tested on a real FM-1 yet.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-04 20:15:50 -03:00
Claude f735a78db1 FMini-1 USB audio out, step 2: receive the playback packets
The playback stream (alt 1) now receives its EP3 OUT packets:

- uac_out_stream() runs on SET_INTERFACE, SET_CONFIGURATION and bus
  reset: alt 1 sets EP3 RX up as isochronous (RXMAXP, RXCSR2 ISO,
  FlushFIFO + ClrDataTog as EP1's RX) and enables its interrupt
  (INTRRX1 bit 3); alt 0 turns it back to EP1 only.
- uac_out_rx() reads one packet in the TIMER5 poll, the same CSR
  sequence as ep1_rx; the packet is clamped to UAC_MAXP and dropped
  whole when the ring has no room (isochronous: no NAK).
- uac_out_store() unpacks 16-bit stereo little endian frames into
  pb_ring (L | R << 16, the layout of ua_ring). The ring has 512
  frames. Only the TIMER5 side writes pb_w.
- The reader (the audio ISR, step 3) does not exist yet, so nothing
  plays; the ring only fills.

tests/uac_out_test.c checks the store: byte layout, a partial frame,
the largest packet, wrap-around, a full ring (whole packet dropped,
earlier frames intact) and the room a reader gives back.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-04 19:53:44 -03:00
Claude 63c9945e20 FMini-1 USB audio out, step 1: the playback interface's descriptors
FELUCCA_UAC_OUT (on by default without the console) adds a class 1.0
playback stream after the audio input and the MIDI interface:

- interface a+3, alt 0 (no bandwidth) and alt 1 (the stream);
- endpoint 3 OUT, isochronous, adaptive, 1 ms, wMaxPacketSize of the
  input stream, with its class-specific endpoint descriptor;
- a second USB streaming input terminal (3, 2 ch L R) and a speaker
  output terminal (4, from 3);
- the AC header lists three interfaces (streams first, MIDI last with
  FELUCCA_UAC_AS_FIRST, the order macOS' AppleUSBAudio parses);
- bcdDevice + 0.40 so hosts do not reuse what they learnt about the
  input-only device.

No data is received yet: SET_INTERFACE / GET_INTERFACE accept the
playback interface's alt settings (alt 1 is acknowledged, the endpoint
is not configured), so Windows can list the device under playback
without a stall. Reception and mixing follow in steps 2 and 3.

FELUCCA_UAC_OUT needs FELUCCA_UAC and no FELUCCA_CDC (EP3 is the
console's bulk pipe); usb.c stops the build otherwise.

Tests: usb_desc_test.c learns T_OUT (interfaces, endpoints, bcdDevice,
collection order, the playback terminals, the alt settings and the
endpoint); run_tests.sh runs it with 48 kHz and 44.1 kHz only and both
collection orders. The byte-for-byte references are not applied to the
playback build, which differs from 1.0 on purpose.

Not tested on a real FM-1 yet: the playback endpoint appears in
Windows' Playback list only after the host accepts the descriptors.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-04 19:25:29 -03:00
Claude 09947fee6b FMini-1 FILT: LP / HP switch under CUTOFF (FT_HP, bit 4 of SW2)
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
2026-11-04 14:41:39 -03:00
Claude b81608c025 Note divisions: 1/2T and 1/4T in ARP RATE, SEQ DIV and A-SYNC; 8T and 16T renamed 1/8T and 1/16T
N_DIV gains 1/2T (code 10, 4/3 of a quarter) and 1/4T (code 11, 2/3 of a
quarter), appended, so stored values keep their meaning. The shown order
(DIV_ORDER) places them by length. The DELAY's TIME list (N_DTIME) gets the
new names too; its own dotted codes 10..12 are unchanged. Renamed labels
only: the values stay. LFO SYNC, the SLICER and the SEQ's slide keep their
own lists. The editor's note tables follow (divLength reads the triplets).

Tests: the length check reads the dotted codes only for N_DTIME; the TIME
check skips A-SYNC's type code (7); the step expectations follow the order.
Emulator regenerated (docs/emu2).

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-03 22:35:51 -03:00
Claude e21b376ea0 FMini-1 DELAY popup: TYPE and TIME knobs follow the shown order
The gauge of a knob now sits at the value's place in the order it is
shown (fmg_ratio over enum_rank): A-SYNC is second, not last. Changing
the TYPE to or from A-SYNC keeps the delay's length (dly_time_convert):
the stored TIME is a note value (0..9) there and ms (0..127) elsewhere,
so the TIME used to jump. Test: the type knob and the conversion both ways.
Emulator regenerated (docs/emu2).

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-03 21:53:34 -03:00
Claude f81aed9de2 FMini-1 DELAY: A-SYNC's TIME shows only the note values that fit the line
The knob skips the ARP RATE values longer than the delay line (1.48 s) at
the tempo now, so they are not shown; a value that fits nowhere (a very
slow tempo) stays. dly_div_fits() is the test, the delay stays silent for
a stored value that does not fit. Tests: 60 BPM skips 1/2 and longer.
Emulator regenerated (docs/emu2).

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-03 21:42:53 -03:00
Claude f73060a7ba FMini-1 DELAY: A-SYNC type, its TIME in note values synced to the tempo
- TYPE gets A-SYNC (7, appended so stored values keep their meaning),
  shown right after ANALOG (DLYTYPE_ORDER, the display order).
- A-SYNC is ANALOG's algorithm (fx.c dly_kind); its TIME (G_DRREV, 0..9)
  is the ARP RATE's note values (N_DIV, with their order), and
  delay_samples takes the tempo's length of the value (div_samples: the
  internal clock, ARP / SEQ, or MIDI clock).
- Limit: the delay line holds 1.48 s, so note values longer than that
  (1/2 below 81 BPM, 1/1, 2BAR, 4BAR) are cut to 1.48 s.
- tests: the type order, the sync length, the type list (eight).
  docs/emu2 rebuilt.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-03 21:35:19 -03:00
Claude 4246bb6d26 FMini-1 GLO: TUNING and TRANSPOSE redraw as they change
fa_signature did not include them, so the list kept the old value until
the highlight moved. Both now enter the signature, with a test for each.
docs/emu2 rebuilt.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-03 21:19:53 -03:00
Claude 089d1d3cd3 FMini-1 GLOBAL: TUNING (410..470 Hz) and TRANSPOSE (-12..+12)
- GLO list: TUNING and TRANSPOSE below PITCH BEND, ABOUT last (8 rows,
  17 px apart). ALGORITHM changes them; TUNING is 1 Hz a click.
- Global, not in the preset: every note (keys, MIDI, SEQ, ARP) goes
  through trk_note_on / trk_note_off (voice.c), TRANSPOSE applies there
  and a note outside 0..127 is dropped (on and off alike); TUNING adds
  its cents from A 440 to the pitch (eng_fmini.c). A change of TRANSPOSE
  is a panic, so no note hangs.
- Settings: two new bytes after the record's last one (no shift of the
  older bytes; the magic is unchanged); erased bytes read as 440 Hz and 0.
- tests: the GLO list, the limits, the transposed out-of-range note.
  docs/emu2 rebuilt.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-03 21:13:57 -03:00
Claude 5dd982ca63 FMini-1: mod wheel is a vibrato (unbuilt, for review)
- eng_fmini: CC1 (t->mw) adds the track LFO to the pitch, +-1 semitone at
  full wheel, whatever MOD OSC is. It no longer deepens the MOD depth:
  that is the patch's E6 only (the matrix's MODW source still drives it).
  With the wheel at 0 the render is unchanged, so the FMini goldens hold.
- tests/fmini_filter_test: the wheel at 0 leaves the pitch still; at 127
  it sways about a semitone with MOD OSC off.
- web/site_fmini: the mod wheel is named as vibrato (pt, en).

Not built for the firmware yet: the JieLi toolchain and the AC79 SDK could
not be fetched in this session, so build.sh, the full suite, the target
budget and the version bump are still to do before this goes to main.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-02 21:37:18 -03:00
Claude bdaf268570 FMini-1 1.23.0: GLO held opens ABOUT
- UI: holding GLO for 0.5 s opens ABOUT (the splash with the version) from
  anywhere: the other pop-ups close (SEQ, its REC too), the list's cursor
  goes to ABOUT, so GLO or an encoder goes back to the list on that line.
  A GLO tap is unchanged (the list, one level back, closed).
- Tests: fmini_app_test, tap vs hold (0.4 s still the list, 0.5 s ABOUT,
  the release keeps it), ABOUT back to the list, the hold over the SEQ
  pop-up with REC armed, an encoder back.
- Web: editor FW_LATEST 1.23.0, emulator and installer rebuilt.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-02 19:32:58 -03:00
Claude 1719657108 FMini-1 1.22.0: SEQ recording takes rests (SELECT)
- SEQ: while REC records, SELECT right leaves a rest (the slot stays empty,
  the take goes on; trailing rests count in the length, a pause before the
  loop comes round) and SELECT left goes back one slot and empties it (a
  note or a rest taken back). A rest also starts a fresh take (the old one
  goes, as a first note does); back before anything is played keeps the old
  take. An empty step plays as a rest (seq.c: released, nothing sounds).
- Grid: the take's rests in a dark red (not the empty slots' grey); while
  REC is armed the hint reads SELECT: REST / BACK. The SEQ comment says 64
  slots (it said 16).
- Site (pt, en): the sequencer's line mentions the rests.
- Tests: fmini_app_test, rests, back over notes and rests, past the start,
  a fresh take (back keeps it, a rest starts it), SELECT with REC off.
- Web: editor FW_LATEST 1.22.0, emulator and installer rebuilt.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-02 19:01:33 -03:00
Claude 24f992affd FMini-1 1.21.0: HOME opens FILT
- UI: the HOME button opens FILT (the filter page, as EDIT) and closes the
  pop-ups; power-on starts on FILT too. LFO still opens CTRL. The HOME LED
  lights with FILT (with EDIT's). A preset change keeps the page (1.18.0).
- fmini_app.c: FA_HOME_PAGE; the header comment's button list corrected
  (EDIT is FILT, SCL OSC then MIX, GLO the global pop-up).
- Site (pt, en): FILT is the home page (HOME or EDIT); CTRL is the LFO
  button's.
- Tests: fmini_app_test, HOME -> FILT, and HOME closes GLO on the way.
- Web: editor FW_LATEST 1.21.0, emulator and installer rebuilt.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-02 17:51:40 -03:00
Claude 37636965f6 FMini-1 1.20.2: TUNE moves 0.1 a detent
- UI: the TUNE knob (CTRL) moves exactly 0.1 a detent on its 0.0 .. 10.0
  dial, with no acceleration (a byte step was 0.079 shown, and the first
  detent of a turn was 2 steps, so the number skipped or repeated tenths).
  Each tenth has its own byte, round trips exact, 5.0 = 64 (A 440), 0.0 = 0,
  10.0 = 127; the dial shows the tenth itself. The stored byte, the sound and
  MIDI CC / the editor are unchanged.
- Tests: fmini_app_test, TUNE through all 101 tenths, both ways and the ends
  (fails on 1.20.1: 5.0 was ratio 503).
- Web: editor FW_LATEST 1.20.2, emulator and installer rebuilt.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-02 17:01:01 -03:00
Claude 95f6739fac FMini-1 1.20.1: 099 CALM SEA (was SONAR), 084 NORTHERN SKY (was OCEAN TIDE)
- Bank: 099 is CALM SEA (effects, 90-99): soft sea waves that come and go.
  White noise, no EMPHASIS; the LFO (SIN, about 9 s a wave) opens and closes
  the filter, so a wave grows louder and brighter together (about 14 dB
  crest to trough), a low rumble between; wide chorus, a long dark HALL.
- Bank: 084 OCEAN TIDE (sea noise, now CALM SEA's job) becomes NORTHERN SKY
  (atmospheres and drones, 80-89): a wide drone in fifths (two saws at 8' a
  fifth apart, a triangle at 4'), the filter contour swelling it in over 4 s,
  a slow LFO on the filter, poly; JUNO chorus, TAPE delay, bright CLOUD.
- Both RELEASE 3.5 s: 4.5 s left voices busy 12 s after the note-offs
  (regress health). LEVELs from preset_lab --calibrate (loudness -22.1 and
  -21.6, as their groups); neither is close to another patch.
- Tests: tests/golden.txt FMINI/84 and FMINI/99 are the new renders; the
  rest as before (66 known changed renders, 0 health failures).
- Web: editor FACTORY RESET names, FW_LATEST 1.20.1, emulator, installer.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-02 16:26:04 -03:00
Claude b5bcc21c7e FMini-1 1.20.0: preset 099 is SONAR, an effect
- Bank: 099 (NEW 099, a placeholder saw lead) becomes SONAR in the effects
  group (90-99, category FX): a triangle at 4' with a quieter one at 8' into a
  ringing filter (EMPHASIS 7.6, a short contour), poly, a 1.4 s decay, into a
  P-PONG delay (560 ms, feedback 78) and a big HALL. LEVEL 116 from
  preset_lab --calibrate (loudness -22.7, peak -11.7 dBFS, as its neighbours).
- Generated: eng_fmini_presets.h and the editor's FACTORY RESET names.
- Tests: tests/golden.txt FMINI/99 is the new render (99_SONAR; the old
  99_NEW_099 line replaced). The rest as before (66 known changed renders).
- Web: editor FW_LATEST 1.20.0, emulator and installer rebuilt.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
2026-11-02 15:10:21 -03:00