The primary Low-Frequency Oscillators (LFOs) in the Smart Grid One are implemented using the PolyXFaderInternal struct (private/src/PolyXFader.hpp). Despite the somewhat unconventional name, this struct evaluates and mixes periodic waveforms.
PolyXFader reads absolute loop phase through GetPhase, with an explicit PhaseDomain. The Theory of Time’s own phase-modulation LFO uses unmodulated phase; voice LFOs use modulated phase. It has no independent phase accumulator or reset input.
Waveform evaluation first reduces phase + phaseShift + 0.75 to a fractional cycle in double precision, then applies the shaping multiplier. A multiplier of 2.5 produces two full lobes and a final shorter lobe with half amplitude in each input cycle. This periodic shaping is preserved even at large absolute phase values.
Running topology edits require simultaneous old/new parent modulated boundaries. Integer phase offsets at an exact shared boundary therefore evaluate to the same periodic waveform. Interpolation uses global phase and the interval’s topology, avoiding a sweep through the absolute integer jump. Sampled boundary overshoot still reflects the new rate, and unmodulated LFO drive can differ from the modulated boundary used to accept an edit.
Components are shaped, weighted and mixed; components with zero blend weight are skipped. There is no waveform quantization. The normalized mix then passes through one OPLowPassFilter. Its per-sample phase distance is abs(modulated phase increment) × maximum active cycle ratio × PolyX multiplier × 8. This keeps the smoothing scale tied to logical travel as warp speed changes. Zero travel holds the mix. Reverse travel uses the same positive decay as equal forward travel; it does not undo the filter’s history.
The warp-producing oscillator uses nominal unmodulated phase travel, avoiding a self-dependent derivative. Stopped LFO slew also uses nominal travel so it can settle while musical phase is stationary. Coefficients update when phase distance changes, retaining the filter state. Small steps use the stable coefficient approximation; large steps use expm1 without a frequency cutoff clamp. The ideal forward law is proved in the phase model; sampled varying inputs still have integration error.
LFO scopes publish the clock’s continuous-phase offset and a period of 1 / gcd(active cycle ratios). The period GCD and axis update run during PopulateUIState, before the scope bank publishes, rather than on each engine sample. They do not record start markers or aggregate loop-top offsets. The display reads the corresponding phase in the current or previous cycle through the shared inverse, keeping a full logical-period axis even before one cycle has been recorded.
Blend weights, mixed-waveform slew, sample-and-hold and its slew are shared across LFO uses. Sample-and-hold captures the smoothed mix, then its held value passes through a 500 Hz OPLowPassFilter before blending with the continuous smoothed mix. This S+H filter runs every sample even at zero S+H mix, preserving its history across triggers and blend changes. There is no additional filter after the blend. Voice, quad and tempo LFOs share the Shape curve below. The tempo LFO retains its narrower Skew range.
The PolyXFader LFOs support a variety of shaping and modulation options:
m_attackFrac).m_phaseShift).0, a triangle at centered Skew. From 0 to 0.5, it crossfades continuously from triangle to sine. Above 0.5, the bipolar sine passes through the existing normalized tanh saturator with drive ExpParam(0.25, 8) of 2 × Shape − 1: exponential from 0.25 just above 0.5 to 8 at 1, approaching a square-like waveform. The positive minimum drive leaves a small step just above 0.5. Normalization preserves the 0–1 range, and fractional-Mult lobes retain their reduced amplitude. No quantizer or quantizer history is used.m_mult).m_trig is asserted, and the mix between the continuous LFO and the stepped S+H is controlled by the m_shFade parameter. Voice LFOs trigger from the voice AHD gate; quad LFOs trigger from each channel’s active delay-loop top.These LFOs are used extensively throughout the system:
SquiggleBoyVoice) has two dedicated SquiggleLFO instances (which wrap PolyXFaderInternal) for per-voice modulation. Their phase-shift knobs spread the nine voices by thirds (voice % 3 / 3).SquiggleBoy runs the same two PolyXFader shapes as two four-lane SquiggleLFOGeneric<4> instances, one lane per quad channel, on the QuadLFOs encoder bank. Their parameters are read as interpolated four-lane encoder values. Phase-shift knobs spread those channels by quarters (channel / 4), and each channel’s Sample-and-Hold captures when that channel’s active delay loop crosses its modulated cycle boundary. Outputs feed Quad modulator slots 6 and 7.