Skip to content

Instantly share code, notes, and snippets.

@aynik
Created June 13, 2022 11:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aynik/320c03828ba5c7c10d7f1389ad0ffbaa to your computer and use it in GitHub Desktop.
Save aynik/320c03828ba5c7c10d7f1389ad0ffbaa to your computer and use it in GitHub Desktop.
mdin
#!/usr/bin/env bash
# usage: ./mdin.sh <input-file> <output-file.wav>
sox -G -M \
-t raw -r 16000 -c 1 -b 16 -e signed -L <(even-bytes < $1 | modem-tx) \
-t raw -r 16000 -c 1 -b 16 -e signed -L <(odd-bytes < $1 | modem-tx) \
-t wav -r 44100 $2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment