Hey guys,
TL;DR: ported well-known audio effect generator API to Unity. Playable web example is here and open-source code is here. Would love to hear comments and criticism on it since I’m new to the Unity platform.
–
Long description:
I’ve slowly been learning Unity for the past few months and I finished something that I’d love to have some feedback on.
In preparation for upcoming Ludum Dare competitions, I decided to convert the sfxr engine for real-time audio generation to Unity/C#. I wanted to be able to play audio inside Unity without static audio assets, and doing little “changes” to the audio during playback, adding some variation to it…
I ended up porting Thomas Vian’s as3sfxr API (which was based on the original sfxr) to Unity. This is a library that lets you play audio with mutations and stuff, as well as create instances of audio that is cached. The difference I suppose is that I made it always generate on a separate thread/cache/etc so it should have near zero impact on gameplay execution (hopefully).
I have a (horrid) prototype/game thing that attempts to explain what the thing is about:
http://hosted.zehfernando.com/ludumdare/usfxr/
Notice this game contains no audio assets, as everything is generated in real time using a parameter string. And since it has “mutated” mode by default, all the audio effects played will be slightly different… just to make things less repetitive (watch this video for a more inspiring explanation).
The code for usfxr (and the sample game, and a few other samples), as well as a lengthier description, is here:
https://github.com/zeh/usfxr
(Update June 20th 2014) It’s also available as a free asset store package, so it’s easier to install it from Unity itself (it also comes with a manual):
I’d love to hear some criticism of… well, anything. Code, example organization, installation instructions. I’m not new to programming, but I don’t have that much experience with Unity (and somewhat limited with C# as well), so I might have screwed things up a bit.
I’ll hopefully add it to the asset store (for free) after it’s done. Just want to get the thing to be a bit more polished before going “public”. So any input is appreciated.
Thanks!
