Programs for sound analysis, resynthesis, display  and transformation

by Rob Maher, James Beauchamp, and others, University of Illinois at Urbana-Champaign (UIUC).

WIN32 version for the Sonic Arts Network (now part of SoundAndMusic) by the Composers Desktop Project.

January 2000
[overview] [file formats] [history] [installation] [the programs] [getting started] [porting notes]



The SNDAN program suite is the outgrowth of work by Rob Maher and James Beauchamp, of the University of Illinois at Urbana-Champaign (UIUC). The programs continue to be maintained and developed by James Beauchamp, reflecting not only his own usage, but that of the many researchers and composers who have worked on and added to the suite. A history of the development of SNDAN, kindly provided by James Beauchamp for this version, can be read here.

SNDAN is intended primarily for the analysis and processing of pitched single tones, and thus lends itself particularly well to the preparation of instrument samples for use in a sampler. The accuracy of analysis and quality of transformation are very high for sounds in this category. However, SNDAN can also work very well with semi-pitched (e.g speech) and abstract sounds, though a deeper understanding of how the programs work will assist in getting the best results.

This WIN32 port can run on all Windows 9x, NT, Windows2000 and later systems. To download, access the SNDAN ftp directory here.

Main facilities of SNDAN

  • two advanced and complementary methods of frequency (spectral and harmonic) analysis (phase vocoder, McAaulay-Quatieri)
  • high-quality configurable graphic display, including 3D colour plots
  • time compression and stretching of sounds, preserving attack and decay
  • broadband noise reduction
  • amplitude and frequency-based transformations
  • scope for frequency-domain synthesis
  • source code available for customization and extension by programmers (contact James Beauchamp for download deails)

File Formats supported by SNDAN.

SNDAN will read and write mono WAVE files in the standard 16bit format, and (introduced for the Windows version) in the 'type-3' 32bit floating-point format. Floating point and 16bit files in the .snd format are aso supported.

There is also support for 'raw' headerless files of either 16bit or 32bit floating point data (indicated by a file extension of .sh and .fl respectively). Windows users will normally neither need nor want to use these formats, but they do offer a path whereby programmers wanting to experiment can read or write  sound files without having to worry about creating or parsing a WAVE header. Of course, in the absence of a header, it is your own responsibility to ensure the SNDAN programs have the correct information about the file.

The output analysis files (.an format and .mq format) are custom formats for SNDAN, and are not readable by other applications in the absence of custom-made conversion tools. For those wanting to inspect the formats in detail, utility programs are included in the SNDAN suite to print files  in text format.

To convert sound files to/from other channel or sample formats, users may like to consider using the CDP Multichannel Toolkit. This provides a number of command line utilities for format conversion, channel interleaving and deinterleaving, and command line file recording and playback (WAVE and AIFF/AIFF-C only).

Installing SNDAN

We recommend that you read the whole of this section before commencing installation, especially if you are not already familiar with the use of command line programs, or in editing your AUTOEXEC.BAT file.

The SNDAN suite comprises a large number of programs (many of which are small and rarely needed utilities), which are run from the commnd-line prompt in a Console window. Some knowledge of the main MSDOS commands used in this environment is useful. See Using the Windows Console.

Graphics support

For graphics output, SNDAN writes files in Encapsulated PostScript format (eps). These require a suitable viewer to be installed. The standard viewer is called Ghostview. The Windows version is supplied in a package called GSTOOLS, available as a self-extracting executable. If you have not already downloaded this, see the [SAN website] for more information. You can leave installing GSTOOLS until later if necessary, but without GSTOOLS or the equivalent, SNDAN will not be able to display graphics. Many laser printers can print eps files directly.

When GSTOOLS is installed, it registers itself with Windows as the 'associated'  application for PostScript (ps) and Encapsulated PostScript (eps) files. This also enables such documents to be viewed from your web browser.  When a SNDAN program wants to create a graphic display, an eps file is created, and the program sends a request to Windows to display it, using the  associated program.

By default, these eps files are stored in your 'current directory'. However, an 'environment variable' called SNDAN_TEMP can be defined either at system or user level. Early versions of Windows used the system batch file AUTOEXEC.BAT for ths purpose, followed by a restart. In more recent versions of Windows, environment variables can be added or updated via the Control Panel (System->Advanced->Environment). They will then be available upon opening a new DOS command session.

