1
README file for resample-1.x.tgz from the
2
Digital Audio Resampling Home Page located at
3
http://ccrma.stanford.edu/~jos/resample/.
5
SOFTWARE FOR SAMPLING-RATE CONVERSION AND FIR DIGITAL FILTER DESIGN
7
For installation instructions, read the INSTALL file in this directory.
9
The resample program "resamples" a soundfile to change its sampling
10
rate. For example, it can be used to convert the sampling rate from
11
48 kHz (used by DAT machines) to 44.1 kHz (the standard sampling rate
12
for Compact Discs). The command line for this operation would look
15
resample -by 0.91875 dat.snd cd.snd
19
resample -to 44100 dat.snd cd.snd
21
Any reasonable sampling rate can be converted to any other.
23
The windowfilter program designs Finite-Impulse-Response (FIR) digital
24
filters by the so-called "window method." In this method, the ideal
25
impulse response (a sinc function) is "windowed" by a Kaiser window (a
26
popular window used in spectrum analysis).
28
The resample program uses 32-bit fixed-point arithmetic: 16-bits data
29
and 16-bits coefficients. The input soundfile must be 16-bit mono or
30
stereo (interleaved) audio data.
34
The program uses elements of Bill Schottstaedt's sndlib sound file
35
library. This means resample can read many different kinds of sound
36
file header (AIFF, WAV, NeXT, IRCAM, etc.).
38
The sndlib files used by resample are included in this directory to
39
ensure stability. The latest version of sndlib should be available as
41
ftp://ccrma-ftp.stanford.edu/pub/Lisp/sndlib.tar.gz
43
See sndlib.html in the sndlib distribution for documentation of SNDLIB.
45
CONTENTS of ./src directory
47
resample.c Sampling-rate conversion program.
48
resample.1 Manual page for resample. Try "nroff -man resample.1".
49
resamplesubs.c Subroutines used by resample.
50
resample.h Configuration constants for the sampling rate converter.
51
stdefs.h Machine-dependent definitions, useful constants and macros.
53
windowfilter.c Program for designing FIR digital filters used by resample.
54
windowfilter.1 Manual page for windowfilter.
55
filterkit.c Library for filter design, application, and file management.
56
filterkit.h Declarations (procedure prototypes) for the filterkit library.
59
README.deemph A word about deemphasis filtering.
60
LGPL GNU Lesser General Public License (LGPL)
72
SNDLIB files are Copyright 2000 by Bill Schottstaedt <bil@ccrma.stanford.edu>.
74
The remaining files in this package, unless otherwise noted, are
75
Copyright 1994-2006 by Julius O. Smith III <jos@ccrma.stanford.edu>,
76
all rights reserved. Permission to use and copy is granted subject to
77
the terms of the "GNU Lesser General Public License" (LGPL) as
78
published by the Free Software Foundation; either version 2.1 of the
79
License, or any later version. In addition, we request that a copy of
80
any modified files be sent by email to jos@ccrma.stanford.edu so that
81
we may incorporate them into the CCRMA version.
83
This library is distributed in the hope that it will be useful,
84
but WITHOUT ANY WARRANTY; without even the implied warranty of
85
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
86
Lesser General Public License for more details.
90
LpFilter() - Calculates the filter coeffs for a Kaiser-windowed
91
low-pass filter with a given roll-off frequency. These
92
coeffs are stored into a array of doubles.
94
writeFilter() - Writes a filter to a file.
96
makeFilter() - A section of the original SAIL program. Calls
97
LpFilter() to create a filter, then scales the double
98
coeffs into a array of half words.
100
readFilter() - Reads a filter from a file.
102
FilterUp() - Applies a filter to a given sample when up-converting.
104
FilterUD() - Applies a filter to a given sample when up- or down-
105
converting. Both are repoductions of the original SAIL
108
initZerox() - Initialization routine for the zerox() function. Must
109
be called before zerox() is called. This routine loads
110
the correct filter so zerox() can use it.
112
zerox() - Given a pointer into a sample, finds a zero-crossing on the
113
interval [pointer-1:pointer+2] by iteration.
115
Query() - Ask the user for a yes/no question with prompt, default,
118
GetUShort() - Ask the user for a unsigned short with prompt, default,
121
GetDouble() - Ask the user for a double with prompt, default, and
124
GetString() - Ask the user for a string with prompt, default, and
130
File Name: "F" Nmult "T" Nhc ".filter"
131
example: "F13T8.filter" and "F27T8.filter"
148
where: Something enclosed in "" indicates specific characters in the file.
149
Nmult, Nwing, Imp[], and ImpD[] are variables (HWORD)
150
Npc is a conversion constant.
151
EOF is the end of the file.
153
See writeFilter() and readFilter() in "filterkit.c" for more details.