Granulator

Replays windowed grains of the live input: up to 32 at once, scheduled from the node path, with freeze, reverse and pitch.

  • Effect
  • Since 0.2.0
  • granular
  • texture
  • freeze
  • cloud
  • pitch

Open in TuneToys

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

Granulator chops the live input into short windowed grains and replays them from the recent past, turning any sound into clouds, stutters, shimmering textures or a frozen drone.

What it does#

The input is written into a circular buffer prepared for the largest admitted Position plus Spray plus the longest grain at its fastest read. New grains start at Density per second, or on a grid of Beats locked to the shared transport. Each grain reads Grain size of audio from Position behind the live input (plus a random Spray), transposed by Pitch and a random Pitch spray, backwards with the Reverse probability, and balanced across the channels by a random amount up to Width. A Hann window fades every grain in and out. Up to 32 grains sound at once; a grain that finds every voice busy is skipped. The sum is normalized by the energy of the windows that are sounding, so dense clouds keep a steady level.

Every random choice comes from a generator seeded by the node's path, so the same Toy sounds identical on every host and in offline renders. Freeze stops writing the buffer: grains keep replaying what it holds, even after the input falls silent.

When to use it#

Use it for ambient textures from any source, glitchy stutters on drums, octave shimmer, or a held freeze drone under a performance. For clean repeats use Delay; for a smooth wash use Reverb.

Ports#

PortDirectionSignalLanes
audioInputAudioInferred from the cable
audioOutputAudioInferred from the cable

Parameters#

ParameterLabelRangeDefaultUnitScaleNotes
size_msGrain size10 to 100090mslogLength of each grain's Hann window, fixed when the grain starts.
density_hzDensity0.5 to 20016HzlogNew grains per second when Beats is 0. A grain that finds all 32 voices busy is skipped.
position_msPosition0 to 2000120mslinearHow far behind the live input each grain starts reading. The buffer is sized for the largest admitted value.
spray_msSpray0 to 100040mslinearRandom extra distance back for each grain.
pitchPitch-24 to 240stlinearGrain transposition in semitones.
pitch_sprayPitch spray0 to 240stlinearRandom transposition of each grain up to this many semitones either way; the total stays within ±24.
reverseReverse0 to 10linearProbability that a grain plays backwards.
widthWidth0 to 10.5linearRandom balance of each grain across the channels.
freezeFreeze0 to 10linearStops writing the live buffer so grains keep replaying what it holds. A frozen buffer reports an infinite tail. Choices: 0 Off, 1 On.
beatsBeats0 to 160beatslinearBeats between grains, phase-locked to the shared transport. 0 uses Density instead.
mixMix0 to 10.5linearDry/wet blend.

Grain size (size_ms)#

The length of each grain's window, from 10 to 1000 ms. It is fixed when the grain starts. Short grains sound buzzy and rhythmic, long grains smooth and smeared.

Density (density_hz)#

New grains per second, from 0.5 to 200, when beats is 0. Density times Grain size is roughly how many grains overlap.

Position (position_ms)#

How far behind the live input each grain starts reading, from 0 to 2000 ms. Grains that play faster than the input start far enough back that they never catch up with it.

Spray (spray_ms)#

A random extra distance back for each grain, up to this many milliseconds, which scatters the cloud in time.

Pitch (pitch)#

Grain transposition in semitones, from -24 to 24.

Pitch spray (pitch_spray)#

A random transposition of each grain up to this many semitones either way. The total stays within ±24.

Reverse (reverse)#

The probability that a grain plays backwards, from 0 (never) to 1 (always).

Width (width)#

How far each grain is randomly balanced across the channels. At 0 every grain sits in the middle.

Freeze (freeze)#

Off or On. On stops writing the live buffer, so the grains keep replaying what it holds. A Toy that can freeze reports an infinite tail.

Beats (beats)#

Beats between grains, phase-locked to the shared transport: 0.25 starts a grain every sixteenth note. At 0 grains follow density_hz. While the transport is stopped, synced grains do not start.

Mix (mix)#

Dry and grain blend.

Tips#

  • Raise Spray and Width with a long Grain size for a wide ambient cloud.
  • Pitch 12 with a little Pitch spray gives an octave shimmer; add Reverse for a backwards bloom.
  • Freeze a chord, then play over the top of the drone it leaves.
  • Large Position, Spray and Grain size values make the prepared buffer larger: up to 8 seconds per channel.

See also#

Delay, Reverb, Chorus.

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. Granulate a live tone

beginner Teaches: size_ms, density_hz, position_ms, mix

A plucked saw loop replayed as a cloud of grains.

Patch: Oscillator audio output connected to Envelope audio input. Envelope audio output connected to Granulator audio input. Granulator audio output connected to Patch outputs audio input.
Connections as text
  • Oscillator audio output connected to Envelope audio input
  • Envelope audio output connected to Granulator audio input
  • Granulator audio output connected to Patch outputs audio input
  • Each grain replays a short windowed slice of the recent input.
  • Density sets how many grains start each second; Position how far back they read.
Frame preview: Granulate a live toneFrame “Granulate a live tone” with 5 elements: knob Density, text heading, knob Mix, knob Position, knob Grain size.16 HzDensityGRANULATE A LIVE TONE0.5Mix120 msPosition90 msGrain size
Frame preview (static). Controls show their default values.

Open in TuneToys

2. Spray, pitch and reverse

intermediate Teaches: spray_ms, pitch, pitch_spray, reverse, width

A plucked loop scattered in time, pitch and direction.

Patch: Oscillator audio output connected to Envelope audio input. Envelope audio output connected to Granulator audio input. Granulator audio output connected to Patch outputs audio input.
Connections as text
  • Oscillator audio output connected to Envelope audio input
  • Envelope audio output connected to Granulator audio input
  • Granulator audio output connected to Patch outputs audio input
  • Spray and Pitch spray randomize each grain from a generator seeded by the node.
  • Reverse is a probability per grain; Width balances grains across the speakers.
Frame preview: Spray, pitch and reverseFrame “Spray, pitch and reverse” with 6 elements: text heading, knob Pitch, knob Pitch spray, knob Reverse, knob Spray, knob Width.SPRAY, PITCH AND REVERSE12 stPitch2 stPitch spray0.3Reverse200 msSpray0.8Width
Frame preview (static). Controls show their default values.

Open in TuneToys

3. Freeze and beat-synced grains

advanced Teaches: freeze, beats

Grains on the transport grid, and a freeze that holds the buffer.

Patch: Oscillator audio output connected to Envelope audio input. Envelope audio output connected to Granulator audio input. Granulator audio output connected to Patch outputs audio input.
Connections as text
  • Oscillator audio output connected to Envelope audio input
  • Envelope audio output connected to Granulator audio input
  • Granulator audio output connected to Patch outputs audio input
  • Beats above zero start a grain on every step of that many transport beats.
  • Freeze stops recording: the grains keep replaying what the buffer holds.
Frame preview: Freeze and beat-synced grainsFrame “Freeze and beat-synced grains” with 3 elements: knob Beats, toggle Freeze, text heading.0.25 beatsBeatsFreezeFREEZE AND BEAT-SYNCED GRAINS
Frame preview (static). Controls show their default values.

Open in TuneToys

  • Delay Tempo-aware, smoothly retimed echoes with colored, ducked and explicit multichannel feedback.
  • Reverb An eight-line modulated feedback-delay network with room, hall and plate-like tunings.
  • Chorus Prepared multi-voice chorus, ensemble and vibrato over arbitrary channel bundles.

Edit this page on GitHub

esc

↑ ↓ move↩ open⌘↩ new tabesc close