                                     Snd

                 Bill Schottstaedt (bil@ccrma.stanford.edu)

[picture of Snd window]
----------------------------------------------------------------------------
Snd is a sound editor modelled loosely after Emacs and an old, sorely-missed
PDP-10 sound editor named Dpysnd. It can accomodate any number of sounds at
once, each with any number of channels. Each channel is normally displayed
in its own window, with its own cursor, edit history, and marks; each sound
has a 'control panel' to try out various changes quickly, and an expression
parser, used mainly during searches; there is an overall stack of 'regions'
that can be browsed and edited; channels and sounds can be grouped together
during editing; edits can be undone and redone without restriction
('unlimited undo'); Snd can be customized using an Emacs-lisp-like syntax;
it can also be extended with user-supplied editing or display functions
loaded at run time; and it's free; the code is available via anonymous ftp
from ccrma-ftp.stanford.edu as pub/Lisp/snd.tar.gz.

----------------------------------------------------------------------------

Contents

Getting Started
File Operations
     The Display
     Other Options
Editing
     The Active Channel and The Cursor
     Marks
     Regions
     How to ...
     Keyboard Commands
The Control Panel
Customization
Extensions
Planned Enhancements
Index

----------------------------------------------------------------------------

Getting Started

Once compiled and loaded (run make in a shell, or get the executable images
from ccrma-ftp), fire Snd up with

  snd some.snd

where "some.snd" is any available sound file. You should get a window with
the first .1 seconds of the sound displayed as a time domain waveform. Click
the "f" button, and an fft window appears alongside the waveform. Drag the
upper scale at the bottom of the graph and both graphs are updated as you
move through the file. Drag the lower scale to zoom in or out. Drag the
outer scale (the wider one) on the left to zoom the y axis in or out. The
inner scale is the least useful of the four -- it moves the y axis up and
down, and exists only for symmetry. Click the "w" button (to unset the
button) and the time domain waveform goes away. Click "play" to play the
file. "sync" is more complicated -- it is used to group sounds together for
simultaneous editing.

Now return to the time domain form (click "w" and "f"), and click on the
graph itself. A red cursor (a big "+") appears at that point. The cursor is
exactly like an Emacs cursor -- you can delete the sample at the cursor, for
example, by typing control D (abbreviated in this document C-d), or move
back one sample with C-b. To see all the cursor-related commands, go to the
"Help" Menu, and choose "Click for Help". The cursor becomes a question
mark. Move the cursor to the graph portion of the window and click, and a
help window pops up, telling all about it. You can use the same sequence to
get help for anything in the Snd window, even the vertical bar after the
file name.

Now click and drag the mouse through some portion of the graph -- the
portion dragged is highlighted in some way. When you release the mouse
button, the highlighted portion is 'selected' -- it becomes a 'region' that
can be deleted, pasted elsewhere (move the mouse and click the middle
button), played, and operated on in many ways. You'll notice if you make
some change to the data that the file name gets an asterisk, as in Emacs,
and the various 'undo' and 'redo' menu options come to life. Just for
laughs, cut the selection, then click the right mouse button to get the
popup menu, and try Undo followed by Redo. Next type C-m -- this sets a mark
at the current cursor location. C-a goes to the start of the window; C-j
jumps forward to the nearest mark. Click and drag the upper horizontal mark
portion to move the mark; click the triangular lower portion to play from
the mark. Drag the triangular portion to play the data following the mouse.

Finally, go to the View menu and select 'Show controls'. A new portion of
the Snd window is opened, containing a number of controls. Try goofing
around with them while playing the sound. For the more complex cases, the
button on the right side turns the option on or off. The sequence of changes
you make while playing can be remembered (the 'Record' button), replayed
('Replay') or applied to the data as a kind of giant editing operation
('Apply').

----------------------------------------------------------------------------

File Operations

  File Menu

    Open:    open a new file                                   (C-x C-f)
    Close:   close a file, flush any unsaved edits             (C-x k)
    Save:    save current edits, overwriting previous version  (C-x C-s)
    Save as: save current edits under a new name, go to that new file
    Revert:  flush edits
    View:    open file read-only
    New:     create a new, empty file
    Print:   produce a Postscript version of current display
    Exit:    leave Snd, flushing all pending edits

Snd operates on sound files. When invoked, Snd scans its arguments for file
names, and opens any it finds.

  snd oboe.snd fyow.snd

If there are no arguments, Snd comes up as a bare menu bar. If a name is
preceded by "-p", it is treated as a directory name and all sound files
found in that directory are preloaded into the previous files list. To load
arbitrary Snd customizations (a session file for example) precede the file
name with "-l".

Each sound file in the argument list can include start up information about
the size and location of the initial waveform display.

  snd oboe.snd -s "0.0,0.25,0.75,0.3"

The flag "-s" introduces the size information, followed by a string
containing the values of the x position, y position, x zoom, and y zoom
scrollbars.

A file can be opened from the File menu via Open or View. View opens the
file read-only, whereas Open will allow it to be changed. The equivalent
keyboard command is C-x C-f. You can also drag a sound file's icon and drop
it on top of the Snd icon or the Snd menubar.

In the file selection dialog, there's a button marked 'Sound files only'.
This can be set by default (see Customization). If it is set, only files
that appear to be sound files are included in the directory listing.
Currently Snd uses the file extension to decide whether it is a sound file
-- the acceptable extensions are snd, wav, aiff, au, aifc, voc, wve, and
perhaps others.

Snd uses CLM's file header and data readers/writers so the file and data
types that it can handle are:

read/write:
     NeXT/Sun/DEC/AFsp mulaw and alaw, 8, 16, 24, 32-bit linear, float,
     double
     AIFF/AIFC 8 to 32-bit linear, mulaw and alaw
     RIFF ('wave') 8, 16, and 32-bit linear, 8-bit unsigned, mulaw and alaw
     IRCAM (old style) 16-bit linear, float, mulaw and alaw
     no header, any data format
read-only:
     8SVX 8 and 16-bit linear
     IRCAM Vax float
     EBICSF, INRS, ESPS, SPPACK, ADC (OGI) 16-bit linear
     NIST-SPHERE 16-bit linear, mulaw and alaw
     AVR 8 and 16-bit linear and unsigned
     VOC 8-bit unsigned, 16-bit linear
     Sound Tools 8-bit unsigned
     Turtle Beach SMP, SoundFont 2.0 16-bit linear
     Sound Designer I and II
     PSION alaw, MAUD 8 and 16 bit
     Tandy DeskMate new and old style 8-bit unsigned
automatically translated to NeXT 16-bit, then read/write:
     IEEE text, Mus10 SAM 16-bit (modes 1 and 4), IBM CVSD
     NIST shortpack, HCOM, Intel ADPCM

'Linear' here means 2's complement integer. The files can have any number of
channels. Data can be either big or little endian. The default output type
is settable as the defaultOutputType resource. A raw data file gets its
srate, chans, and data format information either from the variables
raw-srate and friends (if raw-defaults == 1), or from a dialog window that
pops up when such a file is opened. The files listed as "automatically
translated" are decoded upon being opened, rewritten in NeXT 16-bit format
to a new file with an added (possibly redundant) extension .snd, and that
form is the one the editor sees from then on.

