Skip to content

Commit eaf6d07

Browse files
gamecat69Nik Ansellchrisib
authored
Egressus melodium - Clockable and free-running LFO and random CV pattern generator (#337)
* initial egressum melodiam commit * updated defaults to match doc * move python docstrings to their correct place * fix typos * update debug modes * removed StopException * updated README.md * replaced int(bool) with BOOL_DICT[bool] * updated shread and wave icons to bytearrays * use max_output_voltage from global config * max cv voltage to 5V * removed demo vid placeholder from MD file * wrapped europi_config line in a try/catch to avoid errors with older firmware * Update to require latest firmware version * use max_output_voltage to comply with new config mgmt mechanism. * removed debug output and try/except block * minor cosmetic changes * removed bpm functions - no longer used * updated docstrings * move din interrupt handling code to main() * set CPU freq from global config value * apply black formatting * updated comment re CPU freq * removed unused var: unClockedModeIndicator * removed unused button handling placeholders * added StopIteration handling back in :) * removed overclocking - it is already done in the firmware * Update egressus_melodiam.py Collapse file-level docstring into a single string instead of multiple * Update egressus_melodiam.py Use Doxygen-style docstrings, consistently use `num` vs `sampleRate` for sample generation functions * update output voltages in doc * specify MAX_OUTPUT_VOLTAGE in doc * updated documentation * reverted CVecorder author change - requested by admin * reduce frequency of saveState calls - this should fix OSError 28 * optimize calculateOptimalSampleRate() to work with 0-10V * fixed typos, added link to demo vid --------- Co-authored-by: Nik Ansell <[email protected]> Co-authored-by: Chris I-B <[email protected]>
1 parent 4266a3a commit eaf6d07

15 files changed

+1071
-0
lines changed

software/contrib/README.md

