I am thinking that
reactToBeat:Number = 30;is completely dependant on song.mp3.
If the song was processed at a different volume level, then you may
need to lower the value. (e.g. 30 would be lowered to 19)
I ultimately want to have this work with any song, because I
will be making a playlist and have song.mp3 replaced with the var.
To start, however, I would at least like to get this spectrum
to only respond to low frequencies.
I think for start, I would need to change:
false, 0);so that it reads it as a frenquency spectrum
rather than a complete wav file (according to the as3 ref doc)
With that, the first 256 values should be low freqs and 257
to 512 would be high freqs.
How can I utilize that to only scaleOnBeat to the low
Also, I didn't know if it was best to use a select case for a
certain range of values.
After thinking about it a little bit, if the computeSpectrum
was set to false, that would give me the left channel of 0-256, but
so would the class of "leftpeak"...so is there a way to use that?
Also, vol is currently dependant on the 512 total values, so
perhaps setting computeSpectrum to false, and then changing all 512
references to 256 and all 256 values to 128. That would cut it down
to only work with the left channel...right?
I am also trying to get away from the fixed value of 30 for
reactOnBeat, because what if I want to change the volume?
Yes, I could always increase the vol by the difference
reactOnBeat is from 30, but isn't there a dB averager or some other
class that would tell me more information about the sound