fast forward in playback working

main
mwinter 2 years ago
parent 36d38b8350
commit d4d32d8610

@ -0,0 +1 @@
{"send":["127.0.0.1:57120"],"custom-module":"/home/mwinter/Portfolio/a_history_of_the_domino_problem/a_history_of_the_domino_problem_source/openstagecontrol/custom_module_hdp.js","load":"/home/mwinter/Portfolio/a_history_of_the_domino_problem/a_history_of_the_domino_problem_source/openstagecontrol/mixer_transport.json"}

@ -347,7 +347,7 @@
"ignoreDefaults": false,
"bypass": true,
"onCreate": "",
"onValue": "if(value === 1){\n send(false, \"/transport\", 1);\n} else {\n send(false, \"/transport\", 0);\n}"
"onValue": "if(value === 1){\n send(false, \"/transport\", 1, get(\"measure\"), get(\"beat\"));\n} else {\n send(false, \"/transport\", 0, get(\"measure\"), get(\"beat\"));\n}"
},
{
"type": "panel",
@ -417,7 +417,7 @@
"alphaFillOn": "auto",
"lineWidth": "auto",
"borderRadius": "auto",
"padding": "auto",
"padding": 0,
"html": "",
"css": ":host {\n font-size: 120rem;\n}",
"align": "center",
@ -426,13 +426,13 @@
"numeric": false,
"validation": "",
"maxLength": "",
"value": 10,
"value": 1,
"default": "",
"linkId": "",
"address": "auto",
"preArgs": "",
"typeTags": "",
"decimals": 2,
"decimals": 0,
"target": "",
"ignoreDefaults": false,
"bypass": false,
@ -502,16 +502,16 @@
"align": "center",
"unit": "",
"asYouType": false,
"numeric": false,
"numeric": true,
"validation": "",
"maxLength": "",
"value": 10,
"value": 1,
"default": "",
"linkId": "",
"address": "auto",
"preArgs": "",
"typeTags": "",
"decimals": 2,
"decimals": 0,
"target": "",
"ignoreDefaults": false,
"bypass": false,

@ -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;
*/
*/

@ -2,7 +2,7 @@
~seed = 11735;
~dir = thisProcess.nowExecutingPath.dirname;
PathName.new(~dir).files.do({arg path; if((path.fileName != "main.scd") && (path.fileName != "installation_control.scd") && (path.fileName != "visualize_legacy.scd"), {path.fileName.loadRelative})});
PathName.new(~dir).files.do({arg path; if((path.fileName != "main.scd") && (path.fileName != "installation_control.scd") && (path.fileName != "visualize_legacy.scd") && (path.fileName != "live_utilities.scd"), {path.fileName.loadRelative})});
~bergerTiling = ~berger.value(500, 500, true);

Loading…
Cancel
Save