Firehammer Audio is here!
Firehammer Audio is a new system and way to handle your audio needs in Gamemaker Studio 2(2.3+). It has plenty of functions to handle things you would normally have to write extra code for. The three primary focus points are providing functions for playing music, sound effects, and 3d sound. The music system handles things like tracking the current music playing, fading between tracks, and more. The sound system has things for creating automatic variation when playing sound effects, so you no longer have to avoid things like footstep sounds since now they won’t be so repetitive. Finally, the 3d sound system combines the 3d audio system with the sound effects goodies, along with automatic tracking of instances for the listener and 3d sound emitter positions. Finally, there is a whole system for volume control, and a sound grouping category system making things easier to handle. Note that this system is all done with native GML. There are no external code sources, DLLs, or anything of that sort. This means that the system will work anywhere that gamemaker will work, excepting certain things that simply don’t work on certain platforms(HTML5 is notorious for this). The following list contains a breakdown of the included features.
· Music system
· Plays and tracks music
· Crossfades between music tracks
· Swapfades between like(but different music tracks)
· Can automatically remember what point of the track the music is on when you pause or switch tracks, and will automatically start the music there(unless you tell it not to).
· Can also remember which music was the last one you were playing and can begin playing that one again without you specifying it
· Supports loop points, where the music will loop between the set points automatically
· Automatic music changes when you change rooms Can also remember which music was the last one you were playing and can begin playing that one again without you specifying it
· Sound system
· Automation of volume and pitch variance when you play a sound
· Automation of choosing different actual sound effects for a single sound(in combination with pitch and volume variance), including 3 different behaviors for choosing which sound to play
· Easy usage of the mentioned sound systems for 3d sounds
· Automatic instance tracking for both the listener and 3d sound emitters(both position and velocity)
· Can make sounds fade out over time instead of stopping mid-loop, useful to avoid clipping noise that happen with instant stops not at full-zero of the sound wave
· Volume system
· Expansive volume control, starting with global Master Volume, down to Music Volume, and then Sound Category Volume
· Automatically adjusts music and sounds that are playing(as long as they are looping) when you adjust volumes.
· Automatic saving of all volume settings into a file, which is then loaded the next time the game is ran, if you choose to leave the setting on.
· Category system
· Which groups like sounds that can be controlled as a group, including setting volume and pausing all looping sounds within a category(and resuming them).
· Basic settings are accessible via single script with #macros.
· Extensive Debug Mode(enabled by default) which gives nice messages if you make a mistake calling the system's functions so you know exactly what happened. This can be turned off and the GML compiler will compile out all of those safety checks for performance.
· Easy identification of which arguments to a function are optional, using an underscore before the names.
· ZERO syntax errors as shipped. I applied workarounds/tricks to reference optional arguments to functions so that you never get unused argument errors, and I make sure to reference all functions and macros that aren't already referenced from within the system so you don't get syntax errors for unused functions/macros, even if you delete the examples.
· Uses a double underscore prefix to all internal functions and objects so that only what you need to use shows up in the code editor's auto-complete window.
· Uses "fhAudio" as a prefix for all functions that you will ever need to call so they can easily be found and filtered in the auto-complete window
· Three examples that show the basics of what the system handles for you
Support is provided via the Yoyogames forums(user "kburkhart84"), via e-mail "[email protected]," or on the Firehammer Games Discord server https://discord.gg/6VrZkP2
o Switched to use the proper optional argument declaration for all functions that have them And removed the workarounds for removing false syntax errors due to previously not having proper optional arguments o Added 3d audio falloff model optional parameter to fhAudioInitialize() o Removed redundant function fhAudioSoundFadeout(), adding _fadeTime functionality to fhAudioSoundStop() o Made all default fade times be 1000(when you don’t send that optional argument) o Made sound effects use a string name you send as an argument instead of returning an identifier o Removed redundant function fhAudioSoundFadeout() and added optional fadetime argument to fhAudioSoundStop o Added music Loop Point feature o Added automatic music change when room changes feature