Which audio file format is best?

Started by Kyrridas, Wed 20/01/2021 04:32:55

Previous topic - Next topic

Kyrridas

i know this is a simple one, and its probably more of a techy question than an AGS-specific question, but im just wondering what kind of audio files i should be using. all i can find in the forums are people with audio related coding problems, and the manual simply states which formats are supported.

is there a clear winner? or is it more of a pro/con situation?

i know the difference between the file types, i'm just wondering how they interact with AGS? if im doing 16-bit sound, does the compression even matter? or would it be even more pronounced? maybe do mp3s for long music tracks, but wavs for short sound effects?

any insight/experience would be great, thanks

Gilbert

OGG and OGG only.

Unless you also need sequenced music, where MIDI and MOD come in place.

eri0o

NEVER use MIDI, it simply is the worse format of all time since it doesn't ship the instruments it uses and chances are you are familiar with the instrument sound of a proprietary sample that is exclusive to one platform. Use literally any other format before using MIDI.

OGG is the best format if you want your game to sound exactly the same on anything.

Gilbert

No, MIDI is an industry standard, and its advantage is that the files are small. Anyway, to each his own, I'd rather use MIDI that may sound good when the user's end has a good enough synth, than MOD files with poor samples.

eri0o

#4
Current state of MIDI:

Browser: no support guaranteed, need a MIDI reimplementation in webassembly that will have terrible sound because there are no soundfonts. Soundfonts are HUGE. Prefer anything else, including mod, impulse tracker, literally anything else.

Android: Only supported beyond API 20 and it's not terribly good either, all focus is on MIDI equipment but not really playback. For now supporting it requires the app to not support things below this level of API.

Windows: not sure where to start, anyone is welcomed to read MS documentation on the topic to see how things got worse over time.

Linux: no one uses remotely similar soundfonts, there's no standard, how it will sound? No idea.

MacOS and iOS: haven't looked into those yet, but I expect things to be less terrible there.

Overall, the only way to make it not the worst format in existence in AGS would be full reimplementation of it in code (including the huge amount of extensions on the file format) and also adding some standard AGS soundfont that will make the runtime huge.

Please, use MIDI only at production stage, but not as something to be released. There's no MIDI standard. Too many extensions.

Kyrridas

okay, dont use midi. midi bad. got it. (and AGS can only play a single midi file at a time, right? im pretty sure i read that in the manual)

anyway, i did some digging into ogg, because i honestly wasnt too familiar with it. long story short, its more efficiently compressed than mp3s, so slightly smaller file sizes and slightly higher quality sound. apparently it also does away with mp3s moment of silence between track loops. so thats nice.


my final decision is that i think i agree with Gilbert. there's probably some further discussion that can be had about the what works best for what, but i think ogg is good for AGS. or at least for my games. reduced file size is always good, and if there is compression...well, that just makes it seem all the more retro.

thanks for the suggestion!

Danvzare

Quote from: eri0o on Wed 20/01/2021 13:03:22
Soundfonts are HUGE.
No they're not. Or at least, it doesn't appear to me as though they are
Some of the best ones definitely are, yes. But GZDoom comes with a 3.13mb soundfont, that actually sounds quite pleasing to the ear. If anything, it sounds like the default windows soundfont, but with some extra reverb.
Maybe it's because I'm unfamiliar with how soundfonts work, but that clearly looks like a small soundfont to me.

SMF spam blocked by CleanTalk