0

I have two audio-files and want to mix them with SoX using the -m, --combine mix option.

Both files have the same bpm, but not the same length, meaning I need to loop one file, but not the other. Does anyone on here know (if possible) how to do this?

I managed to create a looped file with sox by using the repeat option, but I can not use this option only on one input file,

somewhat like:

sox -m repeat 4 one-bar.flac four-bar.flac outfile.flac

also a pipe does not work:

sox one-bar.flac repeat 4 | sox - -m four-bars.wav output.flac

I get:

sox FAIL sox: Not enough input filenames specified

sox FAIL formats: can't determine type of  `-'
1

got to use the pipe option -p, --sox-pipe otherwise the first command is not passing anything to stdout and the second command only gets one file for mixing:

sox FAIL sox: Not enough input filenames specified

Using a pipe with the -p option does the job:

sox one-bar.flac -p repeat 4 | sox - -m four-bars.wav output.flac

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.