summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--export-all.pl28
-rw-r--r--mix-wav.sh25
2 files changed, 53 insertions, 0 deletions
diff --git a/export-all.pl b/export-all.pl
new file mode 100644
index 0000000..48670b5
--- /dev/null
+++ b/export-all.pl
@@ -0,0 +1,28 @@
+#!/usr/bin/perl
+
+use strict;
+
+sub process($){
+ my ($dir) = @_;
+ my @exp = split(":", $dir);
+ my $name = $exp[4];
+ my $ep;
+ my $path = "results/" . $dir . "/";
+ my $chex = $path . "checkpoints/";
+ return 0 unless -e $chex;
+ my $sampz = $path . "samples/";
+ return 0 unless -e $sampz;
+
+ print $name . "\n";
+ system('/bin/bash', 'mix.sh', $path, $name);
+}
+
+opendir RESULTS, ("results/") or die $!;
+# my @results = sort {(stat $a)[9] <=> (stat $b)[9]} readdir(RESULTS);
+my @results = sort {$a cmp $b} readdir(RESULTS);
+closedir RESULTS;
+
+for my $result (@results) {
+ next if $result !~ /exp:/;
+ process($result);
+}
diff --git a/mix-wav.sh b/mix-wav.sh
new file mode 100644
index 0000000..ceb4394
--- /dev/null
+++ b/mix-wav.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <results/exp\:experiment> render_name"
+ exit
+fi
+
+dir=$1
+name=$2
+now=`date +'%Y%m%d'`
+
+echo "rendering $name"
+
+cd "$dir/samples"
+for i in *
+do
+ if [[ -d $$i ]]; then
+ cd $i
+ echo $i
+ #../../../xfade.sh
+ #sox mix.wav norm.wav norm
+ #mv norm.wav "../../../../wav/${i}.wav"
+ cd ..
+ fi
+cd ../../..