c

convert(1)

convert(1)

NAME

convert - convert an audio ®le

SYNOPSIS

/opt/audio/bin/convert [source_®le] [target_®le] [-sfmt format] [-dfmt format] [-ddata data_type] [-srate rate] [-drate rate]

[-schannels number] [-dchannels number]

DESCRIPTION

This command converts audio ®les from one supported ®le format, data format, sampling rate, and number of channels to another. The unconverted ®le is retained as a source ®le.

-sfmtformat -dfmtformat

are the ®le formats for the source and destination ®les. Each format can be one of these:

au Sun ®le format

snd NeXT ®le format

wav Microsoft RIFF Waveform ®le format

uMuLaw format

al ALaw

l16 linear 16-bit format

lo8 offset (unsigned) linear 8-bit format

l8

linear 8-bit format

If you omit -sfmt, convert uses the header or ®lename extension in the source ®le. You can omit -dfmtif you supply a ®lename extension for the destination ®le.

-ddatadata_type

is the data type for the destination ®les. data_type can be one of these:

uMuLaw

al ALaw

l16 linear 16-bit

lo8 offset (unsigned) linear 8-bit data

l8 linear 8-bit data

If you omit -ddata, convert uses an appropriate data type, normally the data type of the source ®le.

-srate rate -drate rate

are the number of samples per second for the source and destination ®le. Typical sampling rates range from 8 to 11k (for voice quality) to 44,100 (for CD quality). You can use k to indicate thousands. For example, 8k means 8,000 samples per second.

If you omit -srate, convert uses a rate de®ned by the source ®le header or its ®lename exten- sion. For a raw ®le with no extension, 8,000 is used. By playing the ®le, you can determine if 8,000 samples is too fast or too slow.

If you omit -drate, convert uses a sampling rate appropriate for the destination ®le format; if possible, it matches the sampling rate of the source ®le.

-schannels number -dchannels number

are the number of channels in the source and destination ®les. Use 1 for mono; 2 for stereo. If - schannels is omitted, convert uses the information in the header; for raw data ®les, it uses mono.

If -dchannelsis omitted, convert matches what was used for the source ®le (through the header or -schannelsoption); for raw data ®les, it uses mono.

EXAMPLES

Convert a raw data ®le to a headered ®le.

Section 1112

− 1 −

HP-UX Release 11i: December 2000