|
|
|
@ -10,14 +10,19 @@ appEnvironment.push;
|
|
|
|
|
|
|
|
|
|
s.waitForBoot({
|
|
|
|
|
|
|
|
|
|
var hdpBusArray,
|
|
|
|
|
bergerCreateSynthsForLive, robinsonCreateSynthsForLive, penroseCreateSynthsForLive, ammannCreateSynthsForLive, kariCreateSynthsForLive, jaendelCreateSynthsForLive,
|
|
|
|
|
var hdpBusArray, clickBus, clickBufPrimary, clickBufSecondary,
|
|
|
|
|
bergerCreateSynthsForLive, robinsonCreateSynthsForLive, penroseCreateSynthsForLive, ammannCreateSynthsForLive, kariCreateSynthsForLive, jaendelCreateSynthsForLive, clickCreateSynthForLive,
|
|
|
|
|
bergerCreatePatternsForLive, robinsonCreatePatternsForLive, penroseCreatePatternsForLive, ammannCreatePatternsForLive, kariCreatePatternsForLive, jaendelCreatePatternsForLive,
|
|
|
|
|
createTransportData, createTransportPattern, dir, group, berger, mixer, measureLengths, seqs, transportData, playbackData, tempoClock, player;
|
|
|
|
|
createTransportData, createTransportPattern, createClickPattern, dir, group, berger, mixer, measureLengths, seqs, transportData, playbackData, tempoClock, player;
|
|
|
|
|
|
|
|
|
|
Buffer.freeAll(s);
|
|
|
|
|
|
|
|
|
|
c = Condition.new;
|
|
|
|
|
|
|
|
|
|
dir = thisProcess.nowExecutingPath.dirname;
|
|
|
|
|
|
|
|
|
|
hdpBusArray = 32.collect({Bus.audio(s, 1)});
|
|
|
|
|
clickBus = Bus.audio(s, 1);
|
|
|
|
|
|
|
|
|
|
Event.addEventType(\osc, {
|
|
|
|
|
if (~addr.postln.notNil) {
|
|
|
|
@ -31,7 +36,7 @@ s.waitForBoot({
|
|
|
|
|
//create synth defs
|
|
|
|
|
bergerCreateSynthsForLive = {var b;
|
|
|
|
|
// this creates a different waveform for each sonification of each part
|
|
|
|
|
Buffer.freeAll(s);
|
|
|
|
|
//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(\berger, {arg freq, amp = 0.2, del = 5, gate = 1, sustain = 1, buf = 0, out = 0;
|
|
|
|
@ -40,7 +45,7 @@ s.waitForBoot({
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
robinsonCreateSynthsForLive = {var b;
|
|
|
|
|
Buffer.freeAll(s);
|
|
|
|
|
//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;
|
|
|
|
@ -49,7 +54,7 @@ s.waitForBoot({
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
penroseCreateSynthsForLive = {var b;
|
|
|
|
|
Buffer.freeAll(s);
|
|
|
|
|
//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;
|
|
|
|
@ -62,7 +67,7 @@ s.waitForBoot({
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
ammannCreateSynthsForLive = {var b;
|
|
|
|
|
Buffer.freeAll(s);
|
|
|
|
|
//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;
|
|
|
|
@ -98,6 +103,22 @@ s.waitForBoot({
|
|
|
|
|
}).add;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//sampler for click track
|
|
|
|
|
clickCreateSynthForLive = {
|
|
|
|
|
clickBufPrimary = Buffer.read(s, dir +/+ "music_data" +/+ "primary_click.wav");
|
|
|
|
|
clickBufSecondary = Buffer.read(s, dir +/+ "music_data" +/+ "secondary_click.wav");
|
|
|
|
|
|
|
|
|
|
SynthDef(\click, {arg measure = 0, beat = 0, dur = 1, sustain = 1, gate = 1, out = 0, primaryBufNum = 0, secondaryBufNum = 1;
|
|
|
|
|
var primaryClick, secondaryClick, sig;
|
|
|
|
|
primaryClick = PlayBuf.ar(1, primaryBufNum, BufRateScale.kr(primaryBufNum), 1, SampleRate.ir * BufRateScale.kr(primaryBufNum) * (measure % 100));
|
|
|
|
|
//primaryClick = PlayBuf.ar(1, primaryBufNum, BufRateScale.kr(primaryBufNum));
|
|
|
|
|
secondaryClick = PlayBuf.ar(1, secondaryBufNum, BufRateScale.kr(secondaryBufNum), 1);
|
|
|
|
|
sig = Select.ar(beat > 0, [primaryClick, secondaryClick]);//* EnvGen.kr(Env.cutoff(0.001, 1), doneAction: 2);
|
|
|
|
|
EnvGen.kr(Env.sine(sustain), gate, doneAction: 2);
|
|
|
|
|
Out.ar(out, sig);
|
|
|
|
|
}).add;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//create patterns
|
|
|
|
|
bergerCreatePatternsForLive = {arg seqs, group;
|
|
|
|
@ -244,6 +265,20 @@ s.waitForBoot({
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
createClickPattern = {arg transportData, group;
|
|
|
|
|
Pbind(\instrument, \click,
|
|
|
|
|
\group, group,
|
|
|
|
|
//\msg, Pseq(8.collect({arg i; ["-", (i % 4) + 1]}) ++ transportData.collect({arg item; [item[0], item[1]]}), 1),
|
|
|
|
|
//\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,
|
|
|
|
|
\primaryBufNum, clickBufPrimary,
|
|
|
|
|
\secondaryBufNum, clickBufSecondary,
|
|
|
|
|
\out, clickBus
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
SynthDef(\mixer_old, {arg freq, gate = 1, sustain, amp, dur, out;
|
|
|
|
|
var nameSpaces, sigs;
|
|
|
|
@ -262,19 +297,21 @@ s.waitForBoot({
|
|
|
|
|
}).add;
|
|
|
|
|
|
|
|
|
|
SynthDef(\mixer, {
|
|
|
|
|
var sig;
|
|
|
|
|
var sig, click;
|
|
|
|
|
|
|
|
|
|
sig = hdpBusArray.collect({arg bus, index; In.ar(bus, 1) * NamedControl.kr(\volume_ ++ index, 0.75, 0.1)});
|
|
|
|
|
sig = sig.collect({arg channel, index; Pan2.ar(channel, NamedControl.kr(\pan_ ++ index, 0.5, 0.1) * 2 - 1)});
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
|
|
Out.ar(0, sig)
|
|
|
|
|
click = In.ar(clickBus, 1);// * NamedControl.kr(\volume_click, 0.75, 0.1);
|
|
|
|
|
|
|
|
|
|
Out.ar(0, sig);
|
|
|
|
|
Out.ar(2, click);
|
|
|
|
|
}).add;
|
|
|
|
|
|
|
|
|
|
s.sync(c);
|
|
|
|
|
|
|
|
|
|
dir = thisProcess.nowExecutingPath.dirname;
|
|
|
|
|
s.sync(c);
|
|
|
|
|
|
|
|
|
|
createTransportData = {arg measureLengths;
|
|
|
|
|
measureLengths.collect({arg dur, measure;
|
|
|
|
@ -318,6 +355,7 @@ s.waitForBoot({
|
|
|
|
|
ammannCreateSynthsForLive.value;
|
|
|
|
|
kariCreateSynthsForLive.value;
|
|
|
|
|
jaendelCreateSynthsForLive.value;
|
|
|
|
|
clickCreateSynthForLive.value;
|
|
|
|
|
|
|
|
|
|
group = Group.new;
|
|
|
|
|
berger = Synth.tail(group, \berger);
|
|
|
|
@ -370,7 +408,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), 9, Ppar(pbinds)]);
|
|
|
|
|
patterns = Ptpar([0, createTransportPattern.value(addr, transportData), 1 * msg[5]/60.0, createClickPattern.value(transportData, group), 9 * msg[5]/60.0, Ppar(pbinds)]);
|
|
|
|
|
|
|
|
|
|
stream = patterns.asStream;
|
|
|
|
|
if(msg[3] == 1, {
|
|
|
|
|