Control LFO

A free-running or tempo-synced low-frequency oscillator on a control lane, 0 to 1, with depth, offset, phase, skew, random shapes and a reset input.

  • Control
  • Since 0.2.0
  • lfo
  • modulation
  • control
  • tempo

Open in TuneToys

Control LFO as the Patch draws it, at default values: inlets on the left, outlets on the right.

Control LFO is a low-frequency oscillator whose output is a control lane, a number between 0 and 1 that moves in a repeating cycle. It runs on its own, and an optional reset input restarts it.

What it does#

Shape picks the waveform: sine, triangle, saw, square, or one of two random shapes. Rate sets cycles per second from 0.01 to 40 Hz on a logarithmic control. Setting Beats above 0 locks the cycle to the shared transport instead, so one cycle lasts that many beats (up to 64) and Rate is ignored; at 0 the oscillator is free-running. Depth is the peak-to-peak size of the swing and Offset is its centre, so the defaults (Depth 1, Offset 0.5) sweep the whole 0 to 1 range. Phase sets where in the cycle the oscillator starts. The output is a single control lane.

Reset#

A rising edge (0.5 or more) on the reset input restarts the cycle at the Phase parameter, free-running or locked to Beats, and does not report a cycle. Cable a clock or an Envelope done into it to restart a sweep on every note. The random shapes restart their sequence too.

Random shapes#

Random step holds one value per cycle; Random smooth glides from each cycle's value to the next with an eased curve. Values are drawn from a generator seeded by the node's path, so every host, block size and replay agrees, and a transport seek lands on the same values. Depth and Offset scale them like any other shape.

Events#

The cycle outlet sends an event: it is 1 for one block whenever the phase wraps from the end of a cycle back to the start, free-running or locked to Beats, and 0 otherwise. The first block does not count; a transport seek that moves the beat across a cycle boundary does. Cable it into a trigger input, such as Counter, to make a clock that ticks once per cycle whatever the Shape. Because control runs once per audio block, a cycle shorter than a block still reports one pulse per block, never more.

When to use it#

Use it to produce a moving control signal as an explicit node that can be scaled, smoothed, combined or compared downstream. To turn the 0 to 1 swing into a different range, follow it with Scale; to slow its edges use Smooth.

Ports#

PortDirectionSignalLanes
resetInputControl1
controlOutputControl1
cycleOutputControl1

Parameters#

ParameterLabelRangeDefaultUnitScaleNotes
shapeShape0 to 50linearWaveform of the oscillator. The random shapes draw a new value each cycle from a generator seeded by the node path, so every host and replay agrees. Choices: 0 Sine, 1 Triangle, 2 Saw, 3 Square, 4 Random step, 5 Random smooth.
rate_hzRate0.01 to 401HzlogCycles per second when Beats is 0.
beatsBeats0 to 640beatslinearBeats per cycle, synced to the shared transport. 0 uses Rate instead.
depthDepth0 to 11linearPeak-to-peak amount of the output swing.
offsetOffset0 to 10.5linearCentre of the swing.
phasePhase0 to 10linearStarting phase of the cycle, and where a Reset edge restarts it.
skewSkew0 to 10.5linearWhere the Triangle peaks, or how the Saw bends. 0.5 is the plain shape.

Shape (shape)#

Sine, Triangle, Saw, Square, Random step or Random smooth. A discrete choice. Square jumps between two levels, which makes it a handy clock for Counter or Sample and hold.

Rate (rate_hz)#

Cycles per second, 0.01 to 40 Hz, used when Beats is 0.

Beats (beats)#

Beats per cycle, 0 to 64, locked to the shared transport. 0 hands control back to Rate.

Depth (depth)#

The peak-to-peak size of the swing, 0 to 1. At 0 the output is a steady line at Offset.

Offset (offset)#

The centre of the swing, 0 to 1. Depth and Offset together decide how much of the 0 to 1 range is used.

Phase (phase)#

The starting phase of the cycle, 0 to 1, and where a Reset edge restarts it. Two LFOs with the same Rate or Beats and different Phase move in step but offset in time.

Skew (skew)#

Moves the Triangle's peak earlier or later in the cycle, or bends the Saw so its midpoint arrives at that point. 0.5 is the plain shape and leaves the output exactly as it was; the other shapes ignore it.

Tips#

  • Keep Depth and Offset consistent: a Depth of 1 with an Offset away from 0.5 pushes part of the swing past the 0 to 1 range.
  • Use Beats for anything that should stay in time with the music, and Rate for slow drift.
  • A control lane has no sound of its own. It acts when it is connected to a node that takes control input.
  • Prefer cycle over a square wave when you need one tick per cycle: it fires on the wrap whatever the Shape, Depth or Offset, and stays a one-block pulse.

See also#

Scale, Smooth, Math, Cables.

Help patches

