home *** CD-ROM | disk | FTP | other *** search
/ Groovy Bytes: Behind the Moon / groovybytes.iso / GROOVY / SND_TOOL / WM10.ZIP / DOC.DAT / soxcheat.txt < prev    next >
Encoding:
Text File  |  1995-08-30  |  2.1 KB  |  77 lines

  1.  This is a cheat sheet of examples using SOX to do various common sound file 
  2.  conversions.
  3.  
  4.  Notes:
  5.  
  6.  The Sun examples all assume the old Sun voice-quality 8 kHz u-law hardware. If
  7.  the AU file doesn't have a proper header, you'll need the second command line.
  8.  If you don't want the old format, you can remove the "-r 8012 -U -b" in front 
  9.  of "<destination>.AU" when converting TO Sun AU files. Note that you'll need 
  10.  newer Sun sound hardware to successfully play these files.
  11.  
  12.  VOC has a similar problem. All VOC files have a correct header, but older 
  13.  hardware (and software) only knows about samples made of unsigned bytes.  
  14.  VOC files come from the Sound Blaster and compatible cards on the IBM PC. 
  15.  These cards can play many sample rates; not quite a continuous spectrum
  16.  but close enough.
  17.  
  18.  The Mac sound hardware traditionally has been capable of sample rates 5012, 
  19.  1025, and 22050, but only with unsigned bytes. Recent models support 
  20.  CD-quality sound.
  21.  
  22.  Sun AU to Mac SND:
  23.  
  24.      SOX <source>.AU -r 11025 -t ub <destination>.SND
  25.  
  26.  or:
  27.  
  28.      SOX -t ul -r 8012 <source>.AU -r 11025 -t ub <destination>.SND
  29.  
  30.  When you copy the file to the Mac, you'll have to set
  31.  the sample rate by hand.
  32.  
  33.  Mac SND to Sun AU
  34.  
  35.      SOX -r 11025 -t ub <source>.SND -r 8012 -U -b <destination>.AU
  36.  
  37.  The Mac file might also be at sample rates 5012, 22050, or 44100.
  38.  
  39.  PC VOC to Sun AU
  40.  
  41.      SOX <source>.VOC -r 8012 -U -b <destination>.AU
  42.  
  43.  Sun AU to PC VOC
  44.  
  45.      SOX <source>.AU <destination>.VOC 
  46.  
  47.  or:
  48.  
  49.      SOX -r 8012 -t ul <source>.AU <destination>.VOC
  50.  
  51.  Sun AU to WAV - without clipping
  52.  
  53.      SOX <source>.AU -s -w <destination>.WAV
  54.  
  55.  or:
  56.  
  57.      SOX -t ul -r 8012 <source>.AU -s -w <source>.WAV
  58.  
  59.  WAV to Sun AU
  60.  
  61.      SOX <source>.WAV -r 8012 -U -b <destination>.AU
  62.  
  63.  WAV to VOC
  64.  
  65.      SOX <source>.WAV -u -b <destination>.VOC
  66.  
  67.  VOC to WAV
  68.  
  69.      SOX <source>.VOC <destination>.WAV
  70.  
  71.  Any file to Sun AU
  72.  
  73.  SOX -t auto <source>.X -c 1 -t aiff - |  
  74.  SOX -t aiff - -r 8000 -U -b -t au <destination>.AU
  75.  
  76.  Some people try to put this kind of command in scripts. Good luck!
  77.