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/sfxrjava
Use the class like this:
SFXRData data = new SFXRData(seed); // Or SFXRDataWithReverb(seed)
// Set parameters here.
// Then call resetSample() to set all internal variables
data.resetSample(false);
You can also generate random coin/pick up/explosions/lasers like this:
SFXRData data = new SFXRData(seed); // Or SFXRDataWithReverb(seed)
data.random(1); // Use 0-6 here for different types. See source code for details.
// Then call resetSample() to set all internal variables
data.resetSample(false);
For more instructions, see the original SFXR page:
http://www.drpetter.se/project_sfxr.html
For 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