2022-04-02 06:51:06 +00:00
|
|
|
// Execute this before booting the server
|
|
|
|
|
2023-03-29 07:21:32 +00:00
|
|
|
(
|
2022-04-02 06:51:06 +00:00
|
|
|
Server.default.options.inDevice_("Scarlett 2i2 USB");
|
2023-04-02 06:10:23 +00:00
|
|
|
//Server.default.options.outDevice_("Scarlett 2i2 USB");
|
2023-03-29 07:21:32 +00:00
|
|
|
)
|
|
|
|
Server.killAll;
|
2022-04-02 06:51:06 +00:00
|
|
|
|
2023-04-02 07:59:53 +00:00
|
|
|
|
2023-04-09 02:12:36 +00:00
|
|
|
("./synths.scd").loadRelative;
|
|
|
|
("./control.scd").loadRelative;
|
|
|
|
("./effects.scd").loadRelative;
|
2022-04-02 06:51:06 +00:00
|
|
|
|
2023-04-09 02:32:11 +00:00
|
|
|
Granulator.init(s);
|
|
|
|
|
|
|
|
(
|
|
|
|
|
2022-04-03 01:19:42 +00:00
|
|
|
~modes = [
|
2023-04-09 01:46:05 +00:00
|
|
|
[ "saw", \pos_saw ],
|
|
|
|
[ "reverse", \pos_reverse ],
|
|
|
|
[ "sine", \pos_sine ],
|
|
|
|
[ "step", \pos_step ],
|
2023-04-09 05:10:04 +00:00
|
|
|
[ "random", \pos_random ]
|
2022-04-03 01:19:42 +00:00
|
|
|
];
|
2022-04-02 06:51:06 +00:00
|
|
|
|
2023-04-09 02:32:11 +00:00
|
|
|
~granulators = Array.new(4);
|
|
|
|
~posb = Array.new(4);
|
2023-04-09 05:10:04 +00:00
|
|
|
~possynths = Array.new(4);
|
2023-04-09 02:32:11 +00:00
|
|
|
|
|
|
|
(0..3).do({
|
|
|
|
var pb = Bus.control(s, 1), ps;
|
|
|
|
~posb.add(pb);
|
2023-04-16 07:45:15 +00:00
|
|
|
ps = Synth(\pos_saw, [ \out, pb, \speed, 1 / ~buflen ]);
|
2023-04-09 05:10:04 +00:00
|
|
|
~possynths.add(ps);
|
2023-04-09 02:32:11 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
(0..3).do({ |i|
|
|
|
|
var pb = ~posb.at(i);
|
2023-04-16 07:45:15 +00:00
|
|
|
~granulators.add(Granulator.new(~buflen, ~recordb, ~fxb, pb, ~triggerb, ~pitchb));
|
2023-04-09 02:32:11 +00:00
|
|
|
});
|
|
|
|
|
2023-04-09 05:10:04 +00:00
|
|
|
~setmode = {
|
|
|
|
arg track, mode;
|
|
|
|
var synth = ~modes[mode][1];
|
|
|
|
~possynths[track].get(\speed, { | speed |
|
|
|
|
~possynths[track].free;
|
|
|
|
~possynths[track] = Synth(synth, [\out, ~posb[track], \speed, speed]);
|
|
|
|
});
|
2023-04-09 06:44:59 +00:00
|
|
|
~granulators[track].mode_(mode);
|
2023-04-09 05:10:04 +00:00
|
|
|
}
|
|
|
|
)
|
2023-04-07 06:16:05 +00:00
|
|
|
|
2022-04-02 06:51:06 +00:00
|
|
|
|
2023-04-15 06:03:16 +00:00
|
|
|
("./interface.scd").loadRelative;
|
2023-04-02 07:59:53 +00:00
|
|
|
|
2023-04-15 06:03:16 +00:00
|
|
|
~to.controls.keys.do({|k, i| i.postln; k.postln;~to.controls[k].postln});
|
2023-04-16 07:45:15 +00:00
|
|
|
~to.controls['/track/speed'].send_(0.1);
|
2023-04-15 06:03:16 +00:00
|
|
|
~to.v_(, 0);
|
2022-04-02 06:51:06 +00:00
|
|
|
|
2023-04-15 06:03:16 +00:00
|
|
|
~to.controls.at(~trackctrl.value('speed')).isNil.not
|
2022-04-02 06:51:06 +00:00
|
|
|
|
2023-04-15 06:03:16 +00:00
|
|
|
a = "string"
|
|
|
|
b = 'string'
|
2022-04-18 22:29:26 +00:00
|
|
|
|
2023-04-15 06:03:16 +00:00
|
|
|
a.asSymbol
|
2022-04-09 07:38:18 +00:00
|
|
|
|
2022-04-23 04:28:37 +00:00
|
|
|
|
2022-04-24 06:35:34 +00:00
|
|
|
|
2023-04-16 07:45:15 +00:00
|
|
|
~possynths[0].get(\speed, {|v| v.postln});
|
|
|
|
~possynths[0].set(\speed, 20 / ~buflen)
|