next up previous contents
Next: Sound-Compression Up: Applications Previous: A simple tutorial of


  • SoX
    (man page) is a sound file format converter for Unix.It also does sample rate conversion and some sound effects. It's the swiss army knife of sound tools: the interface isn't great, but it does almost everything.

    SoX uses file suffices to determine the nature of a sound sample file. If it finds the suffix in its list, it uses the appropriate read or write handler to deal with that file. SoX has an auto-detect feature that attempts to figure out the nature of an unmarked sound sample. This is the 'auto' file format.

    Here are some examples on how to use SoX at the shell prompt but first make sure you have the correct file suffix.

    SoX does not like the ``.snd'' file suffix (extension), therefore you need to change your sound-file extension to Sun's ``au'' extension. You can do this with the mv command like,

     		 mv  File.snd         
    To translate a sound-file in SUN Sparc ``.AU'' format into a Microsoft ``.WAV'' or ``Riff'' file you do,

     		  sox file.wav        
    The following example lowers the amplitude of ``'' by half and establishes a sample rate of ``22.05K'' to the Macintosh compatible file ``ofile.aiff''

     		 sox -v 0.5 -r 22050 ofile.aiff        
    You can use the '-V' option on all your command lines. It makes SoX print out its idea of what is going on. To add a low-pass filter (note use of stdout for output of the first stage and stdin for input on the second stage) you can use Unix pipes in the following fashion,

                       sox infile.wav -t raw -s -w -c 1 - lowpass 3700  |
                          sox  -t  raw -r 11025 -s -w -c 1 - -t au -r 8000 -U -b
                          -c 1
    There are more SoX examples in the CD mastering section.

  • sndlib
    The ``sndlib'' sound library is a collection of sound file and audio hardware handlers written in C. It provides relatively straightforward access to many sound file headers and data types, and most of the features of the audio hardware. Its manual is available online .

    Some command line example programs written with sndlib (that are part of the snd package) are quite useful on their own:

    play a soundfile
    print information about a sound file
    record a mono or multichannel sound
    generate a sinusoidal signal

    For example if you want to listen to a sound file you can type:

    sndplay soundfile.snd
    sndplay soundfile.wav

    If you need information about a particular, let's say the number of channels, you type:

    sndinfo soundfile.aiff

  • resample
    (man page ) is a much needed and useful tool for high quality sampling rate conversion that Julius Smith wrote a long time ago (during the NeXT days). You use resample in the command line by writing something like:

     		   resample -to 44100 clm.snd cd-ready.snd        
    The resample program takes a 16-bit mono or stereo sound file and a "sampling- rate conversion factor" r, specified as a floating-point number, and produces an output sound file whose sampling rate is r times that of the input file.

    The output file is in AIFF format. If you omit the output file name, resample will create a file using the input file name, with ".resamp" appended.

    Use resample to create CD-ready soundfiles or transfer from one medium to another. Beware that the default sampling rate in ``clm'' is set to 22050 samples per second because in this way sounds are faster to render. You can use resample to get your soundfile up to CD rate and then use SOX to get the correct timing and WAV ``riff'' formats for burning a CD.

  • Ecasound

    (man page ) This is a full software package designed for multitrack audio processing. It can be used for simple tasks like audio playback, recording and format conversions, as well as for multitrack effect processing, mixing, recording and signal recycling. Ecasound supports a wide range of audio inputs, outputs and effect algorithms. Effects and audio objects can be combined in various ways, and their parameters can be controlled by operator objects like oscillators and MIDI-CCs. As most functionality is located in shared libraries, creating alternative user-interfaces is easy. A versatile console mode interface is included in the package.

    Ecasound has a text user interface that includes an interactive interpreter, see the ecasound-iam man page for details. The ecatools man page documents the some additional commands:

    Plays input soundfiles
    Converts a set of files to a given format
    Fixes DC offsets in a soundfile
    Normalizes a soundfile
    Monitors input signal level and statistics

    Comprehensive customization can be done by creating a configuration file in your home directory, see the ecasoundrc man page for details.

    Since Ecasound is a synchronized ALSA application it might prove very useful in special audio situations which require a high level of audio performance. Perhaps in a real time ``Tape'' concert situation or if you find yourself in a situation where you want to transfer a multi-channel sound-file to tape media like ADAT or DTRS, and if you want to avoid digital dropouts, ecasound is like a Swiss Army audio tool. In addition to sound-file recording or playback you can also do digital signal processing.

    Please make sure about the audio-header-type and the sampling rate of your sound-file. You can do this at CCRMA by issuing ONE of the following commands:

    sndinfo soundfile.wav
    sndinfo soundfile.snd

    Ecasound only likes Riff or Wav files and obviously doesn't like NeXT's snd files. If you need to convert your sound-file you can use the sox command for up to 2-channel stereo files. If your sound-file is a snd file you need to rename it and convert it in the following way:

    mv soundfile.snd
    sox sox soundfile.wav

    For multichannel sound-files you might want to use the srconvert functions of SND or CLM. A ``srconvert.ins'' instrument invocation in CLM might look like this (for more information please consult CLM or SND documentation).

          (with-sound (:output "new.wav" 
                       :header-type mus-riff 
                       :srate 44100
                       :channels 4 
                       :play nil) 
              (sr-convert 0 "~/zap/test.snd" :width 7))
    Please notice the "header type" key inside with-sound it should be "mus-riff" to write multichannel wav files. Once you have your .wav file you just use ecasound in interactive mode with the following command:

     		   ecasound -c -i new.wav -f 32,10,44100 -o alsahw,0,0        
    At this point and inside the ecasound command line (because of the -i switch) , you can start, forward and rewind your sound-file from almost any point with any offset.

    Other examples of playback might be in the following renditions:

    1. With JACK a two channel sound file and 44100 sampling rate.

       		   ecasound -f:32,2,44100 -i new.wav -o jack_alsa        
    2. A JACK client that has one input and one output port.
            ecasound -f:32,1,44100 -i jack -o jack \
               -ef3:800,1.5,0.9 -km:1,400,4200,74,0 -km:2,0.1,1.5,71,0
    3. Realtime inputs (recording from soundcard)

       		  ecasound -i alsahw,0,0 -o somefile.wav         
    4. Realtime Outputs (soundcard playback)

       		  ecasound -i somefile.mp3 -o alsahw,0,0         

    More examples can be found in the Ecasound documentation or at its web page.

  • ecawave
    (man page ) is a simple graphical audio file editor. The user-interface is based on Qt libraries, while almost all audio functionality is taken directly from ecasound libraries. As ecawave is designed for editing large audio files, all processing is done direct-to-disk. Simple waveform caching is used to speed-up file operations. Ecawave supports all audio file formats and effect algorithms provided by ecasound libraries. This includes OSS, ALSA, aRts, over 20 file formats, over 30 effect types, LADSPA plugins and multi-operator effect presets.''

  • cdparanoia
    (man page ) retrieves audio tracks from CDDA capable CDROM drives. The data can be saved to a file or directed to standard output in WAV, AIFF, AIFF-C or raw format. Most ATAPI, SCSI and several proprietary CDROM drive makes are supported; cdparanoia can determine if the target drive is CDDA capable.

    In addition to simple reading, cdparanoia adds extra-robust data verification, synchronization, error handling and scratch reconstruction capability.

  • STK
    ``The synthesis toolkit is a set of audio signal processing C++ classes and instruments for music synthesis. You can use these classes to create programs which make cool sounds using a variety of synthesis techniques. This is not a terribly novel concept, except that STK is very portable (it's mostly platform-independent C and C++ code) AND it's completely user-extensible. So, the code you write using STK actually has some chance of working in another 5-10 years. STK currently runs with realtime support (audio and MIDI) on SGI (Irix), Linux, and Windows computer platforms. Generic, non-realtime support has been tested under NeXTStep, but should work with any standard C++ compiler.''

  • SMS
    ``SMS is a set of techniques and software implementations for the analysis, transformation and synthesis of musical sounds. The aim of this work is to get general and musically meaningful sound representations based on analysis, from which musical parameters might be manipulated while maintaining high quality sound. These techniques can be used for synthesis, processing and coding applications, while some of the intermediate results might also be applied to other music related problems, such as sound source separation, musical acoustics, music perception, or performance analysis.''

If you feel you are into Linux and Sound or simply for general knowledge make sure you take a look at Larry Ayers' Soundings: Explorations In Linux Sound

next up previous contents
Next: Sound-Compression Up: Applications Previous: A simple tutorial of

© Copyright 2001-2006 CCRMA, Stanford University. All rights reserved.
Created and Mantained by Juan Reyes