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.
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