@maruaudio/dsp/voices/fm-algorithms is the table of 32 six-operator FM routings as plain data (the source exports it as DX7_ALGORITHMS), shared by FM instruments and by faces that draw algorithm diagrams. Each entry lists its carriers (outputMix) and, per target operator, the operators that modulate it (modulationMatrix), both 0-based and in the order the engine sums them. wiring is the same graph in the 1-based, feed-forward shape of the UI kit's algorithm diagram. It renders no audio.
Parameters
| Export | Coded behavior |
|---|---|
DX7_ALGORITHMS | 32 entries, id 1 to 32, name Algorithm 01 to Algorithm 32 |
dx7Algorithm(value) | Rounds a 1-based selector and clamps it to 1..32; a non-finite value selects algorithm 1 |
fmWiringFromMatrix(outputMix, matrix) | 1-based edges, carriers and one feedback operator; opCount is always 6 |
When a modulation edge would close a loop spanning several operators, fmWiringFromMatrix turns only that closing edge into the feedback marker; the audible matrix keeps it. A self-route also becomes the feedback marker.
Lifecycle
None. The table and its wirings are built when the module loads; lookups are pure.
When to use it
Drawing or choosing a classic six-operator algorithm in a face, preset browser or FM instrument, from one source the engine also matches.
Limits
- Six operators, 32 fixed routings; there is no way to add one here.
fmWiringFromMatrixallocates arrays and aSet, so it is control-time code, not for a realtime callback.@maru/voices-phase-7keeps its own flattened copy of the table for its fixed-bound loops; this leaf is not imported by its render path.