2023-04-09 01:46:05 +00:00
|
|
|
(
|
|
|
|
|
|
|
|
~usbinput = 2;
|
|
|
|
~usbinput1 = 2;
|
|
|
|
~usbinput2 = 3;
|
|
|
|
|
|
|
|
~buflen = 4.0;
|
|
|
|
~beatsperbar = 4;
|
|
|
|
|
2023-04-09 05:10:04 +00:00
|
|
|
SynthDef(\pos_sine, {
|
2023-04-09 01:46:05 +00:00
|
|
|
arg out, speed=1;
|
|
|
|
Out.kr(out, 0.5 + SinOsc.kr(speed * 0.5, 0, 0.5));
|
|
|
|
}).add;
|
|
|
|
|
|
|
|
SynthDef(\pos_saw, {
|
|
|
|
arg out, speed=1;
|
2023-09-30 07:24:29 +00:00
|
|
|
Out.kr(out, 0.5 + LFSaw.kr(speed, 0, 0.5, 0));
|
2023-04-09 01:46:05 +00:00
|
|
|
}).add;
|
|
|
|
|
|
|
|
SynthDef(\pos_reverse, {
|
|
|
|
arg out, speed=1;
|
2023-09-30 07:24:29 +00:00
|
|
|
Out.kr(out, 0.5 - LFSaw.kr(speed, 0, 0.5, 0));
|
2023-04-09 01:46:05 +00:00
|
|
|
}).add;
|
|
|
|
|
|
|
|
SynthDef(\pos_step, {
|
|
|
|
arg out, speed=1, steps=8;
|
|
|
|
var stepwise = LFSaw.kr(speed, 0.0, 0.5 * steps, 0.5 * steps).floor;
|
|
|
|
Out.kr(out, stepwise / steps);
|
|
|
|
}).add;
|
|
|
|
|
2023-04-09 05:10:04 +00:00
|
|
|
SynthDef(\pos_random, {
|
2023-04-09 01:46:05 +00:00
|
|
|
arg out=5, speed=1;
|
|
|
|
Out.kr(out, 0.5 + WhiteNoise.kr(0.5));
|
|
|
|
}).add;
|
|
|
|
|
2023-09-17 00:11:31 +00:00
|
|
|
SynthDef(\lfo, {
|
2023-04-09 01:46:05 +00:00
|
|
|
arg out, freq=1, amp=0;
|
|
|
|
Out.kr(out, SinOsc.kr(freq, 0, amp));
|
|
|
|
}).add;
|
|
|
|
|
2023-09-17 00:11:31 +00:00
|
|
|
SynthDef(\trigger, {
|
|
|
|
arg out=1;
|
|
|
|
Out.kr(out, Impulse.kr(0))
|
|
|
|
}).add;
|
|
|
|
|
2023-04-09 01:46:05 +00:00
|
|
|
)
|