summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdatasets/dataset.pl17
-rwxr-xr-x[-rw-r--r--]export-all.pl0
-rwxr-xr-xresults/xfade.sh4
3 files changed, 16 insertions, 5 deletions
diff --git a/datasets/dataset.pl b/datasets/dataset.pl
index cd068bf..568928c 100755
--- a/datasets/dataset.pl
+++ b/datasets/dataset.pl
@@ -3,8 +3,8 @@
use strict;
use Getopt::Std;
-our $opt_c; # normalize the file
-our $opt_j; # jitter the pitch of each subsample by N rather than repitching big chunks
+our $opt_c; # DON'T normalize the file
+our $opt_j; # jitter the pitch of each subsample by N 1/100th semitones rather than repitching big chunks
getopts('cj:');
print "<<<< DATASET >>>>\n";
@@ -78,9 +78,16 @@ sub process($) {
next if /^\./;
print "$i...\n" if ++$i % 100 == 0;
my $fn = $_;
- my $n = rand( 2 * $opt_j ) - $opt_j;
- system 'sox', $name . '/' . $fn, $name . '/z_' . $fn, 'pitch', $n;
- system 'rm', $name . '/' . $fn;
+ my $in_fn = $name . '/' . $fn;
+ my $out_fn = $name . '/z_' . $fn;
+ my $n = int rand( 2 * $opt_j ) - $opt_j;
+ system 'sox', $in_fn, $out_fn, 'pitch', $n;
+ my $rep = `soxi $name/z_$fn`;
+ if ($rep =~ /352800/) {
+ unlink $in_fn;
+ } else {
+ unlink $out_fn;
+ }
}
closedir $dh;
}
diff --git a/export-all.pl b/export-all.pl
index e840729..e840729 100644..100755
--- a/export-all.pl
+++ b/export-all.pl
diff --git a/results/xfade.sh b/results/xfade.sh
index 55d343d..accaae7 100755
--- a/results/xfade.sh
+++ b/results/xfade.sh
@@ -4,6 +4,10 @@ limit=10000
for file in `ls *.wav | sort -V`
do
+ if [ "$file" = 'mix.wav' ] || [ "$file" = 'out.wav' ]
+ then
+ continue
+ fi
i=$((i+1))
if [ $i -eq $limit ]
then