The silent death of onSoundComplete event – a petition

History
Back in the year 2002, where FlashMX was introduced, I was pleased to see the new event ‘onSoundComplete’. I had access to the beta version these days (cannot say where, cause I wasn’t in the beta group). I found out, that it simply did not work as expected. The event should be triggered, when a sound was completely played, but starting a new sound on the very same event caused a small gap in playback. What was the point? The ‘onSoundComplete’ event was only triggered at the beginning of a certain minimal timeframe (2048 samples on a PC ~ 46ms / 44.1KHz). Macromedia didn’t take my report seriously – more – they demanded that everything worked as expected. Well, no musicians worked at Macromedia those days.

The first hack on SoundComplete
Same year – Frank Baumgartner found a way to trigger waveforms sample-exact – the base for any kind of sequencing. He found out, that the ‘offset’ in Sound.play( offset, loop ) accepts a float (Number). He played waveforms with a little silence at the beginning to create a time-offset, where the actual waveform starts where it should – free from any timeraster. This was very cool and I started playing with it. Fortunately the event was triggered very precisely. Lucky times.

More enhancements on Sound
In
2005 Adobe introduced Flash8. We got 32 stereo sound channels – a huge number according to 8 in the past. I felt for the first time that the onSoundComplete event has become less stable, but still passable.

Going dynamic
Then Flash9 was introduced with a tiny method, that changed my flash life (Loader.loadBytes). ‘Shouldn’t it be possible to create SWFs on the fly?’. After some tests I found a solution (as others too) to create a dynamic audio stream with your own amplitudes within the FlashPlayer. Awesome possibilities! Just one darkside: It all depends strongly on the now renamed ‘SOUND_COMPLETE’ event. The hack necessarily must have a solid timer for creating an endless audio stream. Unfortunately the onSoundComplete event lost priority. It become very unstable. Using a 4 times longer buffer (8192 samples) makes it more stable, but also increases the latency of the audio application. Furthermore it takes more time at once to compute all samples. Every animation stops.

The silent death
But if you think it cannot be worse, Windows Vista was introduced where the onSoundComplete event went totally out of control. A FlashPlayer minor-update fixed that back to normal (by accident? – no release notes…), but the latest (R115) has back the glitch. Any upcoming minor update of the FlashPlayer can be the death of the onSoundComplete event at all. At that point I hate to be such dependent on Adobe and their interest.

So why should it be important for Adobe to fix this?
Software is going online and Adobe wants us to use the Flash technology to create online application – so called “Rich Internet Application”. We are currently building a huge audio application (yes – a new one!), which completely matches that strategy. So please write a comment. Lets make that issue important for Adobe to fix it in the next “Minor’ release. I know, you will have fun with our new “Rich Internet Application” and a lot of more audio application should follow! Making music is cool! Much cooler than 3D :)

Here some URLs to test:
8bitboy.popforge.de
lab.andre-michelle.com/tag/audio

Note that ALL hacks based on the onSoundComplete fail at the time on various machines!

Related Blog Posts:
New project and my new TB-303
Popforge Opensouce Project
Flash sound issues on vista
Umz tzz Buzz tzz Umz tzz Buzz

