Skip to content
ianhattwick edited this page Jun 3, 2021 · 2 revisions

controlVoltage: easily create CV signals in Arduino projects

This wiki gives an overview the functionality of the controlVoltage library. The library is conceptualized as containing the minimal necessary code is order to create and work with CV signals within an Arduino project.

initial goal

The primary goal is to make experimenting and implementing algorithmic concepts for use with modular synthesizers, e.g. euro rack systems. I won't go into the details of Cv within these kinds of signals, but suffice is to say there are 4 general types of CV:

  1. trigger signals, which are short pulses uses to trigger events
  2. gate signals, which are on/off signals whose duration is dependent on context
  3. continuous CV signals, which are used to modulate parameters
  4. quantized CV signals, which are used to control pitch.

available objects

  1. controlVoltage(): main object for generating triggers, gates, ramps, envelopes, quantized CV
  2. Sequencer(): simple eurorack style sequencer, with various methods for setting and getting sequences
  3. LFO(): control rate oscillator with variable waveform, etc.

signals in controlVoltage

Within modular systems signals are in volts, ranging from around -10 to 10v, depending on the system and signal. While microcontrollers generally work with either 3.3v or 5v, in practice this is ok as most modular systems include ways to scale voltages to different ranges. Pitch CV in particular is normally more limited in voltage range, as the 1V/octave standard means you can express a typical pitch sequence in 2-3V. While 3.3v works in many cases, it is more convenient to at least work with 5v systems, or scale the output of your DAC to 5v.

  • In particular, sometimes 3.3v trigger signals won't be recognized by some eurorack modules
  • Since 32-bit microcontrollers are so much more powerful I recommend them, especially the ESP32. However, these systems are almost always 3.3v.
  • I typically use an external dac running at 5v, for example: https://www.adafruit.com/product/4470
  • I use a logic level shifter to convert i2c from 3.3 to 5v: https://www.adafruit.com/product/1875

bit resolution in controlVoltage

Within a digital system it makes more sense to think about signals in terms of their bit resolution. controlVoltage defaults to a 12-bit resolution, meaning signals range from 0-4095. You can change the bit resolution of any of the modules by calling module.bitDepth( byte resolution ).