-
Analyze Requirements:
- Goal: Add a "Vocal Formant Envelope" specifically for formants.
- Purpose: Create plucky or sweeping vocal filter effects on every note by modifying the formant shifting over time (Attack/Decay).
- Task mentioned in
agent_plan.md:[ ] **Vocal Formant Envelope:** Add a dedicated Attack/Decay envelope specifically for formants to create plucky or sweeping vocal filter effects on every note. - Need to add properties to control Formant Envelope (e.g. Formant Attack, Formant Decay, Formant Envelope Amount).
-
Check Current Formant Control:
FormantShifter.tshandles formant shifting using a chain of Biquad filters.- Currently, it sets static shift values, or linear ramps (
updateFilterChain), or LFO (lfo,lfoGain). - We need an envelope to modulate
f1Shift,f2Shift,f3Shiftor simply thedetune/frequencyof the peaking filters over time, triggered on Note On.
-
Where to implement Formant Envelope?
- The formant filters are standard
BiquadFilterNodecreated inFormantShifter.ts. - In
SingingVoice.ts, we trigger note on. When a note is triggered, we can schedule an envelope on the Formant Filters'detuneorfrequencyparameters, similar to how an amplitude or filter envelope works. - To do this, we need
formantEnvAttack,formantEnvDecay,formantEnvAmountproperties. - Let's add these to
Noteparameters (if it's per-step) or global sampler params. Wait, the backlog says "Add a dedicated Attack/Decay envelope specifically for formants to create plucky or sweeping vocal filter effects on every note." - We should add global controls for Formant Envelope to
SamplerBankParamsor similar, and map them inSamplerPanel.tsxUI. We might also want per-step overrides.
- The formant filters are standard
-
Investigate Data Structures (
types.ts):