source: src/temporal/a_weighting.h @ 7351545

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since 7351545 was 741bdda, checked in by Paul Brossier <piem@piem.org>, 15 years ago

src/temporal: switch to mono

  • Property mode set to 100644
File size: 2.6 KB
Line 
1/*
2  Copyright (C) 2003-2009 Paul Brossier <piem@aubio.org>
3
4  This file is part of aubio.
5
6  aubio is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10
11  aubio is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  GNU General Public License for more details.
15
16  You should have received a copy of the GNU General Public License
17  along with aubio.  If not, see <http://www.gnu.org/licenses/>.
18
19*/
20
21#ifndef _ADESIGN_H
22#define _ADESIGN_H
23
24/** \file
25
26  A-weighting filter coefficients
27 
28  This file creates an A-weighting digital filter, which reduces low and high
29  frequencies and enhance the middle ones to reflect the ability of the human
30  hearing.
31 
32  The implementation is based on the following standard:
33
34    - IEC/CD 1672: Electroacoustics-Sound Level Meters, IEC, Geneva, Nov.  1996,
35  for A- and C-weighting filters.
36 
37  See also:
38 
39    - <a href="http://en.wikipedia.org/wiki/A-weighting">A-Weighting on
40  Wikipedia</a>
41    - <a href="http://en.wikipedia.org/wiki/Weighting_filter">Weighting filter on
42  Wikipedia</a>
43    - <a href="http://www.mathworks.com/matlabcentral/fileexchange/69">Christophe
44  Couvreur's 'octave' toolbox</a>
45 
46  The coefficients in this file have been computed using Christophe Couvreur's
47  scripts in octave 3.0 (debian package 1:3.0.5-6+b2 with octave-signal
48  1.0.9-1+b1 on i386), with <pre> [b, a] = adsign(1/Fs) </pre> for various
49  sampling frequencies (8000, 11025, 16000, 22050, 24000, 32000, 44100, 48000,
50  88200, 96000, and 192000 Hz).
51
52  The sampling frequency should normally be higher than 20kHz, but most common
53  file sampling rates have been included for completeness.
54
55*/
56
57#ifdef __cplusplus
58extern "C" {
59#endif
60
61/** create new A-design filter
62
63  \param samplerate sampling frequency of the signal to filter. Should be one of
64  8000, 11025, 16000, 22050, 24000, 32000, 44100, 48000, 88200, 96000, and
65  192000 Hz
66
67  \return a new filter object
68
69*/
70aubio_filter_t *new_aubio_filter_a_weighting (uint_t samplerate);
71
72/** set feedback and feedforward coefficients of a A-weighting filter
73
74  \param f filter object to get coefficients from
75  \param samplerate sampling frequency of the signal to filter. Should be one of
76  8000, 11025, 16000, 22050, 24000, 32000, 44100, 48000, 88200, 96000, and
77  192000 Hz
78
79*/
80uint_t aubio_filter_set_a_weighting (aubio_filter_t * f, uint_t samplerate);
81
82#ifdef __cplusplus
83}
84#endif
85
86#endif /* _ADESIGN_H */
Note: See TracBrowser for help on using the repository browser.