This commit is contained in:
omar mashaal 2020-05-20 20:02:06 +10:00
commit 5ce4c13c1f
4 changed files with 115 additions and 0 deletions

69
README.md Normal file
View File

@ -0,0 +1,69 @@
# SuperDirt Voltage
A small set of SuperDirt synths and Tidal helpers to control modular synths. No MIDI required!
### Pitch, with scale quantisation
```
-- change notes per octave on each cycle
d1 $ pitch "0 10 8 1" # scale "<12 31 8>" # x 0
```
`pitch` allows a pattern of note values. `scale` sets the amount of notes per octave. The pitch and scale values will be converted to `1v/octave`. Both `pitch` and `scale` can be paternised for some microtonal madness...
### Gate
```
-- patternise gate inputs
d2 $ gate "0 1 0 0 1 1 1" # x 1
```
`gate` will take a 0/1 pattern and return +5v signals for the `1` values. Use `-1` if you need a -5v.
### Voltage automation
```
-- create stepped automation
d3 $ volt "1 0.2 0.5 -0.2" # x 2
```
`volt` will allow you to patternise voltages however you like.
### ADSR
```
-- create adsr
d4 $ adsr 0.001 0.2 0.25 1 # x 3
```
![envelope](https://www.dropbox.com/s/rmsxurs03brmsug/envelope.png?raw=1)
```
-- patternise adsr
d5 $ adsr "<0.05 0.9>" "<0 0.4>" 1 1 # x 4
```
![patternised envelopes](https://www.dropbox.com/s/qd6kxn22mexpyhq/pattterned-envelopes.png?raw=1)
`adsr` will generate a new envelope per cycle.
### Clock
```
-- clock cv output
d6 $ clock # x 5
```
`clock` will output a clock cv, which matches the bpm of your tidal project. You can `slow` / `fast` this as well.
---
### How to use
**These require a DC-coupled sound card.**
Add the `voltage.scd` synths to your active SuperDirt synth definitions.
Evaluate the `voltage.tidal` definitions after starting Tidal. These can also be added to your Tidal startup file.
In the above examples, `x` maps to a channel on your audio card. If you have an 8 output audio card, the `x` will likely be 0-7. If you are using an aggregate device, please refer to your Audio settings.

17
example.tidal Normal file
View File

@ -0,0 +1,17 @@
-- change notes per octave on each cycle
d1 $ pitch "0 10 8 1" # scale "<12 31 8>" # x 0
-- patternise gate inputs
d2 $ gate "0 1 0 0 1 1 1" # x 1
-- create stepped automation
d3 $ volt "1 0.2 0.5 -0.2" # x 2
-- create adsr
d4 $ adsr 0.001 0.2 0.25 1 # x 3
-- patternise adsr
d5 $ adsr "<0.05 0.9>" "<0 0.4>" 1 1 # x 4
-- clock cv output
d6 $ clock # x 5

22
voltage.scd Normal file
View File

@ -0,0 +1,22 @@
(
SynthDef(\pitch, { | out, n, channel, stepsPerOctave = 12 |
n = n + (stepsPerOctave / 12);
n = (n + (n / stepsPerOctave) * (1 / (stepsPerOctave + 1)) / 10);
OffsetOut.ar(channel, DC.ar(n))
}).add
);
(
SynthDef(\voltage, { | out, channel, rate |
rate = rate * 5;
OffsetOut.ar(channel, DC.ar(rate));
}).add
);
(
SynthDef(\adsr, { | out, channel, attack = 0.1, decay = 0.5, sustain = 0.5, release = 0.5, begin, end |
var env = Env.adsr(attack, decay, sustain, release);
var phase = Line.ar(begin, end, sustain);
OffsetOut.ar(channel, IEnvGen.ar(env, phase));
}).add
);

7
voltage.tidal Normal file
View File

@ -0,0 +1,7 @@
pitch pitch = n pitch # s "pitch"
scale scale = stepsPerOctave scale
volt volt = rate volt # s "voltage"
gate = volt
clock = rate "[1 0]*8" # s "voltage"
adsr w x y z = n "0" # attack w # decay x # sustain y # release z # s "adsr"
x x = channel x