RESAMPLE(1)
π RESAMPLE(1) π
ok so you found yourself in the General Commands Manual section, bestie, and this is resample β the little icon that resamples a 16-bit mono or stereo sound file by an arbitrary factor. yes, arbitrary. she does not gatekeep. β¨
π 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 π¦
okay so here's the vibe: resample takes a 16-bit mono or stereo sound file and does bandlimited interpolation to produce an output sound file that has whatever new sampling rate you asked for. the output file is in the same format as the input. no glow-up, no surprise format change, just the rate. periodt. π
β¨ OPTIONS β¨
-toSrateβ this option or"-byFactor"is required, so pick one, you can't skip this step bestie. it specifies the new sampling rate in samples per second. the conversion factor is implied and gets set to the new sampling rate divided by the sampling rate of the input soundfile.-byFactorβ specify the conversion factor. this option or"-toSrate"is required (again: one of them, not neither). the conversion factor is the amount by which the sampling rate is changed. if the sampling rate of the input signal isSrate1, then the sampling rate of the output isfactor*Srate1. for example, a factor of2.0increases 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, which is so accurate that humans should not be able to hear any error whatsoever in the pitch of resampled sounds. we love a precise queen. π-filterFileβ change the resampling filter from its default. a filter file like this can be designed by thewindowfilter(1) program (included with the resample distribution, cute right?). 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, which cuts the number of multiply-adds in half in the inner loop (for most conversion factors). efficiency era fr fr. β‘-linearInterpolationβ select plain linear interpolation for resampling, which means the 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. two completely different things, bestie, do not mix them up. π-terseβ disable informational printout. she's quiet now. shh. π€«-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. the lore is deep. π
since then, the C version has been maintained by jos.
Sndlib support was added 6/99 by John Gibson <jgg9c@virginia.edu>.
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. she said what she said. π
and that's the whole page, bestie!! π«Ά this was brought to you by CCRMA, dated 5 Jan 2006, under the title RESAMPLE(1) β go forth and convert every sampling rate your heart desires. mwah. πβ¨ππ¦πΈ
π¦ where this page comes from
- opensuse-leap 16.0: resample 1.8.1-bp160.1.12 Β· LGPL-2.1+
- opensuse-leap 16.0: resample 1.8.1-bp160.1.12 Β· LGPL-2.1+
- opensuse-leap 16.0: resample 1.8.1-bp160.1.12 Β· LGPL-2.1+
- opensuse-leap 16.0: resample 1.8.1-bp160.1.12 Β· LGPL-2.1+
- ubuntu jammy: resample 1.8.1-1build2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms