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

  • -A = create an AIFF format output soundfile

  • -J = create an IRCAM format output soundfile

  • -W = create a WAV format output soundfile

  • -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 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%.

See Also

srconv

Credits

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

May 2015