@ -8,6 +8,7 @@
~accompLowLowerBusB = Bus.audio(s, 1);
~accompLowUpperBusB = Bus.audio(s, 1);
~interludeTremoloBus = Bus.audio(s, 1);
~clickBus = Bus.audio(s, 1);
SynthDef(\masterPlayerControl ++ ~hash, {
arg sel = 0,
@ -16,9 +17,10 @@ SynthDef(\masterPlayerControl ++ ~hash, {
accompHighVol = 1, accompHighPan = 0, accompHighMute = 1,
accompLowLowerVol = 1, accompLowLowerPan = 0, accompLowLowerMute = 1,
accompLowUpperVol = 1, accompLowUpperPan = 0, accompLowUpperMute = 1,
interludeVol = 1, interludePan = 0, interludeMute = 1;
var guitarSig, accompHighSig, accompLowLowerSig, accompLowUpperSig, interludeSig,
guitarSigPanned, accompHighSigPanned, accompLowLowerSigPanned, accompLowUpperSigPanned, interludeSigPanned,
interludeVol = 1, interludePan = 0, interludeMute = 1,
clickVol = 1, clickPan = 0, clickMute = 1;
var guitarSig, accompHighSig, accompLowLowerSig, accompLowUpperSig, interludeSig, clickSig,
guitarSigPanned, accompHighSigPanned, accompLowLowerSigPanned, accompLowUpperSigPanned, interludeSigPanned, clickSigPanned,
masterSig, imp;
guitarSig = In.ar(~guitarBus) * guitarVol;
@ -36,12 +38,15 @@ SynthDef(\masterPlayerControl ++ ~hash, {
]
) * accompLowUpperVol;
interludeSig = In.ar(~interludeTremoloBus) * interludeVol;
clickSig = In.ar(~clickBus) * clickVol;
guitarSigPanned = Pan2.ar(guitarSig * guitarMute, guitarPan);
accompHighSigPanned = Pan2.ar(accompHighSig * accompHighMute, accompHighPan);
accompLowLowerSigPanned = Pan2.ar(accompLowLowerSig * accompLowLowerMute, accompLowLowerPan);
accompLowUpperSigPanned = Pan2.ar(accompLowUpperSig * accompLowUpperMute, accompLowUpperPan);
interludeSigPanned = Pan2.ar(interludeSig * interludeMute, interludePan);
clickSigPanned = Pan2.ar(clickSig * clickMute, clickPan);
masterSig = Mix.ar(
[
guitarSigPanned,
@ -52,6 +57,7 @@ SynthDef(\masterPlayerControl ++ ~hash, {
]) * masterVol * masterMute;
Out.ar(0, masterSig);
Out.ar(2, clickSigPanned); //change this if you want the click to go somewhere else
imp = Impulse.kr(10);
SendReply.kr(imp,
@ -63,7 +69,7 @@ SynthDef(\masterPlayerControl ++ ~hash, {
[
Amplitude.kr(guitarSig), Amplitude.kr(accompHighSig),
Amplitude.kr(accompLowLowerSig), Amplitude.kr(accompLowUpperSig),
Amplitude.kr(interludeSig)
Amplitude.kr(interludeSig), Amplitude.kr(clickSig)
]
);
}).add;
@ -76,6 +82,12 @@ SynthDef(\transport ++ ~hash, {arg measure = 0, beat = 0, gate = 1, dur = 1;
}).add;
SynthDef(\click ++ ~hash, {arg beat = 0, gate = 1, dur = 1;
Out.ar(~clickBus, 10 * BPF.ar(WhiteNoise.ar * EnvGen.kr(Env.perc(0.01, 0.1), gate), 440 * ((beat <= 1) + 1), 0.02));
EnvGen.kr(Env.sine(dur), gate, doneAction: 2);
}).add;
//~~~~karplus
SynthDef(\karplus ++ ~hash, {arg freq, gate = 1, amp = 0.5, bus;
Out.ar(bus,
@ -250,6 +262,11 @@ SynthDef(\interludeTremelo ++ ~hash, {arg gate = 0, amp = 1, freq1, freq2, tremR
\measure, Pseq(measureSeq),
\beat, Pseq(beatSeq),
\dur, beatFrac * 8
),
Pbind(
\instrument, \click ++ ~hash,
\beat, Pseq(beatSeq.drop(-1)),
\dur, beatFrac * 8
)
]);
pattern
@ -257,34 +274,3 @@ SynthDef(\interludeTremelo ++ ~hash, {arg gate = 0, amp = 1, freq1, freq2, tremR
};
)
/*
//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;
)
*/