Here is a port of the core SFXR sound effects generator with added reverb (optional). It might be good to have as a generator inside a game since it can save some space. You can also wrap a GUI around it if you like.
http://www.springworldgames.com/sfxrjavaUse the class like this:
1 2 3 4 5 6
| SFXRData data = new SFXRData(seed);
data.resetSample(false); |
You can also generate random coin/pick up/explosions/lasers like this:
1 2 3 4 5
| SFXRData data = new SFXRData(seed); data.random(1); data.resetSample(false); |
For more instructions, see the original SFXR page:
http://www.drpetter.se/project_sfxr.htmlFor the reverb stuff there are a couple of parameters:
* wet1 and wet2 controls how much reverb to use
* dry is how much of the pure sfxr signal that should get through
* room_size is quite obvious perhaps
* postAmp is how much the resulting signal is amplified