##synth

//include helper.athinc for SqrOsc function
##include helper

//main function that is called every tick
num Tick()
{
	//as soon as the note stops playing the synth should too
	//noteOff and running are keywords
	//some helper functions do this automatically
	//like Adsr, when it's fifth parameter is true
	if(noteOff) running = false;

	//return a square wave of the note's frequency
	//frequency is a keyword
	return SqrOsc(frequency);
}

//tune part, here you enter notes
##tune

//uppercase letters like A denote the channel
//lowercase letters from a-g denote notes to be played
//r is a rest, works like a note of silence
A c d r e
