

The final path of the sounds should be "garrysmod/sound/soundfont/mysoundfont.sf2/*.wav". txt extension from each sound file, then move the whole "mysoundfont.sf2" folder into "garrysmod/sound/soundfont". This will dump out the sounds into your garrysmod data folder, with the naming convention "garrysmod/data/mysoundfont.sf2/*.wav.txt". I've included a Lua function that can do most of this for you, but you still have to do a little legwork yourself.įirst, you must place the soundfont into your garrysmod folder. The sounds need to be extracted, have their sampling rate changed to something that the Source Engine will play, saved as *.wav files, and placed in the appropriate folder. This addon supports custom soundfonts, however, the Source Engine cannot play sounds directly from the soundfont. This is due to limitations in Source, and me being lazy.ĪDVANCED USERS ONLY! Using custom soundfonts: The implementation of the SoundFont 2 spec is not complete.An HTML5 version of the MIDI player using the same methods produces correct output. The cause of this is unknown, but is probably the fault of Source.

This is due to Source forcing what should be a floating point number into an 8-bit integer. The pitch of a note will not always be accurate.


Several issues with sound playback in the Source engine prevent any improvements. Known Issues:This MIDI player is far from perfect.