Each file has its own 'pane', a horizontal section of the overall Snd screen
space; within that section, each channel has a pane, and below the channels
is the 'control pane', normally hidden except for the file name and
'minibuffer'. The panes can all be independently raised and lowered by
dragging the pane buttons on the right. The channel that is currently active
(receiving keyboard commands) has a thin black border around the display
portion. Each channel has the four scrollbars setting what portion of the
data is displayed; the 'w' button (normally set) which causes the time
domain waveform to be displayed; and the 'f' button (normally unset) which
includes the frequency domain (FFT) display. There is a third display
settable by user-provided functions; if both the 'w' and 'f' buttons are off
and there is no active user-display function, you get an empty display. For
each sound there is a control panel containing the file name, with an
asterisk if there are unsaved edits, a 'minibuffer' for various kinds of
text-based interactions, a 'sync' button for grouped display and edit
operations, a 'unite' button (if the sound has more than one channel), and a
'play' button to play the current (edited) state of the file. Any number of
files can be played at the same time. The rest of the control panel modifies
how the file is played.

To open a new, empty file, use the New option.

To close a file (flushing any unsaved edits), use the File menu Close
option, or C-x k. This command applies to the file that contains the active
channel, or the top file in the display.

To save the current edited state of a file, use the Save option (to
overwrite the old version of the file), or Save as (to write to a new file,
leaving the old file unchanged). The equivalent keyboard command is C-x C-s
(save). Other related keyboard commands are C-x w (save selection as file),
and C-x C-w (extract and save the current channel as a file). Normally, if
the new file already exists, and it is not currently being edited in Snd, it
is silently overwritten. If you try to overwrite a file, and that file has
active edits in a different Snd window, you'll be asked for confirmation. If
you want Snd to ask before overwriting a file in any case, set the resource
overwriteCheck to 1.

To undo all edits and return to the last saved state of a file, use the
Revert option. The edit history is still available, so you can redo all the
edits in order simply by calling Redo repeatedly.

The Print option produces an "encapsulated Postscript" file, suitable for
most printers. The default name of this file is "snd.eps"; the resource that
overrides this default is named 'epsFile'.

Finally, to exit Snd cleanly (that is, removing any temporary files, and
cleaning up some system stuff), use the Exit option. Unsaved edits are
silently flushed.

----------------------------------------------------------------------------

The Display

  View Menu

    Show controls:    show/hide the control panel    (C-x C-o, C-x C-c)
    Normalize:        cleanup current Snd display
    Combine channels: combine channels into one graph
    Info:             describe current file
    Dots:             use dots or lines in the data displays
    Show marks:       show or hide current marks
    Show y=0:         show or hide the y=0 line
    Verbose cursor:   describe the current sample every time the cursor moves
    Regions:          a browser to examine the region stack
    Color:            a browser that sets color schemes
    Orientation:      a browser that sets spectrogram and wavogram orientation
    Files:            a browser of currently and previously loaded files

The file display can be modified in various ways. To use dots rather than
connected lines, use the Dots option in the View menu (see also dot-size).
Similarly, to show (or hide) the line Y = 0, use the y=0 option. The Region
browser is described under Regions. To open the control panel, use Show
Controls. You can also drag the associated pane button. When many files are
displayed, and the pane buttons have been in use, the overall display can
become a bit of a mess. To return to a state where each file and channel has
a 'normal' amount of space, use the Normalize option.

The Color and Orientation options activate windows that set various aspects
of the sonogram, spectrogram, and wavogram displays. There are eight or nine
colormaps available along with ways to invert the maps, and scale (darken)
them differently according to screen or printer characteristics. And the
graphs themselves can be rotated and resized.

The Info dialog can be left in view and updated with M-v i to reflect the
currently active sound.

The Files option fires up the file browser:

[picture of file browser]

The file browser window shown above provides two lists, one of the currently
active files in Snd, and the other of previously active files. The currently
selected sound is highlighted. The save button saves current edits, if any;
the play button plays the file; and the unlist button removes a file from
the previous files list. Click a current file name, and that sound becomes
the selected sound in the main Snd window. Click a previous file name, and
that file is opened in Snd. The 'update' button runs through the previous
files list checking for files that have been deleted or moved behind Snd's
back. 'Clear' clears the previous files list. The previous files list can be
preloaded via the -p switch to Snd, and the extended commands preload and
preload-file-browser. By preloading your "working set" of sounds, you can
save the bother of picking them up one by one from the clumsy file selection
box.

The Regions option is described below.

----------------------------------------------------------------------------

Other Options

  Options Menu

    FFT size:        length of FFT (defaults to 256)
    Show peaks:      show or hide listing of FFT peaks
    Log freq:        log or linear frequency axis for FFT
    FFT in dB:       log or linear magnitude axis for FFT
    FFT style:       normal FFT, sonogram, or spectrogram
    FFT window:      FFT window choice (defaults to 2nd order Blackman-Harris)
    FFT beta:        FFT window parameter, if relevant
    Zoom style:      where to focus during zooms
    Subsampling off: graph subsampling on or off
    Save options:    save current state of options

The Options Menu applies mainly to the FFT display triggered by setting the
'f' button in the channel window. Most of the options should be
self-explanatory. The FFT is taken from the start (the left edge) of the
current window and is updated as the window bounds change.

The easiest way to change the colormap and graph orientation of the
spectrogram, wavogram, and sonogram, is to use the Color and Orientation
dialogs from the View menu. You can also use the numeric keypad, macros, or
C-x C-x expressions. In the latter case, sono_max sets the maxmimum
frequency displayed, spectro_[xyz]angle and spectro_[xyz]scale set the
orientation and size of the graphs, and spectro_hop sets the density of
traces. The numeric keypad is mapped to these variables as follows:

    variable         increase           decrease
  sono_max          PageUp (9)          PageDown (3)
  spectro_hop       Add (+)             Subtract (-)  ;also wavo_trace
  spectro_zangle    RightArrow (6)      LeftArrow (4)
  spectro_xangle    Ctrl-UpArrow (8)    Ctrl-DownArrow (2)
  spectro-yangle    Ctrl-RightArrow (6) Ctrl-LeftArrow (4)
  spectro_zscl      UpArrow (8)         DownArrow (2)
  fft_size          Multiply (*)        Divide (/)
  dot_size          Delete (.)          Insert (0)

You can get arbitrarily small or large ffts with the Multiply and Divide
keys. The keypad Enter key resets all the spectrogram variables to their
default values. (In Linux, use the corresponding numbered keys -- add shift
to the key sequences given above).

A somewhat frivolous feature, known to Snd as the "wavogram", mimics the
spectrogram in the time domain. The same rotation commands apply to this
display, with the additional variable wavo_hop which sets the density of the
traces. To get this display (or turn it off) call the M-x function (wavo).
It is important in this case to get the length of each trace correct so
successive peaks more or less line up. The trace length in samples is set by
the variable wavo_trace, or the numeric keypad + and - keys.