For example, if you wanted to keep eps files in the folder D:\sndan\temp, you would define the following environment variable:

It is also possible to use this command directly from within a Windows Console session (you can switch between different folders this way):


but this will only last until you close your Console window.

It is easy to accumulate a large number of eps files while using SNDAN. Unlike the original form of the programs, this version does not atomatically delete them at the end of a session. You can do this in one step from the Console by issuing the command

    del *.eps

which will remove all eps files in your current directory.

Audio support

Some SNDAN programs, such as monan, include commands to play a soundfile. As with eps files, Windows is asked to launch the application asssociated with soundfiles (WAVE, SND formats). Some users may have changed the default Media Player for a sound editor such as Audacity. These programs can take a while to launch. For work with SNDAN it is recommended that the standard Windows Media Player be configured as the associated application. See your Windows documentation for information on how to do this. Once launched the first time (from within monan, for example, or externally), further play commands will take over that instance, rather than launching a new one - a very quick process that does not cause multiple instances of the player to appear on the Desktop.

Installing the SNDAN package itself  is fairly simple, but is not automatic. You will need a program such as Winzip to unpack the files. The WIN32 distrubution of SNDAN  is supplied in the form of a complete directory structure, with 'sndan' at the top level. This structure is preserved in the zipfile. Unzip the file (e.g. using Winzip), and extract the files preserving folder information, to the root of any convenient drive.

The most important folder in the SNDAN directory structure is the 'bin' folder - this is where all the programs are kept. By making this folder your 'current directory' (using the MSDOS command 'cd'), you can run each program just by typing its name (a usage message will appear). However,  by adding the full name of this folder to the system or user PATH (following the same procedure as for environment variables), you can work in any directory (your 'sounds' directory, for example); Windows will look for the program you run by searching through the PATH list.

Finally, for easy access to the html-based documentation, drag the file sndan.html either to to the Windows desktop (as a shortcut), or directly to the 'Start' button. This enables you to access the documentation without having to move or close other application windows.

The Programs in the SNDAN Suite

There is a small core of programs that you will use frequently, together with set of utility programs, many of which are included here simply for the sake of completion. Those familiar with the original unix-based programs will note a few differences in program names, and in command line formats.

In the original unix form of SNDAN, much use is made of unix 'shell scripts', which ask parameters interactively from the user, and launch various programs behind the scenes. This facility is not directly reproducible using the Windows DOS Console, as it is not possible under MSDOS to obtain parameters from the user, using batch files.  The main consequence of this is that the program mkheader has to be run explicitly, to create the header information requied by the analysis programs.

Create header information.

            Create a header file containing performance information on a sound. The header file is needed by all the analysis programs, but only needs to be created once, for each source soundfile. Much of the information is included in the graphics output.

Analyse sounds

    Analyse a sound using the phase vocoder method. It is effective with a wide class of sounds, but is ideally suited to sounds which have a clear fundamental pitch and do not change pitch very much over time. Output is in .an format, which is read by monan, and can be synthesized by the addsyn group of programs.
      Analyse a sound using the McAaulay-Quatieri partial-tracking method. It is very successful at tracking wide changes in pitch (whether of the fundamental, or of partial tones). Output is in the .mq format, which can be dsiplayed by mqplot, and synthesized using mqsyn2. It can also be converted into the .an format using mqtoan,for use within monan.

Display/transform sounds

    Display and modify .an format analysis files. A powerful program, with over forty commands,  that not only enables very precise measurements and displays of sounds in the frequency domain, but a range of unique high-quality transformations, including pitch shift, time warping, and noise reduction. This program in particular is in continued development by James Beauchamp and colleages, so the user is recommended to monitor this site, and the UNIX SNDAN site at UIUC, for news of updates.
      Display mq format analysis files, using either a 2D or 3D (perspective) plot. There are no transformation facilities. mq files need to be converted to .an format, using mqtoan, so that they can be read into monan.

Resynthesize sounds from analysis files using oscillator-bank synthesis.

A family of additive synthesis programs, raning from plain resynthesis  to  more elaborate versions offering a range of transformations, including multi-segment and time-varying time-stretching and compression, changing of sample rate, and pitch shifting. All the addsyn programs will write floating point files as well as 16bit files.

Utility Programs

The rest of the SNDAN suite. Includes programs for printing out the contents of analysis files, a useful soundfile plotting program (using eps files), and sextract, a clever program for extracting multiple segments from a single soundfile.