sfconvert(1) sfconvert(1)
sfconvert - convert soundfiles
sfconvert infile outfile [ options ... ] [ output keywords ... ]
where options are:
-inputraw [ input keywords ... ] end
-outputraw
The full option string need not be specified; -i and -o will work.
sfconvert converts a soundfile to another soundfile of a different file
format or data format.
If invoked with no arguments, sfconvert displays help.
The default conversion is to the same format. So, the following
invocation:
sfconvert in.snd out.snd
Is basically like "cp in.snd out.snd," except that it will not copy
comments or undocumented chunks found in the input file to the output
file.
If invoked with a pair of filenames and some output keywords, sfconvert
will attempt to open 'infile', convert it to a soundfile described by the
keywords, and write the result in 'outfile' .
For example, the following converts a (presumably stereo) input file to a
mono output file, keeping all other parameters the same:
sfconvert in.snd out.snd channels 1
And this converts an input file (of any allowed format) to a 24-bit, 2's
complement, 2-channel integer aiff file.
sfconvert in.snd out.aif format aiff int 24 2 chan 2
See sfkeywords(1) for a complete description of the keywords used to
describe soundfile formats.
The sfconvert program now performs high-quality sampling rate conversion
between all of the standard sampling rates. See sfkeywords(1) for more
information about sampling rate conversion.
Page 1
sfconvert(1) sfconvert(1)
The -outputraw (-o) option will cause sfconvert to write its output in a
file of raw (headerless) data. If you supply this option and you also
supply a "format" keyword (which normally indicates what type of header
format to use), the "format" keyword will be ignored.
If you specify other keywords, the input file's data will be converted
appropriately before it is written to the raw output file.
sfconvert will also change a file of raw data into a valid soundfile of
any format (such as aiff or wave).
In this case the data format of the raw input data must be specified,
using the appropriate keywords with the -inputraw (-i) option.
The input keywords following -i must be terminated with 'end' in order to
distinguish them from the output keywords.
For example, a raw data file consisting of 8-bit unsigned mono integer
samples could be converted to a playable aiff file with the following
command:
sfconvert in.raw out.aif -i int 8 u chan 1 end format aiff
^^^^^^^^^^^^^^ ^^^^^^^^^^^
input format output format
The keywords are underlined and labeled as to which soundfile they
describe.
See sfkeywords(1) for a complete description of the keywords used to
describe soundfile formats.
If the keywords are not specified or not fully specified, the default raw
input soundfile format is:
Format: 1 channel 8-bit integer (2's complement) file.
Sampling Rate: 8.000 kHz.
Data begins at offset 0 (0 hex).
So, because a sampling rate was not given, the above example would
produce an 8 kHz soundfile.
sfconvert will convert almost any popular soundfile format to a playable
or interchangeable format. However, it does have certain limitations.
sfconvert will:
- only read and write mulaw files with 8-bit encoding.
- read and write only mono and stereo files (although sfinfo will tell
Page 2
sfconvert(1) sfconvert(1)
you if a file has more than 2 channels). 4-channel support (and probably
more) is coming in a future release.
- read and write only single precision IEEE floating point files (double
is not supported yet; this is coming in a future release).
- only read and write integer files of 1-32 bits.
- perform endian conversions only for integer data.
- not manipulate MIDI files or MIDI chunks in soundfiles.
sfconvert uses a high-quality linear phase sampling rate conversion
algorithm for conversions between the standard rates displayed on the
Audio Control Panel. For conversions to or from a nonstandard rate,
sfconvert uses a lower-quality algorithm, and issues a warning to this
effect. For these lower-quality conversions, some loss of quality is
likely, and audible artifacts may occur in the output sound, especially
on conversions from a higher to a lower sampling rate. This lower
quality algorithm, which was present in earlier releases, uses thirdorder
polynomial interpolation and does no pre- or post-filtering. A
high-quality algorithm capable of conversion between arbitrary pairs of
sampling rates is under development.
Note also that no dithering is done on conversions from integers of
higher resolution to lower resolution. This will be amended in a future
release.
Silicon Graphics Inc.; Apple Computer, Inc. for AIFF code.
intro(3a) for more about the audio library.
sfplay(1), sfinfo(1), sfkeywords(1),
dmconvert(1), dminfo(1), mediaconvert(1)
PPPPaaaaggggeeee 3333 [ Back ]
|