home *** CD-ROM | disk | FTP | other *** search
- This is a cheat sheet of examples using SOX to do various common sound file
- conversions.
-
- Notes:
-
- The Sun examples all assume the old Sun voice-quality 8 kHz u-law hardware. If
- the AU file doesn't have a proper header, you'll need the second command line.
- If you don't want the old format, you can remove the "-r 8012 -U -b" in front
- of "<destination>.AU" when converting TO Sun AU files. Note that you'll need
- newer Sun sound hardware to successfully play these files.
-
- VOC has a similar problem. All VOC files have a correct header, but older
- hardware (and software) only knows about samples made of unsigned bytes.
- VOC files come from the Sound Blaster and compatible cards on the IBM PC.
- These cards can play many sample rates; not quite a continuous spectrum
- but close enough.
-
- The Mac sound hardware traditionally has been capable of sample rates 5012,
- 1025, and 22050, but only with unsigned bytes. Recent models support
- CD-quality sound.
-
- Sun AU to Mac SND:
-
- SOX <source>.AU -r 11025 -t ub <destination>.SND
-
- or:
-
- SOX -t ul -r 8012 <source>.AU -r 11025 -t ub <destination>.SND
-
- When you copy the file to the Mac, you'll have to set
- the sample rate by hand.
-
- Mac SND to Sun AU
-
- SOX -r 11025 -t ub <source>.SND -r 8012 -U -b <destination>.AU
-
- The Mac file might also be at sample rates 5012, 22050, or 44100.
-
- PC VOC to Sun AU
-
- SOX <source>.VOC -r 8012 -U -b <destination>.AU
-
- Sun AU to PC VOC
-
- SOX <source>.AU <destination>.VOC
-
- or:
-
- SOX -r 8012 -t ul <source>.AU <destination>.VOC
-
- Sun AU to WAV - without clipping
-
- SOX <source>.AU -s -w <destination>.WAV
-
- or:
-
- SOX -t ul -r 8012 <source>.AU -s -w <source>.WAV
-
- WAV to Sun AU
-
- SOX <source>.WAV -r 8012 -U -b <destination>.AU
-
- WAV to VOC
-
- SOX <source>.WAV -u -b <destination>.VOC
-
- VOC to WAV
-
- SOX <source>.VOC <destination>.WAV
-
- Any file to Sun AU
-
- SOX -t auto <source>.X -c 1 -t aiff - |
- SOX -t aiff - -r 8000 -U -b -t au <destination>.AU
-
- Some people try to put this kind of command in scripts. Good luck!