MODULES
PWM Osc Engine
Complete manual and reference for the PWM Osc Engine module.
UPDATED FEB 27, 2026
ON THIS PAGE
- Quick Overview
- Signal Flow (DSP Path)
- Inputs And Outputs
- Controls Reference
- Signal Section
- Oscillator Section
- Options Section
- Mode Behavior In Detail
- Sign-Flip
- Gate Chop
- PWM Compare
- Source And Modulation Routing
- CV Scaling
- Reset And Sync
- Oversampling, Filtering, And Latency Notes
- Output Safety And Limits
- Scope Section (Panel)
How Does It Work?#
PWM Osc Engine is a pulse modulation voice that can chop audio in two classic ways (sign-flip or gate) and can also run a comparator-style PWM mode with a dedicated carrier output.
Quick Overview#
- It contains an internal oscillator (
Sine,Tri,Saw,Square,Fold,Noise/S&H). - It can use external audio, internal audio, or a mix of both as the modulation source.
- It provides 3 operation modes:
Sign-FlipGate ChopPWM Compare
- It exposes 3 outputs:
Out(main audio)Gate(pulse/comparator state)Carrier(carrier waveform used by PWM section)
Signal Flow (DSP Path)#
For each sample, the engine does this:
- Read all inputs (
In,Gate Freq CV,Duty CV,Osc Freq CV,Reset,Sync). - Detect trigger/clock rising edges (threshold crossing above
0.5) forResetandSync. - Smooth key parameters (
Osc Freq,Gate Freq,Duty,Drive) over ~20 ms. - Apply CV modulation:
f0 *= 2^(clamp(f0_cv, -5, 5) / 5)fg *= 2^(clamp(fg_cv, -5, 5) / 5)duty += clamp(duty_cv, -5, 5) / 10
- Clamp operating ranges:
f0,fgto[0.01, 0.49 * sample_rate]dutyto[0.01, 0.99]
- Generate the internal oscillator sample.
- Resolve source selection (
External,Internal, orMix). - Apply drive stage (
gain = 1 + 8 * drive) with soft saturation (tanh). - Generate pulse/carrier and compute selected mode output:
Sign-Flip: multiply by bipolar pulseGate Chop: multiply by unipolar pulsePWM Compare: comparator (mod_signal >= carrier) with edge smoothing
- Apply output conditioning (DC blocker / anti-alias post-filter depending on mode and oversampling), sanitize NaN/Inf, flush denormals, and clamp outputs.
Inputs And Outputs#
| Port | Type | What It Does |
|---|---|---|
In | Audio | External signal source and/or PWM compare mod source (depending on Source and PWM Source). If unpatched, it is normalled to the internal oscillator. |
Gate Freq CV | CV | Exponential modulation of gate/carrier frequency. |
Duty CV | CV | Linear offset of pulse duty cycle. |
Osc Freq CV | CV | Exponential modulation of internal oscillator frequency. |
Reset | Trigger | Resets oscillator phase, pulse phase, or both (based on Reset Target). |
Sync | Clock | Hard sync for pulse phase only. |
Out | Audio | Final processed output. |
Gate | Gate | Pulse/comparator state output (polarity depends on settings). |
Carrier | Audio | Carrier waveform output (Tri or Saw). |
Controls Reference#
Signal Section#
| Control | Values | Default | Behavior |
|---|---|---|---|
Mode | Sign-Flip, Gate Chop, PWM Compare | Sign-Flip | Selects PWM math path for Out and Gate. |
Source | External, Internal, Mix | Internal | Chooses what feeds the drive/modulation path. |
Drive | 0..1 | 0.2 | Applies pre-mode gain and soft saturation. |
Oscillator Section#
| Control | Values | Default | Behavior |
|---|---|---|---|
Waveform | Sine, Tri, Saw, Square, Fold, Noise/S&H | Saw | Internal oscillator shape. |
Osc Freq | 0.01..20000 Hz | 220 Hz | Base frequency for internal oscillator. |
Gate Freq | 0.01..20000 Hz | 120 Hz | Frequency for pulse/carrier generation. |
Duty | 0.01..0.99 | 0.5 | Pulse width target before CV and clamp. |
Options Section#
| Control | Values | Default | Behavior |
|---|---|---|---|
Polarity | Unipolar, Bipolar | Bipolar | Output/gate polarity behavior, especially in compare mode. |
Oversample | 1x, 2x, 4x | 2x (UI default) | Internal anti-alias quality/perf tradeoff. |
Reset Target | Both, Osc, Pulse | Both | Chooses which phase domains respond to Reset. |
Carrier | Tri, Saw | Tri | Carrier shape for PWM compare path and carrier output. |
PWM Source | External, Internal | Internal | Selects compare input source in PWM Compare mode. |
Mode Behavior In Detail#
Sign-Flip#
- Uses a bipolar pulse (
-1/+1) as multiplier. - Effect: polarity inversion/chopping of the driven source.
- Output is naturally bipolar and includes a DC-block path.
Formula intuition:
out = driven_signal * pulse_bipolar
Gate Chop#
- Uses a unipolar pulse (
0/1) as multiplier. - Effect: classic on/off tremolo/chopping.
- Gate output is unipolar when
Polarity = Unipolar.
Formula intuition:
out = driven_signal * pulse_unipolar
PWM Compare#
- Compares modulation signal to carrier signal:
- comparator high when
mod_signal >= carrier
- comparator high when
- Edges are smoothed to reduce aliasing artifacts.
Carrieroutput exposes the active carrier waveform.
Comparator intuition:
pwm_state = (mod_signal >= carrier) ? 1 : 0
Source And Modulation Routing#
Source = External:- Uses
Inif patched. - Uses internal oscillator if
Inis unpatched (normalled behavior).
- Uses
Source = Internal:- Uses internal oscillator only.
Source = Mix:- Averages external-normalled signal and internal oscillator.
PWM Sourceapplies to compare mode source selection (ExternalorInternal).
CV Scaling#
Osc Freq CVandGate Freq CVare exponential in a clamped-5V..+5Vrange:- at
-5V:0.5xfrequency - at
0V:1.0xfrequency - at
+5V:2.0xfrequency
- at
Duty CVis linear:duty += cv / 10, with cv clamped to-5..+5- Max contribution is
-0.5..+0.5before final duty clamp
Reset And Sync#
- Rising-edge threshold is
0.5. ResetfollowsReset Target:Both: reset oscillator and pulse phasesOsc: reset oscillator onlyPulse: reset pulse only
Syncalways resets pulse phase only.- Pulse reset also clears compare-edge memory.
- In
Noise/S&H, oscillator reset refreshes the held random value.
Oversampling, Filtering, And Latency Notes#
- Oversample modes:
1x: no oversampled subsample set2x: two subsamples then FIR decimation via4xdecimator frame mapping4x: four subsamples then FIR decimation directly
- Only
Outis FIR-decimated.GateandCarrieruse the last subsample result. - The oversampler is a
4xpolyphase FIR design:257taps- linear phase
- ~
80 dBstopband attenuation - base-rate latency constant:
64samples
- Additional one-pole low-pass post-filter is used only when:
- mode is not
PWM Compare - oversampling is
1x
- mode is not
Output Safety And Limits#
- Soft saturation in drive stage (
tanh). - DC blocker behavior:
- always enabled in
Sign-Flip - disabled in
Gate Chop - enabled in
PWM Compareonly whenPolarity = Bipolar
- always enabled in
- Final hard clamps:
Out:[-2.0, 2.0]Gate:[-1.5, 1.5]Carrier:[-1.5, 1.5]
- Non-finite values are sanitized to stable output.
Scope Section (Panel)#
The built-in scope panel is for analysis/visualization:
- Probe targets:
Out,Gate,Carrier - Optional spectrum view toggle
- Time buttons:
S,M,L - Playback controls:
PLAY/PAUSE