OnWorks favicon

resample - Online in the Cloud

Run resample in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command resample that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator



resample - resample a 16-bit mono or stereo sound file by an arbitrary factor


resample [-by factor] [-to newSrate] [-f filterFile] [-n] [-l] [-trace] [-version]
inputFile [outputFile]


The resample program takes a 16-bit mono or stereo sound file and performs bandlimited
interpolation to produce an output sound file have a desired new sampling rate. The
output file is in the same format as the input.


This option or "-byFactor" is required. Specify new sampling rate in samples per
second. The conversion factor is implied and will be set to the new sampling rate
divided by the sampling rate of the input soundfile.

Specify conversion factor. This option or "-toSrate" is required. The conversion
factor is the amount by which the sampling rate is changed. If the sampling rate
of the input signal is Srate1, then the sampling rate of the output is
factor*Srate1. For example, a factor of 2.0 increases the sampling rate by a
factor of 2, giving twice as many samples in the output signal as in the input.
The fractional part of the conversion factor is accurate to 15 bits. This is
sufficiently accurate that humans should not be able to hear any error whatsoever
in the pitch of resampled sounds.

Change the resampling filter from its default. Such a filter file can be designed
by the windowfilter (1) program (included with the resample distribution). The
preloaded filter file requires an oversampling factor of at least 20% to avoid
aliasing (in other words, its "transition band" as a lowpass filter is at least 20%
of the useable frequency range in the sampled signal); the stop-band attenuation is
approximately 80 dB.

By default, the resampling filter table is linearly interpolated to provide high
audio quality at arbitrary sampling-rate conversion factors. This option turns off
filter interpolation, thus cutting the number of multiply-adds in half in the inner
loop (for most conversion factors).

Select plain linear interpolation for resampling (which means resampling filter
table is not used at all). This option is very fast, but the output quality is poor
unless the signal is already heavily oversampled. Do not confuse linear
interpolation of the signal with linear interpolation of the resampling-filter-
table which is controlled by the "noFilterInterp" option.

-terse Disable informational printout.

Print program version.


To convert the sampling rate from 48 kHz (used by DAT machines) to 44.1 kHz (the standard
sampling rate for Compact Discs), the command line would look something like

resample -to 44100 dat.snd cd.snd or resample -by 0.91875 dat.snd cd.snd

Any reasonable sampling rate can be converted to any other. (Note that, in this example,
if you have obtained a direct-digital transfer from DAT or CD, you probably have some pre-
emphasis filtering which should be canceled using a digital filter. See README.deemph in
the resample release for further information)


Source code and further documentation may be found at the Digital Audio Resampling Home
Page (DARHP) located at



The first version of this software was written by Julius O. Smith III <jos /at/ ccrma
/dot/ stanford /dot/ edu> at CCRMA <http://ccrma.stanford.edu> in 1981. It was called
SRCONV and was written in SAIL for PDP-10 compatible machines (see the DARHP for that
code). The algorithm was first published in

Smith, Julius O. and Phil Gossett. ``A Flexible Sampling-Rate Conversion Method,''
Proceedings (2): 19.4.1-19.4.4, IEEE Conference on Acoustics, Speech, and Signal
Processing, San Diego, March 1984.

An expanded tutorial based on this paper is available at the DARHP.

Circa 1988, the SRCONV program was translated from SAIL to C by Christopher Lee Fraley
working with Roger Dannenberg at CMU.

Since then, the C version has been maintained by jos.

Sndlib support was added 6/99 by John Gibson <[email protected]>.

The resample program is free software distributed in accordance with the Lesser GNU Public
License (LGPL). There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A

Use resample online using onworks.net services

Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Firebird RDBMS offers ANSI SQL features
    & runs on Linux, Windows &
    several Unix platforms. Features
    excellent concurrency & performance
    & power...
    Download Firebird
  • 2
    KompoZer is a wysiwyg HTML editor using
    the Mozilla Composer codebase. As
    Nvu's development has been stopped
    in 2005, KompoZer fixes many bugs and
    adds a f...
    Download KompoZer
  • 3
    Free Manga Downloader
    Free Manga Downloader
    The Free Manga Downloader (FMD) is an
    open source application written in
    Object-Pascal for managing and
    downloading manga from various websites.
    This is a mirr...
    Download Free Manga Downloader
  • 4
    UNetbootin allows you to create bootable
    Live USB drives for Ubuntu, Fedora, and
    other Linux distributions without
    burning a CD. It runs on Windows, Linux,
    and ...
    Download UNetbootin
  • 5
    Dolibarr ERP - CRM
    Dolibarr ERP - CRM
    Dolibarr ERP - CRM is an easy to use
    ERP and CRM open source software package
    (run with a web php server or as
    standalone software) for businesses,
    Download Dolibarr ERP - CRM
  • 6
    SQuirreL SQL Client
    SQuirreL SQL Client
    SQuirreL SQL Client is a graphical SQL
    client written in Java that will allow
    you to view the structure of a JDBC
    compliant database, browse the data in
    Download SQuirreL SQL Client
  • More »

Linux commands