When large amounts of data are being displayed, Snd may subsample the data
to speed up the display process. This can introduce artifacts of the
sampling interval on rare occasions. The Subsampling option turns this on or
off. If you are displaying large portions of a sound and notice odd
periodicities in the overall envelope displayed, try turning off subsampling
before drawing any conclusions about the data.

The Save options menu option is best explained as a part of the
customization process described below. It basically sets up an
initialization file for Snd that sets all the options to their current
settings; this is intended to be similar to a .emacs file (its default name
is .snd).

The Zoom style option determines the graph point that tries to remain stable
in the display during an x-axis zoom. The default is to zoom onto the cursor
or the beginning of the current selection if either is visible. You can also
have zoom focus on the left edge, right edge, or midpoint of the current
window.
----------------------------------------------------------------------------

Edit Operations

  Edit Menu
    Undo:            Undo last edit                  (C-x C-u or C-_)
    Redo:            Redo last edit                  (C-x C-r)
    Find:            Global search via find dialog   (C-s, C-r)
    Cut:             Cut (delete) selected portion
    Paste:           Paste (insert) selected portion (C-y, C-x i)
    Mix:             Mix (add) selected portion      (C-x q)
    Play selection:  Play selected portion           (C-x p)
    Save selection:  Save selected portion as file   (C-x w)

Editing in Snd is modelled after Emacs in many regards. Each channel has a
cursor (a big "+"), a set of marks, and a list of edits that have not yet
been saved. Most operations take place at the cursor. Operations can be
applied simultaneously to any other channels or sounds by using the 'sync'
button. And as in Emacs, there is a notion of a region ('selection'), and a
list of saved regions. Operations can be applied either to a sample, a
region, a channel, a file, or any number of files at the same time. Where an
operation has an obvious analog in text editing, I've tried to use the
associated Emacs command. To delete the sample at the cursor, for example,
use C-d.

The following sections describe how to move the cursor and the window; how
to change which channel is active; how to use marks and regions; how to
perform various common editing operations. We end with a description of all
the mouse and keyboard editing commands. The 'control panel' provides more
complex editing operations, but has a chapter to itself.

The Active Channel and The Cursor

The Active Channel

The cursor (and its associated channel) is activated by clicking on the time
domain waveform. The active channel normally has a dark edge around the
graphics portion, as a sort of highlight. It is the window that receives
keyboard commands. You can also move between windows with C-x o (forwards or
backwards).

Moving the Cursor

Any mouse click on the waveform causes the cursor to move to that point. To
move the cursor from the keyboard, use:

  <      move cursor to sample 0
  >      move cursor to last sample
  C-<    move cursor to sample 0
  C->    move cursor to last sample

  C-a    move cursor to window start
  C-e    move cursor to window end
  C-b    move cursor back one sample
  C-f    move cursor ahead one sample

  C-n    move cursor ahead one 'line'
  C-p    move cursor back one 'line'
  C-v    move cursor to mid-window

  C-i    display cursor info
  C-j    goto mark
  C-x j  goto named mark

All keyboard commands accept numerical arguments, as in Emacs. If the
argument is a float, it is multiplied by the sampling rate before being
applied to the command, so C-u 2.1 C-f moves the cursor forward 2.1 seconds
in the data.

Moving the Window

The simplest way to move the window (the portion of the data in the current
graph) is to drag the scrollbars with the mouse. The darker scrollbars zoom
in and out; the lighter bars move the window along the x or y axis. Because
sound files can be enormous, the x axis placement needs some special
handling to make it useful in all cases. To move by a single windowful,
click the arrows on the scrollbar. To move by smaller amounts, use the left
and right arrow keys (or zoom with the up and down arrow keys); the control,
shift, and meta keys are multipliers on this movement -- each key adds a
factor of .5 to the multiple, so to move by .25 windows, press control,
meta, left (or right) arrow. A similar mechanism can be used to zoom quickly
onto a particular point; hold the keys and click the mouse in the waveform
and you'll zoom an increasing amount into the data at that point.

Various keyboard commands provide much more precise control of the window
bounds and placement:

  C-l      position window so cursor is in the middle
  C-x b    position window so cursor is on left margin
  C-x f    position window so cursor is on right margin
  [Down]   zoom out, amount depends on shift, control, and meta
  [Up]     zoom in
  [Left]   move window left
  [Right]  move window right
  C-x l    position selection in mid-view
  C-x v    position window over current selection
  C-x C-b  set x window bounds (preceded by number of leftmost sample)
  C-x C-p  set window size (preceded by size as numeric argument)

As in most other cases, the sample numbers (or sizes) can be floats; if the
argument is not an integer, it is multiplied by the sampling rate before
being applied to the command. So, C-u .1 C-x C-p makes the window display .1
seconds of data.

----------------------------------------------------------------------------

Marks

A mark marks a particular sample in a sound file (not a position in that
file). If we mark a sample, then delete 100 samples before it, the mark
follows the sample, changing its current position in the data. If we delete
the sample, the mark is also deleted; a subsequent undo that returns the
sample also returns its associated mark. I'm not sure this is the right
thing, but it's a lot less stupid than marking a position.

Once set, a mark can be moved (redefined) by dragging the horizontal tab at
the top. Click on the triangle at the bottom to play (or stop playing) from
the mark; drag the triangle to play following the mouse.

A mark can be named or unnamed -- the name is displayed above the horizontal
tab at the top of the window. The following keyboard commands relate to
marks:

  C-m       place (or remove if argument negative) mark at cursor
  C-x /     place named mark at cursor
  C-x C-m   add named mark

  C-j       goto mark
  C-x j     goto named mark

The distance from the cursor to a mark can be used as a numeric argument for
other commands by following C-u with C-m. Any number in-between is the
number of marks to jump forward before getting the distance.

The current marks assoicated with a sound can be saved in a file that Snd
will load automatically later. The session command is the simplest way, but
if you want to save just the marks, use the M-x (save-marks) command.

----------------------------------------------------------------------------

Regions

A region (or selection -- I use the words interchangeably here) is a portion
of the sound data. Regions can be defined by dragging the mouse through a
portion of the data. If the mouse drags off the end of the graph, the x axis
moves, in a sense dragging the data along to try to keep up with the mouse;
the further away the mouse is from the display, the faster the axis moves. A
region can also be defined with keyboard commands, much as in Emacs.
C-[space] starts the region definition and the various cursor moving
commands continue the definition.

Once defined, the selection is added to a stack of currently available
regions (the stack size is normally 16). In many cases, the numeric argument
to the command below chooses which region in that stack to use in the
command. Since it can be hard to remember which region is which, especially
since they are constantly on the move as the stack changes, there is a
region browser, similar to the File browser, invoked from the View menu's
Regions option:

[picture of region browser]

The 'save' button here protects the region from deletion as the region stack
grows. 'Print' produces a Postscript rendition of the current graph
contents, using the default eps output name. 'play' plays the region. The
graphical display shows the waveform with arrows to move around in the
channels of multi-channel regions.

