Changeset 83963b3


Ignore:
Timestamp:
Oct 22, 2009, 3:13:07 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:
fc0262f
Parents:
78429de
Message:

strip down stable public API, defining add AUBIO_UNSTABLE to access unstable API

Location:
src
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • src/aubio.h

    r78429de r83963b3  
    6464#include "cvec.h"
    6565#include "lvec.h"
    66 #include "mathutils.h"
    67 #include "vecutils.h"
    68 #include "utils/scale.h"
    69 #include "utils/hist.h"
    70 #include "spectral/tss.h"
     66#include "musicutils.h"
    7167#include "temporal/resampler.h"
    7268#include "temporal/filter.h"
     
    7470#include "temporal/a_weighting.h"
    7571#include "temporal/c_weighting.h"
     72#include "spectral/fft.h"
     73#include "spectral/phasevoc.h"
     74#include "spectral/mfcc.h"
     75#include "pitch/pitch.h"
     76#include "onset/onset.h"
     77#include "tempo/tempo.h"
     78
     79#if AUBIO_UNSTABLE
     80#include "vecutils.h"
     81#include "mathutils.h"
     82#include "utils/scale.h"
     83#include "utils/hist.h"
     84#include "spectral/tss.h"
    7685#include "spectral/filterbank.h"
    7786#include "spectral/filterbank_mel.h"
    78 #include "spectral/mfcc.h"
    79 #include "spectral/fft.h"
    80 #include "spectral/phasevoc.h"
    81 #include "spectral/spectral_centroid.h"
    82 #include "pitch/pitch.h"
    8387#include "pitch/pitchmcomb.h"
    8488#include "pitch/pitchyin.h"
     
    8791#include "pitch/pitchfcomb.h"
    8892#include "onset/onsetdetection.h"
    89 #include "onset/onset.h"
     93#include "spectral/spectral_centroid.h"
    9094#include "onset/peakpick.h"
    9195#include "tempo/beattracking.h"
    92 #include "tempo/tempo.h"
     96#endif
    9397
    9498#ifdef __cplusplus
  • src/aubio_priv.h

    r78429de r83963b3  
    6868
    6969#include "types.h"
     70
     71#define AUBIO_UNSTABLE 1
     72
     73#include "mathutils.h"
    7074
    7175/****
  • src/mathutils.c

    r78429de r83963b3  
    2424#include "fvec.h"
    2525#include "mathutils.h"
     26#include "musicutils.h"
    2627#include "config.h"
    2728
  • src/mathutils.h

    r78429de r83963b3  
    2626#define MATHUTILS_H
    2727
     28#include "fvec.h"
     29#include "musicutils.h"
     30
    2831#ifdef __cplusplus
    2932extern "C" {
    3033#endif
    31 
    32 /** create window
    33  
    34   References:
    35    
    36     - <a href="http://en.wikipedia.org/wiki/Window_function">Window
    37 function</a> on Wikipedia
    38     - Amalia de Götzen, Nicolas Bernardini, and Daniel Arfib. Traditional (?)
    39 implementations of a phase vocoder: the tricks of the trade. In Proceedings of
    40 the International Conference on Digital Audio Effects (DAFx-00), pages 37–44,
    41 Uni- versity of Verona, Italy, 2000.
    42   (<a href="http://profs.sci.univr.it/%7Edafx/Final-Papers/ps/Bernardini.ps.gz">
    43   ps.gz</a>)
    44 
    45 */
    46 fvec_t *new_aubio_window (char_t * window_type, uint_t size);
    47 
    48 /** compute the principal argument
    49 
    50   This function maps the input phase to its corresponding value wrapped in the
    51 range \f$ [-\pi, \pi] \f$.
    52 
    53   \param phase unwrapped phase to map to the unit circle
    54  
    55   \return equivalent phase wrapped to the unit circle
    56 
    57 */
    58 smpl_t aubio_unwrap2pi (smpl_t phase);
    5934
    6035/** compute the mean of a vector
     
    297272uint_t fvec_peakpick (fvec_t * v, uint_t p);
    298273
    299 /** convert frequency bin to midi value */
    300 smpl_t aubio_bintomidi (smpl_t bin, smpl_t samplerate, smpl_t fftsize);
    301 
    302 /** convert midi value to frequency bin */
    303 smpl_t aubio_miditobin (smpl_t midi, smpl_t samplerate, smpl_t fftsize);
    304 
    305 /** convert frequency bin to frequency (Hz) */
    306 smpl_t aubio_bintofreq (smpl_t bin, smpl_t samplerate, smpl_t fftsize);
    307 
    308 /** convert frequency (Hz) to frequency bin */
    309 smpl_t aubio_freqtobin (smpl_t freq, smpl_t samplerate, smpl_t fftsize);
    310 
    311 /** convert frequency (Hz) to midi value (0-128) */
    312 smpl_t aubio_freqtomidi (smpl_t freq);
    313 
    314 /** convert midi value (0-128) to frequency (Hz) */
    315 smpl_t aubio_miditofreq (smpl_t midi);
    316 
    317274/** return 1 if a is a power of 2, 0 otherwise */
    318275uint_t aubio_is_power_of_two(uint_t a);
     
    321278uint_t aubio_next_power_of_two(uint_t a);
    322279
    323 /** compute sound pressure level (SPL) in dB
    324 
    325   This quantity is often wrongly called 'loudness'.
    326 
    327   \param v vector to compute dB SPL from
    328 
    329   \return level of v in dB SPL
    330 
    331 */
    332 smpl_t aubio_db_spl (fvec_t * v);
    333 
    334 /** check if buffer level in dB SPL is under a given threshold
    335  
    336   \param v vector to get level from
    337   \param threshold threshold in dB SPL
    338 
    339   \return 0 if level is under the given threshold, 1 otherwise
    340 
    341 */
    342 uint_t aubio_silence_detection (fvec_t * v, smpl_t threshold);
    343 
    344 /** get buffer level if level >= threshold, 1. otherwise
    345 
    346   \param v vector to get level from
    347   \param threshold threshold in dB SPL
    348 
    349   \return level in dB SPL if level >= threshold, 1. otherwise
    350 
    351 */
    352 smpl_t aubio_level_detection (fvec_t * v, smpl_t threshold);
    353 
    354280/** compute normalised autocorrelation function
    355281
     
    359285*/
    360286void aubio_autocorr (fvec_t * input, fvec_t * output);
    361 
    362 /** zero-crossing rate (ZCR)
    363 
    364   The zero-crossing rate is the number of times a signal changes sign,
    365   divided by the length of this signal.
    366 
    367   \param v vector to compute ZCR from
    368 
    369   \return zero-crossing rate of v
    370 
    371 */
    372 smpl_t aubio_zero_crossing_rate (fvec_t * v);
    373 
    374 /** clean up cached memory at the end of program
    375  
    376   This function should be used at the end of programs to purge all cached
    377   memory. So far it is only useful to clean FFTW's cache.
    378 
    379 */
    380 void aubio_cleanup (void);
    381287
    382288#ifdef __cplusplus
  • src/pitch/pitch.c

    r78429de r83963b3  
    2121#include "cvec.h"
    2222#include "lvec.h"
     23#include "mathutils.h"
     24#include "musicutils.h"
    2325#include "spectral/phasevoc.h"
    24 #include "mathutils.h"
    2526#include "temporal/filter.h"
    2627#include "temporal/c_weighting.h"
  • src/pitch/pitchfcomb.c

    r78429de r83963b3  
    2222#include "cvec.h"
    2323#include "mathutils.h"
     24#include "musicutils.h"
    2425#include "spectral/fft.h"
    2526#include "pitch/pitchfcomb.h"
  • src/vecutils.c

    r78429de r83963b3  
    11#include "config.h"
     2#include "aubio_priv.h"
    23#include "types.h"
    34#include "fvec.h"
    45#include "cvec.h"
    5 #include "aubio_priv.h"
    66#include "vecutils.h"
    77
Note: See TracChangeset for help on using the changeset viewer.