Posted by: Doug | November 20, 2009

Experimenting With FrequencyAnalyzer

I’ve quickly knocked up an example using the new FrequencyAnalyzer class written by Ben Stucki

Please have a play Test FrequencyAnalyzer

Use it as is in default mode if you like – to change the song while it’s running simply click the stage.

If you want you can pass variables via the url, something like this:
http://www.strangeloopstudios.com/viz/ben_v1/?freq=2&band=0.2&song=11

freq = 0 – 5.
band = 0.1 – 1.
song = 0 – 10.

Posted by: Doug | November 20, 2009

What Is The Maximum Frequency Shown By ComputeSpectrum?

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 :)

Posted by: Doug | November 19, 2009

HYPE & Audio – Early Findings

Playing with HYPE some more this time comparing the difference between calling ComputeSpectrum() direct and via SoundAnalyzer.

SoundAnalyzer is currently using the getFrequencyIndex() method which should spread the ByteArray data psychoacoustically based on Brandens’ previously collated values. See the Hype Blog Post – Understanding…

I’m using 2 different apps/UIs so the display is not identical but the way the data is drawn is! Also don’t run 2 files at the same time as each will display the combined data – that’s a SoundMixer issue, naughty!

Check out these examples:

NOTE: There seems to be an issue with the ‘no hype’ files – returning an end of file error, seems to be an issue with FMS especially if other flash apps are running in other matching browser tabs/windows. If you see it check what else is running flash, close it and refresh your browser – it should go eventually… sorry!

When i get time i’ll test the other methods getOctave() and getFrequencyRange().

Posted by: Doug | November 19, 2009

HYPE v1

A couple of experiments using HYPE.

Hype is great! I’ve been staring at these just tweaking them slightly over and over again – so many permutations it’s very possible the really good ones got lost in the process…

The Word Is
No End In Sight

Posted by: Doug | November 19, 2009

Unhype The HYPE!

Brandon Hall & Joshua Davis have released ‘The HYPE Framework’

Check out the HYPE Videos and HYPE Blog to see what’s on offer.

For me initially it was all about the potential of the SoundAnalyzer wrapper class but now, after some time spent delving a little bit deeper, i think i have truly found a gem!

Older Posts »

Categories