SOX

[ NextMusic Home Page | Sound and Music Programs Page | Program List ]

Author:		Lance Norskog thinman@netcom.com
		Chris Bagwell cbagwell@tddtx.fujitsu.com
Platforms:      NeXT, Intel, HP
Prerequisites:  (see description)
Price:          free
Demo:           
To acquire:     http://home.sprynet.com/sprynet/cbagwell/sox-12.15.tar.gz (196k)
		ftp://ftp.eecs.umich.edu/pub/nextmusic/Sox10.tar.Z
		usenet://comp.sources.misc
Information:	http://home.sprynet.com/sprynet/cbagwell/projects.html
		http://www.spies.com/Sox/
Entry updated:  7 February 1999
Description:	Command-line utility to translate between sound file formats and perform sound effects

SOX 10

Sound Tools translates sound samples between different file formats, and performs various sound effects.

This release understands "raw" files in various binary formats, raw textual 
data, Sound Blaster .VOC files, IRCAM SoundFile files, SUN Sparcstation  
.au files, mutant DEC .au files, Apple/SGI AIFF files,  CD-R (music CD format),
Macintosh HCOM files, Sounder files,  NeXT .snd files, SUN ADPCM (compressed) 
.au files, and Soundtool (DOS) files.

The sound effects include changing the sample rate, adding echo delay lines, 
applying low-, high, and band-pass filtering, reversing a sample in order 
to search for Satanic messages,and the infamous Fender Vibro effect.

There is a nice graphical front-end for the NeXT called GISO. 

Caveats:
SOX is intended as the Swiss Army knife of sound processing tools.  It 
doesn't do anything very well, but sooner or later it comes in very handy. 
SOX is really only useable day-to-day if you hide the wacky options with one-line shell scripts.

Channel averaging doesn't work.  The software architecture of stereo & quad 
is bogus.

Installation:
The sox program is just a batch utility that reads & writes files.  It's very 
easy to port to new computers.


[Note: ftp://ftp.eecs.umich.edu/pub/nextmusic/Sox10.tar.Z
has already been ported to NeXTStep.]

This distribution will compile and run on most Unix systems. It was developed 
on a Unix/386 machine running AT&T V.3.2. It has been ported to many AT&T 
V.3- and V.4-flavored Unixes, and many BSD-derived Unixes as well.  It also 
runs under DOS with Borland C (version 1.5, probably later too). For Borland C, use 'Makefile.bor'.  For the Amiga, use 'Makefile.ami'.

For Unix, use 'Makefile.unx'.  For V.3 and V.4 Unix, the Makefile should work 
as is.  For SUN, NeXT, and other Unixes derived from Berkeley Unix, you'll 
need to comment out these four lines in the Makefile:
	
	CFLAGS    = $O -DSYSV 
	CC        = cc
	AR        = ar r
	RANLIB    = ar ts

and uncomment the following ones:

	# CFLAGS    = $O 
	# CC        = cc
	# AR        = ar r
	# RANLIB    = ranlib



Sox-12.15 - Sound conversion and player/recorder

Sox is a pretty popular package for converting sound files to various formats and applying effects to them. There was a version called Lsox around that would let you play sounds on Linux.  I liked it but it had a few problems with stereo files. It also lacked support for playing on anything but Intel machines.

I did some surfing and found the Sox Webpage and grabbed the latest version to try out and decided to fix some bugs and add support for the above stuff. I gave the patches to the author of Sox (Lance Norskog, thinman@meer.net) and he said he'd add them to his next release but he's a busy guy and hasn't made one since 1995. And so I began my own releases of Sox to make all my changes available.

Since my first release in early 1996, many people have been kind enough to send me their own bugfixes and features for sox which I have started incorporating.  I have also begun actively supporting Sox by looking into bug reports and feature requests as they are sent to me.

Sox is a general purpose sound converter/player/recorder that supports the following formats:
 
  • RAW sound data in various data styles
  • RAW textual sound data
  • Microsoft .WAV files
    • PCM, U-law, A-law, MS ADPCM (read only), IMA ADPCM (read only)
  • MAUD files
  • Sound Blaster .VOC files
  • IRCAM SoundFile files
  • SUN .au files
    • PCM, U-law, A-law, G7xx ADPCM files
  • mutant DEC .au files
  • Apple/SGI AIFF files
  • CD-R data (music CD format)
  • GSM raw data (with optional library)
  • Macintosh HCOM files
  • Sounder files
  • NeXT .snd files
  • Soundtool (DOS) files
  • Psion (palmtop) A-law files
  • Record and Play from OSS /dev/dsp or Sun /dev/audio.

The following effects can be applied to sound data:
 
  • Channel Averaging
  • Band-pass filter
  • Chorus effect
  • Cut out loop samples
  • Add an echo or sequence of echos
  • Apply a flanger effect
  • Apply a high-pass filter
  • Apply a low-pass filter
  • Display a list of loops in a file
  • Add masking noise to a signal
  • Apply a phaser effec
  • Convert from stereo to mono
  • Change sampling rates using several different algorthms
  • Apply a reverb effect
  • Reverse sound samples (to search for Satanic messages :)
  • Convert from mono to stereo
  • Display general stats on sound samples
  • Add the world-famou Fender Vibro-Champ effect

Things fixed/added since last release (12.14):
 
  • New Effects: Echo, Chorus, Flanger, Phaser, Reverb
  • Yamaha TX-16W sampler file handler
  • hcom bug fixes
  • "sox -h" prints out useful information now including supported formats and effects.
  • smp transfers comments better.
  • AIFF manages markers and loops correctly.
  • New polyphase rate change effect.  Try it and compare it to the previously buggy 'rate' and 'resample' effects.
  • Fixed bug in handling MS WAV ADPCM mono files.
  • Fixed bug in determining file length for MS and IMA ADPCM files.
  • New version of the 'rate' effect that is hopefully less buggy.
  • New deemphase effect for certain CD audio samples.
  • Volume adjustments work again.
  • Fixed some problems in play/rec scripts
  • Effects now drain correctly (which caused reverse effect to output 1/2 the file).
  • Now do not have to specify an effect when using the -e option.
  • Added new style options -g and -a for GSM and ADPCM styles.
  • Major documentation updates.
  • What, thats not enough for ya???  Send in more bug fixes then please!!

Sox is often used to convert an audio file from one sampling rate to another rate (i.e. from DAT to CD rates).  Sox's currently has three different algorythms that each suffer from different problems.  Please read a good technical overview of each's ability and possibly provide improvements if your into DSP.

This version of Sox has been tested under Linux, SunOS, and Solaris and I have received success reports for various other platforms such as DOS and Irix.  I have had problems trying to compile and run it using Turbo C under DOS (16-bit mode) but it seems to work fine when compiled with DJGCC (32-bit mode).

No screen shots of sox since there is not much to see it do.  Just think of any command line util that has an insane amount of options and a lousy interface. :-)  But, hey, it does its job very well despite that.

Download the latest version (last updated September 30, 1998): http://home.sprynet.com/sprynet/cbagwell/sox-12.15.tar.gz

Other files available (soon to all be updated to 12.15)


NOTE: Those interested in editing Sox's source code will also be interested in the Audio File Format FAQ which I also maintain. There is also a low volume (or should I say zero volume :-) mailing list set up that you can subscribe to by sending a blank email to sox-subscribe@makelist.com or read the archive at http://www.findmail.com/list/sox.


Eric M. Mrozek (mrozek@umich.edu), EECS-Systems, University of Michigan