Compare commits

..

No commits in common. "4a6fabce8d959938a887f02a113764023676680d" and "d4d32d861028ea220843e05dee174cf82f342587" have entirely different histories.

11 changed files with 28 additions and 967 deletions

View file

@ -9,6 +9,7 @@ module.exports = {
var {host, port, address, args} = data
if (address === '/playing') {
console.log(args)
receive("/measure", args[0].value)
receive("/beat", args[1].value)
receive("/visual_click", 1)

View file

@ -1,612 +0,0 @@
{
"createdWith": "Open Stage Control",
"version": "1.24.0",
"type": "session",
"content": {
"type": "root",
"lock": false,
"id": "root",
"visible": true,
"interaction": true,
"comments": "",
"width": "auto",
"height": "auto",
"colorText": "auto",
"colorWidget": "auto",
"alphaFillOn": "auto",
"borderRadius": "auto",
"padding": "auto",
"html": "",
"css": "",
"colorBg": "auto",
"layout": "default",
"justify": "start",
"gridTemplate": "",
"contain": true,
"scroll": true,
"innerPadding": true,
"tabsPosition": "top",
"hideMenu": false,
"variables": "@{parent.variables}",
"traversing": false,
"value": "",
"default": "",
"linkId": "",
"address": "auto",
"preArgs": "",
"typeTags": "",
"decimals": 2,
"target": "",
"ignoreDefaults": false,
"bypass": false,
"onCreate": "",
"onValue": "",
"widgets": [
{
"type": "matrix",
"top": 240,
"left": 40,
"lock": false,
"id": "mixer/berger/pan",
"visible": true,
"interaction": true,
"comments": "",
"width": 570,
"height": 50,
"expand": "false",
"colorText": "auto",
"colorWidget": "auto",
"colorStroke": "auto",
"colorFill": "auto",
"alphaStroke": "auto",
"alphaFillOff": "auto",
"alphaFillOn": "auto",
"lineWidth": "auto",
"borderRadius": "auto",
"padding": "auto",
"html": "",
"css": "",
"colorBg": "auto",
"layout": "horizontal",
"justify": "start",
"gridTemplate": "",
"contain": true,
"scroll": true,
"innerPadding": true,
"tabsPosition": "top",
"variables": "@{parent.variables}",
"traversing": false,
"widgetType": "knob",
"quantity": 6,
"props": {},
"value": "",
"default": "",
"linkId": "",
"address": "auto",
"preArgs": "",
"typeTags": "",
"decimals": 2,
"target": "",
"ignoreDefaults": false,
"bypass": false,
"onCreate": "",
"onValue": "",
"widgets": [],
"tabs": []
},
{
"type": "matrix",
"top": 20,
"left": 40,
"lock": false,
"id": "mixer/berger/volume",
"visible": true,
"interaction": true,
"comments": "",
"width": 570,
"height": 220,
"expand": "false",
"colorText": "auto",
"colorWidget": "auto",
"colorStroke": "auto",
"colorFill": "auto",
"alphaStroke": "auto",
"alphaFillOff": "auto",
"alphaFillOn": "auto",
"lineWidth": "auto",
"borderRadius": "auto",
"padding": "auto",
"html": "",
"css": "",
"colorBg": "auto",
"layout": "horizontal",
"justify": "start",
"gridTemplate": "",
"contain": true,
"scroll": true,
"innerPadding": true,
"tabsPosition": "top",
"variables": "@{parent.variables}",
"traversing": false,
"widgetType": "fader",
"quantity": 6,
"props": {},
"value": "",
"default": "",
"linkId": "",
"address": "auto",
"preArgs": "",
"typeTags": "",
"decimals": 2,
"target": "",
"ignoreDefaults": false,
"bypass": false,
"onCreate": "",
"onValue": "",
"widgets": [],
"tabs": []
},
{
"type": "matrix",
"top": 290,
"left": 40,
"lock": false,
"id": "mixer/berger/mute",
"visible": true,
"interaction": true,
"comments": "",
"width": 570,
"height": 40,
"expand": "false",
"colorText": "auto",
"colorWidget": "auto",
"colorStroke": "auto",
"colorFill": "auto",
"alphaStroke": "auto",
"alphaFillOff": "auto",
"alphaFillOn": "auto",
"lineWidth": "auto",
"borderRadius": "auto",
"padding": "auto",
"html": "",
"css": "",
"colorBg": "auto",
"layout": "horizontal",
"justify": "start",
"gridTemplate": "",
"contain": true,
"scroll": true,
"innerPadding": true,
"tabsPosition": "top",
"variables": "@{parent.variables}",
"traversing": false,
"widgetType": "button",
"quantity": 6,
"props": {},
"value": "",
"default": "",
"linkId": "",
"address": "auto",
"preArgs": "",
"typeTags": "",
"decimals": 2,
"target": "",
"ignoreDefaults": false,
"bypass": false,
"onCreate": "",
"onValue": "",
"widgets": [],
"tabs": []
},
{
"type": "panel",
"top": 20,
"left": 610,
"lock": false,
"id": "mixer/string/master_panel",
"visible": true,
"interaction": true,
"comments": "",
"width": 60,
"height": 310,
"expand": "false",
"colorText": "auto",
"colorWidget": "auto",
"colorStroke": "auto",
"colorFill": "auto",
"alphaStroke": "auto",
"alphaFillOff": "auto",
"alphaFillOn": "auto",
"lineWidth": "auto",
"borderRadius": "auto",
"padding": "auto",
"html": "",
"css": "",
"colorBg": "auto",
"layout": "default",
"justify": "start",
"gridTemplate": "",
"contain": true,
"scroll": true,
"innerPadding": true,
"tabsPosition": "top",
"variables": "@{parent.variables}",
"traversing": false,
"value": "",
"default": "",
"linkId": "",
"address": "auto",
"preArgs": "",
"typeTags": "",
"decimals": 2,
"target": "",
"ignoreDefaults": false,
"bypass": false,
"onCreate": "",
"onValue": "",
"widgets": [
{
"type": "fader",
"top": 0,
"left": 0,
"lock": false,
"id": "mixer/berger/volume/master",
"visible": true,
"interaction": true,
"comments": "",
"width": "auto",
"height": 300,
"expand": "false",
"colorText": "auto",
"colorWidget": "auto",
"colorStroke": "auto",
"colorFill": "auto",
"alphaStroke": "auto",
"alphaFillOff": "auto",
"alphaFillOn": "auto",
"lineWidth": "auto",
"borderRadius": "auto",
"padding": "auto",
"html": "",
"css": "",
"design": "default",
"knobSize": "auto",
"horizontal": false,
"pips": false,
"dashed": false,
"gradient": [],
"snap": false,
"spring": false,
"doubleTap": false,
"range": {
"min": 0,
"max": 1
},
"logScale": false,
"sensitivity": 1,
"steps": "",
"origin": "auto",
"value": "",
"default": "",
"linkId": "",
"address": "auto",
"preArgs": "",
"typeTags": "",
"decimals": 2,
"target": "",
"ignoreDefaults": false,
"bypass": false,
"onCreate": "",
"onValue": "",
"onTouch": ""
}
],
"tabs": []
},
{
"type": "button",
"top": 520,
"left": 40,
"lock": false,
"id": "transport",
"visible": true,
"interaction": true,
"comments": "",
"width": 80,
"height": 30,
"expand": "false",
"colorText": "auto",
"colorWidget": "auto",
"colorStroke": "auto",
"colorFill": "auto",
"alphaStroke": "auto",
"alphaFillOff": "auto",
"alphaFillOn": "auto",
"lineWidth": "auto",
"borderRadius": "auto",
"padding": "auto",
"html": "",
"css": "",
"colorTextOn": "auto",
"label": "#{@{this} == 0 ? \"play\" : \"stop\"}",
"vertical": false,
"wrap": false,
"on": 1,
"off": 0,
"mode": "toggle",
"doubleTap": false,
"decoupled": false,
"value": "",
"default": "",
"linkId": "",
"address": "auto",
"preArgs": "",
"typeTags": "",
"decimals": 0,
"target": "",
"ignoreDefaults": false,
"bypass": true,
"onCreate": "",
"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",
"top": 330,
"left": 40,
"lock": false,
"id": "metronome",
"visible": true,
"interaction": true,
"comments": "",
"width": 630,
"height": 190,
"expand": "false",
"colorText": "auto",
"colorWidget": "auto",
"colorStroke": "auto",
"colorFill": "auto",
"alphaStroke": "auto",
"alphaFillOff": "auto",
"alphaFillOn": "auto",
"lineWidth": "auto",
"borderRadius": "auto",
"padding": "auto",
"html": "",
"css": "",
"colorBg": "auto",
"layout": "default",
"justify": "start",
"gridTemplate": "",
"contain": true,
"scroll": true,
"innerPadding": true,
"tabsPosition": "top",
"variables": "@{parent.variables}",
"traversing": false,
"value": "",
"default": "",
"linkId": "",
"address": "auto",
"preArgs": "",
"typeTags": "",
"decimals": 2,
"target": "",
"ignoreDefaults": false,
"bypass": false,
"onCreate": "",
"onValue": "",
"widgets": [
{
"type": "input",
"top": 0,
"left": 0,
"lock": false,
"id": "measure",
"visible": true,
"interaction": true,
"comments": "",
"width": 250,
"height": 180,
"expand": "false",
"colorText": "auto",
"colorWidget": "auto",
"colorStroke": "auto",
"colorFill": "auto",
"alphaStroke": "auto",
"alphaFillOff": "auto",
"alphaFillOn": "auto",
"lineWidth": "auto",
"borderRadius": "auto",
"padding": 0,
"html": "",
"css": ":host {\n font-size: 120rem;\n}",
"align": "center",
"unit": "",
"asYouType": false,
"numeric": false,
"validation": "",
"maxLength": "",
"value": 1,
"default": "",
"linkId": "",
"address": "auto",
"preArgs": "",
"typeTags": "",
"decimals": 0,
"target": "",
"ignoreDefaults": false,
"bypass": false,
"onCreate": "",
"onValue": ""
},
{
"type": "text",
"top": 10,
"left": 250,
"lock": false,
"id": "text_3",
"visible": true,
"comments": "",
"width": 50,
"height": 130,
"expand": "false",
"colorText": "auto",
"colorWidget": "auto",
"colorStroke": "auto",
"colorFill": "auto",
"alphaStroke": "auto",
"alphaFillOff": "auto",
"alphaFillOn": "auto",
"lineWidth": "auto",
"borderRadius": "auto",
"padding": "auto",
"html": "",
"css": ":host {\n font-size: 120rem;\n}",
"vertical": false,
"wrap": false,
"align": "center",
"value": ":",
"default": "",
"linkId": "",
"address": "auto",
"preArgs": "",
"decimals": 2,
"target": "",
"onCreate": "",
"onValue": ""
},
{
"type": "input",
"top": 0,
"left": 300,
"lock": false,
"id": "beat",
"visible": true,
"interaction": true,
"comments": "",
"width": 120,
"height": 180,
"expand": false,
"colorText": "auto",
"colorWidget": "auto",
"colorStroke": "auto",
"colorFill": "auto",
"alphaStroke": "auto",
"alphaFillOff": "auto",
"alphaFillOn": "auto",
"lineWidth": "auto",
"borderRadius": "auto",
"padding": "auto",
"html": "",
"css": ":host {\n font-size: 120rem;\n}",
"align": "center",
"unit": "",
"asYouType": false,
"numeric": true,
"validation": "",
"maxLength": "",
"value": 1,
"default": "",
"linkId": "",
"address": "auto",
"preArgs": "",
"typeTags": "",
"decimals": 0,
"target": "",
"ignoreDefaults": false,
"bypass": false,
"onCreate": "",
"onValue": ""
},
{
"type": "led",
"top": 10,
"left": 430,
"lock": false,
"id": "visual_click",
"visible": true,
"comments": "",
"width": 180,
"height": 160,
"expand": "false",
"colorText": "auto",
"colorWidget": "auto",
"colorStroke": "auto",
"colorFill": "auto",
"alphaStroke": "auto",
"alphaFillOff": "auto",
"alphaFillOn": "auto",
"lineWidth": "auto",
"borderRadius": "auto",
"padding": "auto",
"html": "",
"css": "",
"mode": "intensity",
"range": {
"min": 0,
"max": 1
},
"alphaRange": {
"min": 0,
"max": 1
},
"logScale": false,
"value": "",
"default": "",
"linkId": "",
"address": "auto",
"preArgs": "",
"target": "",
"onCreate": "",
"onValue": "var fallTime = 0.3,\nfps = 24,\nmaxValue = 1,\nstep = maxValue / fps / fallTime\n\nsetTimeout(()=>{\n if (value <= 0) clearTimeout()\n set(\"this\", value - step)\n}, 1000 / fps)"
}
],
"tabs": []
},
{
"type": "switch",
"top": 50,
"left": 750,
"lock": false,
"id": "switch_1",
"visible": true,
"interaction": true,
"comments": "",
"width": "auto",
"height": "auto",
"expand": "false",
"colorText": "auto",
"colorWidget": "auto",
"colorStroke": "auto",
"colorFill": "auto",
"alphaStroke": "auto",
"alphaFillOff": "auto",
"alphaFillOn": "auto",
"lineWidth": "auto",
"borderRadius": "auto",
"padding": "auto",
"html": "",
"css": "",
"colorTextOn": "auto",
"layout": "vertical",
"gridTemplate": "",
"wrap": false,
"values": "{\n \"\n \"Value 2\": 2\n}",
"mode": "tap",
"value": "",
"default": "",
"linkId": "",
"address": "auto",
"preArgs": "",
"typeTags": "",
"decimals": 2,
"target": "",
"ignoreDefaults": false,
"bypass": false,
"onCreate": "",
"onValue": ""
}
],
"tabs": []
}
}

View file

@ -47,7 +47,7 @@
"top": 240,
"left": 40,
"lock": false,
"id": "mixer/hdp/pan",
"id": "mixer/berger/pan",
"visible": true,
"interaction": true,
"comments": "",
@ -99,7 +99,7 @@
"top": 20,
"left": 40,
"lock": false,
"id": "mixer/hdp/volume",
"id": "mixer/berger/volume",
"visible": true,
"interaction": true,
"comments": "",
@ -151,7 +151,7 @@
"top": 290,
"left": 40,
"lock": false,
"id": "mixer/hdp/mute",
"id": "mixer/berger/mute",
"visible": true,
"interaction": true,
"comments": "",
@ -250,7 +250,7 @@
"top": 0,
"left": 0,
"lock": false,
"id": "mixer/hdp/volume/master",
"id": "mixer/berger/volume/master",
"visible": true,
"interaction": true,
"comments": "",
@ -347,7 +347,7 @@
"ignoreDefaults": false,
"bypass": true,
"onCreate": "",
"onValue": "if(value === 1){\n send(false, \"/transport\", 1, get(\"piece\"), get(\"measure\"), get(\"beat\"));\n} else {\n send(false, \"/transport\", 0, get(\"piece\"), get(\"measure\"), get(\"beat\"));\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",
@ -562,56 +562,6 @@
}
],
"tabs": []
},
{
"type": "switch",
"top": 20,
"left": 690,
"lock": false,
"id": "piece",
"visible": true,
"interaction": true,
"comments": "",
"width": "auto",
"height": 300,
"expand": "false",
"colorText": "auto",
"colorWidget": "auto",
"colorStroke": "auto",
"colorFill": "auto",
"alphaStroke": "auto",
"alphaFillOff": "auto",
"alphaFillOn": "auto",
"lineWidth": "auto",
"borderRadius": "auto",
"padding": "auto",
"html": "",
"css": "",
"colorTextOn": "auto",
"layout": "vertical",
"gridTemplate": "",
"wrap": false,
"values": {
"Berger": "berger",
"Robinson": "robinson",
"Penrose": "penrose",
"Ammann": "ammann",
"Kari": "kari",
"Jaendel": "jaendel"
},
"mode": "tap",
"value": "",
"default": "",
"linkId": "",
"address": "auto",
"preArgs": "",
"typeTags": "",
"decimals": 2,
"target": "",
"ignoreDefaults": false,
"bypass": false,
"onCreate": "",
"onValue": ""
}
],
"tabs": []

