Synth Overview
The Cosmo PD-101 is a phase distortion (PD) synthesizer inspired by the Casio CZ-101. It generates sound by warping the phase of an oscillator before sampling a base waveform, producing harmonically rich timbres from simple building blocks.
Signal Flow
MIDI Input (Note, Pitch Bend, Mod Wheel, Aftertouch, Velocity)
│
▼
┌─────────────────────────────────┐
│ Modulation Sources │
│ ├─ LFO 1 (sine/tri/sq/saw) │
│ ├─ LFO 2 │
│ ├─ Random Sample & Hold │
│ ├─ ADSR Mod Envelope │
│ ├─ Velocity │
│ ├─ Mod Wheel │
│ └─ Aftertouch │
└──────────────┬──────────────────┘
│
▼
┌─────────────────────────────────┐
│ Modulation Matrix │
│ (7 sources → 51 destinations) │
│ Each route has adjustable depth│
└──────────────┬──────────────────┘
│
▼
┌─────────────────────────────────────────────────┐
│ Voice (×8 polyphony) │
│ │
│ ┌───────────────┐ ┌───────────────┐ │
│ │ Line 1 │ │ Line 2 │ │
│ │ ┌───────────┐ │ │ ┌───────────┐ │ │
│ │ │ DCO Env │ │ │ │ DCO Env │ │ │
│ │ │ (8-step) │ │ │ │ (8-step) │ │ │
│ │ └─────┬─────┘ │ │ └─────┬─────┘ │ │
│ │ ▼ │ │ ▼ │ │
│ │ ┌───────────┐ │ │ ┌───────────┐ │ │
│ │ │Algorithm │ │ │ │Algorithm │ │ │
│ │ │(warp) │ │ │ │(warp) │ │ │
│ │ │ + DCW Env │ │ │ │ + DCW Env │ │ │
│ │ └─────┬─────┘ │ │ └─────┬─────┘ │ │
│ │ ▼ │ │ ▼ │ │
│ │ ┌───────────┐ │ │ ┌───────────┐ │ │
│ │ │Base Wave │ │ │ │Base Wave │ │ │
│ │ │(saw/sin/…)│ │ │ │(saw/sin/…)│ │ │
│ │ └─────┬─────┘ │ │ └─────┬─────┘ │ │
│ │ ▼ │ │ ▼ │ │
│ │ ┌───────────┐ │ │ ┌───────────┐ │ │
│ │ │ DCA Env │ │ │ │ DCA Env │ │ │
│ │ │ (8-step) │ │ │ │ (8-step) │ │ │
│ │ └─────┬─────┘ │ │ └─────┬─────┘ │ │
│ └───────┼───────┘ └───────┼───────┘ │
│ │ │ │
│ ▼ ▼ │
│ ┌───────────────────────────────────┐ │
│ │ Line Mixer │ │
│ │ Normal / Ring Mod / Noise / │ │
│ │ L1 / L1+L1' / L1+L2 / L1+L2' │ │
│ └───────────────┬───────────────────┘ │
└──────────────────┼──────────────────────────────┘
│
▼
┌──────────────────────────────────────────────────┐
│ Output Stage │
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────────────┐ │
│ │ Volume │→│ FX Chain │→│ Soft Clip (tanh) │ │
│ │ + Mod │ │ 6 slots │ │ → Audio Out │ │
│ └──────────┘ └──────────┘ └──────────────────┘ │
└──────────────────────────────────────────────────┘
Phase Distortion — How It Works
In a traditional oscillator, a waveform is generated by stepping through a wavetable at a rate determined by pitch. Phase distortion adds a warping function between the phase accumulator and the wavetable lookup.
Normal: Phase → Wavetable → Output
PD: Phase → [WARP ALGORITHM] → Wavetable → Output
The warp algorithm reshapes the phase curve, which changes the harmonic content of the output in real time. Different algorithms produce different timbral characters — from subtle warmth to extreme metallic textures.
The Two Oscillator Lines
The PD-101 has two independent oscillator lines, each with:
- Its own phase distortion algorithm (from 25 options)
- Three 8-step envelopes controlling:
- DCO (Digitally Controlled Oscillator) — pitch
- DCW (Digitally Controlled Waveshaper) — warp depth
- DCA (Digitally Controlled Amplifier) — volume
- Independent pitch, detune, and octave settings
- A base waveform selector (sine, cosine, triangle, saw, square)
The two lines can be mixed using the Line Select control: L1 only, L2 only, L1+L2 (additive), L1+L1' (with L1's secondary algorithm), or L1+L2' (with L2's secondary algorithm).
Key Concepts
| Term |
Meaning |
| DCO |
Digitally Controlled Oscillator — sets the pitch/frequency |
| DCW |
Digitally Controlled Waveshaper — controls the warp amount |
| DCA |
Digitally Controlled Amplifier — controls the amplitude |
| Algorithm |
The mathematical function that warps the phase |
| Envelope |
An 8-step step-function controlling a parameter over time |
| Modulation Matrix |
Routes any of 7 sources to any of 51 destinations |
| FX Chain |
6 serial effect slots processing the final audio |
Performance Specs
| Spec |
Value |
| Polyphony |
8 voices (SIMD-4 batched) |
| Audio Backend |
Web Audio API (AudioWorklet) / CPAL (native) / nih-plug (plugin) |
| Wasm Binary Size |
~200 KB gzipped |
| Sample Rate |
44.1 kHz / 48 kHz |
| Latency (native) |
10–30 ms (platform-dependent) |
Next: Oscillators → | Algorithms → | Envelopes →