EnglishFrenchSpanish

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

PROGRAM:

NAME


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

SYNOPSIS


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

DESCRIPTION


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.

OPTIONS


-toSrate
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.

-byFactor
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.

-filterFile
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.

-noFilterInterp
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).

-linearInterpolation
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.

-version
Print program version.

EXAMPLE


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)

REFERENCES


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

http://ccrma.stanford.edu/~jos/resample/

HISTORY


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
PARTICULAR PURPOSE.

Use resample online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    unitedrpms
    unitedrpms
    Join us in Gitter!
    https://gitter.im/unitedrpms-people/Lobby
    Enable the URPMS repository in your
    system -
    https://github.com/UnitedRPMs/unitedrpms.github.io/bl...
    Download unitedrpms
  • 2
    Boost C++ Libraries
    Boost C++ Libraries
    Boost provides free portable
    peer-reviewed C++ libraries. The
    emphasis is on portable libraries which
    work well with the C++ Standard Library.
    See http://www.bo...
    Download Boost C++ Libraries
  • 3
    VirtualGL
    VirtualGL
    VirtualGL redirects 3D commands from a
    Unix/Linux OpenGL application onto a
    server-side GPU and converts the
    rendered 3D images into a video stream
    with which ...
    Download VirtualGL
  • 4
    libusb
    libusb
    Library to enable user space
    application programs to communicate with
    USB devices. Audience: Developers, End
    Users/Desktop. Programming Language: C.
    Categories...
    Download libusb
  • 5
    SWIG
    SWIG
    SWIG is a software development tool
    that connects programs written in C and
    C++ with a variety of high-level
    programming languages. SWIG is used with
    different...
    Download SWIG
  • 6
    WooCommerce Nextjs React Theme
    WooCommerce Nextjs React Theme
    React WooCommerce theme, built with
    Next JS, Webpack, Babel, Node, and
    Express, using GraphQL and Apollo
    Client. WooCommerce Store in React(
    contains: Products...
    Download WooCommerce Nextjs React Theme
  • More »

Linux commands

Ad