Home | Rules and Guide | Sign In/Create Account | Write a Post | Reddit | #ludumdare on irc.afternet.org (Info)

Thanks for making Ludum Dare 26 AWESOME! See you in August!

Ludum Dare 26 — April 26-29th, 2013
[ Results: Top 100 Compo, Jam | Top 25 Categories | View My Entry ]
[ View All 2346 Games (Compo Only, Jam Only) | Warmup ]

[ 10 Sec Video Compilation (x3) | 260 Game Video Compilation | IndieCade Deal | Ludum Deals (Unity Deal Ends Soon!) ]


sfxr for Haxe

Posted by
September 14th, 2009 9:22 pm

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: ,

8 Responses to “sfxr for Haxe”

  1. noonat says:

    You are a god. I have been meaning to do this for ages.

  2. ExciteMike says:

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

  3. Tom says:

    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.

    http://superflashbros.net/as3sfxr/

    http://code.google.com/p/as3sfxr/

    Tom-

    • Wiering says:

      That’s great!

      I just added the function setSettingsString to the haxe version to use strings from your app.

      I also added a transpose function to set the pitch of a sound to an actual note (so you could use them to play simple tunes).

  4. DrPetter says:

    Cool. Now will you do complete flash playback code for musagi songs please? ;)

  5. noonat says:

    Haha, the bit.ly link for this page is OMGv1.

  6. [...] Posted by dobosbence in Projects. Tagged: Flash, haXe. Leave a Comment Ludum Dare » Blog Archive » sfxr for Haxe [...]

Leave a Reply

You must be logged in to post a comment.


All posts, images, and comments are owned by their creators.

[cache: storing page]