src_conv
Prev | File Conversion (HET_IMPORT, HET_EXPORT, PVLOOK, PV_EXPORT, PV_IMPORT, SDIF2AD, SRC_CONV) | Next

## src_conv

src_conv — Converts the sample rate of an audio file.

## Description

Converts the sample rate of an audio file at sample rate Rin to a sample rate of Rout. Optionally the ratio (Rin / Rout) may be linearly time-varying according to a set of (time, ratio) pairs in an auxiliary file.

## Syntax

    src_conv [flags] infile

## Initialization

Flags:

- -P num = pitch transposition ratio (srate / r) [don't specify both P and r]

- -Q num =quality factor (1, 2, 3, 4 or 5: default = 3)

- -i filnam = auxiliary breakpoints file (no breakpoint by default. i.e. No ratio change)

- -r num = output sample rate (must be specified if no P)

- -o fnam = sound output filename (default: test.wav)

- -A = create an AIFF format output soundfile

- -J = create an IRCAM format output soundfile

- -W = create a WAV format output soundfile (default after Csound version 6.15)

- -h = no header on output soundfile

- -c = 8-bit signed_char sound samples

- -a = alaw sound samples

- -8 = 8-bit unsigned_char sound samples

- -u = ulaw sound samples

- -s = short_int (16 bit) sound samples (default)

- -3 = 24-bit sound samples

- -l = long_int sound samples

- -f = float sound samples

- -r N = orchestra srate override

- -K = Do not generate PEAK chunks

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

- -H# = print a heartbeat style 1, 2 or 3 at each soundfile write

- -N = notify (ring the bell) when done

This program performs arbitrary sample-rate conversion with high fidelity using the libsamplerate library.

The five levels of accuracy are:

- 1: A linear converter. The quality is poor, but the conversion speed is blindingly fast.
- 2: A Zero Order Hold converter (interpolated value is equal to the last value). The quality is poor but the conversion speed is blindingly fast.
- 3: This is the fastest bandlimited interpolator and has an SNR of 97dB and a bandwidth of 80%.
- 4: This is another bandlimited interpolator much like the previous one. It has an SNR of 97dB and a bandwidth of 90%. The speed of the conversion is much faster than the next one. Blindingly fast.
- 5: This is a bandlimited interpolator derived from the mathematical sinc function and this is the highest quality sinc based converter, providing a worst case Signal-to-Noise Ratio (SNR) of 97dB at a bandwidth of 97%.

## Credits

Author: John ffitch based on code by Erik de Castro Lopo

May 2015

Prev | Up | Next
sdif2ad | Home | Other Csound Utilities (CS, CSB64ENC, ENVEXT, EXTRACTOR, MAKECSD, MIXER, SCALE)