View file

@ -1,7 +1,6 @@
(
var createTransportPattern;
~hdpBusArray = 16.collect({Bus.audio(s, 1)});
~bergerBusArray = 6.collect({Bus.audio(s, 1)});
Event.addEventType(\osc, {
if (~addr.postln.notNil) {
@ -10,9 +9,8 @@ Event.addEventType(\osc, {
};
});
//create synth defs
~bergerCreateSynthsForLive = {var b;
~bergerCreateSynthsForLive = {arg b;
// this creates a different waveform for each sonification of each part
Buffer.freeAll(s);
b = 8.collect({var buf = Buffer.alloc(s, 512, 1); buf.sine1(1.0 / 5.collect({arg i; pow(i + 1, 5.0.rand + 1)}), true, true, true)});
@ -22,75 +20,15 @@ Event.addEventType(\osc, {
}).add;
};
~robinsonCreateSynthsForLive = {var b;
Buffer.freeAll(s);
b = 8.collect({var buf = Buffer.alloc(s, 512, 1); buf.sine1(1.0 / 5.collect({arg i; pow(i + 1, 5.0.rand + 1)}), true, true, true)});
SynthDef(\robinson, {arg freq, amp = 0.2, del = 5, gate = 1, sustain = 1, buf = 0, out = 0;
Out.ar(out, Osc.ar(Select.kr(buf, b), freq, 0, amp) * EnvGen.kr(Env.sine(sustain + 0.01), gate, 1, 0, 1, doneAction: 2));
}).add;
};
~penroseCreateSynthsForLive = {var b;
Buffer.freeAll(s);
b = 8.collect({var buf = Buffer.alloc(s, 512, 1); buf.sine1(1.0 / 5.collect({arg i; pow(i + 1, 5.0.rand + 1)}), true, true, true)});
SynthDef(\penrose_ins, {arg freq, amp = 0.2, del = 5, gate = 1, sustain = 1, buf = 0, out = 0;
Out.ar(out /*10 + buf*/, Osc.ar(Select.kr(buf, b), freq, 0, amp) * EnvGen.kr(Env.adsr(1, sustain - 0.3, 0.7, 0.5), gate, 1, 0, 1, doneAction: 2));
}).add;
SynthDef(\penrose_fades, {arg subSeqLength, gate = 1, ins = 0, out = 0;
Out.ar(out, In.ar(10 + ins) * EnvGen.kr(Env.new([0.4, 0.8, 0.8, 0.4, 0], [3, subSeqLength - 6, 3, 0.1], \sine), gate, 1, 0, 1, doneAction: 2));
}).add;
};
~ammannCreateSynthsForLive = {var b;
Buffer.freeAll(s);
b = 6.collect({var buf = Buffer.alloc(s, 512, 1); buf.sine1(1.0 / 5.collect({arg i; pow(i + 1, 5.0.rand + 1)}), true, true, true)});
SynthDef(\ammann, {arg freq, amp, del = 5, gate = 1, sustain = 1, buf = 0, out = 0;
Out.ar(out, Osc.ar(Select.kr(buf, b), freq, 0, amp) * EnvGen.kr(Env.adsr(0.05, sustain, 0.5, 0.1), gate, 1, 0, 1, doneAction: 2));
}).add;
};
~kariCreateSynthsForLive = {
SynthDef(\kariEnsemble, {arg freq = 110, amp = 1, gate = 1, sustain = 1, dur = 1, out = 0;
Out.ar(out, SinOsc.ar(freq, 0, 0.1) *
pow(EnvGen.kr(Env.sine(sustain, amp / 5), gate, 1, 0, 1, doneAction: 2), 0.5) * 0.25);
}).add;
SynthDef(\kariBass, {arg freq = 110, amp = 1, gate = 1, sustain = 1, dur = 1, out = 0;
Out.ar(out, SinOsc.ar(freq, 0, 0.1) *
EnvGen.kr(Env.adsr(1, dur - 1.3, 0.25, 0.3, 1), gate, doneAction: 2) * 1);
}).add;
SynthDef(\kariNoise, {arg snd = 0, amp = 1, gate = 1, sustain = 1, dur = 1, out = 0;
Out.ar(out, Select.ar(snd, [WhiteNoise.ar(0.5), DC.ar(0), BrownNoise.ar(0.7)]) *
EnvGen.kr(Env.asr(dur, amp / 5, 3), gate, doneAction: 2) * 0.3);
}).add;
};
//sine tones for sonification
~jaendelCreateSynthsForLive = {
SynthDef(\jaendel, {arg freq, col, attack, sustain, decay, del = 5, gate = 1, pan = 0, pIndex = 0;
var env;
env = EnvGen.kr(Env.new([0, 1, 1, 0], [attack, sustain, decay], \sin), 1, 1, 0, 1, doneAction: 2);
//color is mapped to panning similar to the score which maps to different ways of playing the same note
Out.ar(pIndex * 2, SinOsc.ar(freq, 0, (((col >= 1) * (col <= 1)) + (col >= 3)).lag(0.3) * env * 0.05));
Out.ar(pIndex * 2 + 1, SinOsc.ar(freq, 0, (col >= 2).lag(0.3) * env * 0.05));
}).add;
};
//create patterns
~bergerCreatePatternsForLive = {arg seqs, group;
var pBinds;
//sonify musical data
~bergerCreatePatternsForLive = {arg seqs, group, addr;
var pBinds, transportPattern;
pBinds = seqs.collect({arg r, i;
Pbind(\instrument, \berger,
//\buf, Pseq((i - ((0..(r.slice(nil, 2).flat.size - 1)) / 10).trunc.asInteger) % 8),
\group, group,
\buf, i,
\out, ~hdpBusArray[i],
\out, ~bergerBusArray[i],
//\freq, Pseq(55 * r[1]),
\freq, Pseq((55 * r[1]).cpsmidi.round(0.5).midicps),
\dur, Pseq(r[0]),
@ -98,140 +36,25 @@ Event.addEventType(\osc, {
\amp, Pseq(r[2] / 1) //4)
)
});
};
~robinsonCreatePatternsForLive = {arg seqs, group;
var pBinds;
seqs = File.readAllString((~dir +/+ "music_data" +/+ "robinson.txt").standardizePath).interpret;
pBinds = seqs[0].collect({arg r, i;
Pbind(\instrument, \robinson,
\buf, i,
\group, group,
\out, ~hdpBusArray[i],
\freq, Pseq(12.midicps * r.slice(nil, 1)),
\dur, Pseq(r.slice(nil, 0) * 0.25 * (3/4)),
\sustain, Pseq(r.slice(nil, 0) * 0.25 * (3/4)),
\amp, Pseq(r.slice(nil, 2))
)
});
};
transportPattern = Pbind(
\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),
\dur, 1
);
~penroseCreatePatternsForLive = {arg seqs, group;
var finSeqs, finFades;
finSeqs = seqs[0].collect({arg r, i;
Pbind(\instrument, \penrose_ins,
\group, group,
\buf, i,
\out, ~hdpBusArray[i],
//\freq, Pseq((24.midicps * r[1]).cpsmidi.round(0.5).midicps),
\freq, Pseq((24.midicps * r[1])),
\dur, Pseq(r[0] * 0.125),
\sustain, Pseq(r[0] * 0.125),
\amp, Pseq(((r[2] * 0.25) / pow(1.5, ((i % 6) + 1))))
)
});
/*
finFades = seqs[2].collect({ arg r, i;
Pbind(\instrument, \penrose_fades,
\group, group,
\out, ~hdpBusArray[i],
\dur, Pseq(r * 0.125),
\subSeqLength, Pseq(r * 0.125),
\ins, i
)
});
*/
finSeqs /*++ finFades*/;
};
~ammannCreatePatternsForLive = {arg seqs, group;
var finSeqs;
finSeqs = seqs.collect({arg r, i;
Pbind(\instrument, \ammann,
//\buf, Pseq((i - ((0..(r.slice(nil, 2).flat.size - 1)) / 10).trunc.asInteger) % 8),
\group, group,
\buf, i,
\out, ~hdpBusArray[i],
\freq, Pseq((55 * r.slice(nil, 2).flatten).cpsmidi.round(0.5).midicps),
\dur, Pseq(r.slice(nil, 0).flat),
//this is a bit tricky it makes it so that each note goes to the next
//(ignoring the old sustain value)
//but the rests are kept to make it clear where the note falls in each measure
//for the transcriber
\sustain, Pseq(
[r.slice(nil, 0).flat.drop(1).clump(2).size.collect({Rest(1)}),
r.slice(nil, 0).flat.drop(1).clump(2).collect({arg item; item.sum})].flop.flat
),
//\sustain, Pseq(r.slice(nil, 1).flat ),
\amp, Pseq(r.slice(nil, 3).flat * 0.5)
)
});
finSeqs;
};
~kariCreatePatternsForLive = {arg dirs, group;
[
Pbind(\instrument, \kariNoise,
\group, group,
\out, 5,
\dur, Pseq(dirs[0].slice(nil, 1) * 1.2),
\snd, Pseq(dirs[0].slice(nil, 0))),
Pbind(\instrument, \kariBass,
\group, group,
\out, 6,
\dur, Pseq(dirs[1].slice(nil, 1) * 1.2),
\freq, Pseq((dirs[1].slice(nil, 0).collect({arg elem; [Rest(0), 36.midicps, 43.midicps][elem]})))),
] ++
dirs.drop(2).collect({arg row, i;
Pbind(\instrument, \kariEnsemble,
\group, group,
\out, i,
\dur, Pseq(row.slice(nil, 1) * 1.2),
//\sustain, Pseq(row.slice(nil, 1) * 1.2),
\freq, Pseq(row.slice(nil, 0).collect({arg val; if(val == 5, {Rest(0)}, {(60 + (val.trunc * 7)).midicps})})),
\amp, 1)})
};
~jaendelCreatePatternsForLive = {arg colors, version = 0 /*0 is full; 1 is reduced*/, startHarm = 1 /*must be odd*/, fund = 55, group;
//generate patterns
colors.collect({arg row, r;
var durUnit, del, eDur, start, stop, harms, fade, pIndex;
durUnit = 1 / 6; // 90 bpm
// 2 measures for full version, 1 for reduced version
del = if(version == 0, {(32 * (r % 16)) + (512 * (r / 16).asInteger)}, {(32 * (r % 8)) + (512 * (r / 8).asInteger)});
pIndex = if(version == 0, {(r % 16)}, {(r % 8)});
eDur = if(version == 0, {512 - 64}, {512 - 16}); // 32 - 4 measures for full version, 16 - 1 for reduced version
start = del - r; // this skews the tiling
stop = (start + eDur) - 1;
harms = ((0..(if(version == 0, {15}, {7}))) * 2).reverse + startHarm;
fade = if(version == 0, {64}, {64});
Pmono(\jaendel,
\group, group,
\pIndex, pIndex,
\dur, Pseq([Rest(del * durUnit), Pseq([durUnit], inf)]),
\freq, fund * harms[r % if(version == 0, {16}, {8})],
\col, Pseq([0, Pseq(row[start..stop])]),
\attack, fade * durUnit,
\sustain, (eDur - (fade * 2)) * durUnit,
\decay, fade * durUnit,
)
});
Ppar(pBinds.add(transportPattern));
};
SynthDef(\mixer, {arg freq, gate = 1, sustain, amp, dur, out;
var nameSpaces, sigs;
sigs = [~hdpBusArray].collect({arg busArray, i;
sigs = [~bergerBusArray].collect({arg busArray, i;
var nameSpace, sig;
nameSpace = ['hdp'][i];
nameSpace = ['berger', 'sine', 'bass', 'hdust', 'sampler'][i];
sig = busArray.collect({arg bus, c; In.ar(bus, 1) * NamedControl.kr(\ ++ nameSpace ++ '_volume_' ++ c, 1, 0.1)});
sig = sig.collect({arg channel, c; Pan2.ar(channel, NamedControl.kr(\ ++ nameSpace ++ '_pan_' ++ c, i / (busArray.size - 1), 0.1) * 2 - 1)});
sig = sig.collect({arg channel, c; channel * NamedControl.kr(\ ++ nameSpace ++ '_mute_' ++ c, 1, 0.1)});
@ -246,81 +69,15 @@ SynthDef(\mixer, {arg freq, gate = 1, sustain, amp, dur, out;
(
var createTransportData, createTransportPattern, group, berger, mixer, measureLengths, seqs, transportData, playbackData, player;
createTransportData = {arg measureLengths;
measureLengths.collect({arg dur, measure;
var beats;
if(dur.round(0.5) % 1 == 0, {
dur.asInteger.collect({arg beat;
[measure + 1, beat + 1, 1]
})
}, {
var eigths, beatDurs;
eigths = (dur / 0.5).round(0.5).asInteger;
beatDurs = case
{eigths <= 3} {[dur]}
{eigths == 5} {[1, 1.5]}
{eigths == 7} {[1, 1, 1.5]}
{eigths == 9} {[1, 1, 1, 1.5]}
{eigths == 11} {[1, 1, 1, 1, 1.5]}
{eigths == 13} {[1, 1, 1, 1, 1, 1.5]}
{eigths == 15} {[1, 1, 1, 1, 1, 1, 1.5]};
beatDurs.collect({arg bDur, beat;
[measure + 1, beat + 1, bDur]
})
});
}).flatten;
};
createTransportPattern = {arg addr, transportData;
Pbind(
\type, \osc,
\addr, addr,
\path, "/playing",
\msg, Pseq(transportData.collect({arg item; [item[0], item[1]]}), 1),
\dur, Pseq(transportData.collect({arg item; item[2]}), 1),
);
};
var group, berger, mixer, measureDurs, player;
~bergerCreateSynthsForLive.value;
~robinsonCreateSynthsForLive.value;
~penroseCreateSynthsForLive.value;
~ammannCreateSynthsForLive.value;
~kariCreateSynthsForLive.value;
~jaendelCreateSynthsForLive.value;
group = Group.new;
berger = Synth.tail(group, \berger);
mixer = Synth.tail(group, \mixer);
playbackData = Dictionary.new(n: 6);
seqs = File.readAllString((~dir +/+ "music_data" +/+ "berger.txt").standardizePath).interpret;
measureLengths = seqs[0][6];
playbackData.add(\berger -> [~bergerCreatePatternsForLive.value(seqs, group), createTransportData.value(measureLengths), measureLengths]);
seqs = File.readAllString((~dir +/+ "music_data" +/+ "robinson.txt").standardizePath).interpret;
measureLengths = seqs[1].sum.collect({4});
playbackData.add(\robinson -> [~robinsonCreatePatternsForLive.value(seqs, group), createTransportData.value(measureLengths), measureLengths]);
seqs = File.readAllString((~dir +/+ "music_data" +/+ "penrose.txt").standardizePath).interpret;
measureLengths = seqs[1].sum.collect({4});
playbackData.add(\penrose -> [~penroseCreatePatternsForLive.value(seqs, group), createTransportData.value(measureLengths), measureLengths]);
seqs = File.readAllString((~dir +/+ "music_data" +/+ "ammann.txt").standardizePath).interpret;
measureLengths = seqs[0].collect({arg item; item[0].sum});
playbackData.add(\ammann -> [~ammannCreatePatternsForLive.value(seqs, group), createTransportData.value(measureLengths), measureLengths]);
seqs = File.readAllString((~dir +/+ "music_data" +/+ "kari.txt").standardizePath).interpret;
measureLengths = seqs[0].collect({arg item; item.last}).flatten;
playbackData.add(\kari -> [~kariCreatePatternsForLive.value(seqs, group), createTransportData.value(measureLengths), measureLengths]);
seqs = File.readAllString((~dir +/+ "music_data" +/+ "jaendel.txt").standardizePath).interpret;
measureLengths = 284.collect({4});
playbackData.add(\jaendel -> [~jaendelCreatePatternsForLive.value(seqs, 0, 1, 55, group), createTransportData.value(measureLengths), measureLengths]);
measureDurs = ~bergerMusic[0][6];
OSCdef(\mixer, {arg msg, time, addr, port;
msg.postln;
@ -329,18 +86,16 @@ OSCdef(\mixer, {arg msg, time, addr, port;
OSCdef(\transport, {arg msg, time, addr, port;
msg.postln;
if(msg[1] == 0, {
//need some work here to make sure all synths are getting cutoff correctly
if(msg[1].postln == 0, {
group.set(\release, 2);
group.set(\gate, 0);
player.stop;
}, {
var pbinds, transportData, measureLengths, patterns, stream, offset, offsetStream, terminationStream;
# pbinds, transportData, measureLengths = playbackData[msg[2]];
patterns = Ppar(pbinds.postln.add(createTransportPattern.value(addr, transportData).postln));
var patterns, stream, offset, offsetStream, terminationStream;
patterns = ~bergerCreatePatternsForLive.value(~bergerMusic, group, addr);
stream = patterns.asStream;
offset = stream.fastForward(measureLengths.keep(msg[3].asInteger - 1).sum);
offset = stream.fastForward(measureDurs.keep(msg[2].asInteger.postln - 1).sum.postln).postln;
offsetStream = Routine({offset.wait});
terminationStream = Routine({addr.sendMsg("/transport", 0)});
@ -352,15 +107,6 @@ OSCdef(\transport, {arg msg, time, addr, port;
)
/*
TODOs:
- get synths to stop/cutoff correctly
- check and fix part ordering for each piece
- check and fix tempos for each piece
- make tempo variable
- set levels
*/
/*
~bergerCreateSynthsForLive.value;
~patterns = ~bergerCreatePatternsForLive.value(~bergerMusic);

View file

@ -14,9 +14,6 @@ PathName.new(~dir).files.do({arg path; if((path.fileName != "main.scd") && (path
~bergerTranscribe.value(~bergerMusic);
~visualize.value(~berger.value(100, 100), 0, 0, scale: 1, name: "berger")
s.record(~dir +/+ ".." +/+ "recs" +/+ "berger_knuth.wav", duration: (30 * 60));
~bergerMusicFile = File((~dir +/+ "music_data" +/+ "berger.txt").standardizePath, "w");
~bergerMusicFile.write(~bergerMusic.asCompileString);
~bergerMusicFile.close
~robinsonTiling = ~robinson.value(8);
@ -27,9 +24,6 @@ s.record(~dir +/+ ".." +/+ "recs" +/+ "berger_knuth.wav", duration: (30 * 60));
~robinsonTranscribe.value(~robinsonMusic);
~visualize.value(~robinsonTiling, 0, 0, 200, 200, scale: 1, name: "robinson");
s.record(~dir +/+ ".." +/+ "recs" +/+ "robinson.wav", duration: (30 * 60));
~robinsonMusicFile = File((~dir +/+ "music_data" +/+ "robinson.txt").standardizePath, "w");
~robinsonMusicFile.write(~robinsonMusic.asCompileString);
~robinsonMusicFile.close
~penroseTiling = ~penrose.value(120, 5, ~seed);
@ -40,9 +34,6 @@ s.record(~dir +/+ ".." +/+ "recs" +/+ "robinson.wav", duration: (30 * 60));
~penroseTranscribe.value(~penroseMusic);
~visualize.value(~penroseTiling, 0, 0, name: "penrose");
s.record(~dir +/+ ".." +/+ "recs" +/+ "penrose.wav", duration: (30 * 60));
~penroseMusicFile = File((~dir +/+ "music_data" +/+ "penrose.txt").standardizePath, "w");
~penroseMusicFile.write(~penroseMusic.asCompileString);
~penroseMusicFile.close
~ammannTiling = ~ammann.value(645, 105);
@ -53,9 +44,6 @@ s.record(~dir +/+ ".." +/+ "recs" +/+ "penrose.wav", duration: (30 * 60));
~ammannTranscribe.value(~ammannMusic);
~visualize.value(~ammann.value(200, 200), 0, 0, name: "ammann")
s.record(~dir +/+ ".." +/+ "recs" +/+ "ammann.wav", duration: (30 * 60));
~ammannMusicFile = File((~dir +/+ "music_data" +/+ "ammann.txt").standardizePath, "w");
~ammannMusicFile.write(~ammannMusic.asCompileString);
~ammannMusicFile.close
~kariTiling = ~kari_culik.value(500, 500, 0, 0, true);
@ -66,9 +54,6 @@ s.record(~dir +/+ ".." +/+ "recs" +/+ "ammann.wav", duration: (30 * 60));
~kariTranscribe.value(~kariMusic);
~visualize.value(~kari_culik.value(200, 200, 0, 5, true), 0, 0, scale: 1, name: "kari");
s.record(~dir +/+ ".." +/+ "recs" +/+ "kari_culik.wav", duration: (30 * 60));
~kariMusicFile = File((~dir +/+ "music_data" +/+ "kari.txt").standardizePath, "w");
~kariMusicFile.write(~kariMusic.asCompileString);
~kariMusicFile.close
~jaendelTiling = ~jaendel.value(14, 0, 0, 0);
@ -79,9 +64,6 @@ s.record(~dir +/+ ".." +/+ "recs" +/+ "kari_culik.wav", duration: (30 * 60));
~jaendelTranscribe.value(~jaendelMusic);
~visualize.value(~jaendelTiling, 0, 0, name: "jaendel");
s.record(~dir +/+ ".." +/+ "recs" +/+ "jaendel_rao.wav", duration: 30 * 60);
~jaendelMusicFile = File((~dir +/+ "music_data" +/+ "jaendel.txt").standardizePath, "w");
~jaendelMusicFile.write(~jaendelMusic.asCompileString);
~jaendelMusicFile.close
//~~~~~~~~~crypto visualizer code

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long