Another approach for sound loops in MP3
Reply #4 – 2005-08-20 17:08:19
With a slightly more complex procedure (than the one that started this thread), I have come up with an MP3 file that contains a 1 second beep (a sine wave of approx. 1 kHz). When concatenating another copy of this file at its end, I get a 2 second beep. Add one more, and it gives a 3 second beep. Gapless, clickless. I concatenated the files with the DOS copy command; specifically:copy /b f1225.mp3 + /b f1225.mp3 longbeep.mp3 When playing the resulting file in WinAmp, I heard no click, plop or gap. WinAmp cannot possibly have used a "sample skipping" trick, because it does not expect a LAME tag halfway the file. In any case, I know that the f1225.mp3 file has no LAME tag (I stripped it off after encoding). When opening the file in a home-made wave editor that uses the Windows ACM to read MP3 data, I saw no glitch at the junction point. In conclusion, I am convinced that the file f1225.mp3 is loopable. I am not sure whether this trick works in general, or whether it just works with sine waves. Side note 1: It is not very well known, but the copy command can concatenate files with the "+" operator between source files. The "/b" sets binary mode for each source file (this is required; otherwise "copy" assumes text files and inserts a carriage-return/line-feed sequence in the middle of the output file). Side note 2: the original file must not have a glitch/plop when played in a loop, for obvious reasons. This is why I chose a frequency of 1125 Hz: it fell out just right for a 1 second beep.