Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: SoX command to batch insert (Read 1096 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

SoX command to batch insert

Hello,
Is there a single SoX command to batch insert a short audio into a whole directory of music/album files?

I do not know anything about SoX.  It is installed on my Linux MInt.

Thank you!


Re: SoX command to batch insert

Reply #1
Sox can be used to record, synthesize or edit audio files, the exact invocation of the command you'd use depends on precisely what you want to do. It can write it's output to any available file-system with appropriate permissions.

The way you ask about batch inserting an audio file in to a directory (presumably several directories) seems more like a task for a file manager or  script to manipulate the file system,- without any need for an audio processing tool like sox, which would be more appropriate for say batch trimming the silence from the end of a file, or even concatenating additional audio.

e.g. find all directories  beneath  ~/Music/ripped/  and recursively copy "irippedthiscd.mp3" to each of them -- seems like what you asked for but needn't involve anything that actually manipulates audio, except perhaps creating the additional file (ideally once as a separate task, before starting batch processing). Could be done in a one-liner with find and exec, or a shell loop that gets as complex as you like.

versus

find every WAV file, normalize to -6dBFS, and trim off the last 2 seconds of each, which would be almost text-book Sox usage

Certainly it's possible to combine the two.  If you could explain clearly precisely what you want to do (with examples if possible) you're more likely to get a more helpful response.