public SquareWaveGenerator(int rate) {
		dutyCycle = 4;
		cyclePos = 0;
		channel = CHAN_LEFT | CHAN_RIGHT;
		cycleLength = 2;
		totalLength = 0;
		sampleRate = rate;
		amplitude = 32;
		counterSweep = 0;
	}