|
|
@ -7,8 +7,7 @@
|
|
|
|
~accompLowUpperBusA = Bus.audio(s, 1);
|
|
|
|
~accompLowUpperBusA = Bus.audio(s, 1);
|
|
|
|
~accompLowLowerBusB = Bus.audio(s, 1);
|
|
|
|
~accompLowLowerBusB = Bus.audio(s, 1);
|
|
|
|
~accompLowUpperBusB = Bus.audio(s, 1);
|
|
|
|
~accompLowUpperBusB = Bus.audio(s, 1);
|
|
|
|
~interludeBus = Bus.audio(s, 1);
|
|
|
|
~interludeTremoloBus = Bus.audio(s, 1);
|
|
|
|
~droneBus = Bus.audio(s, 1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SynthDef(\masterPlayerControl, {
|
|
|
|
SynthDef(\masterPlayerControl, {
|
|
|
|
arg sel = 0,
|
|
|
|
arg sel = 0,
|
|
|
@ -16,9 +15,10 @@ SynthDef(\masterPlayerControl, {
|
|
|
|
guitarVol = 1, guitarPan = 0, guitarMute = 1,
|
|
|
|
guitarVol = 1, guitarPan = 0, guitarMute = 1,
|
|
|
|
accompHighVol = 1, accompHighPan = 0, accompHighMute = 1,
|
|
|
|
accompHighVol = 1, accompHighPan = 0, accompHighMute = 1,
|
|
|
|
accompLowLowerVol = 1, accompLowLowerPan = 0, accompLowLowerMute = 1,
|
|
|
|
accompLowLowerVol = 1, accompLowLowerPan = 0, accompLowLowerMute = 1,
|
|
|
|
accompLowUpperVol = 1, accompLowUpperPan = 0, accompLowUpperMute = 1;
|
|
|
|
accompLowUpperVol = 1, accompLowUpperPan = 0, accompLowUpperMute = 1,
|
|
|
|
var guitarSig, accompHighSig, accompLowLowerSig, accompLowUpperSig,
|
|
|
|
interludeVol = 1, interludePan = 0, interludeMute = 1;
|
|
|
|
guitarSigPanned, accompHighSigPanned, accompLowLowerSigPanned, accompLowUpperSigPanned,
|
|
|
|
var guitarSig, accompHighSig, accompLowLowerSig, accompLowUpperSig, interludeSig,
|
|
|
|
|
|
|
|
guitarSigPanned, accompHighSigPanned, accompLowLowerSigPanned, accompLowUpperSigPanned, interludeSigPanned,
|
|
|
|
masterSig, imp;
|
|
|
|
masterSig, imp;
|
|
|
|
|
|
|
|
|
|
|
|
guitarSig = In.ar(~guitarBus) * guitarVol;
|
|
|
|
guitarSig = In.ar(~guitarBus) * guitarVol;
|
|
|
@ -35,12 +35,21 @@ SynthDef(\masterPlayerControl, {
|
|
|
|
In.ar(~accompLowUpperBusB) * EnvGen.kr(Env.asr(0.001, 1, 0.1), sel)
|
|
|
|
In.ar(~accompLowUpperBusB) * EnvGen.kr(Env.asr(0.001, 1, 0.1), sel)
|
|
|
|
]
|
|
|
|
]
|
|
|
|
) * accompLowUpperVol;
|
|
|
|
) * accompLowUpperVol;
|
|
|
|
|
|
|
|
interludeSig = In.ar(~interludeTremoloBus) * interludeVol;
|
|
|
|
|
|
|
|
|
|
|
|
guitarSigPanned = Pan2.ar(guitarSig * guitarMute, guitarPan);
|
|
|
|
guitarSigPanned = Pan2.ar(guitarSig * guitarMute, guitarPan);
|
|
|
|
accompHighSigPanned = Pan2.ar(accompHighSig * accompHighMute, accompHighPan);
|
|
|
|
accompHighSigPanned = Pan2.ar(accompHighSig * accompHighMute, accompHighPan);
|
|
|
|
accompLowLowerSigPanned = Pan2.ar(accompLowLowerSig * accompLowLowerMute, accompLowLowerPan);
|
|
|
|
accompLowLowerSigPanned = Pan2.ar(accompLowLowerSig * accompLowLowerMute, accompLowLowerPan);
|
|
|
|
accompLowUpperSigPanned = Pan2.ar(accompLowUpperSig * accompLowUpperMute, accompLowUpperPan);
|
|
|
|
accompLowUpperSigPanned = Pan2.ar(accompLowUpperSig * accompLowUpperMute, accompLowUpperPan);
|
|
|
|
masterSig = Mix.ar([guitarSigPanned, accompHighSigPanned, accompLowLowerSigPanned, accompLowUpperSigPanned]) * masterVol * masterMute;
|
|
|
|
interludeSigPanned = Pan2.ar(interludeSig * interludeMute, interludePan);
|
|
|
|
|
|
|
|
masterSig = Mix.ar(
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
guitarSigPanned,
|
|
|
|
|
|
|
|
accompHighSigPanned,
|
|
|
|
|
|
|
|
accompLowLowerSigPanned,
|
|
|
|
|
|
|
|
accompLowUpperSigPanned,
|
|
|
|
|
|
|
|
interludeSigPanned
|
|
|
|
|
|
|
|
]) * masterVol * masterMute;
|
|
|
|
|
|
|
|
|
|
|
|
Out.ar(0, masterSig);
|
|
|
|
Out.ar(0, masterSig);
|
|
|
|
|
|
|
|
|
|
|
@ -54,7 +63,7 @@ SynthDef(\masterPlayerControl, {
|
|
|
|
[
|
|
|
|
[
|
|
|
|
Amplitude.kr(guitarSig), Amplitude.kr(accompHighSig),
|
|
|
|
Amplitude.kr(guitarSig), Amplitude.kr(accompHighSig),
|
|
|
|
Amplitude.kr(accompLowLowerSig), Amplitude.kr(accompLowUpperSig),
|
|
|
|
Amplitude.kr(accompLowLowerSig), Amplitude.kr(accompLowUpperSig),
|
|
|
|
DC.ar(0)
|
|
|
|
Amplitude.kr(interludeSig)
|
|
|
|
]
|
|
|
|
]
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}).add;
|
|
|
|
}).add;
|
|
|
@ -62,7 +71,6 @@ SynthDef(\masterPlayerControl, {
|
|
|
|
|
|
|
|
|
|
|
|
SynthDef(\transport, {arg measure = 0, beat = 0, gate = 1, dur = 1;
|
|
|
|
SynthDef(\transport, {arg measure = 0, beat = 0, gate = 1, dur = 1;
|
|
|
|
SendReply.kr(Impulse.kr(0) * (measure > 0) * (beat > 0),'/measureClock', values: [measure, beat]);
|
|
|
|
SendReply.kr(Impulse.kr(0) * (measure > 0) * (beat > 0),'/measureClock', values: [measure, beat]);
|
|
|
|
SendReply.kr(TDelay.kr(Impulse.kr(0) * (measure > 0) * (beat > 0), 0.25),'/measureClockReset');
|
|
|
|
|
|
|
|
SendReply.kr(Impulse.kr(0) * (measure < 1) * (beat < 1),'/playNextSubsection');
|
|
|
|
SendReply.kr(Impulse.kr(0) * (measure < 1) * (beat < 1),'/playNextSubsection');
|
|
|
|
EnvGen.kr(Env.sine(dur), gate, doneAction: 2);
|
|
|
|
EnvGen.kr(Env.sine(dur), gate, doneAction: 2);
|
|
|
|
}).add;
|
|
|
|
}).add;
|
|
|
@ -94,38 +102,26 @@ SynthDef(\accompTreble, {arg freq, gate = 1, sustain, amp, bus;
|
|
|
|
Out.ar(bus, treble)
|
|
|
|
Out.ar(bus, treble)
|
|
|
|
}).add;
|
|
|
|
}).add;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SynthDef(\interludeTremelo, { arg gate = 0, amp = 1;
|
|
|
|
SynthDef(\drone, { arg out=0, freq=440, amp=0.1, pan=0, gate=1, bus;
|
|
|
|
var tremeloTrig, freq, sig, feedback, fade;
|
|
|
|
var z;
|
|
|
|
//fast tremelo - note that this can be slower so long as the delaytime of the feedback remains short
|
|
|
|
z = LPF.ar(
|
|
|
|
tremeloTrig = Impulse.kr(50);
|
|
|
|
Mix.new(VarSaw.ar(freq + [0, Rand(-0.4,0.0), Rand(0.0,0.4)], 0, 0.3, 0.3)),
|
|
|
|
//tremelo between two notes
|
|
|
|
XLine.kr(Rand(4000,5000), Rand(2500,3200), 1)
|
|
|
|
freq = Select.kr(Stepper.kr(tremeloTrig, 0, 0, 1), [62.midicps, 62.midicps * 5/6]);
|
|
|
|
) * Linen.kr(gate, 0.01, 0.7, 0.3, 2);
|
|
|
|
//occasionally tremelo on same note
|
|
|
|
Out.ar(bus, Pan2.ar(z, pan, amp));
|
|
|
|
freq = Select.kr(TWChoose.kr(Dust.kr(10), [0, 1, 2], [5, 1, 1], 1), [freq, 62.midicps, 62.midicps * 5/6]) / 2;
|
|
|
|
}, [\ir]).add;
|
|
|
|
//generate signal
|
|
|
|
|
|
|
|
sig = VarSaw.ar(freq, 0, 0.3, 0.1) * EnvGen.kr(Env.perc(0.01, 0.1), tremeloTrig);
|
|
|
|
|
|
|
|
//feedback
|
|
|
|
SynthDef(\droneFade, {arg gate = 0;
|
|
|
|
feedback = CombC.ar(sig, 0.2, 50.reciprocal, 5);
|
|
|
|
Out.ar([0, 1], Clip.ar(In.ar(~droneBus, 1), -1, 1) * 0.1 * EnvGen.ar(Env.asr(20, 1, 20), gate))
|
|
|
|
fade = feedback * EnvGen.ar(Env.asr(20, 1, 20), gate) * amp;
|
|
|
|
|
|
|
|
Out.ar(~interludeTremoloBus, fade);
|
|
|
|
}).add;
|
|
|
|
}).add;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
~dronePattern = EventPatternProxy.new;
|
|
|
|
|
|
|
|
~dronePattern.source = Pbind(
|
|
|
|
|
|
|
|
\instrument, \drone,
|
|
|
|
|
|
|
|
\amp, 0.5,
|
|
|
|
|
|
|
|
\dur, 0.02,
|
|
|
|
|
|
|
|
\sustain, 0.05,
|
|
|
|
|
|
|
|
//\freq, Pseq(3000.collect({[[62.midicps, 250], [62.midicps, 250].choose].wchoose([10, 1].normalizeSum)}).flat / 2),
|
|
|
|
|
|
|
|
\freq, Pwrand([[62.midicps, 250], Prand([62.midicps, 250], inf)], [10, 1].normalizeSum, inf) / 2,
|
|
|
|
|
|
|
|
\bus, ~droneBus.index
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
OSCFunc({ arg msg, time; {~updateSection.value(1, false, false)}.defer},'/playNextSubsection', s.addr);
|
|
|
|
OSCFunc({ arg msg, time; {~updateSection.value(1, false, false)}.defer},'/playNextSubsection', s.addr);
|
|
|
|
|
|
|
|
|
|
|
|
//~~~~gen music
|
|
|
|
//~~~~gen music
|
|
|
|
~genPatterns = {arg guitarSeqIn, accompLowSeqIn, accompHighSeqIn, sectionSeqIn, tempo = 0.08;
|
|
|
|
~genPatterns = {arg guitarSeqIn, accompLowSeqIn, accompHighSeqIn, sectionSeqIn, beatFrac = 1/8;
|
|
|
|
var calcSustains, genSectionSec, sectionLimits, measureCount;
|
|
|
|
var calcSustains, genSectionSec, sectionLimits, measureCount;
|
|
|
|
|
|
|
|
|
|
|
|
//~~~~helper sus function
|
|
|
|
//~~~~helper sus function
|
|
|
@ -210,12 +206,11 @@ OSCFunc({ arg msg, time; {~updateSection.value(1, false, false)}.defer},'/playNe
|
|
|
|
Pbind(
|
|
|
|
Pbind(
|
|
|
|
\instrument, \karplus,
|
|
|
|
\instrument, \karplus,
|
|
|
|
\amp, 0.3,
|
|
|
|
\amp, 0.3,
|
|
|
|
\dur, Pseq(durSeq * tempo),
|
|
|
|
\dur, Pseq(durSeq * beatFrac),
|
|
|
|
\sustain, Pseq(susSeq * tempo),
|
|
|
|
\sustain, Pseq(susSeq * beatFrac),
|
|
|
|
\freq, Pseq(stringSeq.collect({arg string, index;
|
|
|
|
\freq, Pseq(stringSeq.collect({arg string, index;
|
|
|
|
if(string.isRest, {Rest()}, {
|
|
|
|
if(string.isRest, {Rest()}, {
|
|
|
|
((62.midicps * openStrings[string]).cpsmidi + fretSeq[index]).midicps})})),
|
|
|
|
((62.midicps * openStrings[string]).cpsmidi + fretSeq[index]).midicps})})),
|
|
|
|
//\bus, if(secIndex % 2 == 0, {~guitarBusA.index}, {~guitarBusB.index})),
|
|
|
|
|
|
|
|
\bus, ~guitarBus.index),
|
|
|
|
\bus, ~guitarBus.index),
|
|
|
|
if(accompLowSecSeq.size > 1, {
|
|
|
|
if(accompLowSecSeq.size > 1, {
|
|
|
|
Pmono(
|
|
|
|
Pmono(
|
|
|
@ -223,36 +218,31 @@ OSCFunc({ arg msg, time; {~updateSection.value(1, false, false)}.defer},'/playNe
|
|
|
|
\amp, 0.5,
|
|
|
|
\amp, 0.5,
|
|
|
|
\freq1, Pseq(accompLowSecSeq.slice(nil, 0)),
|
|
|
|
\freq1, Pseq(accompLowSecSeq.slice(nil, 0)),
|
|
|
|
\freq2, Pseq(accompLowSecSeq.slice(nil, 1)),
|
|
|
|
\freq2, Pseq(accompLowSecSeq.slice(nil, 1)),
|
|
|
|
\dur, Pseq(accompLowSecSeq.slice(nil, 2)) * tempo,
|
|
|
|
\dur, Pseq(accompLowSecSeq.slice(nil, 2)) * beatFrac,
|
|
|
|
//\cutoff, Pseq(accompLowSecSeq.drop(-1).size.collect({0}).add(1)),
|
|
|
|
|
|
|
|
\busLower, if(secIndex % 2 == 0, {~accompLowLowerBusA.index}, {~accompLowLowerBusB.index}),
|
|
|
|
\busLower, if(secIndex % 2 == 0, {~accompLowLowerBusA.index}, {~accompLowLowerBusB.index}),
|
|
|
|
\busUpper, if(secIndex % 2 == 0, {~accompLowUpperBusA.index}, {~accompLowUpperBusB.index}))
|
|
|
|
\busUpper, if(secIndex % 2 == 0, {~accompLowUpperBusA.index}, {~accompLowUpperBusB.index}))
|
|
|
|
//\bus, ~accompLowBus)
|
|
|
|
|
|
|
|
}, {
|
|
|
|
}, {
|
|
|
|
Pmono(
|
|
|
|
Pmono(
|
|
|
|
\accompBass,
|
|
|
|
\accompBass,
|
|
|
|
\amp, 0.5,
|
|
|
|
\amp, 0.5,
|
|
|
|
\freq1, Pseq([accompLowSecSeq[0][0]]),
|
|
|
|
\freq1, Pseq([accompLowSecSeq[0][0]]),
|
|
|
|
\freq2, Pseq([accompLowSecSeq[0][1]]),
|
|
|
|
\freq2, Pseq([accompLowSecSeq[0][1]]),
|
|
|
|
\dur, Pseq([accompLowSecSeq[0][2]]) * tempo,
|
|
|
|
\dur, Pseq([accompLowSecSeq[0][2]]) * beatFrac,
|
|
|
|
//\cutoff, Pseq(accompLowSecSeq.drop(-1).size.collect({0}).add(1)),
|
|
|
|
|
|
|
|
\busLower, if(secIndex % 2 == 0, {~accompLowLowerBusA.index}, {~accompLowLowerBusB.index}),
|
|
|
|
\busLower, if(secIndex % 2 == 0, {~accompLowLowerBusA.index}, {~accompLowLowerBusB.index}),
|
|
|
|
\busUpper, if(secIndex % 2 == 0, {~accompLowUpperBusA.index}, {~accompLowUpperBusB.index}))
|
|
|
|
\busUpper, if(secIndex % 2 == 0, {~accompLowUpperBusA.index}, {~accompLowUpperBusB.index}))
|
|
|
|
//\bus, ~accompLowBus)
|
|
|
|
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
Pbind(
|
|
|
|
Pbind(
|
|
|
|
\instrument, \accompTreble,
|
|
|
|
\instrument, \accompTreble,
|
|
|
|
\freq, Pseq(accompHighSecSeq.slice(nil, 0)),
|
|
|
|
\freq, Pseq(accompHighSecSeq.slice(nil, 0)),
|
|
|
|
\dur, Pseq(accompHighSecSeq.slice(nil, 1) * tempo),
|
|
|
|
\dur, Pseq(accompHighSecSeq.slice(nil, 1) * beatFrac),
|
|
|
|
\sustain, Pseq(accompHighSecSeq.slice(nil, 2) * tempo),
|
|
|
|
\sustain, Pseq(accompHighSecSeq.slice(nil, 2) * beatFrac),
|
|
|
|
\amp, 0.5,
|
|
|
|
\amp, 0.5,
|
|
|
|
//\bus, if(secIndex % 2 == 0, {~accompHighBusA.index}, {~accompHighBusB.index})),
|
|
|
|
|
|
|
|
\bus, ~accompHighBus.index),
|
|
|
|
\bus, ~accompHighBus.index),
|
|
|
|
Pbind(
|
|
|
|
Pbind(
|
|
|
|
\instrument, \transport,
|
|
|
|
\instrument, \transport,
|
|
|
|
\measure, Pseq(measureSeq),
|
|
|
|
\measure, Pseq(measureSeq),
|
|
|
|
\beat, Pseq(beatSeq),
|
|
|
|
\beat, Pseq(beatSeq),
|
|
|
|
\dur, tempo * 8
|
|
|
|
\dur, beatFrac * 8
|
|
|
|
)
|
|
|
|
)
|
|
|
|
]);
|
|
|
|
]);
|
|
|
|
pattern
|
|
|
|
pattern
|
|
|
@ -260,3 +250,34 @@ OSCFunc({ arg msg, time; {~updateSection.value(1, false, false)}.defer},'/playNe
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
//machine options
|
|
|
|
|
|
|
|
(
|
|
|
|
|
|
|
|
var durUnit = 0.15;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SynthDef(\machine, {arg freq, gate = 1, sustain, amp;
|
|
|
|
|
|
|
|
var sound;
|
|
|
|
|
|
|
|
sound = TWChoose.ar(Impulse.kr(0), [
|
|
|
|
|
|
|
|
PinkNoise.ar(EnvGen.kr(Env.perc(0.01, sustain, amp * 10), gate, doneAction: 2)),
|
|
|
|
|
|
|
|
BrownNoise.ar(EnvGen.kr(Env.perc(0.01, sustain, amp * 2), gate, doneAction: 2))
|
|
|
|
|
|
|
|
], [0, 20], 1);
|
|
|
|
|
|
|
|
Out.ar([0, 1], sound)
|
|
|
|
|
|
|
|
}).add;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
~machine1 = Pbind(
|
|
|
|
|
|
|
|
\instrument, \machine,
|
|
|
|
|
|
|
|
\amp, Pseq(3000.collect({arg i; (i / 2000).clip(0, 0.03)})),
|
|
|
|
|
|
|
|
\dur, Pseq(1000.collect({[durUnit, durUnit + (durUnit / 100).rand2].wchoose([10, 1].normalizeSum)}).flat),
|
|
|
|
|
|
|
|
\sustain, Pseq(1000.collect({durUnit * (1.75 + 0.5.rand)})),//2.25].wchoose([1, 20].normalizeSum)})),
|
|
|
|
|
|
|
|
\freq, Pseq(1000.collect({[[300, 250], [300, 250].choose].wchoose([10, 1].normalizeSum)}).flat / 2)
|
|
|
|
|
|
|
|
).play;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SynthDef(\machine, {arg freq, gate = 1, sustain, amp = 0.03;
|
|
|
|
|
|
|
|
var trig, sound;
|
|
|
|
|
|
|
|
trig = Impulse.kr(10);
|
|
|
|
|
|
|
|
sound = BrownNoise.ar(EnvGen.kr(Env.perc(0.01, 0.3 + TRand.kr(0, 0.1, trig), amp), TDelay.kr(trig, TRand.kr(0, 0.002, Dust.kr(0.75)))));
|
|
|
|
|
|
|
|
Out.ar([0, 1], sound)
|
|
|
|
|
|
|
|
}).play;
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
*/
|