Last active
January 2, 2023 15:27
-
-
Save pwenzel/f0b7589fd548c3ec4aad2842eb8d66b7 to your computer and use it in GitHub Desktop.
FFMPEG Convert Wave to Mono Raw Audio for Radio Music Eurorack Module. Test playback with ffplay.
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
# Bulk convert wave to mono raw audio for Radio Music Eurorack module | |
# Uses FFMPEG and Fish Shell | |
for file in *.wav; | |
set basename (string match -r "(.*)\.[^\.]*\$" $file)[2] | |
ffmpeg -i $file -f s16le -acodec pcm_s16le -ac 1 $basename.raw; | |
end; |
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
# play raw file with ffmpeg, loop it 4 times, and exit. Disable display. | |
ffplay -f s16le -ar 44.1k -ac 1 -nodisp -autoexit -loop 4 example.raw | |
# play raw file with ffmpeg, loop it 4 times, and exit. Include display. | |
ffplay -f s16le -ar 44.1k -ac 1 -autoexit -loop 4 example.raw |
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
# Bulk play all raw files | |
# Uses ffplay (part of FFMPEG) and Fish Shell | |
# https://lynxbee.com/how-to-play-raw-pcm-voice-audio-files-using-ffplay-on-ubuntu/ | |
# https://ffmpeg.org/ffplay.html | |
for file in *.raw; | |
ffplay -f s16le -ar 44.1k -ac 1 -nodisp -autoexit $file; | |
end; |
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
# https://stackoverflow.com/a/37826687 | |
num=0; for i in *; do mv "$i" "$(printf '%04d' $num).${i#*.}"; ((num++)); done |
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
# https://github.com/TomWhitwell/RadioMusic/wiki/SD-Card%3A-Format-and-File-Structure | |
# https://stackoverflow.com/questions/4854513/can-ffmpeg-convert-audio-to-raw-pcm-if-so-how | |
# https://trac.ffmpeg.org/wiki/AudioChannelManipulation | |
ffmpeg -i Break1.wav -f s16le -acodec pcm_s16le -ac 1 Break1_mono.raw |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment