We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hello, do you think it could work well?
#!/bin/bash
suffix="false" # Append the -432Hz suffix or not
oldIFS=$IFS IFS=$'\n' set -f # Deal with blanks and special characters in file names of the file command and in for loop
found=($(find . -name "*.mp3")) # Find the files in the current directory
IFS=$oldIFS set +f filename=""
for file in "${found[@]}"; do # Iterate the found files
mv "$file" "$file.tmp"
if $suffix == "true"; then filename="${file%.mp3}-432Hz.mp3" else filename="$file" fi
ffmpeg -loglevel 8 -i "$file.tmp" -af asetrate=43200,atempo=1.00,aresample=43200 "$filename" rm "$file.tmp" echo "Pitched $filename" done
The text was updated successfully, but these errors were encountered:
something like that could work;
but you won't know the exact source pitch, and the audio conversion quality won't be as good as the converter app
Sorry, something went wrong.
No branches or pull requests
hello, do you think it could work well?
#!/bin/bash
Batch convert all .mp3 files in the current directory to 432Hz with ffmpeg
Options
suffix="false" # Append the -432Hz suffix or not
oldIFS=$IFS
IFS=$'\n'
set -f # Deal with blanks and special characters in file names of the file command and in for loop
found=($(find . -name "*.mp3")) # Find the files in the current directory
IFS=$oldIFS
set +f
filename=""
for file in "${found[@]}"; do # Iterate the found files
Math:
We want to convert from 441Hz to 432Hz, the difference is 9Hz which are 2,040816327 % of 441Hz.
Parameters:
asetrate contains the desired pitch (frequency) but changes the playback speed
atempo ajusts the resulting playback speed, which should remain the same
aresample keeps the pitch change by correct rate of (re)sampling
mv "$file" "$file.tmp"
if $suffix == "true"; then
filename="${file%.mp3}-432Hz.mp3"
else
filename="$file"
fi
ffmpeg -loglevel 8 -i "$file.tmp" -af asetrate=43200,atempo=1.00,aresample=43200 "$filename"
rm "$file.tmp"
echo "Pitched $filename"
done
The text was updated successfully, but these errors were encountered: