Commit Graph
17 Commits
Author SHA1 Message Date
biggy 3be1e42242 refactor(engine): add thread-safe control capture and sub-block MIDI
Introduce a CriticalSection controlLock separating control-thread
state (matrix, macros, controlLfos) from audio-thread snapshots
(audioMatrix, audioMacros, lfos). captureControls() copies under
lock at the start of each processBlock; the audio thread never
touches control state directly. Cache parameter values in an
unordered_map keyed by string_view to avoid per-sample APVTS lookups.

Prebuild wavetables in the constructor instead of lazy allocation.
Resize mixBuffer only in prepare(), not per block. Render MIDI
events at their sample positions using sub-block rendering with
renderUntil(), so notes start at the correct sub-sample offset.

Make RaveController non-destructive: replace APVTS mutation with a
static apply() that boosts the RenderContext and FX slots for the
current block only. Remove the snapshot/restore machinery.

Make currentProgram atomic. Validate state I/O: check XML tag,
clamp program index, sanitize LFO shape data, and use
beginChangeGesture/endChangeGesture for RAVE toggle. Reset
parameters to defaults before loading preset values.
2026-09-09 14:33:30 +02:00
biggy cd26beca42 refactor(osc): support held-note parameter updates without phase reset
Add Oscillator::setParams() which updates detune, pan, and gain for
already-initialised sub-voices without resetting their phases. This
preserves phase continuity when unison or spread is LFO-modulated at
control rate. noteOn() now just seeds phases and delegates to
setParams().

Precompute panL/panR in SubVoice instead of calling cos/sin per
sample. Add paramsValid and cachedParams to skip redundant work.

Replace SynthVoice's lastUnisonA/B tracking with a single
oscillatorsNeedNoteOn flag: noteOn sets it, render clears it after
the first block. Add SubLevel and NoiseLevel to the per-voice
modulation targets so they can be modulated like other parameters.
2026-09-09 14:33:21 +02:00
biggy 40dc0d4105 refactor(lfo): advance by sample count and separate phase offset
Add advance(numSamples) so the engine can step LFOs per sub-block
instead of calling process() in a sample loop. process() now
delegates to advance(1).

Split phaseOffset from phase so setParams doesn't overwrite the
running phase; getPhase() adds the offset and wraps. Fix sync mode
to divide by beat multiplier instead of multiplying. Move SampleHold
randomization into advance() based on cycle count. Validate shape
data in setShapeData with isfinite and jlimit.
2026-09-09 14:33:13 +02:00
biggy e2e66457c2 refactor(mod): validate modulation matrix and macro inputs
Add bounds, finiteness, and range clamping to addConnection and
addAssignment. Validate ValueTree types and property values in
fromValueTree before inserting, rejecting non-integer indices and
unknown source names. Run toValueTree through a validated copy to
ensure persisted state is always within constraints.
2026-09-09 14:33:06 +02:00
biggy 4748bfe768 refactor(fx): give each FX slot independent DSP history
Replace the single shared array of 9 effect units with a 2D array
of kNumFxSlots × kNumEffectTypes, so each slot owns its own DSP
state. This prevents state bleed when the same effect type appears
in multiple slots and allows reordering without carrying over
internal history.

Track activeTypes to skip unchanged slots. Remove the dry buffer
since it was unused.
2026-09-09 14:32:58 +02:00
biggy dc6fd88ed1 refactor(filter): cache coefficients and extract cutoff calculation
Add updateCoefficients() that short-circuits when cutoff, resonance,
and type are unchanged. Cache ladderG and formantCoefficients so
processSample() avoids redundant exp()/tan() calls per sample.

Extract static getCutoffHz() from Filter::process() so FilterBank
can compute the keytracked cutoff once per parallel branch instead
of per sample. Simplify formant() and screamer() signatures to use
cached state.
2026-09-09 14:32:49 +02:00
biggy 3b2ecc50f2 refactor(params): structure parameter IDs into typed groups
Introduce paramIds namespace with Oscillator struct and constexpr
arrays for envelope, LFO, FX, and macro parameter IDs. Replace the
scattered local const char* arrays in Engine and PluginEditor with
references to these shared definitions.

Return ModSource::Count from modSourceFromString for unknown strings
instead of silently mapping to Lfo1. Simplify isPerVoiceSource and
isPerVoiceTarget to range-based expressions.
2026-09-09 14:32:43 +02:00
biggy 05fd6440bd docs: add agent guidance and historical audit report
Add root AGENT.md with project conventions, build verification steps,
source layout, style rules, and real-time/concurrency requirements.
Add per-module AGENT.md files for each existing and proposed source
subdirectory. Add AUDIT_REPORT.md as a historical Phase 1 snapshot
documenting memory management, error handling, concurrency model,
naming conventions, and anti-pattern catalog.
2026-09-09 13:25:02 +02:00
biggy a50666355c feat(gui): add knob value popup, tooltips, tab cycling, and layout system
Add a floating value label near the cursor while dragging a knob, giving
immediate feedback without altering slider behaviour. Inherit
SettableTooltipClient on ToggleButton so setTooltip works consistently
with knobs and combos.

Introduce a shared layout constants namespace in PluginEditor so every
panel, row and control position derives from one spacing system. Add
tooltips to all knobs, combos, toggles, and buttons. Add Tab/Shift+Tab
tab cycling via keyPressed, with a TooltipWindow for hover hints.
2026-09-09 13:24:40 +02:00
biggy 769e85e4e4 test: add headless QA harness 2026-09-08 14:55:22 +02:00
biggy 6e4d399a04 feat(plugin): add plugin processor and editor 2026-09-08 14:55:22 +02:00
biggy 0a94208d0f feat(params): add parameters, macros, RAVE controls and resources 2026-09-08 14:55:22 +02:00
biggy a9abca9e15 feat(gui): add GUI components and displays 2026-09-08 14:55:22 +02:00
biggy 5a80534a2e feat(fx): add effect rack and effect units 2026-09-08 14:55:22 +02:00
biggy 4021b9cdf7 feat(filter): add filter bank and filter models 2026-09-08 14:55:21 +02:00
biggy 44960b9acb feat(modulation): add envelopes, LFOs and modulation matrix 2026-09-08 14:55:21 +02:00
biggy fc9d16b302 feat(dsp): add core synthesizer oscillators, wavetable and voice engine 2026-09-08 14:55:21 +02:00