aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xztunekey9
1 files changed, 7 insertions, 2 deletions
diff --git a/ztunekey b/ztunekey
index 3a3a7a9..61eb9e6 100755
--- a/ztunekey
+++ b/ztunekey
@@ -66,6 +66,11 @@ P="$( perl -MPOSIX=round -e "printf '%+2.2f', round(100 * ($S - $TUNING / 100))
newfile="$( echo "$bn" | sed 's,\.[^.]*$,'$P'.wav,' )"
mkdir -p ~/retuned
-rubberband --pitch $P $tmpfile ~/retuned/"$newfile" | zenity --progress --no-cancel $ZOPT --icon-name=ztunekey --text "Retuning $bn by $P semitones." --pulsate --auto-close
-audtool --playlist-addurl-to-new-playlist ~/retuned/"$newfile"
+cd ~/retuned
+rubberband --pitch $P $tmpfile "$newfile" | zenity --progress --no-cancel $ZOPT --icon-name=ztunekey --text "Retuning $bn by $P semitones." --pulsate --auto-close
+flacfile="$( basename "$newfile" .wav )".flac
+flac -f --delete-input-file -o "$flacfile" "$newfile" | zenity --progress --no-cancel $ZOPT --icon-name=ztunekey --text "Encoding $flacfile" --pulsate --auto-close
+id3cp "$file" "$flacfile"
+id3 -2 -t "%|%t||%_f|? (Retuned $P)" "$flacfile"
+audtool --playlist-addurl-to-new-playlist ~/retuned/"$flacfile"