blog

Tag Archive for SampleDataEvent at Jozef Chúťka's blog

October 25, 2011

1 Comment

BitmapData extract SampleDataEvent Sound

A Sound In Image Experiment

Close-up of a violin body and strings.

There are some usefull apis since Flash Player 10, I have never been playing with. Yesterday, I realized one experiment with Sound + SampleDataEvent and created quick demo for converting music into a bitmap and vice versa.

There is a Sound.extract() method in ActionScript allowing you to grab raw sound data from a sound object. It provides you ByteArray of 32-bit floating-point values, which can be converted to a Number using ByteArray.readFloat(). The resulting values are -1 < value < 1...

Read the rest of this entry »