Bernoulli Gates
Bernoulli Gates
Section titled “Bernoulli Gates”This script is based on Mutable Instruments Branches. Because EuroPi only haa a pair of digital/analogue inputs, the dual Bernoulli gates share the same clock (from the digital input), and only one Bernoulli gate has CV input.
A Bernoulli gate takes a logic signal (trigger or gate) as an input, and routes it to either of its two outputs according to a random coin toss.
Inputs & Outputs
Section titled “Inputs & Outputs”Inputs:
din: trigger/clockain: probability control of gate 1 (summed with Knob 1)k1: probability control of gate 1k2: probability control of gate 2b1: mode switch of gate 1b2: mode switch of gate 2
Outputs:
cv1: output A of gate 1cv2: output B of gate 1cv3: copy of input trigger/clockcv4: output A of gate 2cv5: output B of gate 2cv6: logical AND of both output A (cv1andcv4)
Turning a knob anticlockwise increases the probability that a signal will be routed to the corresponding gate’s A-output, while turning it clockwise increases the probablility of the signal being routed to the gate’s B-output. At 12-o’clock the probability of either is 50/50. Fully anticlockwise the probability of either is 100/0 and fully clockwise is 0/100.
Gate modes can be switched between
- trigger:
Tr - toggle:
Tg - gate (latch):
Gby pressing the buttons. These modes are described in more detail below.
Tigger mode (Tr)
Section titled “Tigger mode (Tr)”When the trigger mode is enabled, an output A/B changes to +5V for 10ms every time they are activated by the corresponding Bernoulli gate.
Toggle mode (Tg)
Section titled “Toggle mode (Tg)”In toggle mode, the module associates the “heads” and “tails” outcomes to a different pair of decisions: “continue sending the trigger to the same output as before” and “send the trigger to the opposite output”. As a result, when the probability knob 1 is set to its maximum value, the trigger will alternate between outputs A and B.
Gate mode/Latch mode (G)
Section titled “Gate mode/Latch mode (G)”When the gate mode is enabled, an output A/B stays at +5V until the other output gets activated.