The keyboard commands that apply to regions are:

  C-y         paste in current selection at cursor
  C-[space]   start keyboard-based region definition
  C-x a       apply amplitude envelope to selection
  C-x c       define selection from cursor to nth mark
  C-x h       apply external function to selection
  C-x i       insert selection
  C-x n       re-evaluate expression over selection
  C-x p       play selection or region (numeric arg selects region)
  C-x q       mix in selection (float arg = scaler)
  C-x w       save selection as file
  C-x x       evaluate expression over selection
  C-x y       prompt for and apply external function to selection

  C-x l       position selection in mid-view
  C-x v       position window over current selection

Currently the inter-process selection passing mechanism is disabled because
it is very buggy, at least in Motif on the SGI. In the best of all worlds,
you would also be able to copy and paste regions between multiple Snd
programs. (The code exists -- I await a working system).

----------------------------------------------------------------------------

How to...

Save, open, close, print
Delete, insert, mix
Multi-channel operations
Amplitude envelopes
Find
Change samples
Undo, redo, revert
Play
Extend snd
Keyboard macros
Change file format
Miscellaneous commands

Save, open, close, print

Most of these kinds of operations are accessible from the File menu. They
can also be invoked from the keyboard:

  C-x k     close currently selected file
  C-x w     save selection as file
  C-x C-d   print
  C-x C-f   open file
  C-x C-s   save file
  C-x C-w   save currently selected channel as file

The Print command produces an encapsulated PostScript file named snd.eps;
this file can be sent to a printer with the Unix lpr command.

Delete, insert, mix

The fastest way to delete a section is to drag the mouse through it and call
the Edit menu's Cut option. Any active region can be pasted or mixed in
using C-x q and C-x i with a numeric argument (the region number); the
current selection (region 0) can be pasted in by clicking the middle mouse
button. The associated keyboard commands are:

  C-d      delete sample at cursor
  C-k      delete a 'line' -- line_size (128) samples
  C-w      delete current selected portion

  C-o      insert a zero sample at cursor
  C-x i    insert selection at cursor (arg = region number)
  C-x C-i  insert file

  C-y      paste in current selection at cursor

  C-x q    mix in region (float arg scales mix, int arg = region number)
  C-x C-q  mix in file

Multi-channel operations

Normally each operation applies only to the currently active channel. If,
however, its 'sync' button is on, the operations apply to every sound or
channel that also has the sync button set. A multichannel sound also has a
'unite' button to the left of the 'sync' button. If this button is set, all
channels are displayed in one graph; the x and y-axis scrollbars apply to
all the channels at once, as do the 'f' and 'w' buttons; two new scrollbars
appear on the right of the window; the furthest right scrollbar affects the
placement of the window within the overall set of graphs, and the scrollbar
on its left zooms in and out of the overall graph. For stereo files, this is
user-interface overkill, but the hope is to accomodate sounds with many
channels, making it easy to focus on particular portions and so on. The View
menu Combine/Separate channels option affects all active multichannel
sounds.

To get multi-channel selections, set the sync button, then define the
selection (by dragging the mouse) in one channel, and the parallel portions
of the other channels will also be selected.

Currently the sync-able operations include those that move the cursor, reset
or resize the graph bounds, make or paste selections, evaluate expressions,
apply amplitude envelopes, or perform searches.

Amplitude envelopes

An envelope in Snd is a sequence of x y break-point pairs. The x axis range
is arbitrary. For example, to define a triangle curve: '0 0 1 1 2 0'. Or if
you find it easier to read: '(0 0) (1 1) (2 0)'. There is no (obvious) limit
on the number of breakpoints.

To apply an envelope to a sound, use the extended command C-x C-a. If this
command gets a numeric argument, the envelope is applied from the cursor for
that many samples.

  C-x a     apply amplitude envelope to selection
  C-x C-a   apply amplitude envelope to channel

You can also specify a file name to the C-x C-a prompt. In this case the
envelope breakpoints are read from the file which is assumed to contain an
even number of floats.

Find

Searches in Snd refer to the sound data, and are, in general, patterned
after Emacs. When you type C-s or C-r, the minibuffer below the graph is
activated and you are asked for the search expression. The expression is a
piece of C-like code that describes which sample satisfies the search. For
example, to look for the next sample that is greater than .1, we could type:
y > .1. The cursor then moves to the next such sample, if any. Successive
C-s's or C-r's repeat the search. C-x C-s can redefine the search pattern,
which is also cleared by various other commands, much as in Emacs.

The search (and C-x C-x) expression syntax includes most of C's operators,
the standard math library, as well as many variables internal to Snd. To get
at the current sample's value (the sample that the cursor is sitting on),
use 'y'. 'y(n)' refers to the sample n samples from the current one. 'x' is
the current sample number. 'samples' is the total number of samples.

Normally, the search applies only to the current channel. To search all
active files at once, use the Edit menu's find option.

The available C operators are:

+ - * / > >= < <= == !=
( ) { } =+ *= /= -= = || && ? : !

The available math library functions are:

log log10 exp cos sin abs (i.e. fabs) pow sqrt
atan acos asin cosh sinh tanh fmod ceil floor

Variables can be defined with 'float'. Snd-internal variables that are
accessible in these expressions include:

  auto_open:     force open window upon activation (default=true)
  explen:        segment length in expand
  exprmp:        ramp size in expand
  exphop:        hop size in expand
  revfb:         reverb volume
  y_max:         y axis bounds
  revlp:         reverb feedback low-pass coefficient
  x:             cursor sample number
  y:             value at cursor (y(n) also)
  samples:       current length of channel
  srate:         current srate of file
  x_max:         x axis bounds
  color_scale:   color scale (darkness setting)
  color_cutoff:  ignore small values?
  revdecay:      length(secs) of reverb decay
  line_size:     length of a 'line' (for C-p etc)
  contrast_amp:  scaler on contrast input
  fft_size:      fft size
  sono_max:      sonogram y axis limit
  sono_color:    sonogram colormap
  spectro_color: spectrogram colormap
  spectro_hop:   density of spectrogram traces
  spectro_xangle:viewing angle of spectrogram (spectro_yangle, spectro_zangle)
  spectro_zscl:  height of peaks in spectrogram (spectro_yscl, spectro_xscl)
  wavo_trace:    wavogram trace length
  dot_size:      size of graph dots (default = 1)

The search commands are:

  C-r   find backwards
  C-s   find forwards

Change samples

The simplest changes are:

  C-z       set current sample to zero
  C-x C-z   smooth data using cosine

For more complex operations, you need to use expressions, described under
Find. You can, for example, use the expression y = .1 to set the sample at
the cursor to .1. See also Extensions below -- it is possible to add your
own arbitrarily complex editing functions to Snd.

Undo, redo, revert

Snd supports 'unlimited undo' in the sense that you can move back and forth
in the list of edits without any obvious limit on how long that list can
get. The data displayed is always the edited form thereof. Each editing
operation extends the current edit list; each undo backs up in that list,
and each redo moves forward in the list of previously un-done edits. Besides
the Edit and Popup menu options, there are these keyboard commands:

  C-x r     redo last edit
  C-x u     undo last edit
  C-x C-r   redo last edit
  C-x C-u   undo last edit
  C-_       undo last edit

