SoX funtions ( Pad, trim, fade) in loop in combination with merge

38 Views Asked by At

I would like to modify a wav file, like in the example.

This works like it should. But now, I would like to add a beep sound at the end of the modified file without generating a new file in the folder, trimmed/filtered/beeped!filename!.wav. Can I combine the two actions in one?

sox.exe -n -r 44100 -b 16 -c 1 beep.wav synth 0.7 sine 1000

for %%i in ("*.wav") do (
   set "filename=%%~ni" 
   set "filename=!filename: =_!"

   sox.exe "%%i" "trimmed/filtered/!filename!.wav" channels 1 trim 0 -0.5 fade 0.1 -0 0.5 pad 0 1 norm -1

   sox.exe trimmed/filtered/!filename!.wav beep.wav trimmed/filtered/beeped!filename!.wav
)

I tried it with two seperate commands, and a temp file, without the beep.

0

There are 0 best solutions below