We’ve got perfectly seamless loops using the FMOD Designer music system, everything works fine when building with the bank compression set to PCM.
Now, when setting the bank compression to MP3, during the game we’re getting sound artifacts on the music system when a segment loops or transitions to the next segment.
Is there anything I can do to avoid this? Like pre-encoding and/or padding the segments’ files used by FMOD Designer?
I’m comfortable with using the command line to pad/cut/process samples in audio files, but since I’m not sure what is happening during the build process and then at runtime, any tips on a gapless MP3 music workflow – or simply knowing if it’s possible – would help.
Note that I’d like to use MP3 because unlike the other compression formats available in Designer (currently using 4.38.02), MP3 manages to compress without audible degradation (apart from the gaps).
- phest asked 5 years ago
I’ve run into the same problem and discussed this with the FMOD guys. With MP3, I was told that it’s difficult/impossible to predict when a loop/transition will be glitchy. Assuming your loops/segment cuts occur on a zero crossing and the sample rate is the same sample rate at which FMOD runs on the target platform (e.g. on the PS3, FMOD runs at 48kHz), then the only thing that has solved the problem for me is to abandon MP3 for the loops/segments that are problematic, or tweak the bpm/tempo until you can ‘fool’ FMOD into triggering the loop/next segment such that the glitch/artifact/gap goes away. I’m sure neither of these are great solutions for you.
I should mention that I’ve never improved a loop/segment transition by changing the sample rate to the engine sample rate (e.g. switch a song from 44.1kHz to 48kHz, in the case of the PS3). As for abandoning MP3, ADPCM is reliably gapless, but generally sounds worse (as you probably know). You could see if MP2 helps, but it probably won’t. CELT hasn’t been much better than MP3, if I recall correctly. As for tweaking the tempo/bpm, I’ve had some success with this, but it’s incredibly tedious and may be fruitless. If it were me, I’d just switch the problem files to ADPCM (hopefully it’s not too many). In the past, I preferred the noisier compression to having gaps in my loops/transitions.
- capybara answered 5 years ago
Thanks for the info.
Happily, Vorbis has fixed the problem (fmod enabled Vorbis and CELT on iOS on the development branch), interactive music is now seamless . My current setup for iOS is music on a Vorbis "Stream from disk bank", and sound effects on a PCM bank. I’ve only tested it on an iPad 2 shortly, but so far it sounds great. Thanks fmod team!!!
- phest answered 4 years ago
Please login first to submit.