Revert is the same as undoing all edits.

Play

To play a sound, click the 'play' button. While it is playing, you can click
the button again to stop it, or click some other file's 'play' button to mix
it into the current set of sounds being played. To play from a particular
point, set a mark there, then click its 'play triangle' (the triangular
portion below the x axis). To 'rock the reels', that is to play while
dragging the mouse back and forth, drag the mark's play triangle. The Edit
menu 'Play' option plays the current selection, if any. The Popup menu's
'Play' option plays the currently selected sound. And the region and file
browsers provide play buttons for each of the listed regions or files.

The keyboard commands for playing are:

  C-q    play current channel starting at the cursor
  C-t    stop playing
  C-x p  play selection or region (numeric arg selects region)

Except in the browsers, what is actually played depends on the control
panel.

Extend the editor

For full details, see the Extensions chapter. The keyboard commands
associated with these external functions are:

  C-h      repeat last external function call
  C-x h    apply external function to selection
  C-x y    prompt for and apply external function to selection
  C-x C-h  external function call
  C-x C-l  load external function from shared library
  C-x C-y  set up external function to be called whenever window changes

Keyboard macros

As in Emacs, C-x ( begins keyboard macro definition, C-x ) ends it, and C-x
e executes the last keyboard macro. Unlike Emacs, C-x C-e prompts for a name
for the last defined macro; Meta-x name invokes the macro "name", the
command save-macros saves all current named macros, and save-macro saves one
(named) macro in the initialization file (normally .snd). You can define
your own macros in that file using the lisp-like customization syntax:

(defmacro jump ()
  (key f 4)
  (show-controls))

moves the cursor ahead one sample and opens the control panel. We can invoke
this in Snd with M-x jump. A macro can call other macros. I may extend the
syntax here to include more of Lisp, but currently a macro is just a list of
commands.

Change file format

To change header or data format, use the File or Edit menu Save as option:

[picture of save as dialog]

Choose the header type you want, then the data format, (the data format list
will change depending on the header choice). The File version saves the
current selected file. The Edit version saves the currently selected region.

Miscellaneous commands

C-g at any point aborts the current keyboard command sequence, as does any
mouse click.

C-u introduces a numeric argument. Besides the integer and float cases
mentioned several times above, you can also use marks to set the argument.
If the (optional) number after C-u is followed by C-m, the resultant number
passed to the command is the distance (in samples) from the cursor to the
n-th successive mark. That is C-u C-m C-f is the same as C-j.

C-x introduces an 'extended command'. It can be preceded by a numeric
argument or aborted with C-g. C-x halts any on-going region definition.

C-x d prompts for the temporary directory name. Snd saves some editing
operations in temporary files, rather than in-core buffers. If the temporary
directory has been set (in various ways), it is used; otherwise Snd looks
for the TMPDIR environment variable; if it is not found, or is null, the
directory /var/tmp is used.

C-x C-c closes the control panel. C-x C-o opens the panel.

C-x C-x evaluates an expression; C-x C-n re-evaluates it.

----------------------------------------------------------------------------

Keyboard Commands

There are two types of keyboard commands in Snd: those associated with the
Meta ('Alt') key, used as mouse equivalents for various menu options, and
all the rest. The menu-related commands are shown underlined in the menubar.
You type the underlined letter with Meta, then just the letter (no Meta) of
the option you want. The menu-related commands are:

----------------------------------------------------------------------------

 File Menu        Edit Menu             View Menu               Options Menu           Help Menu

M-f o: Open      M-e u: Undo           M-v n: Normalize        M-o s: FFT size     M-h c: Click for help
M-f c: Close     M-e r: Redo           M-v c: Combine Channels M-o p: Show peaks   M-h o: Overview
M-f s: Save      M-e f: Find           M-v i: Info             M-o l: Log freq            FFT
M-f a: Save as   M-e c: Cut            M-v d: Dots             M-o d: FFT in dB           Find
M-f r: Revert    M-e p: Paste          M-v m: Show marks              FFT style           Undo and Redo
M-f v: View      M-e m: Mix            M-v y: Show y=0         M-o w: FFT window          Sync
M-f n: New       M-e p: Play selection M-v s: Show controls    M-o b: FFT beta            Speed
M-f p: Print     M-e s: Save selection        Verbose cursor          Focus style         Expand
M-f x: Exit                            M-v r: Regions          M-o o: Subsampling off     Reverb
                                              Color            M-o a: Save options        Contrast
                                       M-v o: Orientation                                 Envelope
                                       M-v b: Files                                       Marks
                                                                                          Formats
                                                                                          Customization
                                                                                          User functions
----------------------------------------------------------------------------

The rest of the keyboard commands refer to the currently active graph, and
any graphs that are currently sync'd to it. In general, commands are
analogous to Emacs where such an analogy exists; in other cases, an extended
command followed by a key with control affects the current channel whereas
the same key without control affects the selection. Case is not significant.

Most of the commands accept a numeric argument which can be either an
integer or a float; an integer causes the command to be repeated that many
times; the float is usually multiplied by the sound's sampling rate, then
applied that many times. So, for example, C-u 1.0 C-f causes the cursor to
move ahead one second in the sound. The argument can be negative to reverse
the sense of the command, as in Emacs. It is often useful to use the
distance to a mark as a count. If the C-u n command is followed by C-m, the
'n' determines how many marks to move to, then the count returned is the
distance from the cursor to that mark. For example, C-u C-m returns the
number of samples between the cursor and the next mark, so C-u C-m C-z zeros
all the samples between the cursor and the next mark.

The commands are:

  [Down]  zoom out
  [Up]    zoom in
  [Left]  move window left
  [Right] move window right
  <:      move cursor to sample 0
  >:      move cursor to last sample
  C-<:    move cursor to sample 0
  C->:    move cursor to last sample
  C-a:    move cursor to window start
  C-b:    move cursor back one sample
  C-d:    delete sample at cursor
  C-e:    move cursor to window end
  C-f:    move cursor ahead one sample
  C-g:    abort current command
  C-h:    repeat external function call
  C-i:    display cursor info
  C-j:    goto mark
  C-k:    delete one line's worth of samples
  C-l:    position window so cursor is in the middle
  C-m:    place (or remove) mark at cursor location
  C-n:    move cursor ahead one 'line'
  C-o:    insert one zero sample at cursor
  C-p:    move cursor back one 'line'
  C-q:    play current channel starting at cursor
  C-r:    repeat last search backwards
  C-s:    search according to an expression
  C-t:    stop playing
  C-u:    start count (numerical argument) specification
  C-v:    move cursor to mid-window
  C-w:    delete current region
  C-x:    start extended command (see below)
  C-y:    paste in region
  C-z:    set current sample to 0.0
  C-_:    undo last edit
  C-[Space]: start region definition (arg<0 => cancel and deselect)

