aboutsummaryrefslogtreecommitdiffstats
path: root/.config/SuperCollider
diff options
context:
space:
mode:
Diffstat (limited to '.config/SuperCollider')
-rw-r--r--.config/SuperCollider/functions.scd22
1 files changed, 21 insertions, 1 deletions
diff --git a/.config/SuperCollider/functions.scd b/.config/SuperCollider/functions.scd
index 3f27e31..d4dd058 100644
--- a/.config/SuperCollider/functions.scd
+++ b/.config/SuperCollider/functions.scd
@@ -105,7 +105,7 @@ postln('Loading custom functions.');
// adds a source to an SSR instance
~ssrAddSource = {
arg ssr, name, model = "point", port, x = 0.0, y = 0.0, orientation = 0.0,
- gain = 0.0, movability = $F, orientationMovability = $F, mute = $F;
+ gain = 1.0, movability = $F, orientationMovability = $F, mute = $F;
if (ssr.isKindOf(NetAddr), {
if (name.isString, {
if (model.isString, {
@@ -170,3 +170,23 @@ postln('Loading custom functions.');
error('Argument key must be of type Symbol: '++key.class);
});
};
+
+// setting clock of ZZZES3 to bpm (in given range)
+~midiControlToClockBPM = {
+ arg key, msgNum, chan, uid, zzz, range;
+ MIDIdef.new(
+ key,
+ {
+ arg ...args;
+ var bpm = args[0].linexp(0, 127, range[0], range[1]).asInteger;
+ zzz.setClock(
+ msgNum.indexOf(args[1].asInteger)+1,
+ bpm/60
+ );
+ },
+ msgNum,
+ chan,
+ \control,
+ uid
+ );
+};