Ignore:
Timestamp:
Sep 29, 2009, 7:43:12 AM (15 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
c159aeb
Parents:
d9c45df
Message:

src/temporal: revamp filter object, clarify API for A- and C-weighting filters,
add coefficients for 8000 16000 22050 44100 96000 192000, improve documentation,
remove unneeded filter_priv.h, add A and C weighting tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/temporal/adesign.h

    rd9c45df ra4364b8  
    11/*
    2    Copyright (C) 2003-2007 Paul Brossier
     2  Copyright (C) 2003-2009 Paul Brossier <piem@aubio.org>
    33
    4    This program is free software; you can redistribute it and/or modify
    5    it under the terms of the GNU General Public License as published by
    6    the Free Software Foundation; either version 2 of the License, or
    7    (at your option) any later version.
     4  This file is part of aubio.
    85
    9    This program is distributed in the hope that it will be useful,
    10    but WITHOUT ANY WARRANTY; without even the implied warranty of
    11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    12    GNU General Public License for more details.
     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.
    1310
    14    You should have received a copy of the GNU General Public License
    15    along with this program; if not, write to the Free Software
    16    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
     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/>.
    1718
    1819*/
     
    2324/** \file
    2425
    25   Create a new A-design filter
     26  Create an A-weighting filter
     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:
    2633
    27   This file creates an IIR filter object with A-design coefficients.
     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.
    2850
    2951*/
     
    3557/** create new A-design filter
    3658
    37   \param samplerate sampling-rate of the signal to filter
     59  \param samplerate sampling frequency of the signal to filter. Should be one of
     60  8000, 16000, 22050, 44100, 96000, 192000.
    3861  \param channels number of channels to allocate
    3962
     63  \return a new filter object
     64
    4065*/
    41 aubio_filter_t * new_aubio_adsgn_filter(uint_t samplerate, uint_t channels);
     66aubio_filter_t * new_aubio_filter_adsgn (uint_t samplerate, uint_t channels);
    4267
    43 /** filter input vector (in-place) */
    44 #define aubio_adsgn_filter_do aubio_filter_do
    45 /** delete a-design filter object */
    46 #define del_aubio_adsgn_filter del_aubio_filter
     68/** set feedback and feedforward coefficients of a A-weighting filter
     69
     70  \param f filter object to get coefficients from
     71
     72*/
     73void aubio_filter_set_adsgn (aubio_filter_t *f);
    4774
    4875#ifdef __cplusplus
Note: See TracChangeset for help on using the changeset viewer.