(
// MAIN LAUNCH - Best to reboot interpreter and server first to make sure all buffers are cleared
~dir = thisProcess.nowExecutingPath.dirname;
"ostinato_and_interrupt_generator_synthdef.scd".loadRelative(true, {
	"ostinato_and_interrupt_player_synthdef.scd".loadRelative(true, {
		"ostinato_and_interrupt_nrt_generator_function.scd".loadRelative(true, {
			"ostinato_and_interrupt_lilypond_generator_function.scd".loadRelative(true, {
				"ostinato_and_interrupt_gui_generator_function.scd".loadRelative(true, {
					if(File.exists(~dir +/+ "../audio/ostinato_and_interrupt.wav"), {
						~appStatusString = "loading buffer";
						~generateGUI.value;
						~appStatusFunc.play;
						Buffer.read(s, ~dir +/+ "../audio/ostinato_and_interrupt.wav", action: {
							|buf| ~totalDur = buf.duration;
							~play = Synth.new(\play, [\buf, buf]);
							~appStatusFunc.stop;
							{~appStatus.string = "ready"}.defer
						});
					}, {
						~appStatusString = "generating data";
						~generateGUI.value;
						~appStatusFunc.play;
						~generateData.value(true)});
})})})})});
)