|
|
|
@ -41,7 +41,7 @@ Event.addEventType(\osc, {
|
|
|
|
|
\type, \osc,
|
|
|
|
|
\addr, addr,
|
|
|
|
|
\path, "/playing",
|
|
|
|
|
\msg, Pseq(seqs[0][6].collect({arg beats, measure; beats.asInteger.collect({arg beat; [measure + 1, beat + 1]})}).flatten;, 1),
|
|
|
|
|
\msg, Pseq(seqs[0][6].collect({arg beats, measure; beats.asInteger.collect({arg beat; [measure + 1, beat + 1]})}).flatten, 1),
|
|
|
|
|
\dur, 1
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
@ -69,12 +69,16 @@ SynthDef(\mixer, {arg freq, gate = 1, sustain, amp, dur, out;
|
|
|
|
|
|
|
|
|
|
(
|
|
|
|
|
|
|
|
|
|
var group, berger, mixer, player;
|
|
|
|
|
var group, berger, mixer, measureDurs, player;
|
|
|
|
|
|
|
|
|
|
~bergerCreateSynthsForLive.value;
|
|
|
|
|
|
|
|
|
|
group = Group.new;
|
|
|
|
|
berger = Synth.tail(group, \berger);
|
|
|
|
|
mixer = Synth.tail(group, \mixer);
|
|
|
|
|
|
|
|
|
|
measureDurs = ~bergerMusic[0][6];
|
|
|
|
|
|
|
|
|
|
OSCdef(\mixer, {arg msg, time, addr, port;
|
|
|
|
|
msg.postln;
|
|
|
|
|
mixer.set((msg[1] ++ '_' ++ msg[2] ++ '_' ++ msg[3]), msg[4])
|
|
|
|
@ -82,16 +86,22 @@ OSCdef(\mixer, {arg msg, time, addr, port;
|
|
|
|
|
|
|
|
|
|
OSCdef(\transport, {arg msg, time, addr, port;
|
|
|
|
|
msg.postln;
|
|
|
|
|
if(msg[1] == 0, {
|
|
|
|
|
if(msg[1].postln == 0, {
|
|
|
|
|
group.set(\release, 2);
|
|
|
|
|
group.set(\gate, 0);
|
|
|
|
|
player.stop;
|
|
|
|
|
}, {
|
|
|
|
|
var patterns = ~bergerCreatePatternsForLive.value(~bergerMusic, group, addr);
|
|
|
|
|
player = Pfset(pattern: patterns, cleanupFunc: {
|
|
|
|
|
addr.sendMsg("/transport", 0);
|
|
|
|
|
});
|
|
|
|
|
player = player.play
|
|
|
|
|
var patterns, stream, offset, offsetStream, terminationStream;
|
|
|
|
|
patterns = ~bergerCreatePatternsForLive.value(~bergerMusic, group, addr);
|
|
|
|
|
|
|
|
|
|
stream = patterns.asStream;
|
|
|
|
|
offset = stream.fastForward(measureDurs.keep(msg[2].asInteger.postln - 1).sum.postln).postln;
|
|
|
|
|
|
|
|
|
|
offsetStream = Routine({offset.wait});
|
|
|
|
|
terminationStream = Routine({addr.sendMsg("/transport", 0)});
|
|
|
|
|
|
|
|
|
|
player = EventStreamPlayer(offsetStream ++ stream ++ terminationStream);
|
|
|
|
|
player.play;
|
|
|
|
|
});
|
|
|
|
|
}, \transport);
|
|
|
|
|
|
|
|
|
@ -102,4 +112,4 @@ OSCdef(\transport, {arg msg, time, addr, port;
|
|
|
|
|
~patterns = ~bergerCreatePatternsForLive.value(~bergerMusic);
|
|
|
|
|
~patterns.play
|
|
|
|
|
~bergerMusic[0][6].collect({arg beats, measure; beats.asInteger.collect({arg beat; [measure + 1, beat + 1]})}).flatten;
|
|
|
|
|
*/
|
|
|
|
|
*/
|
|
|
|
|