source: src/bark.h @ 88199ce

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since 88199ce was 88199ce, checked in by ahazan <ahazan@mtg55>, 17 years ago

added mffc + bark

  • Property mode set to 100644
File size: 2.0 KB
Line 
1/*
2   Copyright (C) 2006 Amaury Hazan
3   Ported to aubio from LibXtract
4   http://libxtract.sourceforge.net/
5   
6
7   This program is free software; you can redistribute it and/or modify
8   it under the terms of the GNU General Public License as published by
9   the Free Software Foundation; either version 2 of the License, or
10   (at your option) any later version.
11
12   This program is distributed in the hope that it will be useful,
13   but WITHOUT ANY WARRANTY; without even the implied warranty of
14   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15   GNU General Public License for more details.
16
17   You should have received a copy of the GNU General Public License
18   along with this program; if not, write to the Free Software
19   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20
21*/
22
23#ifndef BARK_H
24#define BARK_H
25
26
27// Initalization
28
29/** \brief A function to initialise bark filter bounds
30 *
31 * A pointer to an array of BARK_BANDS ints most be passed in, and is populated with BARK_BANDS fft bin numbers representing the limits of each band
32 *
33 * \param N: the audio block size
34 * \param sr: The sample audio sample rate
35 * \param *band_limits: a pointer to an array of BARK_BANDS ints
36 */
37int xtract_init_bark(int N, float sr, int *band_limits);
38
39// Computation
40
41/** \brief Extract Bark band coefficients based on a method   
42 * \param *data: a pointer to the first element in an array of floats representing the magnitude coefficients from the magnitude spectrum of an audio vector, (e.g. the first half of the array pointed to by *result from xtract_spectrum().
43 * \param N: the number of array elements to be considered
44 * \param *argv: a pointer to an array of ints representing the limits of each bark band. This can be obtained  by calling xtract_init_bark.
45 * \param *result: a pointer to an array containing resultant bark coefficients
46 *
47 * The limits array pointed to by *argv must be obtained by first calling xtract_init_bark
48 *
49 */
50int xtract_bark_coefficients(const float *data, const int N, const void *argv, float *result);
51
52
53#endif
Note: See TracBrowser for help on using the repository browser.