blob: 345dd66f1086ccd7ca6a1082acb46d72ed59df35 [file] [log] [blame]
Benny Prijonof03861b2007-04-08 09:40:58 +00001README file for resample-1.x.tgz from the
2Digital Audio Resampling Home Page located at
3http://ccrma.stanford.edu/~jos/resample/.
4
5SOFTWARE FOR SAMPLING-RATE CONVERSION AND FIR DIGITAL FILTER DESIGN
6
7For installation instructions, read the INSTALL file in this directory.
8
9The resample program "resamples" a soundfile to change its sampling
10rate. For example, it can be used to convert the sampling rate from
1148 kHz (used by DAT machines) to 44.1 kHz (the standard sampling rate
12for Compact Discs). The command line for this operation would look
13something like
14
15 resample -by 0.91875 dat.snd cd.snd
16
17or, more simply,
18
19 resample -to 44100 dat.snd cd.snd
20
21Any reasonable sampling rate can be converted to any other.
22
23The windowfilter program designs Finite-Impulse-Response (FIR) digital
24filters by the so-called "window method." In this method, the ideal
25impulse response (a sinc function) is "windowed" by a Kaiser window (a
26popular window used in spectrum analysis).
27
28The resample program uses 32-bit fixed-point arithmetic: 16-bits data
29and 16-bits coefficients. The input soundfile must be 16-bit mono or
30stereo (interleaved) audio data.
31
32SNDLIB
33
34The program uses elements of Bill Schottstaedt's sndlib sound file
35library. This means resample can read many different kinds of sound
36file header (AIFF, WAV, NeXT, IRCAM, etc.).
37
38The sndlib files used by resample are included in this directory to
39ensure stability. The latest version of sndlib should be available as
40
41 ftp://ccrma-ftp.stanford.edu/pub/Lisp/sndlib.tar.gz
42
43See sndlib.html in the sndlib distribution for documentation of SNDLIB.
44
45CONTENTS of ./src directory
46
47resample.c Sampling-rate conversion program.
48resample.1 Manual page for resample. Try "nroff -man resample.1".
49resamplesubs.c Subroutines used by resample.
50resample.h Configuration constants for the sampling rate converter.
51stdefs.h Machine-dependent definitions, useful constants and macros.
52
53windowfilter.c Program for designing FIR digital filters used by resample.
54windowfilter.1 Manual page for windowfilter.
55filterkit.c Library for filter design, application, and file management.
56filterkit.h Declarations (procedure prototypes) for the filterkit library.
57
58README This file.
59README.deemph A word about deemphasis filtering.
60LGPL GNU Lesser General Public License (LGPL)
61
62SNDLIB files:
63 io.c
64 audio.c
65 headers.c
66 sound.c
67 sndlib.h
68 sndlib-strings.h
69
70COPYING
71
72SNDLIB files are Copyright 2000 by Bill Schottstaedt <bil@ccrma.stanford.edu>.
73
74The remaining files in this package, unless otherwise noted, are
75Copyright 1994-2006 by Julius O. Smith III <jos@ccrma.stanford.edu>,
76all rights reserved. Permission to use and copy is granted subject to
77the terms of the "GNU Lesser General Public License" (LGPL) as
78published by the Free Software Foundation; either version 2.1 of the
79License, or any later version. In addition, we request that a copy of
80any modified files be sent by email to jos@ccrma.stanford.edu so that
81we may incorporate them into the CCRMA version.
82
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.
87
88FILTERKIT CONTENTS
89
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.
93
94 writeFilter() - Writes a filter to a file.
95
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.
99
100 readFilter() - Reads a filter from a file.
101
102 FilterUp() - Applies a filter to a given sample when up-converting.
103
104 FilterUD() - Applies a filter to a given sample when up- or down-
105 converting. Both are repoductions of the original SAIL
106 program.
107
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.
111
112 zerox() - Given a pointer into a sample, finds a zero-crossing on the
113 interval [pointer-1:pointer+2] by iteration.
114
115 Query() - Ask the user for a yes/no question with prompt, default,
116 and optional help.
117
118 GetUShort() - Ask the user for a unsigned short with prompt, default,
119 and optional help.
120
121 GetDouble() - Ask the user for a double with prompt, default, and
122 optional help.
123
124 GetString() - Ask the user for a string with prompt, default, and
125 optional help.
126
127
128FILTER FILE FORMAT
129
130 File Name: "F" Nmult "T" Nhc ".filter"
131 example: "F13T8.filter" and "F27T8.filter"
132
133 Structure of File:
134 "ScaleFactor" LpScl
135 "Length" Nwing
136 "Coeffs:"
137 Imp[0]
138 Imp[1]
139 :
140 Imp[Nwing-1]
141 "Differences:"
142 ImpD[0]
143 ImpD[1]
144 :
145 ImpD[Nwing-1]
146 EOF
147
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.
152
153 See writeFilter() and readFilter() in "filterkit.c" for more details.
154