sfplay(1) sfplay(1) NAME sfplay - play soundfile SYNOPSIS sfplay [ options ... ] soundfiles ... where options are: -printinfo -reporterror -inputraw [ input keywords ... ] end -nice -device <device> -transpose <rate> -gain <gain> DESCRIPTION sfplay plays the given soundfile(s). It will play files in many formats not supported by the audio hardware, by automatically converting the data as it is played. If invoked with no arguments, sfplay will display help. By default, sfplay ignores any file specified that is not a valid soundfile, reporting no error. The -reporterror (-r) option tells sfplay to report an error in this case. It is often useful to see information about soundfiles as they are played. The -printinfo option prints this information in "sfinfo -s"- format. By default, sfplay will set the hardware sampling rate to the rate of the file(s) being played. If the specified audio hardware is being used (that is, another application has an output port open, or monitoring is enabled) at the time a given file is played, sfplay will rate-convert the sound to match the current output port setting. Since rate-conversion will consume processor cycles, the -nice option can be specified so that sfplay will not change the hardware sampling rate or rate-convert. This will result in the file sounding incorrect, but the application using the audio device previously will not be disturbed, and rate-conversion overhead will be spared. The -rude option can also be specified, in which case sfplay will force the current audio hardware sampling rate to the rate of the file(s) being played. In this case, the application using the audio device previously will be disturbed by the rate change. Finally, the -match option can be specified, which will always rate-convert the sound to the current audio hardware sampling rate, regardless of whether the audio hardware is being used by another application. sfplay will also rate-convert the sound to match the current output port setting when the audio device specified does not support the native sampling rate of the file(s) being played. The -nice option can be used to override the default in this case as well. This program will play audio files in any recognized audio format (i.e., any sample width, byte order, sample type, channel count) including all supported compression types. It will play sounds with any number of channels (mixing them down as is appropriate), will play at any of the standard sampling rates appearing on the Audio Control Panel, and will convert any other rates to match. As a special case it will play codec- rate (8012.8210513 Hz) files at 8000.00 Hz, and issue a warning to this effect. The -transpose option tells sfplay to play a soundfile at an alternate sampling rate, as set by <rate>. The -gain option tells sfplay to apply anywhere from 30dB of attenuation (-30dB) to 6dB of gain (+6dB) to the audio output. The gain value should be specified in a floating point format (-30.0 to 6.0). RAW DATA sfplay can also play soundfiles which contain raw (headerless) data. In this case the data format must be specified, using the appropriate keywords with the -inputraw (-i) option. For example, many Macintosh and PC soundfiles are actually raw data files containing 8-bit unsigned mono or interleaved stereo samples. For these files, the sampling rate is generally 8 kHz or 22.05 kHz. So this statement, sfplay -i integer 8 unsigned chan 2 rate 8000 end raw.mac ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ will play such a raw data file at 8 kHz. The keywords are underlined. Don't forget the 'end' ! It tells sfplay when the keywords end and the other options and filenames begin. See sfkeywords(1) for a complete description of the keywords used to describe soundfile formats. It is also possible, and perhaps preferable, to first convert the raw data to a soundfile such as an aiff file with sfconvert(1), and then simply say "sfplay file.aif" . HARDWARE sfplay works only on systems with Iris Audio Processor. BUGS sfplay will not play 4-channel files. It currently assumes the hardware can only play mono and stereo files. This will be amended in a future release. You can use playaifc to play 4-channel AIFF/AIFF-C files. AUTHOR Silicon Graphics Inc.; Apple Computer, Inc. for AIFF code. SEE ALSO intro(3a) for more about the audio library. sfinfo(1), sfconvert(1), sfkeywords(1), dmconvert(1). Page 3