Sing like HAL with the Flash Player 10.1
30. December 2009 – 00:49Tags: Flash Player 10.1, Microphone, Pitch
Of course everybody remembers the scene from 2001 when Dave Bowman removes HAL´s memory banks.
While being shut down HAL sings the song ‘daisy’ and his voice continuously pitches down while his ‘mind fades’.
With this little test app you can sing like HAL!
…provided you installed the Flash Player 10.1 beta and have a microphone handy.
Yes 10.1 – as the new year is coming, so is the next subversion step of the flash player, bringing among other features video playback and p2p/streaming enhancements.
The beta2 has been released at the 17th December and brought also the long-awaited debug version.
But aside from the global error handling, the new feature I was looking forward to the most is the access to binary data coming from the microphone.
This will allow to develop a bunch of pretty interesting applications that make use of voice input – like voice recognition for example.
This little demo records data from the mic and plays it with an adjustable speed offset, pitching the sound.
You can download the source here.
Note: to be able to compile the project you need to download the updated “playerglobal.swc“.

6 Responses to “Sing like HAL with the Flash Player 10.1”
Nice Example.
Do you know if it is possible to compute spectrum in real time from mic data? If so have you been able to do it successfully?
thanks,
Chris
By Chris Florio on Feb 23, 2010
Hi Chris,
as computeSpectrum is a Method of the global SoundMixer, you would have to play the mic data as sound in order to use it so sadly this doesn´t work.
But on every SampleDataEvent you receive the incoming sample as a RAW bytearray.
So you just have to apply the fast fourier transformation with an own implementation of that method.
That should do the trick – hope it helps you out.
Cheers!
By flashgordon on Feb 23, 2010
Thanks I will try playing with that.
By Chris Florio on Feb 23, 2010
That’s great. It works and is way easier than everything I was trying. Thanks for pointing me in the right direction.
By Chris Florio on Feb 23, 2010
Anytime
By flashgordon on Feb 23, 2010
Thanks for this test Gordon, they said it will only be available in AIR but it works in the FP plugin as well
By Og2t on Mar 2, 2010