The extended commands (preceded by C-x) are:

  a:    apply envelope to selection
  b:    position window so cursor is on left margin
  c:    define selection from cursor to nth mark
  d:    get temp dir name
  e:    execute keyboard macro
  f:    position window so cursor is on right margin
  h:    apply external function to selection
  i:    insert region
  j:    goto named mark
  k:    close file
  l:    position selection in mid-view
  n:    re-evaluate expression over selection
  o:    move to next or previous graph
  p:    play selection or region n
  q:    mix in region
  r:    redo last undone edit
  u:    undo last edit
  v:    position window over current selection
  w:    save selection as file
  x:    evaluate expression over selection
  y:    get and apply external function to selection
  z:    smooth selection
  /:    place named mark
  (:    begin keyboard macro definition
  ):    end keyboard macro definition

  C-a:  apply amplitude envelope
  C-b:  set x window bounds (preceded by first sample number)
  C-c:  hide ("close") controls
  C-d:  print
  C-f:  open file
  C-g:  abort command
  C-h:  external function call
  C-i:  insert file
  C-l:  load user function from shared library
  C-m:  add named mark
  C-n:  re-evaluate expression
  C-o:  show ("open") controls
  C-p:  set window size (preceded by size)
  C-q:  mix in file
  C-r:  redo last undone edit
  C-s:  save file
  C-u:  undo last edit
  C-v:  set window size as percentage of total
  C-w:  save current channel in file
  C-x:  evaluate expression
  C-y:  set up auto-call of external function
  C-z:  smooth using cosine

----------------------------------------------------------------------------

The Control Panel

The control panel is the portion of each sound's display beneath the channel
graphs. It is normally hidden, except for the upper portion that shows the
file name, the sync and play buttons, and the minibuffer (the portion in
between that opens into a text window when activated).

[picture of Snd control panel]

The controls are: amp, speed, expand, contrast, reverb, and filter.

'Speed' here refers to the rate at which the sound data is consumed during
playback. Another term might be 'srate'. Snd uses linear interpolation to
perform the speed change. The arrow button on the right determines the
direction we move through the data.

'Expand' refers to a kind of granular synthesis used to change the tempo of
events in the sound without changing pitch. Successive short slices of the
file are overlapped with the difference in size between the input and output
hops (between successive slices) giving the change in tempo. This doesn't
work in all files -- it sometimes sounds like execrable reverb or is too
buzzy -- but it certainly is more robust than the phase vocoder approach to
the same problem.

There are a variety of variables that control expand's hop sizes, segment
lengths, and overall segment envelopes. These can be set in the minibuffer
via C-x C-x, or in your Snd init file. In the former, the syntax is C-like;
in the latter, Lisp-like. The variables are:

  exprmp: the length (percentage of the grain envelope) of the ramp (.4, 0 to .5)
  explen: the length (seconds) of each slice (.15)
  exphop: the hop size (.05) (also seconds)

The expander is on only if the expand button is set.

The reverberator is a version of Michael McNabb's Nrev. In addition to the
controls in the control pane, you can set the reverb feedback gain and the
coefficient of the low pass filter in the allpass bank. The variables are
'revfb' and 'revlp'. The reverb is on only if the reverb button is set. The
reverb length field takes effect only when the reverb is set up (when the
DAC is started by clicking 'play' when nothing else is being played).

'Contrast enhancement' is my name for a somewhat weird waveshaper or
compander. It phase-modulates a sound, which can in some cases make it sound
sharper or brighter. For softer sounds, it causes only an amplitude change.
To scale a soft sound up before being 'contrasted', use the variable
contrast_amp. The function maxamp (M-x maxamp) returns the channel's max
amp, so the inverse of that is a good first guess for contrast_amp. Contrast
is on only if the contrast button is set.

The filter is an arbitrary order FIR filter specified by giving the
frequency response envelope and order in the text windows provided. You can
also specify the filter coefficients in a file of floats, then load them
into the Snd filter by typing the file name in the filter envelope text
window. The filter is on only if the filter button is set.

The 's' (for 'Save') button saves the current control panel state for a
subsequent 'Restore'. The 'r' (for 'Restore') button returns the control
panel to the state at the time of the last save, or the initial state if
there has been no save.

Except for the filter setting and the reverb length setting, the controls
can be changed as the sound plays. You can record the changes you make by
setting the 'Record' button, and replay the new version later with 'Replay'.
The latter actually takes effect only when play is set in motion. 'Replay'
and 'Record' can be set at the same time, allowing you to add more changes
or override previous ones. To take all the current recorded changes and turn
them into a giant 'edit' of the file, click the 'Apply' button. Apply may
change the length of the file; for example, if reverb is on, the reverb
decay length (revdecay) is added onto the end. Once Apply has taken effect,
the controls section is not currently reset to its clean state, so to hear
the applied version of the sound (i.e. to hear the effect of the edit you
just did by clicking Apply), remember to click the 'r' button to reset the
controls. Maybe this should be the default...

Snd's control panel is not intended to replace mixers or CLM -- I view it as
a quick-and-dirty 'cartooning' facility. After finding useful settings,
you'll want to save the recorded changes and run them through CLM or some
other hi-fi signal processing system.

The keyboard commands associated with the control panel are:

  C-x C-o   show ("open") control panel
  C-x C-c   hide ("close") control panel

----------------------------------------------------------------------------

Customization

