OVER/under
Introduction
In keeping with our interest in generative modular compositions, We would like a way to programmatically introduce a sense of progression. We believe we can accomplish this with a counter module. Such a module would increment or decrement an internal counter on receipt of a related trigger. When the counter rises beyond a specified limit (or drops below zero), the module outputs triggers to indicate the associated condition.
The working name of this project is OVER/under.
Design
Interface
-
inputs
-
steps (knob)
-
steps (CV, -5 – +5V)
-
increment (trigger)
-
increment (button)
-
decrement (trigger)
-
decrement (button)
-
enable (gate)
outputs-
overflow (trigger)
-
underflow (trigger)
-
wrap (trigger)
-
percent/progress (CV, 0 – +5 or +10V)
The module will also have some kind of display to indicate the counter's internal state, either an LCD with boxes (think Pam's Euclidean rhythm display) or a series of multicolor LEDs.
The percent or progress CV out sends a stepped voltage based on the counter's progress to the selected step count.
Software
A proposed pseudocode outline appears below.
init: length = 1 counter = 0 n = max length k = knob CV scale r = output range for percent out (+5V or +10V) loop: clear expired triggers read steps knob read stops CV (norm = 0V) length = k * [steps CV] + [steps knob], clamped to [1, n] counter = counter % length, do not emit wrap triggers read enable (norm = +5V) if enable > +2V and increment triggered: if ++counter >= length: counter = counter % length emit overflow trigger emit wrap trigger else if enable > +2V and decrement triggered: if --counter <= 0: counter = counter % length emit underflow trigger emit wrap trigger update interface set percent out to (counter / n) * r
Prototyping
VCV Rack
This project is ideal for testing within the virtualized environment offered by VCV Rack.
-
- rnd/projects/overunder.txt
- Last modified: 2023-07-15 22:58
- by asdf