I want to be able to play module music in Godot which gives access to both a huge variety of tunes and also drives game’s size down since module music is basically like MIDIs, but they include instrument samples used, meaning they’re pretty small (conventional wisdom for OGG/MP3 is about 1MB per minute of audio, whereas module music can be as small as few hundred kilobytes for an hour of audio or more, it all depends on the amount of samples used).
How about this addon?
https://godotengine.org/asset-library/asset/841
Unfortunately the list of supported formats isn’t too great, Impulse Tracker for one isn’t on the list, for comparison, this is the full list of supported module formats in libopenmpt:
mptm mod s3m xm it 667 669 amf ams c67 dbm digi dmf dsm dsym dtm far fmt imf ice j2b m15 mdl med mms mt2 mtm mus nst okt plm psm pt36 ptm sfx sfx2 st26 stk stm stx stp symmod gtk gt2 ult wow xmf gdm mo3 oxm umx xpk ppm mmcmp
Source: libopenmpt and openmpt123 - FAQ
I did extention for self using libxm
(support only XM, for windows), in theory MilkyTracker can convert any other to XM, but it a very big job to compile extention for all platforms, also it won’t work in web without recompile whole Godot with special flag.
If you want do it self, look how AudioStreamGenerator
class made, it’s a good start point