Each help patch is an ordinary Toy that teaches one idea. The diagram shows the Patch; the preview shows its Frame. Open it in TuneToys to play and edit it.

1. Shape a control wave

beginner Teaches: shape, rate_hz, depth, offset

A control LFO with shape, rate, depth and offset beside a steady tone.

Patch: Oscillator audio output connected to Patch outputs audio input.
Connections as text
  • Oscillator audio output connected to Patch outputs audio input
  • Control LFO makes a 0 to 1 control lane. Shape and Rate set the motion.
  • Depth is the size of the swing and Offset is its centre.
  • The tone is only here so the Toy plays; the lane is available to any control input.
Frame preview: Shape a control waveFrame “Shape a control wave” with 5 elements: knob Depth, text heading, knob Offset, knob Rate, segmented Shape.1DepthSHAPE A CONTROL WAVE0.5Offset1 HzRateSineTriangleSawSquareShape
Frame preview (static). Controls show their default values.

Open in TuneToys

2. Lock two LFOs to the beat

intermediate Teaches: beats, phase

Two tempo-synced LFOs with a shared cycle length and a phase offset.

Patch: Oscillator audio output connected to Patch outputs audio input.
Connections as text
  • Oscillator audio output connected to Patch outputs audio input
  • Beats above 0 syncs the cycle to the shared transport and replaces Rate.
  • Both LFOs share a cycle length; Phase on the second one offsets it in time.
Frame preview: Lock two LFOs to the beatFrame “Lock two LFOs to the beat” with 3 elements: knob Beats, text heading, knob Phase.4 beatsBeatsLOCK TWO LFOS TO THE BEAT0.5Phase
Frame preview (static). Controls show their default values.

Open in TuneToys

3. Tick once per cycle

intermediate Teaches: rate_hz, shape, control-lanes

An LFO swells the level with its wave while its cycle outlet clocks a counter that picks the next pitch, whatever the shape.

Patch: Oscillator audio output connected to Gain audio input. Gain audio output connected to Patch outputs audio input. Control LFO control output connected to Gain @level input. Control LFO cycle output connected to Counter trigger input. Counter control output connected to Select lanes control input. Select lanes control output connected to Scale control input. Scale control output connected to Oscillator @frequency input.
Connections as text
  • Oscillator audio output connected to Gain audio input
  • Gain audio output connected to Patch outputs audio input
  • Control LFO control output connected to Gain @level input
  • Control LFO cycle output connected to Counter trigger input
  • Counter control output connected to Select lanes control input
  • Select lanes control output connected to Scale control input
  • Scale control output connected to Oscillator @frequency input
  • The control lane (0 to 1) rides the gain level, so you hear the Shape.
  • cycle is 1 for one block when the phase wraps: a clock that ticks once per cycle.
  • The counter wraps at 4, so the pitch walks four steps and starts over.
Frame preview: Tick once per cycleFrame “Tick once per cycle” with 4 elements: text heading, text hint, knob Rate, segmented Shape.TICK ONCE PER CYCLEThe wave itself swells the level. The cycle outlet fires once at the start of e…1 HzRateSineTriangleSawSquareShape
Frame preview (static). Controls show their default values.

Open in TuneToys

4. Reset, skew and random

intermediate Teaches: skew, rate_hz

A slow clock resets a skewed triangle so it always restarts in phase, and a random-smooth LFO wanders the pitch.

Patch: Oscillator audio output connected to Gain audio input. Gain audio output connected to Patch outputs audio input. Control LFO “clock” control output connected to Control LFO “wave” reset input. Control LFO “wave” control output connected to Gain @level input. Control LFO “drift” control output connected to Oscillator @frequency input.
Connections as text
  • Oscillator audio output connected to Gain audio input
  • Gain audio output connected to Patch outputs audio input
  • Control LFO “clock” control output connected to Control LFO “wave” reset input
  • Control LFO “wave” control output connected to Gain @level input
  • Control LFO “drift” control output connected to Oscillator @frequency input
  • Reset restarts the phase on a rising edge.
  • Shapes 4 and 5 are seeded from the node path, so they replay exactly.
Frame preview: Reset, skew and randomFrame “Reset, skew and random” with 5 elements: knob Drift, text heading, text hint, knob Rate, knob Skew.1.2 HzDriftRESET, SKEW AND RANDOMEach clock edge restarts the triangle at its Phase. Skew moves its peak, so the…3 HzRate0.2Skew
Frame preview (static). Controls show their default values.

Open in TuneToys

  • Scale Map a control range onto another with a curve, clamp and inversion. Depth and offset for any modulation.
  • Smooth Slow a control lane down with separate rise and fall times so jumpy sensors and buttons stop clicking.
  • Math Arithmetic on any signal, lane by lane: add, multiply, divide, power and more on audio or control operands. The output runs at the rate of its fastest input.

Edit this page on GitHub

esc

↑ ↓ move↩ open⌘↩ new tabesc close