Snack Home Page
The Snack Sound Toolkit
(c) 1997-2004 Kåre
Sjölander
All audio data handled as
floating point internally for fast and accurate computations.
Multi-platform, same scripts
usable on Windows 95/98/NT/2K/XP, Linux, Macintosh, Sun Solaris, HP-UX,
FreeBSD, NetBSD, and SGI IRIX.
Script compilation tool included, for easy deployment using stand-alone executables.
Filters which can be used
to process sound objects or during playback for on-the-fly operation.
Visualization with waveforms,
spectrograms, and spectrum sections. Postscript support.
Real-time visualization/spectrum
analysis.
Web enabled, possible to
run scripts embedded in web pages through the use of the Tcl
plug-in.
Extensible, new commands,
filters, and sound file formats can be added using the Snack C-library.
Lots of examples included as well as a skeleton C-extension.
Supported sound file formats:
WAV, AU, AIFF, MP3, CSL, SD, SMP, and NIST/Sphere
News
Snack v2.2.10 released December 01
WaveSurfer 1.8.5 released November 01
WaveSurfer is a sound application built using Snack. WaveSurfer was developed mainly for use in speech research, but has also proven useful in many other contexts.
Snack v2.2.8 part of ActiveState's Tcl/Tk distribution.
If you need the latest version or the source release download from this site. Otherwise use the ActiveState release.
Download
Snack
Installation
(with Tcl/Tk)
Installation
(with Python)
Introductory
examples
Tutorial (Tcl only, there is an introductory section on Snack and Python at the top of the Python manual)
Snack manual for
Tcl/Tk, for
Python
FAQ
Writing
extensions to Snack in C/C++
Links
related to Snack
Links
related to scripting languages
Introductory examples
Using Tcl/Tk
The Snack toolkit adds the command
snack::sound
to the Tcl language. It is used to create and handle sound objects. The
following three statements shows how to create a sound object, read audio
data from a WAV-file into it and finally play the sound:
snack::sound snd
snd read ex1.wav
snd play
To get a graphical representation
of this sound you can draw its waveform using these statements:
canvas .c
pack .c
.c create waveform 0 0 -sound snd
Using
Python
The same
functions with Snack and Python would be
snd = Sound()
snd.read('ex1.wav')
snd.play()
And
for the graphics
c = SnackCanvas()
c.pack()
c.create_waveform(0, 0, sound=snd)
Last updated January 23, 2006
Department
of Speech, Music and Hearing home
|