source: src/temporal/c_weighting.h @ c1303c6

Last change on this file since c1303c6 was 6f42c16, checked in by Paul Brossier <piem@piem.org>, 9 years ago

src/: change c header identifiers (see #35)

  • Property mode set to 100644
File size: 2.7 KB
RevLine 
[4f4d892]1/*
[4598946]2  Copyright (C) 2003-2015 Paul Brossier <piem@aubio.org>
[4f4d892]3
[a4364b8]4  This file is part of aubio.
[4f4d892]5
[a4364b8]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.
[4f4d892]10
[a4364b8]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/>.
[4f4d892]18
19*/
20
[6f42c16]21#ifndef AUBIO_FILTER_C_DESIGN_H
22#define AUBIO_FILTER_C_DESIGN_H
[4f4d892]23
[76ac373]24/** \file
25
[7893149]26  C-weighting filter coefficients
[4598946]27
[a4364b8]28  This file creates a C-weighting digital filter, which reduces low and high
29  frequencies and enhance the middle ones to reflect the ability of the human
30  hearing.
[4598946]31
[a4364b8]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.
[4598946]36
[a4364b8]37  See also:
[4598946]38
[a4364b8]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>
[4598946]45
[a4364b8]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] = cdsign(1/Fs) </pre> for various
[d1c0554]49  sampling frequencies (8000, 11025, 16000, 22050, 24000, 32000, 44100, 48000,
50  88200, 96000, and 192000 Hz).
[321eb85]51
52  The sampling frequency should normally be higher than 20kHz, but most common
53  file sampling rates have been included for completeness.
[76ac373]54
[621f1ff]55  \example temporal/test-c_weighting.c
56
[76ac373]57*/
58
[34eee42]59#ifdef __cplusplus
60extern "C" {
61#endif
62
[76ac373]63/** create new C-design filter
[4f4d892]64
[4598946]65  \param samplerate sampling frequency of the signal to filter. Should be one of
[d1c0554]66  8000, 11025, 16000, 22050, 24000, 32000, 44100, 48000, 88200, 96000, and
67  192000 Hz
[4f4d892]68
[a4364b8]69  \return a new filter object
70
[4f4d892]71*/
[741bdda]72aubio_filter_t *new_aubio_filter_c_weighting (uint_t samplerate);
[4f4d892]73
[a4364b8]74/** set feedback and feedforward coefficients of a C-weighting filter
75
76  \param f filter object to get coefficients from
[4598946]77  \param samplerate sampling frequency of the signal to filter. Should be one of
[2d1d5ce]78  8000, 11025, 16000, 22050, 24000, 32000, 44100, 48000, 88200, 96000, and
79  192000 Hz
[a4364b8]80
81*/
[8b19e1c]82uint_t aubio_filter_set_c_weighting (aubio_filter_t * f, uint_t samplerate);
[34eee42]83
84#ifdef __cplusplus
85}
86#endif
87
[6f42c16]88#endif /* AUBIO_FILTER_C_DESIGN_H */
Note: See TracBrowser for help on using the repository browser.