aubio
0.4.1
|
00001 /* 00002 Copyright (C) 2007-2013 Paul Brossier <piem@aubio.org> 00003 and Amaury Hazan <ahazan@iua.upf.edu> 00004 00005 This file is part of aubio. 00006 00007 aubio is free software: you can redistribute it and/or modify 00008 it under the terms of the GNU General Public License as published by 00009 the Free Software Foundation, either version 3 of the License, or 00010 (at your option) any later version. 00011 00012 aubio is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with aubio. If not, see <http://www.gnu.org/licenses/>. 00019 00020 */ 00021 00022 /** \file 00023 00024 Filterbank object coefficients initialization 00025 00026 Functions to create set the ::aubio_filterbank_t coefficients to 00027 - ::aubio_filterbank_set_triangle_bands: overlapping triangular bands, 00028 - ::aubio_filterbank_set_mel_coeffs_slaney: Mel frequency bands. 00029 00030 \example spectral/test-filterbank_mel.c 00031 00032 */ 00033 00034 #ifndef _AUBIO_FILTERBANK_MEL_H 00035 #define _AUBIO_FILTERBANK_MEL_H 00036 00037 #ifdef __cplusplus 00038 extern "C" 00039 { 00040 #endif 00041 00042 /** filterbank initialization with triangular and overlapping bands 00043 00044 \param fb filterbank object 00045 \param freqs arbitrary array of boundary frequencies 00046 \param samplerate audio sampling rate 00047 00048 This function computes the coefficients of the filterbank based on the 00049 boundaries found in freqs, in Hz, and using triangular overlapping bands. 00050 00051 */ 00052 uint_t aubio_filterbank_set_triangle_bands (aubio_filterbank_t * fb, 00053 fvec_t * freqs, smpl_t samplerate); 00054 00055 /** filterbank initialization for Mel filters using Slaney's coefficients 00056 00057 \param fb filterbank object 00058 \param samplerate audio sampling rate 00059 00060 The filter coefficients are built according to Malcolm Slaney's Auditory 00061 Toolbox, available at http://cobweb.ecn.purdue.edu/~malcolm/interval/1998-010/ 00062 (see file mfcc.m). 00063 00064 */ 00065 uint_t aubio_filterbank_set_mel_coeffs_slaney (aubio_filterbank_t * fb, 00066 smpl_t samplerate); 00067 00068 #ifdef __cplusplus 00069 } 00070 #endif 00071 00072 #endif /* _AUBIO_FILTERBANK_MEL_H */