void Start()
{
Instance = this;
crossovers[0] = 30; //guesstimating sample lengths for frequency bands
crossovers[1] = 50;
crossovers[2] = 600;
crossovers[3] = freqData.Length;
band = new float[BANDS];
output = new float[BANDS];
for (int i = 0; i < audioObj.Length; i++)
{
audioObj[i].player = (GameObject)Instantiate(playerPrefab);
audioObj[i].player.transform.parent = transform;
audioObj[i].player.transform.position = Vector3.zero;
audioObj[i].clip = new AudioClip();
}
inputDevices = new string[Microphone.devices.Length];
deviceNum = Microphone.devices.Length - 1;
for (int i = 0; i < Microphone.devices.Length; i++)
inputDevices[i] = Microphone.devices[i].ToString();
CurrentAudioInput = Microphone.devices[deviceNum].ToString();
InvokeRepeating("Check", 0, 1.0f / 15.0f);
StartCoroutine(StartRecord());
}