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