|
|
|
@ -3,12 +3,13 @@
|
|
|
|
|
SynthDef(\flicker, { |automate = 1, bufs = #[0, 1, 2, 3, 4, 5, 6, 7, 8],
|
|
|
|
|
fadeInTrigBusNum = 0, fadeOutTrigBusNum = 2, wakeTrigBusNum = 1|
|
|
|
|
|
//~~~~~ Vars ~~~~~
|
|
|
|
|
// fadeInTimes, fadeOutTimes, wakeTimes according to example in score with 1 minute delay
|
|
|
|
|
// start times / fade ins
|
|
|
|
|
var fadeInTimes = [5, 100];
|
|
|
|
|
var fadeInTimes = [1, 50] * 60;
|
|
|
|
|
// end times / fade outs (must be same length as fadeInTimes with fadeInTimes[i] < fadeOutTimes[i])
|
|
|
|
|
var fadeOutTimes = [80, 150];
|
|
|
|
|
var fadeOutTimes = [47, 106] * 60;
|
|
|
|
|
// These are the times to wake up with a flourish of activity and the reading of an entry in the journal
|
|
|
|
|
var wakeTimes = [15, 105];
|
|
|
|
|
var wakeTimes = [4, 9, 17, 24, 34, 44, 53, 57, 73, 97, 101, 106] * 60;
|
|
|
|
|
// These are the frequency ratios of the ensemble parts
|
|
|
|
|
var freqRatios = [2, 3/2, 5/4, 7/4, 11/8, 13/8, 17/16, 19/16, 23/16];
|
|
|
|
|
// Triggers
|
|
|
|
@ -22,6 +23,8 @@ SynthDef(\flicker, { |automate = 1, bufs = #[0, 1, 2, 3, 4, 5, 6, 7, 8],
|
|
|
|
|
// Timed trigger
|
|
|
|
|
var timedTrigger = {|times| Changed.kr(EnvGen.kr(Env.step({|i| i % 2} ! (times.size + 1),
|
|
|
|
|
times.differentiate ++ [0.01]), Impulse.kr(0)))};
|
|
|
|
|
// Monitor time
|
|
|
|
|
var sTrig, sCount, secs, mins;
|
|
|
|
|
|
|
|
|
|
//~~~~~ Triggers ~~~~~
|
|
|
|
|
// Triggers for fadeInTimes
|
|
|
|
@ -95,6 +98,8 @@ SynthDef(\flicker, { |automate = 1, bufs = #[0, 1, 2, 3, 4, 5, 6, 7, 8],
|
|
|
|
|
{|i| SendTrig.kr(pulse, i + 9, energy[i] * fadeInOutEnv * wakeEnv)} ! 9;
|
|
|
|
|
|
|
|
|
|
//~~~~~ Monitor Time ~~~~~
|
|
|
|
|
Poll.kr(PulseDivider.kr(pulse, 30), PulseCount.kr(PulseDivider.kr(pulse, 30)), \time);
|
|
|
|
|
sTrig = PulseDivider.kr(pulse, 30); sCount = PulseCount.kr(sTrig);
|
|
|
|
|
secs = sCount % 60; mins = (sCount / 60).trunc;
|
|
|
|
|
Poll.kr(sTrig, mins + (secs / 100), "time (min.secs)");
|
|
|
|
|
}).send(s);
|
|
|
|
|
)
|