Compare commits
4 Commits
37f2d6677c
...
9ba8700d8a
Author | SHA1 | Date |
---|---|---|
bombinans | 9ba8700d8a | |
bombinans | de332e6c48 | |
bombinans | e22b46066a | |
bombinans | 1f6210c6d8 |
|
@ -1,7 +1,7 @@
|
|||
|
||||
|
||||
(
|
||||
~to = TouchOSC("192.168.0.209", 9000);
|
||||
~to = TouchOSC(~touchosc_ip, 9000);
|
||||
|
||||
|
||||
~tracknum = 0;
|
||||
|
@ -15,12 +15,9 @@ OSCdef.freeAll;
|
|||
|
||||
~to.button('/grains/reset', 0, { | v |
|
||||
if( v > 0, {
|
||||
var sp = ~to.v('/grains/speed')[0];
|
||||
~buflen = ~to.v('/grains/buflen');
|
||||
(0..3).do({|i|
|
||||
var speed = ~to.v('/grains/speed' ++ i);
|
||||
~granulators[i].reset(~buflen);
|
||||
~possynths[i].set(\speed, speed / ~buflen);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -33,7 +30,6 @@ OSCdef.freeAll;
|
|||
~setspeed = { | track, v |
|
||||
var speed, qv = if(~speedquant > 0, { ~quantspeed.value(v) }, { v });
|
||||
speed = qv / ~buflen;
|
||||
[ "setspeed", v, qv, speed ].postln;
|
||||
if(~speedlock > 0, {
|
||||
(0..3).do({|n|
|
||||
~possynths[n].set(\speed, speed);
|
||||
|
@ -58,7 +54,6 @@ OSCdef.freeAll;
|
|||
|
||||
~setrecord = { | track, v |
|
||||
~granulators[track].record_(v);
|
||||
[ v, track, ~tracknum ].postln;
|
||||
if(v == 0, {
|
||||
~mixlevel[track] = ~granulators[track].mix;
|
||||
~granulators[track].mix_(0);
|
||||
|
@ -79,10 +74,6 @@ OSCdef.freeAll;
|
|||
|
||||
|
||||
|
||||
~to.button('/grains/record0', 0, { | v | ~setrecord.value(0, v) });
|
||||
~to.button('/grains/record1', 0, { | v | ~setrecord.value(1, v) });
|
||||
~to.button('/grains/record2', 0, { | v | ~setrecord.value(2, v) });
|
||||
~to.button('/grains/record3', 0, { | v | ~setrecord.value(3, v) });
|
||||
|
||||
|
||||
|
||||
|
@ -112,7 +103,7 @@ OSCdef.freeAll;
|
|||
// Page 2: track
|
||||
|
||||
|
||||
~to.xy('/track/triggersize', [ 320, 0.25 ], TouchOSCScale(0, 640), TouchOSCScale(0, 0.5), { |v|
|
||||
~to.xy('/track/triggersize', [ 100, 0.125 ], TouchOSCScale(0, 200), TouchOSCScale(0, 0.25), { |v|
|
||||
~granulator.trigger_(v[0]);
|
||||
~granulator.size_(v[1]);
|
||||
});
|
||||
|
@ -152,6 +143,13 @@ OSCdef.freeAll;
|
|||
~to.v_('/track/pitch', ~granulator.pitch);
|
||||
});
|
||||
|
||||
// set up the record buttons on the front page now because /track/mix has been defined
|
||||
|
||||
~to.button('/grains/record0', 0, { | v | ~setrecord.value(0, v) });
|
||||
~to.button('/grains/record1', 0, { | v | ~setrecord.value(1, v) });
|
||||
~to.button('/grains/record2', 0, { | v | ~setrecord.value(2, v) });
|
||||
~to.button('/grains/record3', 0, { | v | ~setrecord.value(3, v) });
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
12
main.scd
12
main.scd
|
@ -20,6 +20,7 @@ Routine.run({
|
|||
s.sync;
|
||||
("./effects.scd").loadRelative;
|
||||
s.sync;
|
||||
~touchosc_ip = "192.168.0.209";
|
||||
("./interface.scd").loadRelative;
|
||||
});
|
||||
)
|
||||
|
@ -27,14 +28,3 @@ Routine.run({
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
("./synths.scd").loadRelative;
|
||||
Granulator.init(s);
|
||||
("./control.scd").loadRelative;
|
||||
("./granulator.scd").loadRelative;
|
||||
("./effects.scd").loadRelative;
|
||||
("./interface.scd").loadRelative;
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -14,12 +14,12 @@ SynthDef(\pos_sine, {
|
|||
|
||||
SynthDef(\pos_saw, {
|
||||
arg out, speed=1;
|
||||
Out.kr(out, 0.5 + LFSaw.kr(speed, 0, 0.5, 0.5));
|
||||
Out.kr(out, 0.5 + LFSaw.kr(speed, 0, 0.5, 0));
|
||||
}).add;
|
||||
|
||||
SynthDef(\pos_reverse, {
|
||||
arg out, speed=1;
|
||||
Out.kr(out, 0.5 - LFSaw.kr(speed, 0, 0.5, 0.5));
|
||||
Out.kr(out, 0.5 - LFSaw.kr(speed, 0, 0.5, 0));
|
||||
}).add;
|
||||
|
||||
SynthDef(\pos_step, {
|
||||
|
|
Loading…
Reference in New Issue