Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/filterbank.h

    rb276dee r7c6c806d  
    11/*
    2    Copyright (C) 2007 Amaury Hazan <ahazan@iua.upf.edu>
    3                   and Paul Brossier <piem@piem.org>
     2   Copyright (C) 2007 Amaury Hazan
     3   Ported to aubio from LibXtract
     4   http://libxtract.sourceforge.net/
     5   
    46
    57   This program is free software; you can redistribute it and/or modify
     
    1820*/
    1921
    20 /** \file
    21 
    22   Filterbank object
    23 
    24   General-purpose spectral filterbank object. Comes with mel-filter initialization function.
    25 
    26 */
    27 
    28 #ifndef FILTERBANK_H
    29 #define FILTERBANK_H
     22#ifndef AUBIOFILTERBANK_H
     23#define AUBIOFILTERBANK_H
    3024
    3125#ifdef __cplusplus
     
    3327#endif
    3428
    35 typedef struct aubio_filterbank_t_ aubio_filterbank_t;
    36 
    37 /** create filterbank object
    38 
    39   \param win_s size of analysis buffer (and length the FFT transform)
    40   \param n_filters number of filters to create
    41 
    42 */
    43 
    44 aubio_filterbank_t * new_aubio_filterbank(uint_t n_filters, uint_t win_s);
    45 
    46 /** filterbank initialization for mel filters
    47 
    48   \param nyquist nyquist frequency, i.e. half of the sampling rate
    49   \param style libxtract style
    50   \param freqmin lowest filter frequency
    51   \param freqmax highest filter frequency
    52 
    53 */
    54 aubio_filterbank_t * new_aubio_filterbank_mfcc(uint_t n_filters, uint_t win_s, smpl_t samplerate, smpl_t freq_min, smpl_t freq_max);
    5529
    5630
    57 /** destroy filterbank object
     31typedef struct aubio_mel_filter_ aubio_mel_filter;
    5832
    59   \param fb filterbank, as returned by new_aubio_filterbank method
     33// Initialization
    6034
    61 */
    62 void del_aubio_filterbank(aubio_filterbank_t * fb);
    63 
    64 /** compute filterbank
    65 
    66 */
    67 void aubio_filterbank_do(aubio_filterbank_t * fb, cvec_t * in, fvec_t *out);
     35/** \brief A function to initialise a mel filter bank
     36 *
     37 * It is up to the caller to pass in a pointer to memory allocated for freq_bands arrays of length N. This function populates these arrays with magnitude coefficients representing the mel filterbank on a linear scale
     38 */
     39int aubio_mfcc_init(int N, smpl_t nyquist, int style, smpl_t freq_min, smpl_t freq_max, int freq_bands, smpl_t ** fft_tables);
    6840
    6941#ifdef __cplusplus
     
    7143#endif
    7244
    73 #endif // FILTERBANK_H
     45#endif
Note: See TracChangeset for help on using the changeset viewer.