Repository navigation
Fourth performance pass, review fixes, Stop releases notes - #2
Merged
Merged
Conversation
…20, loader OOM, stale MIDI) From a full review of the engine and the plugin layer: - The same note again searched every voice, also those above a lowered polyphony that ring out: one was revived there, and the next setPatch() released it under the held key. The search stays within the limit. - All Sound Off (CC 120) cleared the engine's sustain pedal while NoteGen kept it down: key-offs then released until the next CC 64. reset() keeps it. - Loader::publish moved the old table into the graveyard's push_back: out of memory there freed the table the audio thread was playing. It reserves the slot first. - A block that threw kept its MIDI events for the next block to replay. Regression checks for the first two in test/review_test.cpp. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n stacks) Profiled by function and source line under qemu-arm (a TCG plugin counting each translated block's executions): - The SVF step rearranged, the same filter: the new ic1 is b1 ic1 + b2 v3, the new ic2 v2 + t; the band output only for the types that use it. GCC had made `2 v1 - ic1` a multiply-add on -ic1 (a negation and a move per state per sample). LP24's loop: 30 -> ~19 instructions. - Sources render into per-lane buses, transposed into the filters' layout four lanes by four samples (gatherBuses): no scalar store per sample, no clearing. Serial with nothing else into F2: F2 filters F1's bus in place. - The wavetable reader takes a whole unison stack per call, compiled per level length (immediate shifts), the fraction by a fixed-point convert, its float pairs loaded straight into q-register halves (asm: GCC moved registers five times per four samples), two voices per pass on float frames (one output load and store per pair). - Drive: dry * x + sat * softclip(x * pre) with a once-refined reciprocal. ARM instructions per block, profile-guided: 8 voices -12%, 8 x 8 unison -24% (positions still) / -18% (moving) / -19% (busy matrix). The output is within 7.8e-6 relative RMS of the previous engine over 139 scenes on ARM. Not yet benched on the Force. Numbers in docs/PERFORMANCE.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…them MPC suspends and resumes the plugin within ~100 ms on every transport Stop (effStopProcess, effMainsChanged 0). The next block hard-reset the engine: every ringing voice stopped dead, a click and every tail cut. It now releases them as All Notes Off (CC 123) does; All Sound Off (CC 120) still silences at once. A check in test/review_test.cpp, a line in the user guide. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A full review of the engine and plugin layer, a fourth performance pass on the engine's hot paths, and transport Stop no longer cutting ringing notes.
Performance
These are ARM instructions per 128-frame block for the profile-guided build that ships, counted under
qemu-arm. The patch is both oscillators, F1 LP24 with drive into F2 LP12, notes held.2 v1 - ic1into a multiply-add on-ic1, a negation and a register move per state per sample. LP24's loop went from 30 to about 19 instructions.asmblock, which saves the five register moves GCC made per four samples.dry · x + sat · softclip(x · pre)with a once-refined reciprocal. The Dirty engine's in-loop saturator keeps the full reciprocal.Output matches the previous engine within 7.8e-6 relative RMS over 139 scenes rendered on ARM. The scenes cover every filter type, the engines, unison 1–8, routings, steals, glides, odd block sizes and busy matrices. Details are in
docs/PERFORMANCE.md.Not yet benched on the Force. qemu counts instructions, not cycles. Before merging, run
make bench-device.Review fixes
Loader::publishcould free the playing table ifpush_backthrew out of memory. It reserves the slot first.Stop and suspend
MPC suspends and resumes the plugin within ~100 ms on every Stop. Each time, the engine was hard-reset: ringing voices stopped dead, which clicked and cut every tail. Now Stop releases them, as CC 123 does. CC 120 still silences at once.
Testing
make test(x86, ASan/UBSan) andmake test-arm(qemu): 4125 checks pass, including three new regression checks. Each new check fails on the old code.make test-arm-pgopasses against the shipped profile-guided objects.make teston its own.🤖 Generated with Claude Code