133 thoughts on “The silent death of onSoundComplete event – a petition”

  1. Let’s do André better than hacks !

    I think Flash needs to be more efficient for sound, not just volume for the microphone, not just a hack for on fly sound generation.
    But now juste repare this bug

    Adobe, do not the same thing as Microsoft, listen your customers !

  2. +1 for the fix, or everybody just drop Vista…now seriously: it would be more interesting to see stuff like André and some others do with sound implemented directly on the player as in no hacks or PHD involved to create this kind of apps, that would be an improvement, not 1 audio bug platform specific fix.

  3. /me voting too :-)

    unfortunatly i never got used to dynamic audio in flash, but why should adobe reroll a program part with less capabilities. i hate standing still and this is the best example for some stupid ideas from adobe/microsoft whatever…

    hope this helps :-)

  4. I am really worried about this issue, Media is getting more interactive each day. Why sound in flash holds so mediocre while display classes are growing amazingly? is it some kind of punishment or just laziness? what ever it is Adobe please make sound part of the “rich media” concept a lot of people would be pleased to be able to make unpredicted things with sound and music…

  5. no question, very unsatisfying for each flash developer. working hard for know-how, extending it’s limits and being part to make it popular, especially andre. and it makes no sense to invest in things you can’t trust.
    andres sound developments are really encouraging, opening a new dimension for flash applications with interactive arranged music. that’s rich.

  6. Yes, my vote too for better audio in Flash and a fix for onSoundComplete. I’ve always been a bit disappointed with the audio capabilities of Flash, so this hack is a big improvement.

    And thanks for making your 909 code open source! I’m now making my own drum machine / sample player as a first project to get used to Flex and AS3. Lots more fun when you can make music with Actionscript. :-)

  7. I second that. Andre deserves more than anyone else to be heard and supported by Adobe – besides the fact that it would make our lives much easier if this event works as expected.

  8. You have my vote as well. It’s sad but this sort of thing is precisely why I warned people away from getting too deep into dynamic sound in Flash.

  9. Thank you all for your comments. Unfortunately I heard from dark channels, that Adobe probably won’t release another minor update before the FlashPlayer 10 arrives. However a official note would be nice!

    Let’s pray for new Sound functionalities in FP10 to create ass-kicking rich-media-music-applications in future.

    The petition worths the effort anyway. We made clear, that we NEED this :)

    Happy new year!

  10. ADOBE please fix. This is an old undying issue. Just create a writable sound buffer and an accurate way to stream to it already. Or, better yet, make a real sound object with resampling and stuff as well.

    Wouldn’t want to have to start speccing Silverlight for applications needing in depth sound.

  11. ADOBE please fix. This is an old undying issue. Just create a writable sound buffer and an accurate way to stream to it already. Or, better yet, make a real sound object with resampling and stuff as well.

    Wouldn’t want to have to start speccing Silverlight for applications needing in depth sound.

  12. Rather than fix this SOUND_COMPLETE issue, I’d like Adobe to create a ‘normal’ way to access the sound buffer of Flash.

    Don’t get me wrong… I hope they fix this SOUND_COMPLETE issue, but this only makes a complex hack work again.

    I agree with E-Phonic. SOUND_COMPLETE of course needs to be fixed, it’s a part of the Flash Player API. But further dynamic sound capabilities (both audio buffer & MIDI) need to be added. MIDI is small, dynamic and universal, all the things Flash Player stands for. The capability we have to generate streaming sound via the Loader class is to our own credit (developer community) despite Adobe’s lack of attention to audio features.

    The SOUND_COMPLETE will probably be fixed in FP 10, but don’t count on any audio enhancements.

  13. Definitely worth it.

    Loops and sounds are an amazing way to workout an emotional plus to interactivity. OnSoundComplete is part of the magic for me. Don’t want to put intervals everywhere just because they can’t make it work…

    Sound may be the less important dimension in websites right now, but it’s just a question of time. Have anyone seen a movie on mute lately?

  14. Totally agree with you there Johnny. Adobe/Macromedia systematically undervalued sound on the web. What improvements of the Sound Class has Adobe given us since Flash 7? Sound analyze data. Whoohooo!!! We can now make graphic visualizers in Flash that are not phoney. The popForge Library, now that’s something that’s really gone make a difference on the way people COULD experience the web. If Adobe would take Flash Player functionality consistancy a little more serious, that is. And that’s assuming the death of SOUND_COMPLETE was unintentional.

    People over at Adobe: Wake up and hear the sound!

  15. I’ll vote on that. Adobe has certainly done amazing things in the past few years, but… here we are, in Flash Player 9 (going on 10), and sound in the Flash Player is still a pain to work with. Get with it, Adobe.

  16. What a hot discussion. I expect the adobe to concern this issue.
    By the way, I wish adobe add another musical features to flashplayer—MIDI playback and midi device communication.
    I had tried to control playing MIDI file in flashplayer with the assistance of js, but met troubles at synchronous and cross broswers.
    I have publish my MidAs3 project at http://code.google.com/p/midas3/

  17. Adobe seems to think that sound is inconsequential. We have been forced to seriously consider Silverlight, due to the following unresolved issues:
    1) The problems with soundComplete
    2) ‘open’ is triggered incorrectly in IE (according to Adobe, I didn’t test it myself)
    3) lack of memory handling on used sound events
    4) lack of native playback for music encoded at 48khz (come on, this is as old as winAmp! and yes, I know that r115 resamples the music during playback, but it is far far from satisfactory. Timing is off, and sound cannot be started in the middle).
    5) Confusing support for different mp3 bitrates
    6) An overall feeling that sound is not a priority. For a music site, this doesn’t work well at all.

    Silverlight has been accused of being Windows Media Player rewrapped and shoved into a browser. Maybe so, but that means proper support (if bloated) for sound!

  18. This is extremely cool hack that allows to synthesize almost anything you want on the run. And so we can make precious music pieces for flash games \ applications in couple of kilobytes, like they do it in 64k demos.

    Hope the problem will be solved and the Earth will be saved.

  19. >Janosch Said…
    >Please vote for this bug at
    >http://bugs.adobe.com/jira/browse/ASC-3111
    >hope this is going to be fixed!

    Hey! the page ASC-3111 says the SOUND_COMPLETE BUG has been rejected in fact!

    the status of the bug has been ‘resolved’, but it does not mean that it’s been resolved by ActionScript Debug Team.
    It’s just put back to us, and they say that we should post the issue to the FlashPlayer Bugbase.

    Also Brent Baker commented we should report the bug more concretely .

    so why don’t you inform them of this problem from the following link!
    http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

    I’ll do that, because I really want to create AudioApplication in Flash!

  20. What do we want ONSOUNDCOMPLETE
    When do we want it…………

    when the sound has finished playing ;)

Comments are closed.