Skip to content

Instantly share code, notes, and snippets.

@windytan
Created February 23, 2013 20:11
Show Gist options
  • Save windytan/5021143 to your computer and use it in GitHub Desktop.
Save windytan/5021143 to your computer and use it in GitHub Desktop.
open(S,"sox salakalastaja.wav -t .raw -e signed -|");
open(U,"|sox -b 16 -c 1 -e signed -t .raw -r 44100 ".
"- ssb.wav sinc 6000 -n 4096");
while(not eof(S)) {
read(S,$a,2);
print U pack("s",unpack("s",$a) *
cos(($n++ * 2 * 3.141592653589793 * 6000) / 44100);
}
close(U);
close(S);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment