Ben Stucki has updated his blog with part two of his findings relating to SoundMixer.computeSpectrum().
Quantifying Flash Audio Visualizations
Absolutely amazing work! So i am again testing and experimenting…
My first question regarding his post… Is 11025Hz the maximum visible frequency available from a byteArray snapshot?
I used Sound Forge 10 to create a .wav file @[44100, 16bit, Stereo] and then used the ‘Insert’ menu to add Synthesis->Simple and Silence. My demo file creates test tones @[-12db, Sine] that last for 3 seconds followed by silence for 3 seconds. The sequence is as follows:
[22,050] silence [21,050] silence [20,050] silence [19,050] silence [18,050] silence [17,050] silence [16,050] silence [15,050] silence [14,050] silence [13,050] silence [12,050] silence [11,050] silence [11,025] silence.
The last part of the file is a sweep from 11,025Hz to 0.01Hz that lasts for 10 seconds.
I saved the .wav and then saved again as .mp3 @[128kbps, 44100, 16bit, Stereo] – immediately i noticed the frequencies that were displayed in the .wav (from 22,050 to 16,050) were displayed differently in the .mp3. Frequencies from 15.050Hz down looked identical to the .wav – so i guess the top end had been compressed… is that right?
I made a quick test so as to see visually what is coming back Test Tones Demo This uses the same code as all previous recent sound examples.
It takes a while until you see or hear anything but eventually things start happening around 16,050Hz. Is it overtones??? You tell me… It’s easy to check what frequency is heard, i counted each audible or visual response up until the sweep and then counted back. When i get more time i’ll annotate the audio file so it’s even easier to understand.
This is what i found:
- 22,050 – 17,050 / not audible / no visual
- 16,050 / audible / no visual
- 15,050 / audible / no visual
- 14,050 / audible / no visual
- 13,050 / audible / displayed
- 12,050 / audible / displayed
- 11,050 / audible / displayed
- 11,025 / audible / no visual
- SWEEP / audible / displayed
NOTE: You can adjust my demo by using these keys:
[0-5] changes sample rate 44100, 22050, 11025 etc
[6] 128 bands per channel
[7] 256 bands per channel
[8] FFT OFF
[9] FFT ON
[D] toggles swf performance display
NOTE: Still getting that end of file error from FMS – hit F5 and try again… it will work