|
|
|
(
|
|
|
|
// MAIN LAUNCH (loads necessary files and definitions)
|
|
|
|
|
|
|
|
var appEnvironment;
|
|
|
|
|
|
|
|
//push new environment
|
|
|
|
appEnvironment = Environment.make;
|
|
|
|
appEnvironment.push;
|
|
|
|
|
|
|
|
s.waitForBoot({
|
|
|
|
|
|
|
|
~hash = Date.getDate.hash.asString;
|
|
|
|
|
|
|
|
// load all files
|
|
|
|
"cicc_musical_data_generator.scd".loadRelative;
|
|
|
|
"cicc_sonifier.scd".loadRelative;
|
|
|
|
"cicc_gui.scd".loadRelative;
|
|
|
|
"cicc_transcriber.scd".loadRelative;
|
|
|
|
|
|
|
|
// generate all the data
|
|
|
|
~genAll = {arg seed;
|
|
|
|
~allMusicData = ~genMusicData.value(seed);
|
|
|
|
~patterns = ~allMusicData[0];
|
|
|
|
~scoreData = ~allMusicData[1];
|
|
|
|
~sectionOffsets = ~allMusicData[2];
|
|
|
|
~currentSection = 0;
|
|
|
|
~currentSubsection = 0;
|
|
|
|
~isPlaying = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
// set the global variables
|
|
|
|
~tempoClock = TempoClock.new(90 / 60);
|
|
|
|
~dir = thisProcess.nowExecutingPath.dirname;
|
|
|
|
"loading app".postln;
|
|
|
|
~genAll.value(20200525);
|
|
|
|
~play = Synth.new(\masterPlayerControl ++ ~hash);
|
|
|
|
~interludeTremelo = Synth.new(\interludeTremelo ++ ~hash);
|
|
|
|
~autoAdvance = true;
|
|
|
|
~interludes = false;
|
|
|
|
~sectionOrder = ~patterns.size.collect({arg sec; sec});
|
|
|
|
~generateGUI.value;
|
|
|
|
"ready".postln;
|
|
|
|
});
|
|
|
|
appEnvironment.pop;
|
|
|
|
)
|