Closed VideogameScrapbook closed 5 years ago
Thanks for quertymodo fulfilling my request to add support for smpl chunk loop points for his version of the msu2wav tool, I've updated my request to make it clear the potential to update LoopingAudioConverter to support both inputting/outputting the MSU-1 format for SNES games.
Don't bother trying to import anything from my tools. It would be pretty trivial to add import/export functionality directly. The MSU-1 .pcm file format is a simple 8-byte header followed by redbook audio samples (44.1K, 16-bit, little-endian, stereo).
The header is: 4 byte file signature: 'M' 'S' 'U' '1' (0x4D, 0x53, 0x55, 0x31) 32-bit (little-endian) unsigned loop point (sample number)
The header sample number is the loop start point, the loop end is simply the last sample in the file.
All right, I'll look into it when I have time. Is the file extension (for output) just .pcm?
Yes, the extension for this format is just .pcm.
Also, there is nothing in the file itself that specifies whether a track does or does not loop. Non-looping tracks typically set the loop point to 0, but it's not required. The game itself is responsible for deciding whether to loop the track or stop playback when it reaches the end-of-file.
Is it OK if I treat all MSU-1 input files as looping, given the general purpose of Looping Audio Converter? Users can override it on a song-by-song basis with the "ask for all files" option.
That's entirely up to you. How would you treat, say, a .wav file that didn't have any smpl chunks? It would be pretty similar to that for MSU-1 files with a loop point of 0. The track might loop back to the very beginning or it might not loop at all, there's no way to tell for sure.
However, if you ever encounter a file with a loop point set after the last sample in the file, you can probably assume that it doesn't loop (I've never seen a file that does this, like I said, the normal convention is to use 0).
I've been thinking about changing the default setting to assume that files without looping information loop from start to end. In that case, I could treat MSU-1 files with loop points of 0 the same way.
There have been many MSU-1 looping audio packs created for SNES games (http://www.zeldix.net/f45-msu-1-hacking). These packs could be used as a source for easily creating other looping audio formats for use in other games or audio players. In addition, looopable audio on Smash Custom Music could be used as a source to go the opposite direction, acting as a source for new MSU-1 hacks for SNES games.
There are already command line tools with source code that handle importing from and exporting to this format:
By incorporating these two tools, I believe it would be low effort for somebody to add import/export support for this format.