public void setBand(int i, float a) {
		if (a < 0) {
			throw new IllegalArgumentException(
					"Can't set a frequency band to a negative value.");
		}
		if (real[i] == 0 && imag[i] == 0) {
			real[i] = a;
			spectrum[i] = a;
		} else {
			real[i] /= spectrum[i];
			imag[i] /= spectrum[i];
			spectrum[i] = a;
			real[i] *= spectrum[i];
			imag[i] *= spectrum[i];
		}
		if (i != 0 && i != timeSize / 2) {
			real[timeSize - i] = real[i];
			imag[timeSize - i] = -imag[i];
		}
	}