README.resample 5.0 KB

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