Skip to content

FM Synthesis and Algorithm Mathematics

pyoneerC edited this page Sep 13, 2026 · 3 revisions

FM Synthesis and Operator Algorithm Mathematics

The Yamaha DX7, released in 1983, revolutionized commercial synthesis by implementing digital Phase Modulation (PM), commercially branded as Frequency Modulation (FM). Based on patents by Dr. John Chowning at Stanford University (CCRMA)[^1], the DX7 generates complex harmonic and inharmonic acoustic spectra using six digital sine wave oscillators (Operators) configured in 32 discrete algorithmic topologies[^2].

This document details the underlying digital signal processing (DSP) mathematics, Bessel function sideband expansions, and envelope generator curves that bipluk.com parses and visualizes.


1. Phase Modulation vs. True Frequency Modulation

While commonly termed "FM", Yamaha digital sound engines implement Phase Modulation:

$$y(t) = A(t) \sin\left( \omega_c t + \phi(t) \right)$$

where the instantaneous phase deviation $\phi(t)$ is modulated by an auxiliary operator $x(t)$:

$$\phi(t) = I(t) \cdot \sin(\omega_m t)$$

Yielding the canonical Chowning Phase Modulation equation:

$$y(t) = A(t) \sin\left( 2\pi f_c t + \beta \sin(2\pi f_m t) \right)$$

where:

  • $f_c$ is the Carrier frequency in Hertz.
  • $f_m$ is the Modulator frequency in Hertz.
  • $\beta = \frac{\Delta \theta}{\text{rad}}$ is the Modulation Index, directly controlled by the modulator Operator Output Level ($0$ to $99$).
  • $A(t)$ is the Carrier Envelope Generator amplitude.

Note

Mathematical Equivalence: In continuous time, Phase Modulation by a sinusoidal source produces an identical spectrum to Frequency Modulation, with the effective FM modulation index defined as $\beta_{\text{FM}} = \frac{\Delta f}{f_m}$. Phase modulation prevents center pitch drifting when the modulation index varies rapidly over time.


2. Bessel Function Expansion & Sideband Spectrum

Expanding the sinusoidal PM equation via Jacobi-Anger Fourier series yields a carrier flanked by an infinite series of sidebands spaced at integer multiples of the modulation frequency $f_m$:

$$y(t) = A \sum_{n=-\infty}^{+\infty} J_n(\beta) \sin\left( 2\pi (f_c + n f_m) t \right)$$

where $J_n(\beta)$ represents the Bessel Function of the First Kind of order $n$:

$$J_n(\beta) = \sum_{k=0}^{\infty} \frac{(-1)^k}{k! , \Gamma(k + n + 1)} \left( \frac{\beta}{2} \right)^{2k + n}$$

flowchart TD
    Index["Modulation Index beta (0 to 99)"] --> BesselCalc["Bessel Amplitudes Jn(beta)"]
    BesselCalc --> Harmonics["Harmonic Ratios (fc : fm = 1:1, 1:2, 1:3.14)"]
    Harmonics --> Spectrum["Output Timbre: Harmonic Series or Inharmonic Bell/Metallic"]
Loading

Carrier-to-Modulator Frequency Ratio Rules

The harmonic nature of the resulting timbre is strictly governed by the ratio $R = \frac{f_c}{f_m}$:

  1. Integer Ratios ($1:1, 1:2, 1:3, 1:4$): Produce harmonic spectra identical to acoustic brass, strings, reeds, and woodwinds.
  2. Fractional Ratios ($1:1.414, 1:3.1415$): Produce non-integer sidebands characteristic of metallic bells, chimes, gongs, and cymbals.
  3. High Modulation Index ($\beta > 5.0$): Distributes acoustic energy into dozens of sidebands, producing bright, cutting lead and digital bass timbres.

3. Operator Topological Structures: Pure Stack vs. Pure Additive

The DX7 arranges 6 Operators into 32 pre-wired routing algorithms:

flowchart LR
    subgraph Algo1 ["Algorithm 1: Deep FM Stack"]
        Op6["OP 6 (Modulator)"] --> Op5["OP 5 (Modulator)"]
        Op5 --> Op4["OP 4 (Modulator)"]
        Op4 --> Op3["OP 3 (Modulator)"]
        Op3 --> Op2["OP 2 (Modulator)"]
        Op2 --> Op1["OP 1 (Carrier)"]
        Op1 --> Out1["Audio DAC Out"]
    end

    subgraph Algo32 ["Algorithm 32: Pure Additive"]
        A1["OP 1"] --> SumNode["Summing Bus"]
        A2["OP 2"] --> SumNode
        A3["OP 3"] --> SumNode
        A4["OP 4"] --> SumNode
        A5["OP 5"] --> SumNode
        A6["OP 6"] --> SumNode
        SumNode --> Out2["Audio DAC Out"]
    end
Loading

Tip

