Nodes
Stochastic nodes
Nodes for generating musical material through controlled randomness and probability-weighted selection.
| Node | Inputs | Outputs | Description |
|---|---|---|---|
| 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
The Black Page — statistical density
The Black Page: nested tuplets bar by bar, five against seven, a density envelope thickening the tuplets…
Inca Roads — the Lydian vamp, 19/16, and the angular line
Inca Roads: a two-chord Lydian vamp from typed chord symbols with its scale derived, a whole tune in 19/16…
G-Spot Tornado — Synclavier stochastics
G-Spot Tornado: Euclidean drums, weighted-choice and Markov lines, the logistic map driving pitch and…
Out of Doors — The Night's Music
The Night's Music: a cluster thinned by seeded chance, frogs and insects on a sparse grid, bird calls as…
Quatuor pour la fin du Temps — the rhythmic pedal, the palindrome, the modes
Quatuor pour la fin du Temps: 29 chords against 17 durations, non-retrogradable rhythms proved identical to…
Mode de valeurs et d'intensités, Catalogue d'oiseaux — the mode of values, the bird
Mode de valeurs and the Catalogue: every pitch bound to its own duration, dynamic and attack; a Markov bird…
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.