+6
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ Recording of CV can be primed so that you can record a movement without missing
4242
<i>Author: [anselln](https://github.com/anselln)</i>
4343
<br><i>Labels: sequencer, CV, performance</i>
4444

45+
### Egressus Melodium \[ [documentation](/software/contrib/egressus_melodiam.md) | [script](/software/contrib/egressus_melodiam.py) \]
46+
Clockable and free-running LFO and random CV pattern generator
47+
48+
<i>Author: [gamecat69](https://github.com/gamecat69)</i>
49+
<br><i>Labels: clocked lfo, sequencer, CV, randomness</i>
50+
4551
### Envelope Generator \[ [documentation](/software/contrib/envelope_generator.md) | [script](/software/contrib/envelope_generator.py) \]
4652
An attack release envelope with optional sustain and looping functionality.
4753
Envelopes are triggered or gated by the digital input, and the envelope is output, along with a copy of the digital input and an inverted copy of the envelope.
Binary file not shown.
Loading
Loading
Loading
644 Bytes
Loading
Loading
Loading
456 Bytes
Loading
Loading
223 Bytes
Loading
396 Bytes
Loading

software/contrib/egressus_melodiam.md

+91
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# Egressus Melodiam (Stepped Melody)
2+
3+
author: Nik Ansell (github.com/gamecat69)
4+
date: 19-Feb-24
5+
labels: clocked lfo, sequencer, CV, randomness
6+
Demo Video: https://youtu.be/_qlnV_ewb_c
7+
8+
Clock-able and free-running LFO and random CV pattern generator.
9+
Eight different wave shapes either define the LFO shape or the slew shape between CV pattern steps.
10+
Use it to generate variable length melodies (using a quantizer), LFOs or weird and wonderful control voltages.
11+
12+
# Inputs, Outputs and Controls
13+
14+
![Operating Diagram](./egressus_melodiam-docs/egressus_melodiam.png)
15+
16+
Analogue outputs send a voltage from 0V to the maximum configured output voltage (MAX_OUTPUT_VOLTAGE) as defined by europi_config.
17+
The default maximum output voltage is +10V.
18+
19+
# Getting started
20+
21+
1. Patch a 50% duty cycle square wave or clock with pulses >= 16ms in duration into the digital input
22+
2. Connect one or more outputs to an input on another module (e.g. CV modulation inputs)
23+
3. Select a pattern length using Knob 1
24+
4. Start your clock. Each output will now send a looping CV pattern to your module!
25+
26+
So, what happened in the above example?
27+
When the module first powered on it automatically generated 6 x 32 step random CV patterns - one for each of the 6 outputs.
28+
Each time a clock is received, the step advances by one step and then loops when it get to the end of the pattern.
29+
The length of the pattern loop is controlled using knob 1, which supports a value from 1 to 32.
30+
31+
# Changing the slew/wave shape and clock division of an output
32+
33+
Refer to the above diagram for a visual representation of the example below.
34+
35+
1. Press and release button 2 until the output number you would like to edit is shown on the top-right.
36+
2. Press button 1 to cycle through the available wave shapes
37+
3. Adjust knob 2 to select the output division. An output division of 1 causes the CV pattern / LFO for that
38+
output to run at the clock rate. An output division greater than one reduces the CV pattern / LFO to run at the selected division (e.g. selecting a division of 2 would run at half the clock rate)
39+
40+
In LFO mode (pattern length of 1) the wave shape determines the shape of the cycling LFO. However, when in CV pattern mode (Pattern length > 1) the wave shape determines the slew between pattern steps.
41+
42+
## Available Slew/wave shapes
43+
44+
Eight shapes are available. Some are symmetrical where the rising shape is the same as the falling shape, others are asymmetrical.
45+
46+
- [<img src="./egressus_melodiam-docs/square.png" width="15"/>](square.png) **Square/Step**: Moves up/down immediately and holds until the next step
47+
- [<img src="./egressus_melodiam-docs/tri.png" width="15"/>](tri.png) **Triangle/Linear**: A straight line between steps
48+
- [<img src="./egressus_melodiam-docs/sine.png" width="15"/>](sine.png) **Sine/Smooth**: A smooth line between steps using a sine/cosine wave
49+
- [<img src="./egressus_melodiam-docs/exp-up-exp-down.png" width="15"/>](exp-up-exp-down.png) **Exponential up and down**: An exponential curve between steps. This rises/falls slowly at the start and fast at the end
50+
- [<img src="./egressus_melodiam-docs/sharktooth.png" width="15"/>](sharktooth.png) **Sharktooth**: Logarithmic rise, exponential fall. A logarithmic curve rises/falls quickly at the start and slowly at the end.
51+
- [<img src="./egressus_melodiam-docs/sharktooth-rev.png" width="15"/>](sharktooth-rev.png) **Reverse Sharktooth**: Exponential rise, Logarithmic fall.
52+
- [<img src="./egressus_melodiam-docs/log-up-step-down.png" width="15"/>](log-up-step-down.png) **Logarithmic up, step down**: Upward transitions are logarithmic, downward transitions are stepped.
53+
- [<img src="./egressus_melodiam-docs/square-up-exp-down.png" width="15"/>](square-up-exp-down.png) **Step up, exponential down**: Upward transitions are stepped, downward transitions are exponential.
54+
55+
# Generating a new CV pattern for an output
56+
57+
A new CV pattern is generated for the selected output by holding down button 1 for 2 seconds and releasing. An indicator is shown on the top left of the screen to show a new CV pattern has been generated. Note that if you are in LFO mode (pattern length of 1) this function will have no effect until the pattern length is increased.
58+
59+
# LFO Mode / CV Pattern mode
60+
61+
Selecting a pattern length of 1 will output an LFO.
62+
Selecting a pattern length greater than one plays through the generated CV patterns.
63+
Slew is generated between CV pattern steps when a wave shape other then square is selected.
64+
65+
# Clocked / Free-running mode
66+
67+
Clocked mode is selected by default - indicated by showing the length of the CV pattern (in dots) in the middle of the screen.
68+
To enter free-running mode, hold button 2 for 2 seconds and release. The configured clock rate in milliseconds is shown
69+
in the middle of the screen to indicate you are in free-running mode.
70+
71+
Note that when in free-running mode, the previously selected pattern length remains unchanged, it is therefore a good idea to select the required pattern length before changing to unclocked mode.
72+
73+
# Saving and loading
74+
75+
All settings and CV patterns are saved when changes are made and will not be lost when the module is powered off.
76+
77+
# Changing the maximum CV voltage
78+
79+
CV Patterns (including LFOs) output a range of 0-10V based on the default globally configured value.
80+
If you would like to change this value, two methods are available 1) Create a json file (see below), 2) Configure the global configuration value using the UI (coming soon in a later firmware release).
81+
82+
## Reducing the maximum CV output using a json file
83+
84+
1. Create a file on your pico named `config/config_EuroPiConfig.json`. Thonny is the easiest method for this.
85+
2. Add the following to the json file:
86+
87+
```json
88+
{
89+
"max_output_voltage": 5
90+
}
91+
```

0 commit comments

Comments
 (0)