Skip to content

feat: add synth runtime modulation rack#1018

Draft
ChuxiJ wants to merge 1 commit intofeat/v0.0.x-sprint-01-runtime-voicesfrom
feat/v0.0.x-sprint-01-modulation-runtime
Draft

feat: add synth runtime modulation rack#1018
ChuxiJ wants to merge 1 commit intofeat/v0.0.x-sprint-01-runtime-voicesfrom
feat/v0.0.x-sprint-01-modulation-runtime

Conversation

@ChuxiJ
Copy link
Copy Markdown

@ChuxiJ ChuxiJ commented Mar 27, 2026

Summary

  • add a track-level modulation rack to SynthEngine so canonical subtractive LFO settings drive live playback
  • map the highest-signal targets first: amp, pan, filterCutoff, and pitch
  • cover the new modulation mapping with focused SynthEngine tests

Details

  • export a pure createSynthModulationSpec(...) helper alongside the existing runtime-spec mapping
  • instantiate Tone modulation nodes (Tremolo, AutoPanner, AutoFilter, Vibrato) per track and preview synth when the subtractive LFO is enabled
  • route the synth chain as voice -> optional modulation rack -> gain -> destination
  • restart retriggerable modulation nodes on note attacks for live play, preview, and slide playback paths
  • leave FM and sampler instruments unchanged in this slice

Validation

  • npx tsc --noEmit
  • npx vitest run --environment node src/engine/__tests__/SynthEngine.test.ts
  • npx vitest run --environment node src/utils/__tests__/trackInstrument.test.ts tests/unit/sessionLaunchModes.test.ts tests/unit/sessionLegato.test.ts
  • npm run build
  • browser smoke on http://127.0.0.1:4174/: opened Piano Roll, confirmed synth editor renders, toggled LFO on, changed target to amp, and verified the update writes through window.__store.getState().project.tracks[*].instrument.settings.lfo

Notes

  • This PR is stacked on top of feat: connect synth runtime to canonical voices #1015.
  • The repo's default jsdom Vitest run is currently blocked in this local environment by a Node v18.16.0 + jsdom/html-encoding-sniffer/@exodus/bytes ESM compatibility issue in the shared node_modules tree. The new runtime coverage added in this PR was validated under --environment node, and the existing build stays green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant