dx7
dx7 · sources · schema v1Pure-TypeScript 6-operator DX7-style FM synthesizer. 32 algorithms, 5-voice polyphony via the polyPitchGate cable, bundled bank of factory-inspired patches (E.PIANO 1, BASS 1, HARMONICA, STRINGS 1, MARIMBA, etc.), and a .syx file picker for loading custom 32-voice cartridge dumps (in-memory only). On top of the six per-operator DX7 envelope generators, a per-voice master OUTPUT-VCA ADSR (Attack / Decay / Sustain / Release) gives a player-dialable amplitude swell / long-release without editing the SYX: one envelope per voice multiplies the summed-carrier output, gated by the same note-on/note-off as the operator EGs (soft/click-safe retrigger). Defaults are ~pass-through (fast attack, full sustain, fast release) so loaded patches sound identical until you touch the master ADSR; a long master release now outlives operator-EG silence (a voice frees only once both the operator EGs and the master amp envelope have faded). NOT a Plaits-backed implementation — see .myrobots/plans/dx7-and-polyphony.md for the design rationale.
the faceplate
inputs
| id | cable | what it does |
|---|---|---|
poly | polyPitchGate | The polyphonic note source and the preferred way to play this synth: a poly cable carrying up to 5 pitch+gate voice pairs (patch a poly sequencer, MIDI LANE, or keyboard here). Each lane drives one voice — a rising gate on a lane triggers a fresh note-on at that lane's pitch, the falling gate releases it, and while a lane's gate stays high its pitch is tracked live so the note glides. When all voices are busy a new note steals the oldest. poly pitch+gate bus; 10-channel poly bus (5 pitch + 5 gate lanes) |
pitch_cv | cv | Mono V/oct pitch for legacy single-voice playing — used only when nothing is patched into POLY. It drives voice 0's pitch, paired with the mono GATE input. 0 V is middle C; transpose and the patch's own transpose offset it. control voltage (CV) |
gate | gate | Mono note-on/off gate for the single-voice (PITCH CV) path — level-sensitive: the rising edge triggers a note-on on voice 0, the note sustains while the level stays high (and follows PITCH CV for glides), and the falling edge releases it. Patch an envelope/clock gate or a keyboard gate here; the POLY input is preferred for polyphony. gate / trigger; gate — acts while the level is high (reacts to both edges) |
outputs
| id | cable | what it does |
|---|---|---|
out | audio | Mono audio: the summed carrier output of every active voice, after the per-voice master ADSR and the LEVEL control. It's attenuated internally so all 5 voices sounding at once stay clear of clipping. Patch it into a VCA, filter, mixer, or straight to the output. audio signal |
params
| id | label | range | default | curve |
|---|---|---|---|---|
algorithm | Algorithm | 1..32 | 5 | discrete |
voiceCount | Voices | 1..5 | 5 | discrete |
level | Level | 0..2 | 0.7 | linear |
transpose | Transpose | -24..24st | 0 | linear |
attack | Atk | 0.001..5s | 0.001 | log |
decay | Dec | 0.001..5s | 0.1 | log |
sustain | Sus | 0..1 | 1 | linear |
release | Rel | 0.001..5s | 0.005 | log |
controls
| control | what it does |
|---|---|
| Algorithm | Which of the 32 DX7 algorithms wires the six operators together (1–32) — each algorithm fixes the carrier/modulator routing, so this is the biggest single shaper of the timbre's character (stacked FM chains vs. parallel additive tones). Editable live while playing; the loaded preset starts from its own stored algorithm. Shown on the ALG readout above the knobs. |
| Atk | Master output-VCA attack time (per voice) layered on top of the preset's built-in operator envelopes: how long each note takes to swell to full amplitude after note-on. Near the 0.001 s minimum it's effectively instant (the default, so loaded patches sound as designed); raise it for a slow fade-in. |
| Dec | Master-VCA decay time — how long each note takes to fall from its peak to the sustain level after the attack. Part of the player-dialable amplitude envelope on top of the patch's operator EGs. |
| Dx7 preset select {n} | Voice/preset selector — pick a built-in DX7-style patch (e.g. E.PIANO 1) or, once you've loaded a .syx cartridge, one of its voices. Choosing a preset loads its operators, feedback, and stored algorithm into all voices. Use the LOAD .SYX BANK button below to import real DX7 cartridge files, which then appear in this menu. |
| Dx7 syx input {n} | Load .syx bank — import a real Yamaha DX7 cartridge (.syx) file; its 32 voices are parsed and added to the preset menu above so you can select them. A status line reports how many voices loaded (or any parse warnings). |
| Level | Master output gain for the whole synth, 0 to 2 (1 = unity); scales the summed voice bus feeding OUT. |
| Rel | Master-VCA release time — how long a note takes to fade to silence after its gate falls. Near the 0.001 s minimum (default) the note ends quickly; raise it for long tails. The voice frees only once both this master envelope and the operator EGs have faded. |
| Sus | Master-VCA sustain level (0 to 1) — the amplitude a held note settles at after attack+decay, maintained until the gate releases. 1 (default) is full level, i.e. effectively pass-through of the patch's own envelopes. |
| Transpose | Global pitch offset in semitones (-24 to +24) applied to every voice on top of the preset's own transpose — shift the whole instrument up or down by up to two octaves. |
| Voices | Polyphony cap, 1 to 5 — how many notes can sound at once before a new note steals the oldest voice. Set it to 1 for a strictly monophonic patch, or up to 5 for full chords. |
source
dx7.ts on GitHub.