diff options
-rwxr-xr-x | chordspeller.pl | 2 | ||||
-rwxr-xr-x | find_key | 4 | ||||
-rwxr-xr-x | find_tuning | 2 | ||||
-rwxr-xr-x | renumfiles | 16 |
4 files changed, 17 insertions, 7 deletions
diff --git a/chordspeller.pl b/chordspeller.pl index 66b498d..d4215d1 100755 --- a/chordspeller.pl +++ b/chordspeller.pl @@ -393,7 +393,7 @@ our @tuning_list = ( [ 'cv', 'cgda', 'Cello or Viola' ], [ 'v', 'gdae', 'Violin' ], [ 'vs', 'adae', 'Violin (scordatura)' ], - [ 'u', 'gcae', 'Ukulele' ], + [ 'u', 'gcea', 'Ukulele' ], [ 'ub', 'dgbe', 'Baritone Ukulele' ], ); @@ -55,8 +55,8 @@ $0: Find key of music in audio (or maybe video) files. Usage: $0 [-m|-M] file.wav [file.wav ...] --m: Force all keys to minor --M: Force all keys to major +-m: Force major keys to relative minor +-M: Force minor keys to relative major EOF exit 0; } diff --git a/find_tuning b/find_tuning index cbb4d73..aee1be3 100755 --- a/find_tuning +++ b/find_tuning @@ -28,7 +28,7 @@ for(@ARGV) { $infile = $_; } else { $infile = "/tmp/find_tuning_$$.wav"; - $rm_infile = 1; + #$rm_infile = 1; warn "Decoding $_ with mplayer\n" unless $quiet; system("mplayer -really-quiet -benchmark -vo null -ao pcm:fast:file=\"$infile\" \"$_\""); } @@ -16,11 +16,21 @@ if($ARGV[0] =~ /^\d+$/) { } $pattern = $ARGV[0] || usage; -$pattern =~ s/\%d/%02d/; +usage if -f $pattern; + +shift; +if(@ARGV >= 1000) { + $places = 4; +} elsif (@ARGV >= 100) { + $places = 3; +} else { + $places = 2; +} + +$pattern =~ s/\%d/%0${places}d/; if($pattern !~ /\%\d+d/) { - $pattern = "${pattern}_\%02d.jpg"; + $pattern = "${pattern}_\%0${places}d.jpg"; } -shift; @files = @ARGV; usage unless @files; |