-
Notifications
You must be signed in to change notification settings - Fork 5
controlVoltage API
ianhattwick edited this page Jun 3, 2021
·
1 revision
controlVoltage();
controlVoltage(uint8_t bitDepth);
controlVoltage cv = controlVoltage();- optional argument to set bit depth. Default bit depth is 12-bit.
void loop();
- called every time your main loop runs. Checks to see whether it is time to generate a new sample, and then generates the samples
int get();
- reads the current cv sample, and flags the object to generate a new sample on the next loop()
void trigger();
- creates a 3ms long trigger signal
void gate(int val);
- creates a static gate signal
void timedGate(int gateLen);
- creates a timed gate signal of duration
length
void cv(int val);
- creates a standard CV signal
void cv(int val, int lineTime);
- creates a cv signal that ramps to
valoverlineTimemilliseconds
void cv(int val, int attack, int decay);
- creates a cv signal that ramps to
val, with variable ramp time depending on whether the signal is ascending or descening.- if the signal is ascneding the ramp time is
attackms - if the signal is descending, the ramp time i
decayms
- if the signal is ascneding the ramp time is
void AR(int attack, int decay);
- creates an attack release envelope, that ramps from 0 to maximum over
attackms and then ramps to 0 overdecayms
void midi( byte _val );
- creates a quantized cv signal which represents a midi note value.
- Note the input is a byte midi note, but the output is a cv signal in the range 1000 unit/ octave
- each midi note step is 1000/12 units
void curve(float val);
- creates an exponential curve to ramps. The formula is simply pow(sig, curve).
- A curve of 1 is linear
- A curve of 2 is exponential
- A curve of 0.5 is 'logarithmic' like
void bitDepth( byte depth);
- sets the bit resolution of the cv signal
- note you can set this when you create the controlVoltage object as well