I have 2 audio files for primary and background music that I want to merge (not concatenate). The final audio file should be as long as the primary file, and if the background music is shorter then it should repeat.
If there a Linux command or a Python library that can be used to do this? Sox supports merging, but does not appear to allow repeating the background audio.