freaq
A downloadable thingy for Windows
freaq is a single GameMaker script that adds 102 sound effects without any audio files. Just add the one script, and you will have 102 new functions that play unique sound effects. Volume control is built in, along with adjustable randomized pitch variation to keep things sounding interesting.
If you are in the prototyping stage or are participating in a game jam, freaq is a great choice. It is the fastest and easiest way to add sound effects to your projects. It's just one script!
There are some memory usage concerns with this, and HTML5 is not supported well. Please see the "Caveats" section for more info.
Usage
To adjust the volume, use freaq_set_volume(volume)
and freaq_get_volume()
. The default volume is 0.75 (with max volume being 1).
The sound effects in freaq (with a few exceptions) are played with a randomized pitch between 0.95 and 1.05. To adjust these numbers, use freaq_set_random_pitch_values(min, max)
. If you don't want any randomization at all, you can do freaq_set_random_pitch_values(1, 1)
.
Sounds are played using individual functions starting with freaq_play_
and then the sound name. So if you need an explosion sound, you can do freaq_play_explosion()
. You can use GameMaker's auto-complete to browse all of the sounds available.
Each one of these playback functions accepts two optional arguments, volume
and pitch
. When you provide these arguments, they override the volume and randomized pitch that you setup with the previously mentioned functions. For example, freaq_play_explosion(0.5, 2)
would play the explosion sound at half volume, and double the pitch.
Caveats
Under the hood, freaq uses audio buffers to create all of the sounds. Audio buffers take up a good amount of memory and it adds up quick. To account for this, freaq only creates the audio buffers for a sound the first time you play it. For most sounds this works transparently, but some bigger sounds can cause the game to stutter the first time it is played.
To fix this, you can use the freaq_preload_sound(...sounds)
function. You can pass in multiple sound names to preload them, or just one. Following the example above, if you wanted to preload the explosion sound, you would do freaq_preload_sound("explosion")
. You can also pass the keyword all
to preload everything, but I would avoid doing this unless you have a good reason, as loading every single sound can spike your memory usage to over a gigabyte (yikes).
Because memory usage is a concern when using it, I wouldn't recommend depending freaq for large games. Also, HTML5 is unfortunately not supported well due to audio buffers behaving differently on the web. It may be possible to improve support in the future, but I haven't looked into it yet.
More info
If you want to see more detailed documentation & technical details, you can view my full write-up on my website: https://topheranselmo.com/docs/freaq
Status | Released |
Category | Other |
Platforms | Windows |
Author | topherlicious |
Tags | GameMaker |
Download
Click download now to get access to the following files:
Comments
Log in with itch.io to leave a comment.
Ha ha this is great.
There's some error in the call_later function when exporting. Just tried to solve, but unsucess.
What's the error and what version of GM are you using? freaq was made using IDE 2024.4.1.152 and runtime 2024.4.1.201