How to make previews for multi-soundfile submissions?

How to make previews for multi-soundfile submissions?

qubodup's picture

You have multiple audio files, .wav files perhaps. You want a to merge them into one mp3 file and add 0.2 seconds of silence. There is one piece of sofware that will do the concatenating for you: SOX. Install it. Then run:

sox *wav preview.mp3

Unfortunately this will not work if the original files had different depth (8bit/16bit/24bit) rate (22050/44100/48000/96000) and channels (1 aka mono/2 aka stereo). Also, as far as I know, only mp3 files with a rate of 44100 can be played back by the flash player. All this means that a script with temporary files needs to be created for special cases or that maybe another tool can be used, that takes care of the mentioned problems. (sox seems to not allow converting all input files in one step without naming each of them, for this reason you also can't add silence after each file).

Do you know another tool that can do this? Otherwise I'll provide a dirty bash file sooner or later