mirror of
https://github.com/juanjiant-bit/JIANT.git
synced 2026-12-05 20:34:27 +01:00
core.h CTL 32 -> 64 (tools/gen_tables.py; the half buffer 128 frames: two mix_block passes a half, not four), so the fixed cost of a block (events_block, mc_split, the core-1 handshake, buffers cleared and summed, sends, buses, master) is paid half as often. Everything that counted blocks of 32 counts in CTL: envelope / LFO tables, glides, fades, the steal fade, the leveler's (its peak still read over 32) and DUCK's followers, DRUM-X FLAM / PUNCH / pan slew / group fade, the FX gate, DJF crossfade, SPRING / RESO glides, WORDS' phoneme timing, the FX layer's LPF / HPF sweep (perform.c PF_CSTEP), the mod matrix's NOISE and STEP eases. The sequencer did not get coarser: a note inside the block carries its sample (core.h ev_off; voice.c voice_begin / voice_off_at / track_render render the sounding voice up to it and the new one from it; every engine but FM6, which renders whole blocks and keeps the nearer edge). tests/ctl64_timing_test.c: on a MICRO-shifted pattern every rendered onset is within 2 samples of the sample-at-a-time sequencer (ANALOG POLY worst 2, ANALOG MONO cuts worst 2, DRUM kit hits worst 1); the 32-sample build placed them -22 .. +5 samples off. Host CPU (tests/cpu_vg.py, exact instructions / sample, 32 -> 64): mix/idle 516 -> 426 (-17.5 %), seq/mono4 1514 -> 1188 (-21.5 %), eng/DRUM 1477 -> 1156 (-21.7 %), eng/FM6 1710 -> 1507 (-11.9 %), eng/VOICE 1500 -> 1337 (-10.9 %), VOICE.EN 1783 -> 1619 (-9.2 %), ANALOG / PHASE / LOFI / NOISE / WHEEL -6 .. -9 %, reverbs and delays -7 .. -8 %, mix/full 2671 -> 2505 (-6.2 %), seq/plain 2381 -> 2158 (-9.4 %), seq/heavy 2783 -> 2485 (-10.7 %), song/cputest 3016 -> 2742 (-9.1 %), peak/VOICE.EN6 3304 -> 2937 (-11.1 %). Firmware: image 567896 B, .data+.bss 88276 of 98304 (+9 KB: the CTL-long buffers), RAM code 21848 of 24576; the render loops' target cost as before (tests/target_budget.txt). docs/CPU3_PERFORMANCE.md, README (the dual-core section), CPU5_PERFORMANCE.md. Goldens: tests/golden.txt, cpu_baseline_vg.txt, target_budget.txt regenerated (GOLDEN_UPDATE / BUDGET_UPDATE: the sound changes through the buses' one-block lag, now 1.45 ms, and the leveler's reading); djf_test / micro_test reference hashes of the 0.9.0 renders redone at CTL 64. Host tests that counted blocks count in CTL (reverb DUCK 3 / 20 ms, voice glide 163 blocks of 32 and 1/8 st a block, click_test, drumx_oct_test); drumx_test's HANDS and PUNCH checks reset the kit's noise generator before each compared strike (they compared different noise realizations: up to x5 strike to strike on the 32-sample build too, measured). Full host suite: every section passes but gen_nav_map's stale docs/navigation-map.svg, which the base reports as well. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh
23 lines
3.2 KiB
Markdown
23 lines
3.2 KiB
Markdown
# 0.9.9 cpu5: narrower dependencies and hardware diagnostics
|
|
|
|
CPU4 hardware feedback still reported drum dropouts with four tracks and historical overload (peak 104%, late 10, shed 61), with 24% load while stopped. CPU4's empty-buffer shortcuts therefore do not establish a solution to that scene. The exact engines, sends, reverb and release durations are still needed for reproduction.
|
|
|
|
## Repartition independent work
|
|
|
|
The existing safety groups keep shared random streams on one core, preserving serial output. Their predicates were broader than the actual dependencies:
|
|
|
|
* Every AUTO PAN track was grouped, although only S&H uses its shared RNG. SIN, TRI, SAW and SQR now remain independent; S&H and preset fades keep their conservative grouping.
|
|
* Every VOICE track was grouped, although LANG OFF / BREATH 0 does not consume noise. Avoid the unnecessary shared noise load/store in that path, and allow independent scheduling. WORDS, nonzero BREATH, fades and any active matrix slot targeting BREATH keep the safety group.
|
|
|
|
No random sequence, engine quality, sample rate, shared voice cap or overload threshold is changed. No extra persistent state is needed. This only helps scenes with previously unnecessary dependencies; it does not make a single expensive VOICE/WORDS track run across two cores.
|
|
|
|
The threaded mixer test adds six clean VOICE tracks with triangular pan, six FM6/ANALOG tracks with triangular pan, and a BREATH matrix case. CPU4 cannot split either independent scene (zero mixed-core masks); cpu5 splits all 1024 blocks. Serial/deferred/threaded/adversarial output and RNG hashes match, and clean scene hashes also match the CPU4 serial reference. Existing random pan, WORDS/noise, fades, shared RNG, polyphony and timeout cases remain covered. Core-mask counts demonstrate schedulability, not measured CPU savings on the FM1.
|
|
|
|
## ABOUT diagnostics on Android-compatible firmware
|
|
|
|
ABOUT now shows admitted voices and cap, allocation cuts and quiet trims, the existing FX elapsed time in microseconds per control block, and engine/active-voice count/time for each enabled track. It reads the scheduler's existing smoothed measurements from main while audio IRQ workers are joined. There are no additional timers, audio callbacks or per-voice counters. The screen refreshes roughly five times a second while open.
|
|
|
|
Each control block was 32 samples at 44100 Hz (about 726 microseconds) when this was written; since 0.9.9 ctl64 it is 64 (1.45 ms; `docs/CPU3_PERFORMANCE.md`). Times overlap between cores and must not be summed as total audio load. Active counts include fading voices, while VOICES excludes already-surrendered fading slots. ALLOC CUT uses the existing console definition (`voice_kills - trims - shed`), which can also include mode/cap/track transitions; it is not a drum-specific counter. On the browser emulator there is no target scheduler clock, so times are zero.
|
|
|
|
Hardware evaluation: capture ABOUT once with the same four-track pattern playing and once stopped after its tails, including the detail rows. Compare against fresh-boot load. This distinguishes active voice work, long/expensive FX processing and allocation pressure before deciding on quality tradeoffs such as FM4. CPU5 is still based on stable 0.9.9; FM6 remains six operators.
|