The audio interrupt's static loop cost rose 10.2 % with the sustain
code (a shared compilation unit; the code in the interrupt is unchanged).
Accepted by the owner. Measured on 2.6.5 at 9383, so the baseline was
already 6.9 % above the recorded budget before this change.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
- tools/fmini_bank.py: OSC 1 wave sine (was the triangle), CUTOFF at its maximum
(+5.0 on the dial, byte 127; was -1.9, closed)
- tools/gen_fmini_presets.py: the oscillator wave table takes 6 = SIN (the
firmware's sine, eng_fmini.c); it was missing from the table
- firmware/src/eng_fmini_presets.h regenerated (only the 04 line)
- version 2.6.5 in core.h and web/editor_fmini.html (FW_LATEST)
- tests/golden.txt: preset/FMINI/04_SINE_SOLO only
- samples: 000 MINI LEAD a hard rock solo at 150 bpm (bends, runs, a held D6);
004 SINE SOLO a soul ballad at 84 bpm in Bb (scoops, melisma, vibrato)
- docs/emu, docs/index.html, docs/sounds regenerated for 2.6.5
Tests: fmini_app_test and fmini_filter_test pass; the full suite fails only in
the sections already listed as known.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
- tools/fmini_bank.py: coarse byte stays 65 (nearest 11-cent step), the
cents bytes carry the 8 (det_cents), as for patches 010 and 040
- firmware/src/eng_fmini_presets.h regenerated (only the 00 line)
- version 2.6.4 in core.h and web/editor_fmini.html (FW_LATEST)
- tests/golden.txt: preset/FMINI/00_MINI_LEAD only
- docs/emu, docs/index.html, docs/sounds regenerated for 2.6.4
Tests: fmini_app_test and fmini_filter_test pass; the full suite fails
only in the sections already listed as known (fm4, union, regress,
second core, ui, web pages).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
- firmware: the factory reset, an erased config byte and the GLO list's
initial value now read LAST (was LOW). A device that saved its own value
keeps it. Mono voices pick the last key played where they picked the
lowest before, in every engine (the default is global).
- tests: the reset check expects LAST; the goldens of the FMINI renders
that play several keys moved on purpose (90 lines). Two stale goldens of
other engines now match again (FM6/02_FM_BASS, LOFI/04_STEP_LEAD).
- web: EDITOR_PROTOCOL notes the default; FW_LATEST 2.6.3.
- emulators and installer regenerated for 2.6.3 (FM-1 and the three SMK-37).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
- firmware: the VOLUME row of PRESET SETTINGS shows and turns the stored
P_LEVEL itself (0..127), instead of the 0..10 dial that was a rounding
of it. The sound does not change: the level is the same byte.
The gauge is level * 1000 / 127.
- tests: fmini_app_test turns VOLUME over its full 0..127 range.
- web: FW_LATEST 2.6.1.
- emulators and installer regenerated for 2.6.1 (FM-1 and the three SMK-37).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
Brings the new-filter branch (ladder calibration against the CA-72) onto
the CPU-optimised main, and resolves the two branches' overlap by hand.
- firmware: the ladder's input is halved (12 dB headroom, FMINI_LADDER_IN)
and the differential pairs take a bias (FMINI_PAIR_BIAS); the filter
contour follows the CA-72's AMOUNT taper over 6.3 octaves (FMINI_CNTR).
The oscillator first-write and voice-ramp running sums from main are kept.
- factory bank and generated headers regenerated from their generators.
- tests: the 100 FMINI goldens moved on purpose (the sound changed); the
other engines' stale goldens are untouched. The budget is regenerated.
- web: EDITOR_PROTOCOL notes the CNTR change (stored values keep their raw
amount, so older patches sweep further; no migration), FW_LATEST 2.6.0.
- emulators and installer regenerated for 2.6.0 (FM-1 and the three SMK-37).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
chk_mode_release set the track's P_PRIO (the Felucca VOICE page) for the
LAST / LOW / HIGH cases, but the engine's mono stack reads glo_note_prio,
the GLO list's NOTE PRIORITY, which is the one FMini-1 shows and changes.
With the default LOW the LAST and HIGH expectations failed (76 sounded
instead of 80) in MONO, LEGATO and UNISON: 6 of the 76 cases.
The check now sets glo_note_prio as well. No engine change: the sound is
the same; the regression reports 0 voice / routing checks failed. The 157
changed golden renders are the known stale hashes, unchanged here.
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
Each wave loop now masks the mix with keep (one AND per sample), in
exchange for the zeroing pass that fmini_render no longer runs. The
compiled static cost is 348; the check allowed 355 (+10 %), and the
build passes. Measured: none on the device yet.
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
fmini_wave tested the polyBLEP residual's two bounds on every sample
through osc_saw / osc_pulse. The step d and the bounds (lo, hi) are the
same for the whole call, so they are computed once and each sample tests
two constants; the pulse waves compute their two saws in one expression.
The residual's arithmetic is the same as dsp.c's blep, bit for bit: an
old-versus-new harness over 400000 random calls (every wave, steps from
tiny to huge, phases at the wrap) gives identical output and phase.
Static cost of fmini_wave 345 -> 323 (budget updated).
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
Their per-type loop copies raised the static budget (cho_block +39,
ins_swept +72) and no CPU gain was measured for them. The budget counts
every loop body, though only one runs per block, so the rise does not
mean more cost at run time; the two functions are reverted to main
rather than raising their budget to hide a number nobody measured.
The other changes stay: voice ramp, mix_part sends, track_dist, ins_drive,
the FMini stereo reverb room, and the delay. The FX harness and the
regression goldens still match main; the budget values for cho_block and
ins_swept are the main ones again.
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUF6pQ1NkTwmBC8SR8AK94
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
- 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
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
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
- 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
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
- 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
- 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
- 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
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
- 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
PAD SWELL (004), ACID LEAD (016) and MEGA LEAD (023) set the contour's
AMOUNT as a raw dial (knob(7.0), knob(3.8), cntr=85), not in octaves, so
the CA-72 taper of b09e761 left their bytes as they were and made their
contour sweep further: PAD SWELL went from 3.5 to 4.65 octaves and its
chords opened into a harsh, crackly top (energy above 12 kHz, 99th
percentile of 10 ms frames: -55 dB on main, -37 dB on b09e761). cknob()
reads such a dial as it read before (linear, 10 = 5 octaves) and returns
the byte that sweeps as far now; every factory preset now sweeps within
0.05 octave of main. PAD SWELL is back to -54 dB.
The mixer also clipped hard at full scale before the 12 dB shift into the
ladder, so loud patches clipped in the mixer (MOOG BASS: 15000 samples in
2 s of a chord). The clamp now sits after the shift: the mixer is linear,
as the CA-72's, up to 12 dB over full scale. No factory preset clips at the
output (preset lab, all 200, full chain); the loudest peak is -9.0 dBFS.
Goldens: 35 FMINI renders updated; the 158 pre-existing mismatches left.
filter test 10/10, app test ok, budget ok (fmini_render 254).
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
CNTR was linear, 127 = 5 octaves of cutoff at a full contour. It now follows
the CA-72's AMOUNT taper (voice::contour_amount_track, R12) through the new
FMINI_CNTR[128] (Q15), interpolated on the smoothed knob, over
FMINI_CNTR_FULL16 = 1210 (6.3 octaves, MIDI x 16), both generated by
tools/fmini_filter.py.
The full swing comes from the CA-72 model: with the filter contour's SUSTAIN
at 0.3 and the keyboard off, amount 1 moves the singing pitch 1.84 .. 1.97
octaves (cutoff 0.2 and 0.5); 6.3 is that over 0.3. Measured on FMINI the
same way (SUSTAIN 38, CUTOFF 38 and 64):
amount 0.25 / 0.5 / 0.75 / 1.0: +0.39 / +0.96 / +1.48 / +1.87 octaves
CA-72 +0.36..0.40 / +0.89..0.99 / +1.42..1.54 / +1.84..1.97
The factory bank is written in octaves: co() now inverts the taper, the
presets were regenerated and sweep as before (2 octaves: byte 51 -> 44).
A stored patch keeps its raw CNTR and sweeps further (noted in
web/EDITOR_PROTOCOL.md; no migration).
Goldens: 88 FMINI renders updated, the 158 pre-existing mismatches left.
filter test 10/10, app test ok, target budget ok (fmini_render 254).
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
The CA-72's differential pairs sit on a bias, so a triangle at full level has
its 2nd harmonic near -37 dB (the FMini had -98 dB: no even harmonic at all).
Odd harmonics are unchanged by the bias.
Each pair is now tanh(x + B) less tanh(B), with B = FMINI_PAIR_BIAS = 1500
(about 0.046 of full scale); tanh(B) is taken once a block. Measured in the
steady window (1.5 s to 2 s), triangle at 440 Hz, level 90 / 127, against the
CA-72 oscillator through the open ladder:
2nd -39.7 / -33.9 dB (CA-72 -36.8 at full volume)
3rd -19.8 / -20.6 dB (CA-72 -20.6)
5th -29.2 / -29.7 dB (CA-72 -29.5)
7th -36.0 / -35.8 dB (CA-72 -35.2)
9th -41.3 / -40.4 dB (CA-72 -39.5)
Earlier measurements that found the ladder's corner stalled at 1.1 kHz, and
the triangle dark above 1 kHz, were taken in a window that still held a slow
amplitude rise; in the steady window the response follows the stage laws.
Goldens: the 110 FMINI renders that changed on this branch are updated; the
158 pre-existing mismatches of main are left as they are. target_budget.txt:
fmini_render moves 246 -> 254 (the bias adds one add per stage) on purpose.
filter test: 10 of 10 ok. 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
- 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
- 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
- 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
- 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
- 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
- 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
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
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
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
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
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