Skip to content

Commit e659231

Browse files
authored
Fix typos, formatting for contrib readmes (#437)
1 parent b4a40bf commit e659231

40 files changed

Lines changed: 1091 additions & 904 deletions
Lines changed: 39 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,53 @@
11
# Bernoulli Gates
22

3-
author: Bridgee
3+
This script is based on Mutable Instruments Branches. Because EuroPi only haa a pair of digital/analogue
4+
inputs, the dual Bernoulli gates share the same clock (from the digital input), and only one Bernoulli
5+
gate has CV input.
46

5-
date: 03/13/22
7+
A Bernoulli gate takes a logic signal (trigger or gate) as an input, and routes it to either of its
8+
two outputs according to a random coin toss.
69

7-
labels: Random
10+
## Inputs & Outputs
811

9-
### General
10-
This app is based on Mutable Instruments Branches. Because EuroPi only have a pair of digital/analogue inputs, the dual Bernoulli gates share the same clock (from the digital input), and only one Bernoulli gate have CV input.
12+
Inputs:
13+
- `din`: trigger/clock
14+
- `ain`: probability control of gate 1 (summed with Knob 1)
15+
- `k1`: probability control of gate 1
16+
- `k2`: probability control of gate 2
17+
- `b1`: mode switch of gate 1
18+
- `b2`: mode switch of gate 2
1119

12-
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.
20+
Outputs:
21+
- `cv1`: output A of gate 1
22+
- `cv2`: output B of gate 1
23+
- `cv3`: copy of input trigger/clock
24+
- `cv4`: output A of gate 2
25+
- `cv5`: output B of gate 2
26+
- `cv6`: logical AND of both output A (`cv1` and `cv4`)
1327

14-
Knob 1 adjusts the probability of the Bernoulli gate 1, and Knob 2 adjusts the probability of the Bernoulli gate 2.
28+
Turning a knob anticlockwise increases the probability that a signal will be routed to the
29+
corresponding gate's A-output, while turning it clockwise increases the probablility of the signal
30+
being routed to the gate's B-output. At 12-o'clock the probability of either is 50/50. Fully
31+
anticlockwise the probability of either is 100/0 and fully clockwise is 0/100.
1532

16-
Button 1 switches the mode of gate 1 between trigger mode, toggle mode, and gate mode (latch mode), and Button 2 switches the mode of gate 2 between trigger mode, toggle mode, and gate mode (latch mode).
33+
Gate modes can be switched between
34+
- trigger: `Tr`
35+
- toggle: `Tg`
36+
- gate (latch): `G`
37+
by pressing the buttons. These modes are described in more detail below.
1738

18-
### Tigger mode (Tr)
39+
## Tigger mode (Tr)
1940

20-
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.
41+
When the **trigger mode** is enabled, an output A/B changes to +5V for 10ms every time they are
42+
activated by the corresponding Bernoulli gate.
2143

22-
### Gate mode/Latch mode (G)
23-
24-
When the **gate mode** is enabled, an output A/B stays at +5V until the other output gets activated.
25-
26-
### Toggle mode (Tg)
27-
28-
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.
44+
## Toggle mode (Tg)
2945

46+
In **toggle mode**, the module associates the “heads” and “tails” outcomes to a different pair of
47+
decisions: “continue sending the trigger to the same output as before” and “send the trigger to the
48+
opposite output”. As a result, when the probability knob 1 is set to its maximum value, the trigger
49+
will alternate between outputs A and B.
3050

51+
## Gate mode/Latch mode (G)
3152

32-
33-
34-
digital in: trigger/clock
35-
analogue in: probability control of gate 1 (summed with Knob 1)
36-
knob 1: probability control of gate 1
37-
knob 2: probability control of gate 2
38-
button 1: mode switch of gate 1
39-
button 2: mode switch of gate 2
40-
cv1/cv2: output A/B of gate 1
41-
cv4/cv5: output A/B of gate 2
42-
cv3: copy of trigger/clock
43-
cv6: logic AND of the two output A
53+
When the **gate mode** is enabled, an output A/B stays at +5V until the other output gets activated.

software/contrib/bezier.md

Lines changed: 48 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -5,41 +5,45 @@ This script generates two random CV outputs using [Bezier curves](https://en.wik
55
This work is inspired by the [ADDAC507](https://www.addacsystem.com/en/products/modules/addac500-series/addac507),
66
a collaboration between ADDAC System and [Monotrail](https://youtu.be/9PxVmeMrOoQ?si=GsNDKNipjHtBIPT1)
77

8-
## Input & Output
8+
## Inputs & Outputs
99

10-
The module has two separate output channels, referred to as A and B. Each has identical controls, though channel B's
11-
controls can only be accessed by holding `b2`. Note that when changing channels, the knobs will "lock" in their
12-
previous positions, so you may need to sweep the knob to unlock it.
10+
The module has two separate output channels, referred to as A and B. Each has identical controls,
11+
though channel B's controls can only be accessed by holding `b2`. Note that when changing channels,
12+
the knobs will "lock" in their previous positions, so you may need to sweep the knob to unlock it.
1313

1414
- `b1` -- press to change the clipping mode for both channels (see below)
1515
- `b2` -- hold to change `k1` and `k2` to channel B input
1616

1717
- `k1` -- set the frequency of channel A or B
1818
- `k2` -- set the curve of channel A or B
19-
- `ain` -- configurable CV input to control either the frequency or curve (see below for how to set routing)
20-
- `din` -- on a rising edge, force channels A and B to choose new goal voltages. This will not generate an output gate
21-
on `cv4` (see below), but may change the gate state on `cv5` and `cv6`.
19+
- `ain` -- configurable CV input to control either the frequency or curve (see below for how to set
20+
routing)
21+
- `din` -- on a rising edge, force channels A and B to choose new goal voltages. This will not
22+
generate an output gate on `cv4` (see below), but may change the gate state on `cv5` and `cv6`.
2223

2324
- `cv1` -- CV output from channel A
2425
- `cv2` -- CV output from channel B
2526
- `cv3` -- the average of channel A and B CV outputs
2627
- `cv4` -- gate output of channel A
2728
- `cv5` -- gate output of channel B
28-
- `cv6` -- logic combination of gate outputs of channels A and B (see below for how to configure the logic mode)
29+
- `cv6` -- logic combination of gate outputs of channels A and B (see below for how to configure the
30+
logic mode)
2931

3032
Gate outputs are different for channels A and B:
31-
- Channel A (`cv4`) outputs a 10ms trigger every time a new sample is generated (determined by the frequency)
32-
- Channel B (`cv5`) is high whenever its voltage output is higher than 50%. e.g. if the range is set to 0-10V, `cv5`
33-
will be high if `cv2` is 5V or more.
34-
35-
Patching a clock/gate/trigger signal into `din` will force the output channels to choose a new goal voltage. This can
36-
(and frequently will) cause an abrupt change in the CV output of channels A and B, rather than the smoothly changing
33+
- Channel A (`cv4`) outputs a 10ms trigger every time a new sample is generated (determined by the
34+
frequency)
35+
- Channel B (`cv5`) is high whenever its voltage output is higher than 50%. e.g. if the range is set
36+
to 0-10V, `cv5` will be high if `cv2` is 5V or more.
37+
38+
Patching a clock/gate/trigger signal into `din` will force the output channels to choose a new goal
39+
voltage. This can (and frequently will) cause an abrupt change in the CV output of channels A and B,
40+
rather than the smoothly changing
3741
voltages they normally output.
3842

3943
## Additional Configuration
4044

41-
The script has additional parameters that can be set by manually editing/creating `/config/Bezier.json`. The default
42-
values for this file are below:
45+
The script has additional parameters that can be set by manually editing/creating
46+
`/config/Bezier.json`. The default values for this file are below:
4347

4448
```json
4549
{
@@ -55,38 +59,44 @@ The following fields may be set:
5559

5660
- `MIN_VOLTAGE` -- the minimum voltage that channel A or channel B may output. Default: 0.0
5761
- `MAX_VOLTAGE` -- the maximum voltage that channel A or channel B may output. Default 10.0
58-
- `AIN_MODE` -- changes what parameter voltage to `ain` controls. Must be one of `curve` or `frequency`. Default: `frequency`
59-
- `LOGIC_MODE` -- sets the logical operation used to determine the gate output of `cv6`. Must be one of
60-
`and`, `or`, `xor`, `nand`, `nor`, or `xnor`. Default: `xor`.
61-
- `MIN_FREQUENCY` -- the minumum frequency (Hz) for choosing new random values. Must be between 0.001 and 10.0. Default: 0.01
62-
- `MAX_FREQUENCY` -- the maximum frequency (Hz) for choosing new random values. Must be between 0.001 and 10.0. Default: 1.0
62+
- `AIN_MODE` -- changes what parameter voltage to `ain` controls. Must be one of `curve` or
63+
`frequency`. Default: `frequency`
64+
- `LOGIC_MODE` -- sets the logical operation used to determine the gate output of `cv6`. Must be one
65+
of `and`, `or`, `xor`, `nand`, `nor`, or `xnor`. Default: `xor`.
66+
- `MIN_FREQUENCY` -- the minumum frequency (Hz) for choosing new random values. Must be between
67+
0.001 and 10.0. Default: 0.01
68+
- `MAX_FREQUENCY` -- the maximum frequency (Hz) for choosing new random values. Must be between
69+
0.001 and 10.0. Default: 1.0
6370
- `MAX_INPUT_VOLTAGE` -- the maximum CV input voltage (default: 10.0)
6471

6572
Note that the maximum and minimum voltages must be defined such that:
6673
- `MIN_VOLTAGE` is less than `MAX_VOLTAGE`
6774
- `MIN_VOLTAGE` and `MAX_VOLTAGE` are positive
68-
- `MIN_VOLTAGE` and `MAX_VOLTAGE` do not fall outside the range defined by the module's master configuration
75+
- `MIN_VOLTAGE` and `MAX_VOLTAGE` do not fall outside the range defined by the module's master
76+
configuration
6977
- `MAX_INPUT_VOLTAGE` is less than the module's master configuration.
7078

71-
See [Configuration](/software/CONFIGURATION.md) for more information on input & output voltage options for the
72-
entire module.
79+
See [Configuration](/software/CONFIGURATION.md) for more information on input & output voltage
80+
options for the entire module.
7381

74-
If you plan on using CV to control Bezier, make sure you set the maximum input voltage according to your modules'
75-
output. For example if you plan on connecting it to an LFO that outputs 0-5V, you may find it helpful to set the
76-
`MAX_INPUT_VOLTAGE` to `5.0` to allow the full modulation range. If your LFO is bipolar (e.g. `+/-5V`), the input
77-
will be clamped at 0 as EuroPi does not support bipolar CV input. In this case, the use of a voltage rectifier is
78-
recommended.
82+
If you plan on using CV to control Bezier, make sure you set the maximum input voltage according to
83+
your modules' output. For example if you plan on connecting it to an LFO that outputs 0-5V, you may
84+
find it helpful to set the `MAX_INPUT_VOLTAGE` to `5.0` to allow the full modulation range. If your
85+
LFO is bipolar (e.g. `+/-5V`), the input will be clamped at 0 as EuroPi does not support bipolar CV
86+
input. In this case, the use of a voltage rectifier is recommended.
7987

8088
## Clipping mode
8189

82-
The output can behave in one of 3 ways if the output wave moves outside the defined maximum/minimum voltage range:
90+
The output can behave in one of 3 ways if the output wave moves outside the defined maximum/minimum
91+
voltage range:
8392
- `limit` -- the output is clipped to the maximum/minimum value
8493
- `fold` -- the output is flipped such that the shape of the curve is reflected
8594
- `thru` -- the output wraps around through the opposite end of the range
8695

8796
## Curve Shapes
8897

89-
The shape of the bezier curves is defined by the "curve constant" `k`. This value lies in the range `[-1, 1]`, and is
98+
The shape of the bezier curves is defined by the "curve constant" `k`. This value lies in the range
99+
`[-1, 1]`, and is
90100
interpreted as follows:
91101
- `0.0` -- linear interpolation between voltages
92102
- `k < 0` -- horizontal approach to each new voltage
@@ -95,16 +105,17 @@ interpreted as follows:
95105
The following image illustrates this concept, copied from the ADDAC507 manual:
96106
![Bezier Curves](bezier-docs/curve-knob.png.png)
97107

98-
Negative values of `k` will generally result in a smoother overall shape to the output voltage. Positive values will
99-
have more abrupt changes in voltage whenever a new goal value is generated.
108+
Negative values of `k` will generally result in a smoother overall shape to the output voltage.
109+
Positive values will have more abrupt changes in voltage whenever a new goal value is generated.
100110

101111
## CV Control
102112

103-
If CV control is set to `frequency` (the default), `ain` will accept positive voltage, increasing the frequency of both
104-
channels as voltage increases.
113+
If CV control is set to `frequency` (the default), `ain` will accept positive voltage, increasing
114+
the frequency of both channels as voltage increases.
105115

106-
If CV control is set to `curve`, `ain` will accept positive voltage, changing the curve constant of both channels. The
107-
channels' curve constants are set to the average between the knob value (`[-1, 1]`) and the CV value:
116+
If CV control is set to `curve`, `ain` will accept positive voltage, changing the curve constant of
117+
both channels. The channels' curve constants are set to the average between the knob value
118+
(`[-1, 1]`) and the CV value:
108119
- `0V` is equivalent to a curve constant of `-1`
109120
- `50%` of `MAX_INPUT_VOLTAGE` is equivalent to a curve constant of `0`
110121
- `100%` of `MAX_INPUT_VOLTAGE` is equivalent to a curve constant of `+1`

software/contrib/bit_garden.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
11
# Bit Garden - pseudo-random deterministic repeated triggers
22

3-
author: Adam Wonak (github.com/awonak)
4-
5-
date: 2024-03-21
6-
7-
labels: triggers, random
8-
93
Connect a trigger or gate source to the Digital input and the each output will
104
mirror that signal according to a decreasing deterministic probability pattern
11-
set by the seed value. Use the Analog input as a trigger to get a new random
5+
set by the seed value. Use the Analog input as a trigger to get a new random
126
seed. From the main page, use the left knob adjust the pattern length. The
137
right knob will scroll through each output to show the current trigger pattern
148
for that output. Left button will change the cv output mode from Trigger

software/contrib/bouncing_pixels.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
# Bouncing Pixels
22

3-
author: [Jorin](https://github.com/jorins)
4-
5-
date: 2025-04-12
6-
7-
labels: gates, random, simulation, triggers
8-
93
Pixels bounce around the display and trigger gates when hitting the edges.
104
Inspired by the classic bouncing DVD logo!
115

@@ -41,7 +35,7 @@ One possible over and under speed behaviour is that pixels are deactivated.
4135
When deactivated, a pixel will not be processed or rendered until reset. Resets
4236
can be manually triggered by pressing B1 or using the digital input (must be
4337
configured). A reset is automatically triggered when all pixels in play are
44-
deactivated.
38+
deactivated.
4539

4640
## Outputs
4741

@@ -167,7 +161,7 @@ controller.
167161
## Known issues & limitations
168162

169163
* Gate lengths are not entirely precise. They're guaranteed to be at least the
170-
set length, but they may exceed it slightly on account of running on
164+
set length, but they may exceed it slightly on account of running on
171165
tick-based timers.
172166
* Corners aren't actually corners, they're just the top and bottom most
173167
parts of the side edges. This means that if a pixel is traveling parallel and
@@ -198,4 +192,4 @@ you can do:
198192
under speed behaviour.
199193
* Allow more in-app configuration instead of relying on the configuration file.
200194
* Implement visual feedback on the locked knob inputs. This would make the use
201-
of the second layer knobs easier.
195+
of the second layer knobs easier.

software/contrib/clock_mod.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
This program performs clock multiplications and divisions based on an incoming gate signal on DIN.
44

5-
Each output is a multiple or a division of the incoming clock signal on `DIN`. The duration of the output gates
6-
are not adjustable and are fixed to approximately a 50% duty cycle (some rounding will occur).
5+
Each output is a multiple or a division of the incoming clock signal on `DIN`. The duration of the
6+
output gates are not adjustable and are fixed to approximately a 50% duty cycle (some rounding will
7+
occur).
78

89
## I/O Mapping
910

@@ -17,24 +18,25 @@ are not adjustable and are fixed to approximately a 50% duty cycle (some roundin
1718
| `k2` | Clock modifier for CV4/5/6 |
1819
| `cv1-6` | Multiplied/divided clock signals |
1920

20-
The outputs will begin firing automatically when clock signals are received on `din`, and will stop if the input
21-
signals are stopped for 5s or longer. Upon stopping all output channels will reset. (NOTE: this means the signal
22-
coming into `din` cannot be 0.2Hz or slower!)
21+
The outputs will begin firing automatically when clock signals are received on `din`, and will stop
22+
if the input signals are stopped for 5s or longer. Upon stopping all output channels will reset.
23+
(NOTE: this means the signal coming into `din` cannot be 0.2Hz or slower!)
2324

2425
Applying a signal of at least 0.8V to `ain` will reset all output channels.
2526

2627
## Persistence
2728

28-
The clock modifiers for output channels 1 and 4 are read directly from the positions of `k1` and `k2` on startup.
29-
The modifiers for the other channels (2, 3, 5, and 6) are saved in a configuration file and will persist across
30-
restarts.
29+
The clock modifiers for output channels 1 and 4 are read directly from the positions of `k1` and
30+
`k2` on startup. The modifiers for the other channels (2, 3, 5, and 6) are saved in a configuration
31+
file and will persist across restarts.
3132

3233
## Note on Phase Alignment
3334

34-
Changing the clock modifers while the module is running is possible, but can (and generally will) result in some
35-
phase-shifting of the outputs. e.g. if `cv1` and `cv2` are set to `x1`, changing `cv1` to `x2` and then back to `x1`
36-
will probably result in `cv1` and `cv2` no longer being synchronized.
35+
Changing the clock modifers while the module is running is possible, but can (and generally will)
36+
result in some phase-shifting of the outputs. e.g. if `cv1` and `cv2` are set to `x1`, changing
37+
`cv1` to `x2` and then back to `x1` will probably result in `cv1` and `cv2` no longer being
38+
synchronized.
3739

38-
This can be mitigated either by not adjusting the clock modifers while the module is running, or by patching a reset
39-
signal into `ain` to force the module to re-synchronize periodically. Alternatively, embrace the chaos and use the
40-
de-syncronization as a performance effect.
40+
This can be mitigated either by not adjusting the clock modifers while the module is running, or by
41+
patching a reset signal into `ain` to force the module to re-synchronize periodically.
42+
Alternatively, embrace the chaos and use the de-syncronization as a performance effect.

software/contrib/coin_toss.md

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
# Coin Toss
22

3-
author: awonak
3+
Two pairs of clocked probability gates.
44

5-
date: 03/01/22
5+
## Inputs & Outputs
66

7-
labels: Clock, Random, CV Generation
7+
Inputs:
8+
- `din`: External clock (when in external clock mode)
9+
- `ain`: Threshold control (summed with threshold knob)
10+
- `k1`: internal clock speed
11+
- `k2`: probability threshold
12+
- `b1`: toggle internal / external clock source
13+
- `b2`: toggle gate/trigger mode
814

9-
Two pairs of clocked probability gates.
15+
Outputs:
16+
- `cv1` & `cv2`: Coin 1 gate output pair when voltage above/below threshold
17+
- `cv3`: Coin 1 clock
18+
- `cv4` & `cv5`: Coin 2 gate output pair at 1/4x speed
19+
- `cv6`: Coin 2 clock
1020

1121
Knob 1 adjusts the master clock speed of gate change probability. Knob 2 moves
1222
the probability thresholed between A and B with a 50% chance at noon. Output
@@ -15,23 +25,3 @@ row 1 (cv1 and cv2) run at 1x speed and output row 2 (cv4 and cv5) run at
1525
internal and external clock source. Push button 2 to toggle between gate and
1626
trigger mode. Analogue input is summed with the threshold knob value to allow
1727
external threshold control.
18-
19-
digital in: External clock (when in external clock mode)
20-
analogue in: Threshold control (summed with threshold knob)
21-
knob 1: internal clock speed
22-
knob 2: probability threshold
23-
button 1: toggle internal / external clock source
24-
button 2: toggle gate/trigger mode
25-
cv1/cv2: Coin 1 gate output pair when voltage above/below threshold
26-
cv4/cv5: Coin 2 gate output pair at 1/4x speed
27-
cv3: Coin 1 clock
28-
cv6: Coin 2 clock
29-
30-
For developing, I like to use Visual Studio Code as my IDE and `rshell` to copy
31-
and run my scripts.
32-
33-
From the root dir of the repo, enter rshell:
34-
35-
$ rshell
36-
> cp software/contrib/coin_toss.py /pyboard/main.py
37-
> repl pyboard ~ import main

0 commit comments

Comments
 (0)