formatting unfinished score and adding times for wakes

main
Michael Winter 7 years ago
parent 9a7fb3ebf0
commit 536af04d47

@ -3,12 +3,13 @@
SynthDef(\flicker, { |automate = 1, bufs = #[0, 1, 2, 3, 4, 5, 6, 7, 8], SynthDef(\flicker, { |automate = 1, bufs = #[0, 1, 2, 3, 4, 5, 6, 7, 8],
fadeInTrigBusNum = 0, fadeOutTrigBusNum = 2, wakeTrigBusNum = 1| fadeInTrigBusNum = 0, fadeOutTrigBusNum = 2, wakeTrigBusNum = 1|
//~~~~~ Vars ~~~~~ //~~~~~ Vars ~~~~~
// fadeInTimes, fadeOutTimes, wakeTimes according to example in score with 1 minute delay
// start times / fade ins // 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]) // 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 // 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 // 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]; var freqRatios = [2, 3/2, 5/4, 7/4, 11/8, 13/8, 17/16, 19/16, 23/16];
// Triggers // Triggers
@ -22,6 +23,8 @@ SynthDef(\flicker, { |automate = 1, bufs = #[0, 1, 2, 3, 4, 5, 6, 7, 8],
// Timed trigger // Timed trigger
var timedTrigger = {|times| Changed.kr(EnvGen.kr(Env.step({|i| i % 2} ! (times.size + 1), var timedTrigger = {|times| Changed.kr(EnvGen.kr(Env.step({|i| i % 2} ! (times.size + 1),
times.differentiate ++ [0.01]), Impulse.kr(0)))}; times.differentiate ++ [0.01]), Impulse.kr(0)))};
// Monitor time
var sTrig, sCount, secs, mins;
//~~~~~ Triggers ~~~~~ //~~~~~ Triggers ~~~~~
// Triggers for fadeInTimes // 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; {|i| SendTrig.kr(pulse, i + 9, energy[i] * fadeInOutEnv * wakeEnv)} ! 9;
//~~~~~ Monitor Time ~~~~~ //~~~~~ 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); }).send(s);
) )
Loading…
Cancel
Save