@maruaudio/dsp/voices/phase-7 is a six-operator phase-modulation FM instrument with the Mark I parameter model: 32 fixed routings with multi-operator feedback (or an editable matrix), ratio or fixed-frequency operators with keyboard scaling, four-stage operator and pitch envelopes, six LFO waveforms, unison, poly and two mono modes, portamento with glissando, pitch bend and master tune. The source says it keeps the earlier Phase7Engine's formulas and statement order exactly.
Parameters
setPhase7Param writes a dense store of 164 values, ignoring non-finite values and unknown indices; phase7ParameterIndexFor(path) maps schema paths, and each operator takes 22 slots from index 19. Clamps apply where read:
| Parameter | Read as | Default |
|---|---|---|
| voice algorithm | Rounded, 1 to 32 | 1 |
| LFO speed / delay / pitch and amp depth / pitch sensitivity | 0 to 99 / 0 to 99 / 0 to 99 / 0 to 7 | 35 / 0 / 0 / 3 |
| LFO waveform | Rounded, 0 triangle, 1 saw down, 2 saw up, 3 square, 4 sine, 5 sample-and-hold | 4 |
| voice mode / note priority | Rounded, 0 to 2 | 0 / 0 |
| voice polyphony | Rounded, 1 to 12, enforced live | 12 |
| unison voices / detune / spread | 1 to 4 / 0 to 50 cents / 0 to 1 | 1 / 12 / 0.65 |
| pitch bend value / range | −1 to 1 / 0 to 24 semitones | 0 / 2 |
| master tune / master level | −100 to 100 cents / 0 to 1, 10 ms glide | 0 / 0.72 |
Operator rates and levels default to 99 (level 4 to 0); operator 1's output level is 99, the others 0.
Lifecycle
phase7InitVoice(rate, lane) allocates every array (lane defaults to the "juce" downward-only phase wrap; PHASE7_LANE_DIRECT wraps both ways) → set parameters → phase7NoteOn (note clamped to 0..127) / phase7NoteOff → phase7Tick once per frame, then read phase7OutputLeft and phase7OutputRight → phase7Reset clears pool, held notes, counters and LFO, keeping the parameters.
When to use it
Six-operator FM patches in the classic 32-algorithm layout, polyphonic or mono with glide.
Limits
- Stereo, sample tick; 12 logical voices, 512 physical voice slots for released tails; a full pool retires the oldest logical group.
- Retiring a sounding group crosses a 5 ms bridge; summation order is fixed.