Last active
February 16, 2022 22:20
-
-
Save podratz/d3d55af49b7e45fefe2c7b87b998ddcc to your computer and use it in GitHub Desktop.
Retune music from 440 Hz to desired frequency (by changing playback speed)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Prequisite: Using Mac OS and having VLC Media Player installed | |
# Usage: `freq 432 /path/to/song` | |
vlc () { /Applications/VLC.app/Contents/MacOS/VLC -I rc "$@" ;} | |
LC_NUMERIC="en_US.UTF-8" \ | |
rate=$(printf "%0.6f\n" $(bc -q <<< scale=6\;$1/440)) | |
vlc -Irc --rate "$rate" "$2" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment