mwinter 1 year ago
commit 0eb6de18b1

@ -142,11 +142,11 @@ module.exports = {
//piece = tokens[2]
type = tokens[3]
val = args[0].value
if(type != "volume_master") {
if((type == "volume_master") || (type == "volume_click") || (type == "out_audio") || (type == "out_click")) {
args = [{'type': 's', 'value': type}, {'type': 'f', 'value': val}]
} else {
index = tokens[4]
args = [{'type': 's', 'value': type}, {'type': 's', 'value': index}, {'type': 'f', 'value': val}]
} else {
args = [{'type': 's', 'value': type}, {'type': 'f', 'value': val}]
}
//args = [{'type': 's', 'value': piece}, {'type': 's', 'value': type}, {'type': 's', 'value': index}, {'type': 'f', 'value': val}]
//console.log(data)

@ -160,7 +160,7 @@
"interaction": true,
"comments": "",
"width": "100%",
"height": "100%",
"height": "95%",
"expand": "false",
"colorText": "auto",
"colorWidget": "auto",
@ -204,6 +204,56 @@
"onCreate": "",
"onValue": "",
"onTouch": ""
},
{
"type": "dropdown",
"top": "95%",
"left": 0,
"lock": false,
"id": "mixer/@{parent.variables.piece}/out_audio",
"visible": true,
"interaction": true,
"comments": "",
"width": "100%",
"height": "5%",
"expand": "false",
"colorText": "auto",
"colorWidget": "auto",
"colorStroke": "auto",
"colorFill": "auto",
"alphaStroke": "auto",
"alphaFillOff": "auto",
"alphaFillOn": "auto",
"lineWidth": "auto",
"borderRadius": "auto",
"padding": "auto",
"html": "",
"css": "",
"label": "auto",
"icon": "true",
"align": "center",
"values": [
1,
2,
3,
4,
5,
6,
7,
8
],
"value": "",
"default": 1,
"linkId": "",
"address": "auto",
"preArgs": "",
"typeTags": "",
"decimals": 0,
"target": "",
"ignoreDefaults": false,
"bypass": false,
"onCreate": "",
"onValue": ""
}
],
"tabs": []
@ -369,7 +419,7 @@
"interaction": true,
"comments": "",
"width": "100%",
"height": "100%",
"height": "95%",
"expand": "false",
"colorText": "auto",
"colorWidget": "auto",
@ -413,6 +463,56 @@
"onCreate": "",
"onValue": "",
"onTouch": ""
},
{
"type": "dropdown",
"top": "95%",
"left": 0,
"lock": false,
"id": "mixer/@{parent.variables.piece}/out_click",
"visible": true,
"interaction": true,
"comments": "",
"width": "100%",
"height": "5%",
"expand": "false",
"colorText": "auto",
"colorWidget": "auto",
"colorStroke": "auto",
"colorFill": "auto",
"alphaStroke": "auto",
"alphaFillOff": "auto",
"alphaFillOn": "auto",
"lineWidth": "auto",
"borderRadius": "auto",
"padding": "auto",
"html": "",
"css": "",
"label": "auto",
"icon": "true",
"align": "center",
"values": [
1,
2,
3,
4,
5,
6,
7,
8
],
"value": "",
"default": 1,
"linkId": "",
"address": "auto",
"preArgs": "",
"typeTags": "",
"decimals": 0,
"target": "",
"ignoreDefaults": false,
"bypass": false,
"onCreate": "",
"onValue": ""
}
],
"tabs": []

@ -1012,7 +1012,7 @@
"scroll": true,
"innerPadding": true,
"tabsPosition": "top",
"label": "Jaendal",
"label": "Jaendel",
"variables": "@{parent.variables}",
"traversing": false,
"value": "",
@ -1084,7 +1084,7 @@
"fallback": "",
"props": {
"variables": {
"piece": "kari",
"piece": "jaendel",
"tempo": 60
}
},

@ -123,8 +123,8 @@ s.waitForBoot({
//create patterns
bergerCreatePatternsForLive = {arg seqs, group;
var pBinds, cleanSeqs;
cleanSeqs = [seqs[5], seqs[6], seqs[7], seqs[0], seqs[1], seqs[2]];
pBinds = seqs.collect({arg r, i;
cleanSeqs = [seqs[5], seqs[6], seqs[7], seqs[1], seqs[2], seqs[3]];
pBinds = cleanSeqs.collect({arg r, i;
Pbind(\instrument, \berger,
//\buf, Pseq((i - ((0..(r.slice(nil, 2).flat.size - 1)) / 10).trunc.asInteger) % 8),
\group, group,
@ -219,12 +219,12 @@ s.waitForBoot({
[
Pbind(\instrument, \kariNoise,
\group, group,
\out, 0,
\out, hdpBusArray[0],
\dur, Pseq(dirs[0].slice(nil, 1) /* * 1.2*/),
\snd, Pseq(dirs[0].slice(nil, 0))),
Pbind(\instrument, \kariBass,
\group, group,
\out, 1,
\out, hdpBusArray[1],
\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]})))),
] ++
@ -232,7 +232,7 @@ s.waitForBoot({
dirs.drop(2).reverse.collect({arg row, i;
Pbind(\instrument, \kariEnsemble,
\group, group,
\out, i + 2,
\out, hdpBusArray[i + 2],
\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})})),
@ -272,29 +272,14 @@ s.waitForBoot({
//\dur, Pseq(8.collect({arg i; 1}) ++ transportData.collect({arg item; item[2]}), 1),
\measure, Pseq(8.collect({arg i; 2}) ++ transportData.collect({arg item; item[0]}) - 1, 1),
\beat, Pseq(8.collect({arg i; 2}) ++ transportData.collect({arg item; item[1]}) - 1, 1),
\dur, Pseq(transportData.collect({arg item; item[2]}), 1),
\sustain, 1,
\dur, Pseq(8.collect({arg i; 1}) ++ transportData.collect({arg item; item[2]}), 1),
\sustain, 0.75,
\primaryBufNum, clickBufPrimary,
\secondaryBufNum, clickBufSecondary,
\out, clickBus
);
};
SynthDef(\mixer_old, {arg freq, gate = 1, sustain, amp, dur, out;
var nameSpaces, sigs;
sigs = [hdpBusArray].collect({arg busArray, i;
var nameSpace, sig;
nameSpace = ['hdp'][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)});
sig = Mix.ar(sig) * pow(NamedControl.kr(\ ++ nameSpace ++ '_volume_master', 1, 0.5), 2);
});
sigs = Mix.ar(sigs / 6);
Out.ar(0, sigs)
}).add;
SynthDef(\mixer, {
var sig, click;
@ -304,10 +289,10 @@ s.waitForBoot({
sig = sig.collect({arg channel, index; channel * NamedControl.kr(\mute_ ++ index, 1, 0.1)});
sig = Mix.ar(sig) * pow(NamedControl.kr(\volume_master, 0.75, 0.5), 2);
click = In.ar(clickBus, 1);// * NamedControl.kr(\volume_click, 0.75, 0.1);
click = In.ar(clickBus, 1) * NamedControl.kr(\volume_click, 0.75, 0.1);
Out.ar(0, sig);
Out.ar(2, click);
Out.ar(NamedControl.kr(\out_audio, 0, 0), sig);
Out.ar(NamedControl.kr(\out_click, 0, 0), click);
}).add;
@ -316,13 +301,14 @@ s.waitForBoot({
createTransportData = {arg measureLengths;
measureLengths.collect({arg dur, measure;
var beats;
if(dur.round(0.5) % 1 == 0, {
dur.asInteger.collect({arg beat;
if((dur.round(0.5) % 1 == 0) && (dur.round(0.5) != 1), {
dur.round(0.5).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]}
@ -331,6 +317,8 @@ s.waitForBoot({
{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 = eigths.collect({0.5});
beatDurs.collect({arg bDur, beat;
[measure + 1, beat + 1, bDur]
@ -364,6 +352,7 @@ s.waitForBoot({
playbackData = Dictionary.new(n: 6);
seqs = File.readAllString((dir +/+ "music_data" +/+ "berger.txt").standardizePath).interpret;
seqs.size.postln;
measureLengths = seqs[0][6];
playbackData.add(\berger -> [bergerCreatePatternsForLive.value(seqs, group), createTransportData.value(measureLengths), measureLengths]);
@ -387,13 +376,14 @@ s.waitForBoot({
measureLengths = 284.collect({4});
playbackData.add(\jaendel -> [jaendelCreatePatternsForLive.value(seqs, 0, 1, 55, group), createTransportData.value(measureLengths), measureLengths]);
OSCdef(\mixer, {arg msg, time, addr, port;
[msg, time, addr, port];
if(msg[1].asString != "volume_master", {
mixer.set((msg[1] ++ '_' ++ msg[2]), msg[3]);
[msg, time, addr, port].postln;
if((msg[1].asString == "volume_master") || (msg[1].asString == "volume_click") || (msg[1].asString[..2] == "out"), {
var val = msg[2];
if(msg[1].asString[..2] == "out", {val = val.round - 1});
mixer.set(msg[1], val)
}, {
mixer.set(msg[1], msg[2])
mixer.set((msg[1] ++ '_' ++ msg[2]), msg[3]);
});
}, \mixer);
@ -408,7 +398,7 @@ s.waitForBoot({
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));
patterns = Ptpar([0, createTransportPattern.value(addr, transportData), 1 * msg[5]/60.0, createClickPattern.value(transportData, group), 9 * msg[5]/60.0, Ppar(pbinds)]);
patterns = Ptpar([0, createTransportPattern.value(addr, transportData), 1 * msg[5]/60.0, createClickPattern.value(transportData, group), 8 + (msg[5]/60.0), Ppar(pbinds)]);
stream = patterns.asStream;
if(msg[3] == 1, {

Loading…
Cancel
Save