sfxr for Haxe

I just finished porting sfxr to Haxe, but as a library instead of an app. Instead of generating a WAV file in sfxr and storing it in your SWF, you can now generate it while your program is loading, or the moment you need it. Why? To save space in the final SWF and to provide more flexibility, like being able to vary a sound a little depending on something in the game.

http://www.wieringsoftware.nl/ld/sfxrhx/

There are several ways to use it:
– you can start with making a sound in sfxr and save it as a .sfs file and use the load() function
– generate random sounds in your program and simply save the random seeds of the ones you like, use create(), randomize() and mutate()
– if you need to fine-tune a sound, you can also edit the individual parameters in your program
– use generate() to create the wave file in memory
– finally, use play() at any time to play it

Tags: haXe, sfxr

Comments

15. Sep 2009 · 03:23 UTC
You are a god. I have been meaning to do this for ages.
15. Sep 2009 · 03:28 UTC
Oh wow! I’ve been idly thinking of doing that for a long time now, only as3 instead of Haxe. Probably very easy to port to as3 from Haxe (or I can just load up a separate swf).
16. Sep 2009 · 11:35 UTC
I just finished porting sfxr to as3, with some bonus features too. Like your’s, you can use it as a library in your as3 projects to save on space, but I also ported the app.
DrPetter
16. Sep 2009 · 16:42 UTC
Cool. Now will you do complete flash playback code for musagi songs please? 😉
17. Sep 2009 · 18:45 UTC
Haha, the bit.ly link for this page is OMGv1.