2023-04-09 01:46:05 +00:00
|
|
|
(
|
|
|
|
|
|
|
|
SynthDef(\pos_saw, {
|
2023-10-25 01:54:05 +00:00
|
|
|
arg out, dur=1;
|
|
|
|
Out.kr(out, EnvGen.kr(Env([0, 1], dur), doneAction: Done.freeSelf))
|
|
|
|
}).add();
|
2023-04-09 01:46:05 +00:00
|
|
|
|
2023-10-25 01:54:05 +00:00
|
|
|
SynthDef(\pos_sin, {
|
|
|
|
arg out, dur=1;
|
|
|
|
Out.kr(out, EnvGen.kr(Env.sine(dur, 1), doneAction: Done.freeSelf))
|
|
|
|
}).add();
|
2023-04-09 01:46:05 +00:00
|
|
|
|
2023-10-25 01:54:05 +00:00
|
|
|
SynthDef(\pos_reverse, {
|
|
|
|
arg out, dur=1;
|
|
|
|
Out.kr(out, EnvGen.kr(Env([1, 0], dur), doneAction: Done.freeSelf))
|
|
|
|
}).add();
|
2023-04-09 01:46:05 +00:00
|
|
|
|
2023-10-25 01:54:05 +00:00
|
|
|
// SynthDef(\pos_step, {
|
|
|
|
// arg out, speed=1, steps=8;
|
|
|
|
// var stepwise = LFSaw.kr(speed, 1, 0.5 * steps, 0.5 * steps).floor;
|
|
|
|
// Out.kr(out, stepwise / steps);
|
|
|
|
// }).add;
|
2023-04-09 01:46:05 +00:00
|
|
|
|
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, {
|
2023-10-25 01:54:05 +00:00
|
|
|
arg out=1;
|
|
|
|
Out.kr(out, EnvGen.kr(Env.perc(0.001, 0.2, 2), levelScale:2.0, levelBias:-1,doneAction:Done.freeSelf));
|
2023-09-17 00:11:31 +00:00
|
|
|
}).add;
|
|
|
|
|
2023-10-25 01:54:05 +00:00
|
|
|
|
|
|
|
SynthDef(\metronome, {
|
|
|
|
arg out=0, amp=1, pan=0, filter=1000, atk=0.01, rel=0.1;
|
|
|
|
var sig, env;
|
|
|
|
env = EnvGen.kr(Env.perc(atk, rel, amp), doneAction: Done.freeSelf);
|
|
|
|
sig = HPF.ar(WhiteNoise.ar(), filter);
|
|
|
|
Out.ar(out, Pan2.ar(sig * env, pan));
|
|
|
|
}
|
|
|
|
).add;
|
|
|
|
|
2023-04-09 01:46:05 +00:00
|
|
|
)
|