Algorithm 1 provides intense harmonic richness with multiple cascaded non-linearities, ideal for complex acoustic simulations. Algorithm 32 functions as a 6-drawbar additive organ engine where each operator directly contributes a fundamental or overtone directly to the output DAC.

Click to expand DX7 Carrier-to-Modulator Algorithm Archetypes
Algorithm Class Member Algorithms Carrier Count Modulator Count Acoustic Application
Deep Serial Stacks Algorithms 1, 2, 3, 4 1 Carrier 5 Modulators Brass, bowed strings, distorted guitars
Dual Stacks Algorithms 5, 6, 7, 8 2 Carriers 4 Modulators Electric pianos, mallet instruments, bells
Triple Branches Algorithms 9, 10, 11, 12, 13 3 Carriers 3 Modulators Complex acoustic pianos, harpsichords
Multi-Carrier Clusters Algorithms 14 through 31 3 to 5 Carriers 1 to 3 Modulators Split instruments, ensembles, pads
Pure Additive Algorithm 32 6 Carriers 0 Modulators Pipe organs, additive tone wheels, sine clusters

4. 4-Rate 4-Level Envelope Generator Geometry

Unlike traditional analog ADSR (Attack, Decay, Sustain, Release) envelope generators, Yamaha FM engines implement piecewise linear 4-Rate, 4-Level (R1-R4, L1-L4) contour generators:

$$\text{Target Level } L_k \in [0, 99], \quad \text{Rate } R_k \in [0, 99]$$

flowchart LR
    Start["Key On (Start: Level 4)"] --> Step1["R1 to Target L1 (Attack)"]
    Step1 --> Step2["R2 to Target L2 (Decay 1)"]
    Step2 --> Step3["R3 to Target L3 (Decay 2 / Sustain)"]
    Step3 --> KeyOff["Key Off Event"]
    KeyOff --> Step4["R4 to Target L4 (Release)"]
Loading

Exponential Rate Duration Formulation

The transition duration $\Delta t_k$ for an envelope segment moving from level $L_{k-1}$ to level $L_k$ at rate $R_k$ follows a logarithmic slope implemented in hardware lookup ROM:

$$\Delta t_k = \frac{|L_k - L_{k-1}|}{2^{(R_k / 8)}} \cdot \tau_0$$

where $\tau_0 \approx 0.73 \text{ ms}$ represents the master operator clock cycle interval.

Important

Non-Linear Rate Mapping: A rate value of $99$ completes in under $1.5 \text{ milliseconds}$ (percussive transient), whereas a rate value of $0$ can sustain a slow swell for up to $4.5 \text{ minutes}$. bipluk.com maps these curve durations accurately in its interactive preset visualizer.


5. Casio Phase Distortion (PD) Synthesis & 8-Step Envelope Geometry

Alongside Yamaha FM, Casio developed Phase Distortion (PD) synthesis in 1984 for the CZ series (CZ-101, CZ-1000, CZ-5000, CZ-1)[^4]. Instead of modulating carrier phase with an independent audio-rate oscillator, Casio distorted the reading phase angle of a cosine lookup table using non-linear piecewise phase accumulators:

$$\theta'(t) = g(\theta(t))$$

where the distorted phase $\theta'(t)$ maps a standard ramp into double-angle sine, sawtooth, or resonant resonant-pulse waveforms. The distortion amount is dynamically driven by the DCW (Digitally Controlled Wave) parameter:

flowchart LR
    PhaseCounter["Linear Master Phase Counter: 0 to 2*pi"] --> DCW["DCW Non-Linear Transfer Function g(theta)"]
    DCW --> CosTable["Cosine Waveform ROM Lookup"]
    CosTable --> DCA["DCA Amp Level Control"]
    DCA --> AudioOut["Audio Output"]
Loading

Casio 8-Stage Rate/Level Envelopes

The Casio CZ engine replaced standard ADSRs with flexible 8-stage Rate and Level envelopes across DCO (Pitch), DCW (Timbre), and DCA (Amplitude):

$$\text{Stage } s \in [1, 8]: \quad \text{Rate}_s \in [0, 99], \quad \text{Level}_s \in [0, 99], \quad \text{Sustain/End Flags}$$

This allows complex multi-transient sweeps, secondary attacks, and looped modulation cycles without external LFOs. For the byte packing structure of Casio CZ Sysex parameters, inspect SysEx Specifications and Checksums.


6. References & Academic Citations

[^1]: Chowning, John M. "The Synthesis of Complex Audio Spectra by Means of Frequency Modulation." Journal of the Audio Engineering Society 21, no. 7 (1973): 526-534. [^2]: Yamaha Corporation. Yamaha DX7 Digital Programmable Algorithm Synthesizer Operating Manual, Nippon Gakki Co., Ltd., 1983. [^3]: Bristow, Derek, and John Chowning. FM Theory & Applications: By Musicians for Musicians. Tokyo: Yamaha Music Foundation, 1986. [^4]: Casio Computer Co., Ltd. CZ-101 Operation Manual & MIDI Implementation Chart, Tokyo, 1984.

Clone this wiki locally