|
|
@ -1,26 +1,22 @@
|
|
|
|
(
|
|
|
|
(
|
|
|
|
//busses
|
|
|
|
//busses
|
|
|
|
~masterBus = Bus.audio(s, 1);
|
|
|
|
~masterBus = Bus.audio(s, 1);
|
|
|
|
~guitarBusA = Bus.audio(s, 1);
|
|
|
|
|
|
|
|
~guitarBusB = Bus.audio(s, 1);
|
|
|
|
|
|
|
|
~accompHighBusA = Bus.audio(s, 1);
|
|
|
|
|
|
|
|
~accompHighBusB = Bus.audio(s, 1);
|
|
|
|
|
|
|
|
~accompLowBusA = Bus.audio(s, 1);
|
|
|
|
|
|
|
|
~accompLowBusB = Bus.audio(s, 1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
~guitarBus = Bus.audio(s, 1);
|
|
|
|
~guitarBus = Bus.audio(s, 1);
|
|
|
|
~accompHighBus = Bus.audio(s, 1);
|
|
|
|
~accompHighBus = Bus.audio(s, 1);
|
|
|
|
~accompLowBus = Bus.audio(s, 1);
|
|
|
|
~accompLowLowerBusA = Bus.audio(s, 1);
|
|
|
|
|
|
|
|
~accompLowUpperBusA = Bus.audio(s, 1);
|
|
|
|
|
|
|
|
~accompLowLowerBusB = Bus.audio(s, 1);
|
|
|
|
|
|
|
|
~accompLowUpperBusB = Bus.audio(s, 1);
|
|
|
|
|
|
|
|
|
|
|
|
SynthDef(\masterPlayerControl, {
|
|
|
|
SynthDef(\masterPlayerControl, {
|
|
|
|
arg sel = 0,
|
|
|
|
arg sel = 0,
|
|
|
|
masterVol = 1, masterMute = 1,
|
|
|
|
masterVol = 1, masterMute = 1,
|
|
|
|
guitarVol = 1, guitarPan = 0, guitarMute = 1,
|
|
|
|
guitarVol = 1, guitarPan = 0, guitarMute = 1,
|
|
|
|
accompHighVol = 1, accompHighPan = 0, accompHighMute = 1,
|
|
|
|
accompHighVol = 1, accompHighPan = 0, accompHighMute = 1,
|
|
|
|
accompLowVol = 1, accompLowPan = 0, accompLowMute = 1;
|
|
|
|
accompLowLowerVol = 1, accompLowLowerPan = 0, accompLowLowerMute = 1,
|
|
|
|
var guitarSig, accompHighSig, accompLowSig,
|
|
|
|
accompLowUpperVol = 1, accompLowUpperPan = 0, accompLowUpperMute = 1;
|
|
|
|
guitarSigPanned, accompHighSigPanned, accompLowSigPanned,
|
|
|
|
var guitarSig, accompHighSig, accompLowLowerSig, accompLowUpperSig,
|
|
|
|
|
|
|
|
guitarSigPanned, accompHighSigPanned, accompLowLowerSigPanned, accompLowUpperSigPanned,
|
|
|
|
masterSig, imp;
|
|
|
|
masterSig, imp;
|
|
|
|
|
|
|
|
|
|
|
|
//guitarSig = SelectX.ar(sel, [In.ar(~guitarBusA), In.ar(~guitarBusB)]) * guitarVol;
|
|
|
|
//guitarSig = SelectX.ar(sel, [In.ar(~guitarBusA), In.ar(~guitarBusB)]) * guitarVol;
|
|
|
@ -30,17 +26,24 @@ SynthDef(\masterPlayerControl, {
|
|
|
|
guitarSig = In.ar(~guitarBus) * guitarVol;
|
|
|
|
guitarSig = In.ar(~guitarBus) * guitarVol;
|
|
|
|
accompHighSig = In.ar(~accompHighBus) * accompHighVol;
|
|
|
|
accompHighSig = In.ar(~accompHighBus) * accompHighVol;
|
|
|
|
//accompLowSig = SelectX.ar(sel, [In.ar(~accompLowBusA), In.ar(~accompLowBusB)]) * accompLowVol;
|
|
|
|
//accompLowSig = SelectX.ar(sel, [In.ar(~accompLowBusA), In.ar(~accompLowBusB)]) * accompLowVol;
|
|
|
|
accompLowSig = Mix.ar(
|
|
|
|
accompLowLowerSig = Mix.ar(
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
In.ar(~accompLowLowerBusA) * EnvGen.kr(Env.asr(0.001, 1, 0.1), (sel + 1) % 2),
|
|
|
|
|
|
|
|
In.ar(~accompLowLowerBusB) * EnvGen.kr(Env.asr(0.001, 1, 0.1), sel)
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
) * accompLowLowerVol;
|
|
|
|
|
|
|
|
accompLowUpperSig = Mix.ar(
|
|
|
|
[
|
|
|
|
[
|
|
|
|
In.ar(~accompLowBusA) * EnvGen.kr(Env.asr(0.001, 1, 0.1), (sel + 1) % 2),
|
|
|
|
In.ar(~accompLowUpperBusA) * EnvGen.kr(Env.asr(0.001, 1, 0.1), (sel + 1) % 2),
|
|
|
|
In.ar(~accompLowBusB) * EnvGen.kr(Env.asr(0.001, 1, 0.1), sel)
|
|
|
|
In.ar(~accompLowUpperBusB) * EnvGen.kr(Env.asr(0.001, 1, 0.1), sel)
|
|
|
|
]
|
|
|
|
]
|
|
|
|
) * accompLowVol;
|
|
|
|
) * accompLowUpperVol;
|
|
|
|
|
|
|
|
|
|
|
|
guitarSigPanned = Pan2.ar(guitarSig * guitarMute, guitarPan);
|
|
|
|
guitarSigPanned = Pan2.ar(guitarSig * guitarMute, guitarPan);
|
|
|
|
accompHighSigPanned = Pan2.ar(accompHighSig * accompHighMute, accompHighPan);
|
|
|
|
accompHighSigPanned = Pan2.ar(accompHighSig * accompHighMute, accompHighPan);
|
|
|
|
accompLowSigPanned = Pan2.ar(accompLowSig * accompLowMute, accompLowPan);
|
|
|
|
accompLowLowerSigPanned = Pan2.ar(accompLowLowerSig * accompLowLowerMute, accompLowLowerPan);
|
|
|
|
masterSig = Mix.ar([guitarSigPanned, accompHighSigPanned, accompLowSigPanned]) * masterVol * masterMute;
|
|
|
|
accompLowUpperSigPanned = Pan2.ar(accompLowUpperSig * accompLowUpperMute, accompLowUpperPan);
|
|
|
|
|
|
|
|
masterSig = Mix.ar([guitarSigPanned, accompHighSigPanned, accompLowLowerSigPanned, accompLowUpperSigPanned]) * masterVol * masterMute;
|
|
|
|
|
|
|
|
|
|
|
|
Out.ar(0, masterSig);
|
|
|
|
Out.ar(0, masterSig);
|
|
|
|
|
|
|
|
|
|
|
@ -50,7 +53,13 @@ SynthDef(\masterPlayerControl, {
|
|
|
|
values: [Amplitude.kr(masterSig)]);
|
|
|
|
values: [Amplitude.kr(masterSig)]);
|
|
|
|
SendReply.kr(imp,
|
|
|
|
SendReply.kr(imp,
|
|
|
|
'/trackLevels',
|
|
|
|
'/trackLevels',
|
|
|
|
values: [Amplitude.kr(guitarSig), Amplitude.kr(accompHighSig), Amplitude.kr(accompLowSig), DC.ar(0)]);
|
|
|
|
values:
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
Amplitude.kr(guitarSig), Amplitude.kr(accompHighSig),
|
|
|
|
|
|
|
|
Amplitude.kr(accompLowLowerSig), Amplitude.kr(accompLowUpperSig),
|
|
|
|
|
|
|
|
DC.ar(0)
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
);
|
|
|
|
}).add;
|
|
|
|
}).add;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -74,26 +83,14 @@ SynthDef(\karplus, {arg freq, gate = 1, amp = 0.5, bus;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//~~~~accompaniment
|
|
|
|
//~~~~accompaniment
|
|
|
|
SynthDef(\accompBass, {arg freq1 = 100, freq2 = 100, gate = 1, amp = 0.5, bus, cutoff = 0;
|
|
|
|
SynthDef(\accompBass, {arg freq1 = 100, freq2 = 100, gate = 1, amp = 0.5, busLower, busUpper, cutoff = 0;
|
|
|
|
var bassDrop;
|
|
|
|
var env, lower, upper;
|
|
|
|
bassDrop = Mix.ar(
|
|
|
|
env = EnvGen.kr(Env.perc(0.1, 10, level: amp), Impulse.kr(0) + Changed.kr(freq2));
|
|
|
|
[
|
|
|
|
lower = SinOsc.ar(freq1, 0, 0.5) * env;
|
|
|
|
SinOsc.ar(freq1, 0, 0.5),
|
|
|
|
upper = SinOsc.ar(freq2, 0, 0.5) * env;
|
|
|
|
/*
|
|
|
|
|
|
|
|
Select.ar(((freq2 - freq1).poll < 1.1).poll,
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
SinOsc.ar(freq2, 0, 0.5),
|
|
|
|
|
|
|
|
SinOsc.ar((freq1 +
|
|
|
|
|
|
|
|
(EnvGen.kr(Env.cutoff(10), Impulse.kr(0) + Changed.kr(freq2)) * (freq2 - freq1))).poll, 0, 0.5)
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
SinOsc.ar(freq2, 0, 0.5)
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
) *
|
|
|
|
|
|
|
|
EnvGen.kr(Env.perc(0.1, 10, level: amp), Impulse.kr(0) + Changed.kr(freq2));
|
|
|
|
|
|
|
|
//EnvGen.kr(Env.cutoff(0.1, level: amp), cutoff);
|
|
|
|
//EnvGen.kr(Env.cutoff(0.1, level: amp), cutoff);
|
|
|
|
Out.ar(bus, bassDrop)
|
|
|
|
Out.ar(busLower, lower);
|
|
|
|
|
|
|
|
Out.ar(busUpper, upper)
|
|
|
|
}).add;
|
|
|
|
}).add;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -135,11 +132,7 @@ SynthDef(\droneOut, {arg gate, bus;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
OSCFunc({ arg msg, time;
|
|
|
|
OSCFunc({ arg msg, time;
|
|
|
|
if((~currentSection + 1) < ~patterns.size, {
|
|
|
|
{~updateSection.value(1, false)}.defer;
|
|
|
|
~currentSection = ~currentSection + 1;
|
|
|
|
|
|
|
|
~play.set(\sel, ~currentSection % 2);
|
|
|
|
|
|
|
|
~patterns[~currentSection].play(quant: 0)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},'/playNextSubsection', s.addr);
|
|
|
|
},'/playNextSubsection', s.addr);
|
|
|
|
|
|
|
|
|
|
|
|
//~~~~gen music
|
|
|
|
//~~~~gen music
|
|
|
@ -254,7 +247,8 @@ OSCFunc({ arg msg, time;
|
|
|
|
\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)) * tempo,
|
|
|
|
//\cutoff, Pseq(accompLowSecSeq.drop(-1).size.collect({0}).add(1)),
|
|
|
|
//\cutoff, Pseq(accompLowSecSeq.drop(-1).size.collect({0}).add(1)),
|
|
|
|
\bus, if(secIndex % 2 == 0, {~accompLowBusA.index}, {~accompLowBusB.index}))
|
|
|
|
\busLower, if(secIndex % 2 == 0, {~accompLowLowerBusA.index}, {~accompLowLowerBusB.index}),
|
|
|
|
|
|
|
|
\busUpper, if(secIndex % 2 == 0, {~accompLowUpperBusA.index}, {~accompLowUpperBusB.index}))
|
|
|
|
//\bus, ~accompLowBus)
|
|
|
|
//\bus, ~accompLowBus)
|
|
|
|
}, {
|
|
|
|
}, {
|
|
|
|
Pmono(
|
|
|
|
Pmono(
|
|
|
@ -264,7 +258,8 @@ OSCFunc({ arg msg, time;
|
|
|
|
\freq2, Pseq([accompLowSecSeq[0][1]]),
|
|
|
|
\freq2, Pseq([accompLowSecSeq[0][1]]),
|
|
|
|
\dur, Pseq([accompLowSecSeq[0][2]]) * tempo,
|
|
|
|
\dur, Pseq([accompLowSecSeq[0][2]]) * tempo,
|
|
|
|
//\cutoff, Pseq(accompLowSecSeq.drop(-1).size.collect({0}).add(1)),
|
|
|
|
//\cutoff, Pseq(accompLowSecSeq.drop(-1).size.collect({0}).add(1)),
|
|
|
|
\bus, if(secIndex % 2 == 0, {~accompLowBusA.index}, {~accompLowBusB.index}))
|
|
|
|
\busLower, if(secIndex % 2 == 0, {~accompLowLowerBusA.index}, {~accompLowLowerBusB.index}),
|
|
|
|
|
|
|
|
\busUpper, if(secIndex % 2 == 0, {~accompLowUpperBusA.index}, {~accompLowUpperBusB.index}))
|
|
|
|
//\bus, ~accompLowBus)
|
|
|
|
//\bus, ~accompLowBus)
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
Pbind(
|
|
|
|
Pbind(
|
|
|
|