Fixed phase bugs in position control synths

main
bombinans 2023-10-07 16:17:45 +11:00
parent d0be4a3b67
commit 3ddc8cff47
1 changed files with 4 additions and 4 deletions

View File

@ -2,22 +2,22 @@
SynthDef(\pos_sine, {
arg out, speed=1;
Out.kr(out, 0.5 + SinOsc.kr(speed * 0.5, 0, 0.5));
Out.kr(out, 0.5 + SinOsc.kr(speed * 0.5, -0.5pi, 0.5));
}).add;
SynthDef(\pos_saw, {
arg out, speed=1;
Out.kr(out, 0.5 + LFSaw.kr(speed, 0, 0.5, 0));
Out.kr(out, 0.5 + LFSaw.kr(speed, 1, 0.5, 0));
}).add;
SynthDef(\pos_reverse, {
arg out, speed=1;
Out.kr(out, 0.5 - LFSaw.kr(speed, 0, 0.5, 0));
Out.kr(out, 0.5 - LFSaw.kr(speed, 1, 0.5, 0));
}).add;
SynthDef(\pos_step, {
arg out, speed=1, steps=8;
var stepwise = LFSaw.kr(speed, 0.0, 0.5 * steps, 0.5 * steps).floor;
var stepwise = LFSaw.kr(speed, 1, 0.5 * steps, 0.5 * steps).floor;
Out.kr(out, stepwise / steps);
}).add;