As promised, I’ll answer your questions wolfraider:
Q: What format should the sound files be?
A: Exempt from SDL_mixer (API used to manage audio devices and play music) documentation:
SDL_mixer supports playing music and sound samples from the following formats:
- WAVE/RIFF (.wav)
- AIFF (.aiff)
- VOC (.voc)
- MOD (.mod .xm .s3m .669 .it .med and more) requiring libmikmod on system
- MIDI (.mid) using timidity or native midi hardware
- OggVorbis (.ogg) requiring ogg/vorbis libraries on system
- MP3 (.mp3) requiring SMPEG or MAD library on system
- FLAC (.flac) requiring the FLAC library on system - also any command-line player, which is not mixed by SDL_mixer…
Q: What bit and sample rates should we use?
A: First another exempt of SDL_mixer documentation: “It supports 8 channels of 16 bit stereo audio, plus a single channel of music, mixed by the popular MikMod MOD, Timidity MIDI and SMPEG MP3 libraries.”
Also:
- frequency has been set at 44100 Hz;
- format has been set as AUDIO_S16LSB = Signed 16-bit samples, in little-endian byte order;
- channels has been set to 2 = stereo;
- chunks size was set to 2048 bytes;
For anything else you’d have to check the SDL_mixer documentation
Q: What final file size do you recommend, since there are going to be a lot of files?
A: There is no recommendation for that, bigger the files bigger the soundpack itself. However many sfx are either short sounds or short looped sounds. Also you can reuse sound files for different sfx ids and variants just pointing them from the JSON file.
Q: What LUFS levels should we target? Do we use same level music is mastered?
A: There are no directions on that field, other that common sense requires at least some general equalizing of the sound levels of the sfx, to avoid situation in which some drastically stand out. Game has volume settings for music, sfx, and ambient sfx (most looped environmental sfx).
Q: Do I understand this example correctly: smash_success smash_glass_contents|(table) means sound of smashing glass on the table? And what do furniture and terrain mean in this example: open_door default|(furniture)|(terrain)?
A: Ensure you have read the whole SOUNDPACKS.md documentation file.
And the answer would be: the pair of “id” and “variant” always work together, so wherever in documentation you see:
smash_success smash_glass_contents
you see id followed by a variant exactly as it’s written (static variant) - in this instance sound of breaking glass items being smashed to pieces
smash_success <furniture>
you see id followed by a placeholder of a furniture id (dynamic variant)
- Different variants are separated by “|” to indicate that they all belong to the id that is first in line.
- Every dynamic id is equal to respective id of the object that can be found in respective json files, for ex. furniture.json
Let me explain on an example exempt from a JSON file where you will be linking sfx ids & variants with respective sound files:
{
"type": "sound_effect",
"id" : "smash_success",
"variant" : "f_bigmirror",
"volume" : 100,
"files" : [
"env/smashes/smash_glass1.ogg",
"env/smashes/smash_glass2.ogg"
]
},
{
"type": "sound_effect",
"id" : "smash_fail",
"variant" : "f_bigmirror",
"volume" : 100,
"files" : [
"env/smashes/hit_glass1.ogg",
"env/smashes/hit_glass2.ogg",
"env/smashes/hit_glass3.ogg"
]
},
{
"type": "sound_effect",
"id" : "smash_fail",
"variant" : "smash_glass_contents",
"volume" : 100,
"files" : [
"env/smashes/break_glass1.ogg"
]
},
Notice how:
- ids and variants change,
- variants are defined for the same id
- many optional files can be linked to a set of id+variant - they will be played at random to add variety
Remember that "variant" : "default",
can be defined. It’s useful for dynamic variants - if no sound is defined for specific variant the ‘default’ will be played for a given ‘id’. So if someone adds a new furniture that would not have a specific bash sound at the time of the update, bashing it will not be soundless if default sound is in place.
I’d be happy to answer any more questions that might emerge.