|
From: Michael C. <ch...@mc...> - 2008-01-10 07:16:54
|
On a different topic Chris Bagwell wrote (09 January 2008 3:16) :
> There is no single effect in SoX to do this but it contains enough
> building blocks to get it done.
The wonder of SoX is the "building blocks" and the infinte ways they
can be arranged. However my 'workaround' for splitting multi-track files
is becoming increasingly messy (especially when the number of tracks is
into double figures).
I would like to:
1) Extract a single track from a multi-track file.
in.wav --> out-track-23.wav
2) Split a multi-track file:
in.wav --> out01.wav, out02.wav, ..., out99.wav
Apologies if I have missed something, but thus far my messy workaround is:
<CODE>
my $on = " square fmod 10 0 0 100" ; # mutiply by 1
my $off = " square create 10 50 0 0"; # replace with 0
my %off; $off{0} = " ";
for ( my $n = 1 ; $n < $channels ; $n++ ){ $off{$n} = $off
x $n }
for ( my $n = 1 ; $n < $channels + 1 ; $n++){
my $k = $n -1;
my $l = $channels - $n;
SoX ( "$file -c 1 $tdir/tmp.wav synth 0
$off{$k} $on $off{$l} " );
# etc., etc. (rename tmp.wav, etc.)
</CODE>
This is so messy I tend to think I have missed something!!
Thanks,
Michael
|