|
From: Erich E. <er...@ec...> - 2015-07-13 04:22:32
|
Am 12.07.2015 um 22:20 schrieb forget color: > I want to reprocess parts of a file after I already did something to it. > > For example, let's say I have a 5 second file and I want to adjust the > speed of seconds 0-3 to 1.02 and, after that adjustment, I want to > adjust the speed of seconds 0-2 to .98. So in trim notation what I'd > want is something like: > > play in.wav trim 0 3 speed 1.02 : trim -3 3 speed 0.98 > > But I can't use a negative number as the first input to trim. > > I could accomplish it with this: > > sox in.wav tmp1.wav trim 0 3 speed 1.02 > sox tmp1.wav out.wav trim 0 3 speed 0.98 > > But is there a way to do this in one command? I don't just want it for > one step back but constantly over an entire file. > > thx > fg > Hi, this won't work in one effects chain: Once you've cut it out with trim for re-speeding, the remaining samples go to another effects chain. Thus, samples from the first and second part can't be accessed from the same speed-command. However, what you can do is to use a second sox-command (as you did), but without a temporary file: sox in.wav -p trim 0 3 speed 1.02 : | \ sox -t sox - out.wav trim 0 3 speed 0.98 I assume, your command line is not, what you actually attempt, becaus 1) it doesn't fit your verbal description 2) you _could_ fit it in one line: sox in.wav out.wav trim 0 3 speed 1.02 speed 0.98 greetings, Erich |