Use Non-Frames Version Previous Page Next Page
Utilities: File Conversion

srconv


Description

Convert the sample rate of an audio file. Optionally the ratio of the orginal sample rate to the new sample rate may be linearly time-varying according to time and ratio pairs in an auxiliary file.

csound  -U srconv [flags] inputfilename

or

srconv [flags] inputfilename

-o filename – output filename

-r num – output sample rate. -r should not be used if -P is specified.

-P num – pitch transposition ratio (srate / r). -P should not be used if -r is specified.

-Q num – quality factor in the range of 1 to 4. The default value is 2.

-i filename – break file

-A – AIFF format output

-W – WAV format output

-J – IRCAM format output

-h – skip soundfile header. Not valid for AIFF or WAV output.

-8 – 8-bit unsigned character sound samples

-c – 8-bit signed character sound samples

-a – alaw sound samples

-u – ulaw sound samples

-s – short integer sound samples

-l – long integer sound samples

-f – float sound samples. (New in Csound 3.47) Floats also supported for WAV files.

-K – do not generate PEAK chunks

-R – continually rewrite header while writing soundfile (WAV/AIFF)

-H1 – generates a rotating line progress report. Can also be written -H.

-H2 – generates a "." every time a buffer is written

-H3 – reports the size in seconds of the output

-N – sounds a bell for every buffer of the output written

-- filename – output to log file filename

This program performs arbitrary sample-rate conversion with high fidelity. The method is to step through the input at the desired sampling increment, and to compute the output points as appropriately weighted averages of the surrounding input points. With sample rates in a small integer ratios, the weights are obtained from a table. With sample rates in large integer ratios, the weights are linearly interpolated from the table.

If decimating, then the window is the impulse response of a low-pass filter with the cutoff frequency at half of the output sample rate. If interpolating, then the window is the impulse response of a lowpass filter with the cutoff frequency at half of the input sample rate.

Note: Either -r or -P must be specified, but not both.

Author

Mark Dolson
August, 1989

John ffitch (Adaptation for Csound)
December, 2000
New in Csound 4.10


Use Non-Frames Version Previous Page Next Page
Utilities: File Conversion