aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2020-07-05 21:13:12 -0400
committerB. Watson <yalhcru@gmail.com>2020-07-05 21:13:12 -0400
commit0af243616ea2870796382d778dc1281121714288 (patch)
tree84fd73c496b3adb3c3486e8f8754c36c73d12f83
parent94ea7a8cd41b5b0cebf2606f4319ca5050e80520 (diff)
downloadmisc-scripts-0af243616ea2870796382d778dc1281121714288.tar.gz
Minor updates from ~/bin
-rwxr-xr-xchordspeller.pl2
-rwxr-xr-xfind_key4
-rwxr-xr-xfind_tuning2
-rwxr-xr-xrenumfiles16
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' ],
);
diff --git a/find_key b/find_key
index 485e728..5e5e035 100755
--- a/find_key
+++ b/find_key
@@ -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\" \"$_\"");
}
diff --git a/renumfiles b/renumfiles
index 28ff2b9..1f57776 100755
--- a/renumfiles
+++ b/renumfiles
@@ -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;