Utilities
Bernoulli
Probabilistic gate router - flip a weighted coin on every trigger and send it to A or B.
Try one in your browser →
What is a Bernoulli?
A Bernoulli gate is a probabilistic trigger router. On each rising edge of an incoming gate, it flips a weighted coin and sends the trigger to one of two outputs - A with probability P, B with probability 1-P. The probability is set by a knob (and modulated by CV); at P=0 every trigger goes to A, at P=1 every trigger goes to B, at P=0.5 it's a 50/50 coin flip on every event. The output you can predict is the input clock; the output you can't is which channel the next pulse will land on.
The name comes from Jacob Bernoulli, the 17th-century Swiss mathematician who formalized the analysis of independent two-outcome random events. A Bernoulli trial in probability theory is exactly this: a single experiment with two possible outcomes, one with probability p, the other with 1-p. Coin flips, dice rolls (heads/not-heads), trigger routing - all share the same mathematical structure. Stack many trials in a row and you get a Bernoulli process, which is what a clock running into a Bernoulli gate produces over time.
In modular synthesis, this is one of the most powerful tools for controlled chaos. A clock running at a steady tempo into a Bernoulli gate produces two output streams that, together, contain every original pulse, but distributed unpredictably. Drive a kick drum from output A and a snare from output B and the rhythm becomes a random-walk groove - on the beat, but never the same way twice. Adjust P to bias the texture: P=0.3 gives a snare-light pattern, P=0.7 gives a snare-heavy one.
The Mutable Instruments Branches, designed by Émilie Gillet around 2014, popularized the concept in Eurorack. Earlier antecedents include the Buchla Source of Uncertainty family (which contained probabilistic routing in various forms since the 1970s) and any number of computer-music systems back to Iannis Xenakis's stochastic compositions in the 1950s. The mathematical foundation is centuries old; the modular implementation is straightforward and the musical implications are deep.
Two related ideas: a random gate simply drops triggers based on probability (1-P probability of silence, P probability of pass-through), which is a one-output Bernoulli gate where channel B goes nowhere. A Markov chain gate makes the next probability depend on the previous outcome, producing patterns with memory rather than pure independence - more musical for some applications but no longer truly Bernoulli.
Our Bernoulli
Our Bernoulli is dual-channel - two independent probabilistic gate routers in one panel - so you can run two unrelated rhythmic streams from a single module. Each channel has its own trigger input, probability knob (0-100%), probability CV input, and pair of outputs (A and B).
The LATCH toggle switches both channels between trigger-shaped outputs (each output pulses for as long as the input gate is HIGH, but only on the chosen side) and state-latched outputs (each output holds HIGH or LOW until the next coin flip). Trigger mode is right for driving drum voices or envelopes; latch mode is right for mute control, parameter switching, or anywhere you need a held state.
The BOTH output fires when both channels' last decisions both landed on A - a small piece of conjunction logic for free, useful for rare accents from two independent random streams. The PRNG is a xorshift32 reseeded from Date.now() on each module instantiation, which is plenty random for musical purposes and much faster than a cryptographic RNG would be in the audio thread.
In a patch
The classic patch: a regular clock into TR1, a kick drum from A1, a snare from B1. With prob at 50%, the kick and snare swap unpredictably on every beat. Push prob toward 0.2 and the snare appears occasionally, like ghost notes; push toward 0.8 and the kick becomes the rare accent.
Drive voice variations with a Bernoulli. Two slightly different VCO patches (different waveforms, different filter settings) each with their own envelope. A single melody line goes to both V/Oct inputs; a single clock through the Bernoulli triggers either envelope A or envelope B on each note. The melody plays the same notes, but on each one you can't predict which timbre will speak.
Use the BOTH output for accents. With two Bernoullis running on independent rhythms - say one clocked at quarter notes, one at eighth notes - the BOTH output fires only when both channels land on A simultaneously. With probabilities of 0.5 each, that's rare; combine with a clock divider upstream and you can create accent patterns that fire on average once every 8 or 16 beats, never on the same one.
Inputs
- TR 1 (gate) — Trigger input for channel 1. Each rising edge is randomly routed to A1 or B1.
- TR 2 (gate) — Trigger input for channel 2. Independent from channel 1 with its own probability.
- P1 (cv) — Probability CV for channel 1. Adds to the Prob 1 knob. Positive voltage biases toward B, negative toward A.
- P2 (cv) — Probability CV for channel 2. Adds to the Prob 2 knob.
Outputs
- A1 (gate) — Channel 1 output A. Receives the trigger when the coin flip lands on A. In Latch mode, stays HIGH until B1 fires.
- B1 (gate) — Channel 1 output B. Receives the trigger when the coin flip lands on B.
- A2 (gate) — Channel 2 output A. Independent from channel 1.
- B2 (gate) — Channel 2 output B. Independent from channel 1.
- BOTH (gate) — Fires when both channel 1 and channel 2 route to A simultaneously. Rare at 50/50 probability - useful for accent patterns.
Controls
- Prob 1 — Channel 1 probability from 0% (always A) to 100% (always B). At 50% it is a fair coin flip.
- Prob 2 — Channel 2 probability from 0% (always A) to 100% (always B).
- Latch — Latch mode toggle. When ON, outputs stay HIGH until the opposite output fires, creating sustained random gate patterns. When OFF, outputs are short triggers.
Inspired by
A direct conceptual descendant of Branches: each incoming trigger is a Bernoulli trial, sent to output A with probability P or output B with probability 1-P. We add a latch mode and a BOTH gate that fires when both channels happen to land on A simultaneously.
- Mutable Instruments Branches
- 2hp Brn
- Antimatter Audio Crossfold
← Back to all modules