Audio Hacking - monday 2004-04-05 0707 | last modified 2004-04-05 0707 |
Categories: Nerdy | |
TrackBacks Sent: None | |
I use the open source project Audacity for converting tapes into sermons via the headphone out jack on a stereo and the line in jack on my laptop. Unfortunately, it's not very stable on Mac OS X, the odd case where something on Windows was more stable than other platforms. Fortunately, Audacity leaves behind raw Sun audio format (.au) files it keeps around as a set of temporary six-second clips for later integration into a recording project. Except it provides no way to restore these. In fact, it asks you on a crash restart if you want to delete or keep the temporary files, explaining rather uselessly that "you can restore them manually, but Audacity can't." I don't know why not.
After reading up on the .au format, I wrote a Perl script to strip the audio files of their headers. After that, it was just a matter of using
Call this #!/usr/bin/perl -w use strict; die "usage: $0 in" unless @ARGV == 1; my ($infile) = @ARGV; my $buf; my $outfile = "a" . substr($infile, 2); open(IN, "<$infile") || die "problem opening 'in' "; while(
And this #!/usr/bin/perl use strict; die "usage: $0 in" unless @ARGV == 1; my ($infile) = @ARGV; my ($buf, $head); my $outhead = "head"; open(IN, "<$infile") || die "problem opening 'in' "; while( Then do: [~ ]$ ./header [~ ]$ find . -name "b*.au" -exec ./strip-headers \{} \; [~ ]$ cat head a*.au > raw.au
Audacity should be able to import |
|
You must login to leave a comment |
|
TrackBacks
No TrackBacks for this entry.