.TH STD.SFALIASES 7 BICSF "1st Edition" "Berkely/IRCAM/CARL Sound Filesystem"
.SH NAME
std.sfaliases std.cshrc \- standard BICSF CSH aliases
.SH SYNOPSIS
source
.B std.cshrc
.SH DESCRIPTION
.LP
BICSF depends upon a set of shell variables and aliases to maintain
the notion of a separate parallel soundfile directory.  These must
be read and evaluated by each shell that will potentially execute soundfile
commands, before the commands can operate successfully.  
.LP
It is most conveniently arranged for if the user sources the std.cshrc
file in the user's 
.I .cshrc 
file.  This way, each shell created by the user is equipped to execute
soundfile commands.
.LP
BICSF standard aliases are listed below.  On an installed system, these
aliases will be automatically added to every 
.IR csh (1) 
shell exec'ed
by the user, including the login shell.
The purpose of the aliases is to institute program renaming, e.g.,
to select the appropriate program to execute when the user says
.I play,
or to map an ``old'' CARL or IRCAM program name to the ``new'' BICSF
naming convention of having all BICSF programs end with 
.I sf.
Another purpose is to implement the notion of parallel current working
directories, one for sound, the other for one's conventional UNIX 
.I cwd.
.LP
The BICSF 
current working directory
is implemented as a 
.IR csh (1)
variable,
.I SFDIR.
All other BICSF programs refer to this variable to cd to the
correct directory before executing the appropriate program.  In this way
standard
.I csh
filename globbing is allowed to refer to one's separate BICSF directory.
Some aliases, such as 
.I cdsf
are pure shell commands, designed to manipulate
.I SFDIR.
Other operations, such as removing files, are done
by wrapping an alias around a
standard UNIX utility.  In this case the alias
.I rmsf
invokes the standard UNIX
.IR rm (1).
Some programs one expects would use standard UNIX commands have to
be done specially, such as
.I lsf,
because of the additional flags it must have to print the contents
of a soundfile header.
.SH LOGIN SEQUENCE
Upon startup,
.IR csh (1)
reads the file 
.I ~user/.cshrc,
which (besides everything else the user wants done there) must read in the 
.I std.cshrc 
file.  This file must exist in a well-known place, for instance,
.I /usr/local/lib,
or
.I /`hostname`/lib,
depending on your system administration.
See
.IR config.m4.7 (7carl)
for more information.
.I std.cshrc
does two things: it sources
.I std.sfaliases,
and declares some miscellaneous command aliases (these are
optional \- edit to local taste).
.I std.sfaliases
usually lives wherever 
.I std.cshrc
lives.
.SH SHELL VARIABLES
The user's 
.I .cshrc 
file may define the following variables before
sourcing 
.I std.cshrc
(and subsequently
.I std.sfaliases).
.DS
ROOT_SFDIR	\- mount point of the default soundfile partition
HOME_SFDIR	\- home soundfile directory (where you go by saying just "cdsf")
SFDIR		\- initial current working soundfile directory
BINSF		\- location of soundfile binaries
.DE
If the user's 
.I .cshrc
file does not set these variables, default values are supplied in 
.I std.sfaliases.
.SH THE ALIASES
.LP
A standard set of these aliases follows.
.DS
# Aliases for soundfile-oriented commands.
alias	aimonitor	'(cd $SFDIR; $BINSF/aimonitor \!*)'
alias	aiplay	'(cd $SFDIR; $BINSF/aiplay \!*)'
alias	airecord	'(cd $SFDIR; $BINSF/airecord \!*)'
alias	catsf	'(cd $SFDIR; $BINSF/catsf \!*)'
alias	cdsf	'set TEMP_CWD=$cwd; set TEMP_STATUS=1; set ARGS=(\!*); \\
	(cd $SFDIR; cd \!*; if($#ARGS == 0)cd $HOME_SFDIR); \\
	if($status) set TEMP_STATUS=0; if($TEMP_STATUS) cd $SFDIR;  \\
	if($TEMP_STATUS)cd \!*; if($#ARGS == 0)cd $HOME_SFDIR; \\
	if($TEMP_STATUS)setenv SFDIR $cwd; cd $TEMP_CWD; \\
	unset TEMP_STATUS ARGS TEMP_CD'
alias	chgrpsf	'(cd $SFDIR; /bin/chgrp \!*)'
alias	chmodsf	'(cd $SFDIR; /bin/chmod \!*)'
alias	chownsf	'(cd $SFDIR; /etc/chown \!*)'
alias	cpsf	'(cd $SFDIR; /bin/cp \!*)'
alias	createsf	'(cd $SFDIR; $BINSF/createsf \!*)'
alias	dsplay	'(cd $SFDIR; $BINSF/dsplay \!*)'
alias	dsrecord	'(cd $SFDIR; $BINSF/dsrecord \!*)'
alias	dyplay	'(cd $SFDIR; $BINSF/dyplay \!*)'
alias	dyrecord	'(cd $SFDIR; $BINSF/dyrecord \!*)'
alias	fromsf	'(cd $SFDIR; $BINSF/fromsf \!*)'
alias	gainsf	'(cd $SFDIR; $BINSF/gainsf \!*)'
alias	lsf	'(cd $SFDIR; $BINSF/lsf \!*)'
alias	mkdirsf	'(cd $SFDIR; /bin/mkdir \!*)'
alias	mksfdir	mkdirsf
alias	monitor	'(cd $SFDIR; $BINSF/aimonitor \!*)'
alias	mvsf	'(cd $SFDIR; /bin/mv \!*)'
alias	normsf	'(cd $SFDIR; $BINSF/normsf \!*)'
alias	pansf	'(cd $SFDIR; $BINSF/pansf \!*)'
alias	peaksf	'(cd $SFDIR; $BINSF/peaksf \!*)'
alias	play	'(cd $SFDIR; $BINSF/aiplay \!*)'
alias	pwdsf	'(cd $SFDIR; /bin/pwd \!*)'
alias	pwsf	pwdsf
alias	querysf	'(cd $SFDIR; $BINSF/querysf \!*)'
alias	record	'(cd $SFDIR; $BINSF/airecord \!*)'
alias	restorsf	'(cd $SFDIR; $BINSF/restorsf \!*)'
alias	retrosf	'(cd $SFDIR; $BINSF/retrosf \!*)'
alias	rmdirsf	'(cd $SFDIR; /bin/rmdir \!*)'
alias	rmsf	'(cd $SFDIR; /bin/rm \!*)'
alias	scalesf	'(cd $SFDIR; $BINSF/scalesf \!*)'
alias	setsf	'(cd $SFDIR; $BINSF/setsf \!*)'
alias	sfcreate	'(cd $SFDIR; $BINSF/createsf \!*)'
alias	sndawk	'(cd $SFDIR; $BINSF/sndawk \!*)'
alias	sndcat	'(cd $SFDIR; $BINSF/catsf \!*)'
alias	sndgain	'(cd $SFDIR; $BINSF/gainsf \!*)'
alias	sndin	'(cd $SFDIR; $BINSF/fromsf \!*)'
alias	sndinfo	'(cd $SFDIR; $BINSF/querysf \!*)'
alias	sndnorm	'(cd $SFDIR; $BINSF/normsf \!*)'
alias	sndout	'(cd $SFDIR; $BINSF/tosf \!*)'
alias	sndpan	'(cd $SFDIR; $BINSF/pansf \!*)'
alias	sndpeak	'(cd $SFDIR; $BINSF/peaksf \!*)'
alias	sndreverse	'(cd $SFDIR; $BINSF/retrosf \!*)'
alias	sndscale	'(cd $SFDIR; $BINSF/scalesf \!*)'
alias	sndset	'(cd $SFDIR; $BINSF/setsf \!*)'
alias	sndtransp	'(cd $SFDIR; $BINSF/transpsf \!*)'
alias	swabsf	'(cd $SFDIR; $BINSF/swabsf \!*)'
alias	tarsf	'(cd $SFDIR; $BINSF/tarsf \!*)'
alias	tosf	'(cd $SFDIR; $BINSF/tosf \!*)'
alias	transpsf	'(cd $SFDIR; $BINSF/transpsf \!*)'
.DE
.SH FILES
.I std.sfaliases
and
.I std.cshrc
ordinarily live in
/`hostname`/lib
but may also be in
/usr/local/lib
or elsewhere depending upon local administration.
See
.IR config.m4 (7carl)
for details.
.SH AUTHOR
Rob Gross (IRCAM), Gareth Loy (CARL)
