FX INTRODUCTION / 07 / DRAFT

Wobble: move a filter

Move from a fixed low-pass filter to one whose cutoff rises and falls.

This article is a work in progress. The examples will be refined through listening. Run starts playback; Stop ends it. Use Apply after editing values. Stop the playing iframe before trying another one.

Listen with the built-in FX

SettingMeaning
cutoff / depthCutoff and modulation depth
rateOne LFO cycle in beats, not Hz
resonanceResonance
mixWet signal proportion

Select none in FX Monitor to see the waveform after the built-in FX. This pass-through effect makes input and output overlap; it does not compare the signal before and after the built-in FX.

Open in a separate Playground tab ↗

How the PCM is processed

Use a slowly moving sine wave as an LFO and derive the cutoff from its value. This moves a filter setting rather than replacing the audio waveform with a low-frequency signal. Both channels share the LFO phase, but keep separate filter history.

input[ch][i] is one input sample. ch identifies a left or right audio channel, not a physical FM voice. Store values carried between blocks in state. Since process cannot access outer variables, put settings in context.

Try it with liveFx

The 48000 in context.sampleRate is a placeholder. Match it to the actual output rate shown in FX Monitor. It is used to calculate times and frequencies; it does not change the browser's output sample rate.

Open in a separate Playground tab ↗

Select wobble-lab in FX Monitor to compare the input and output of this process.

  1. Try lfoHz at 0.25, 1, and 4 to hear different modulation speeds.
  2. Set lowHz and highHz equal for a stationary filter.
  3. Check whether high-frequency strength changes in Spectrum.

Scope of this example

The learning example is a first-order low-pass filter moving logarithmically between lowHz and highHz. It does not reproduce the built-in cutoff/depth or resonance behavior. At BPM 120, a built-in rate of two beats is one second; lfoHz 1 is one cycle per second.

The waveform shows changes over time; Spectrum shows the strength of frequency components. A short display window or smoothing can hide some changes. Listen while changing one setting at a time.