0 %

Nodes

Stochastic nodes

Nodes for generating musical material through controlled randomness and probability-weighted selection.

NodeInputsOutputsDescription
Random Pitches number low (midicents, default: 4800)
number high (midicents, default: 8400)
number count (default: 16)
number quantize (divisions, default: 12)
number seed (default: random)
midicents Generates N random pitches within a given range, quantized to the nearest division of the octave. Divisions = 12 gives semitones; 24 gives quarter-tones. Use a seed for reproducible results. The simplest stochastic pitch generator.
Random Walk number start (midicents, default: 6000)
number max-step (midicents, default: 300)
number count (default: 16)
number low-bound (midicents, default: 4800)
number high-bound (midicents, default: 8400)
number seed (default: random)
midicents Generates a constrained melodic random walk. Starting from an initial pitch, each step moves randomly by up to max-step midicents in either direction, staying within the specified bounds. Produces melodic lines that wander organically within a defined ambitus — stochastic but with local coherence.
Weighted Choice list values
list weights
number count (default: 16)
number seed (default: random)
list Selects N values from a list according to probability weights. Higher weights make a value more likely to be chosen. For example, values [6000, 6400, 6700] with weights [5, 2, 1] will produce mostly C4, some E4, and occasional G4. Use this to create probabilistic pitch or rhythm distributions with controlled tendencies.
Brownian Walk number low (midicents, default: 4800)
number high (midicents, default: 8400)
number step (midicents, default: 200)
number count (default: 16)
number seed (default: 42)
midicents Bounded random walk — SuperCollider's Pbrown analogue. Each step is uniform in [-step, +step], reflecting off the bounds so the path stays inside [low, high] with even density. Compared to Random Walk, the reflection (rather than clamping) keeps the distribution flat across the range instead of piling up at the edges — closer to musically usable melodic contours.
Gaussian / Cauchy number mean (midicents, default: 6000)
number sigma (midicents, default: 200)
number distribution (0=Gaussian, 1=Cauchy, default: 0)
number count (default: 16)
number seed (default: 42)
midicents Sample pitches from a Gaussian (bell-curve) or Cauchy (fat-tailed) distribution centred on mean. Gaussian uses Box-Muller transform — symmetric bell, ~99% of values within 3σ. Cauchy has the same centre but heavy tails: most pitches hover near the mean with occasional dramatic leaps, which is exactly the contour you want for a melody that mostly sits then suddenly takes flight.
Markov Chain midicents states (pitch alphabet)
list transitions (row-major N×N weights)
number start (state index, default: 0)
number count (default: 24)
number seed (default: 42)
midicents First-order Markov chain — SuperCollider's Pmarkov. Each row of the transition matrix gives the relative weights for the next state out of the current state; rows are normalised before sampling so weights need not sum to one. The classic stochastic-melody tool: pour different aesthetics into the matrix shape and dial Ligeti, Xenakis, or generative folk pastiche. A row that sums to zero falls back to a uniform draw so the chain never dead-ends.

Studies that use these nodes

Wire these nodes into a piece of your own.

Create a free account14 days of Composer Pro, no card needed. Every account opens with the Examples folder.