Nearly everything in Snd can be set in an initialization file, read after a
system crash from an automatically generated backup file, loaded any time
from a session file, specified via inter-process communciation from any
other program, invoked via M-x, or imbedded in a macro. The syntax used is
lisp-like; the point of view adopted here will be that of someone writing an
intialization file to customize his version of Snd. The same syntax is used
in the backup file (normally called ".snd-backup"), the initialization file
(normally called "~/.snd"), the IPC channel (see snd-test.cl for an example
of the latter), macro definitions, and session files. The commands that Snd
recognizes in these contexts are:

          ;; File Menu
 (open file)              ;open file read/write
 (close file)             ;close file, add to previous files list
 (save-as file1 file2)    ;save current state of file1 as file2
 (revert file)            ;cancel edits, if any, to file
 (view file)              ;open file read-only
 (new)                    ;create new (empty) file
 (print)                  ;print current graphs
 (exit)                   ;exit Snd

          ;; Edit Menu
 (undo n)                 ;undo last n edits in current channel
 (redo n)                 ;redo last n undone edits in current channel
 (find expr)              ;find sample that satisfies expr
 (cut)                    ;delete selected data, add to region stack
 (paste n)                ;paste region n at current cursor position
 (play file) (stop file)  ;play or stop playing file

          ;; View Menu
 (show-marks) (hide-marks);show or hide marks
 (show-y-zero)            ;show or
   (hide-y-zero)          ;  hide the y=0 line (normally hidden)
 (dots) (lines)           ;show waveforns using dots or lines
                          ;dot-size variable (keypad ".") sets size of dot
 (unite) (separate)       ;combine or separate channels in multi-channel sounds
 (normalize)              ;normalize Snd display
 (info)                   ;show sound type, header comment etc
 (show-controls)          ;show or
   (hide-controls)        ;  hide the control panel

          ;; Options Menu
 (show-peaks) (hide-peaks);fft display can include peaks
 (peaks)                  ;place peak data in text window
 (fft-style n)            ;0=normal, 1=sonogram, 2=spectrogram
 (focus-style n)          ;0=window left, 1=window right,
                          ;2=active entity (cursor or region), 3=window middle
 (fft-dB) (fft-linear)    ;choose fft amplitude axis scaling (log or linear)
 (fft-log-freq)           ;choose fft frequency axis scaling (log or
    (fft-linear-freq)     ;  linear)
 (subsampling-on)         ;turn data subsampling on or
    (subsampling-off)     ;  off
 (silent-cursor)          ;turn minibuffer info about cursor position off or
    (verbose-cursor)      ;  on

          ;; Snd as a whole
 (fit-data)               ;match y axis to data excurion or
   (dont-fit-data)        ;  just use -1.0 to 1.0 as a first guess
 (default-output-type n)  ;region temp file header choice
 (disconnect)             ;close IPC fifos (named pipes)

          ;; Sound window
 (sound file)             ;return the sound data in file (for CLM)
 (goto-sound file)        ;select file
 (goto-channel file chan) ;select channel of file
 (select-sound n)         ;select the nth sound in the current sound list
 (select-channel n)       ;select channel n in current sound
 (sync) (unsync)          ;set or unset sync button of currently selected sound
 (save-controls)          ;save or
   (restore-controls)     ;   restore the control panel settings
 (amp-env beg dur scl env);apply amp env to current synced channels
                          ;   from beg for dur (both in samples) scaled by scl

          ;; Channel window
 (x-axis low high)        ;set x axis bounds
 (y-axis max)             ;set y axis max (normally 1.0)
 (axes x0 x1 y0 y1)       ;set x and y axis bounds (floats)
 (maxamp)                 ;return current channel maxamp
              ;write current marks (sound-relative) to filename.marks
 (goto-mark name)         ;move cursor to named mark
 (mark name)              ;return sample associated with named mark
 (delete-mark)            ;delete mark at cursor
 (setf (mark name) sample);place mark at sample
 (show-fft) (hide-fft)    ;show or hide the fft window
 (show-wave) (hide-wave)  ;show or hide the time-domain waveform

          ;; various browser
 (preload directory)      ;add sounds in directory to previous files list
                          ;  (preload .) -> preload current directory
 (preload-files-browser list-of-files)
                          ;put list of files in previous files list
                          ;  (preload-file-browser pistol.snd fyow.snd)
 (raw-sound srate chans format defaults)
                          ;set raw data file defaults
 (color-dialog width height)
                          ;start the color dialog (size = width by height)
 (orientation-dialog width height)
                          ;start the orientation dialog
 (file-dialog width height)
                          ;start the file browser
 (just-sounds) (all-files);in the file selection box, either set
                          ;  or unset the just-sounds button

          ;; regions
 (region n)               ;return data of region n
 (setf-region low high)   ;define region from sample low to high
 (insert beg num)         ;insert data at beg for num samples
 (change beg num)         ;change data (new data follows)
 (delete beg num)         ;delete section from beg for num
 (temp-dir dir)           ;set the temporary file directory to dir
 (copy)                   ;copy region to X/Motif clipboard (normally disabled)

          ;; keyboard
 (command cmd state)      ;mimic keyboard cmd, state: control/shift/meta (4/1/8)
 (key key state)          ;key = char here, not ASCII as in command

          ;; parser
 (float a)                ;declare a new variable
 (session file)           ;save current Snd state as text file of commands
 (load file)              ;load a file of these commands
                          ;  (e.g. continue earlier session or get saved macros)

 (load-function lib fun)  ;load external function from shared library
 (function fun)           ;call the external function

 (save-macros)            ;save all current macros at end of init file
 (save-macro name)        ;save the current macro under name
 (eval expr)              ;send expr to the C-style parser/evaluator

The variables that Snd recognizes (in this case) are:

   cursor y window-height window-width fft-window fft-size fft-beta
   expand-button contrast-button reverb-button filter-button dot-size
   amp speed contrast expand revscl revlen line-size filter filter-order
   explen exprmp exphop revfb y-max revlp x color-scale sono-max contrast-amp
   remember-state raw-srate raw-chans raw-format raw-defaults header-type
   auto-open spectro-[xyz]angle spectro-[xyz]scl spectro-hop combine-channels
   wavo-hop wavo-trace color-cutoff color-inverted spectro-color sono-color

The operations setf, setq, incf, and decf can be used to change these
variables. 'cursor' refers to the position of the currently active cursor.
'window-height' and 'window-width' refer to the overall main Snd window.

As an example of an initialization file, say we always want the fft graph
with its associated peaks displayed; and the file browser to default to
listing only sound files; and any multichannel file to combine its channels
into one graph. We create the file "~/.snd" and place in it:

(show-peaks)
(show-fft)
(just-sounds)
(setf combine-channels 1)

The peaks command opens a help window with the fft peak information,
including the unscaled, linear amplitudes.

Saved State and Sessions

If you'd like Snd to start up in the state you left it in upon last exiting
(within reason), set the variable remember-state to 1. This causes Snd to
write the .snd-backup file just before exiting; it will then read that file
the next time it is invoked if it doesn't have any other arguments. At any
time you can save the current state of Snd by calling (session name) where
name is a file name. You can start in this state by calling Snd with this
file name and the "-l" switch: snd -l name. This is called a session file,
but it is in exactly the same format as the initialization file discussed
above, and can be edited, renamed, or whatever. To load such a file after
startup, use the command load: M-x (load name).

Snd resources

There are a few X-style resources that Snd explicity looks for (see Snd.ad):

initFile       "~/.snd"
backupFile     ".snd-backup"
epsFile        "snd.eps"
overwriteCheck 0

buttonFont     -*-times-medium-r-*-*-14-*-*-*-*-*-iso8859-1
boldbuttonFont -*-times-bold-r-*-*-14-*-*-*-*-*-iso8859-1
axisLabelFont  -*-times-medium-r-normal-*-20-*-*-*-*-*-iso8859-1
axisNumbersFont -*-courier-medium-r-normal-*-14-*-*-*-*-*-iso8859-1
helpTextFont    9x15

useSchemes      none
lightestcolor   ivory1
basiccolor      ivory2
darkcolor       ivory3
darkestcolor    ivory4
textcolor       lightsteelblue1
cursorcolor     cyan
selectioncolor  ivory4

You can experiment with other choices by using the -xrm command line
argument:

  snd -xrm '*Lightestcolor: Red' oboe.snd
  snd -xrm '*AxisNumbersFont: 6x10' oboe.snd
  snd -xrm '*overwriteCheck: 1' oboe.snd
  snd -xrm "*useSchemes: all" \
      -xrm "*scheme: Pacific"

There's a list of widget names for Xresource files, now somewhat
out-of-date, in the file snd-widgets.txt. If you use schemes, the color
resources mentioned above are ignored.

----------------------------------------------------------------------------

Extensions

You can load your own analysis, editing, or display functions into Snd.
These functions have access to all the sound data and can operate on it in
many ways. There are several examples of user functions in the Snd source
file snd-ufunex.c, normally loaded into sndlib.so during the Snd make
process. These examples should give an idea of how to add your own favorite
functions to Snd. I've tried to provide copious comments in the source to
explain what's going on. Due to limitations in shared object files, the
communication path between Snd and a user function is somewhat peculiar.

The interface is defined in snd-ufun.h; briefly, a user function is loaded
via C-x C-l or the command (load-function library function). In both cases
the arguments are unquoted. For example, the rms function in snd-ufunex.c
can be loaded into Snd with:

C-x C-l sndlib.so,rms

Once loaded, the function can be invoked with:

C-x C-h rms

and thereafter with C-h. If instead, you invoke the function with C-x C-y,
the function will be called automatically thereafter each time the data in
the channel window changes. This can be cancelled by giving a '-' argument
to C-x C-y. Beware of setting up an automatic call to a function that edits
the Snd data! To apply the function to the current selection, use C-x h or
C-x y. Arguments can be passed to the user function:

C-x C-h a_func(4,3.14)

See snd-ufunex.c if you're interested in writing one of these functions.

[picture of Snd with user function]

Here we are running the sonogram with sono_max set to .5, and the
autocorrelation function in sndlib.so, invoked with C-x C-y so that it
updates automatically alongside the sonogram.
----------------------------------------------------------------------------

Planned Enhancements

On my list of things to do: integrate Snd much more closely with CLM, with,
in particular, an edit history mechanism; add more external functions to
sndlib.so -- perhaps some sort of wavelet package; make the fft and
user-function graphics editable; use a fancier sampling rate conversion
function if current machines can keep up with it; enable multiple views of
the same file; add a sine probe tone window; add a graphical envelope
definition window; make some pretty icons; add a mode where the cursor runs
along showing where we are as we play a sound; perhaps add an fft-filtering
dialog; improve the view normalize option; look at possible ports to Windows
95, Openstep, perhaps Be; add escape-to-Snd applets to this document.

----------------------------------------------------------------------------

Index

        Action           Menu       Keyboard          M-x                 Other
 abort command                    Cg                             mouse click
 amp env                          Cx Ca, Cx a amp-env
 autocall external
 func                             Cx Cy

 axis bounds                      Cx Cb, Cx   axes, [xy]-axis    -s switch to Snd
                                  Cp
 axis fits data                               fit-data
 call external
 function                         Ch, Cx Ch   function           Cx h -> selection
 center cursor                    Cl, Cv
 center selection                 Cx l
 change samples                   Cz, Cx Cz   change             see also external funcs
 close file          File: Close  Cx k        close
 color               View: Color              color-dialog       color-scale,color-cutoff

 combine channels    View:                    unite, separate    also setf
                     Combine                                     combine-channels
 continue session                             load               -l switch to Snd

 control panel       View: Show   Cx Co, Cx   show-controls      drag pane sash
                     controls     Cc
 create new file     File: New                new
 cut selection       Edit: Cut    Cw          cut
 define mark                      Cx /, Cx Cm setf mark          also Cm

 define selection                 C[space],   setf-region        mouse drag
                                  Cx c
 delete mark                      - Cm        delete-mark
 delete samples      Edit: Cut    Cd, Ck      delete             see also external funcs
 describe file       View: Info               info               Popup: Info
                     View:
 describe sample     Verbose      Ci          verbose-cursor     also cursor, y
                     cursor

 dots or lines       View: Dots               dots, lines        dot_size: numberpad '.',
                                                                 '0'

 evaluate expression              Cx Cx, Cx   eval               over region: Cx x, Cx n
                                  Cn

 examine selections  View:                    region
                     Regions
 exit Snd            File: Exit               exit               mwm menu: close or exit

 fft in dB           Options: FFT             fft-db
                     in dB

 fft log freq        Options: Log             fft-log-freq
                     freq

 fft peaks           Options:                 show-peaks         M-x peaks for full info
                     Show Peaks

 fft size            Options: FFT             fft-size           fft_size: numberpad:
                     size                                        '*', '/'

 fft window          Options: FFT             fft-window
                     window

 fft window parameterOptions: FFT             fft-beta
                     beta

 fft/sono/spectrogramOptions: FFT             fft-style [0]
                     style

 file formats        File: Save               raw-sound          defaultOutputType
                     as
 file lists          View: Files              file-dialog
 find                Edit: Find   Cs or Cr    find
 insert file                      Cx Ci
 insert samples                               insert             see also external funcs
 insert selection    Edit: Paste  Cy or Cx i  paste
 insert zeros                     Co, Cz
 keyboard macros                  C(, Cx e    defmacro           also command, key
 load external
 function                         Cx Cl       load-function
 load session                                 load
 max amp                                      maxamp
 mix file                         Cx Cq
 mix selection       Edit: Mix    Cx q
 move cursor ahead                Cf, Cn, Ce  incf cursor        also >
 move cursor back                 Cb, Cp, Ca  decf cursor        also <
 move to mark                     Cj, Cx j    goto-mark          Cx j -> named mark

 move window ahead                [Left], Cx                     scroll bars
                                  f

 move window back                 [Right], Cx                    scroll bars
                                  b
 multichannel ops                             sync               sync button

 normalize display   View:                    normalize          Popup: Normalize
                     Normalize
 numeric arguments                Cu                             see marks as args
 open file           File: Open   Cx Cf       open               Files dialog: click file
 open file read-only File: View               view

 orientation         View:                    orientation-dialog mapped to number pad
                     Orientation
 overwrite check                                                 overwriteCheck
 play channel                     Cq, Ct

 play file           Popup: Play              play, stop         File or main window:
                                                                 'play'
 play selection      Edit: Play   Cx p
 preload directory                            preload            -p switch to Snd
 print file          File: Print  Cx Cd       print              epsFile resource
 redo edit           Edit: Redo   Cx Cr       redo               Popup: Redo
 revert file         File: Revert             revert
 save channel                     Cx Cw
 save control state                           save-controls      'save' button
 save file           File: Save   Cx Cs       save               Popup: Save

 save file as        File: Save               save-as            see also overwriteCheck
                     as
 save macros                                  save-macros        also session
 save marks                                   save-marks         also session

 save options        Options:
                     Save options

 save selection      Edit: Save   Cx w
                     selection
 save session                                 session            also remember-state
 select sound                     Cx o        goto-sound         File dialog: click file
 show freq domain                             show-fft           'f' button

 show marks          View: Show               show-marks
                     marks
 show time domain                             show-wave          'w' button
 smooth samples                   Cx Cz
 smooth selection                 Cx z

 sonogram            Options: FFT             setf fft-style 1   sono_color,sono_max
                     style

 spectrogram         Options: FFT             setf fft-style 2   orientation, scaling
                     style

 subsampling         Options:                 subsampling-on
                     Subsampling
 temp directory                   Cx d        temp-dir           TMPDIR or /var/tmp
 undo edit           Edit: Undo   C_ or Cx Cu undo               Popup: Undo
 wavogram                                     wavo               wavo_trace, wavo_hop

 y=0 line            View: Show               show-y-zero
                     y=0

 zoom focus          Options:                 focus-style
                     Zoom style
 zoom window                      [Up],[Down] axes, x-axis       control keys intensify
