Created
July 9, 2025 23:59
-
-
Save azarbayejani/40be9d307efb83545f52decaa6945730 to your computer and use it in GitHub Desktop.
Scripts for DJs
This file contains hidden or 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/bash | |
| ############################################################### | |
| # Script Name: convert-to-320-mp3.sh | |
| # Description: Converts audio files to mp3 | |
| # Author: @miseryconfusion.com | |
| # Date: 2025-07-09 | |
| # Version: 1.0 | |
| # Usage: ./convert-to-mp3.sh file-to-convert ... | |
| # Notes: This script requires ffmpeg to run | |
| ############################################################### | |
| for f in "$@" | |
| do | |
| file=$f | |
| newfile=${file%.*} | |
| ffmpeg -i "$f" -b:a 320k "$newfile".mp3 | |
| done |
This file contains hidden or 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/bash | |
| ############################################################### | |
| # Script Name: convert-to-aiff.sh | |
| # Description: Converts audio files to aiff | |
| # Author: @miseryconfusion.com | |
| # Date: 2025-07-09 | |
| # Version: 1.0 | |
| # Usage: ./convert-to-aiff.sh file-to-convert ... | |
| # Notes: This script requires ffmpeg to run | |
| ############################################################### | |
| for f in "$@" | |
| do | |
| file=$f | |
| newfile=${file%.*} | |
| ffmpeg -i "$f" -write_id3v2 1 "$newfile".aif | |
| done |
This file contains hidden or 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/bash | |
| ################################################################ | |
| # Script Name: get-spectrogram.sh | |
| # Description: Generates a spectrogram and opens it | |
| # Author: @miseryconfusion.com | |
| # Date: 2025-07-09 | |
| # Version: 1.0 | |
| # Usage: ./convert-to-aiff.sh file-to-convert ... | |
| # Notes: This script requires sox to run. Also, `open` may | |
| not be available on your system. | |
| ################################################################ | |
| sox "$1" -n spectrogram -o /tmp/spectrogram.png | |
| # open /tmp/spectrogram.png |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment