Ignore:
Timestamp:
Mar 10, 2017, 2:26:32 PM (8 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, sampler
Children:
ee8a57c
Parents:
00d0275 (diff), 67b6618 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into awhitening

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/spectral/statistics.c

    r00d0275 r155cc10  
    2323#include "spectral/specdesc.h"
    2424
    25 void aubio_specdesc_centroid (aubio_specdesc_t * o, cvec_t * spec,
    26     fvec_t * desc);
    27 void aubio_specdesc_spread (aubio_specdesc_t * o, cvec_t * spec,
    28     fvec_t * desc);
    29 void aubio_specdesc_skewness (aubio_specdesc_t * o, cvec_t * spec,
    30     fvec_t * desc);
    31 void aubio_specdesc_kurtosis (aubio_specdesc_t * o, cvec_t * spec,
    32     fvec_t * desc);
    33 void aubio_specdesc_slope (aubio_specdesc_t * o, cvec_t * spec,
    34     fvec_t * desc);
    35 void aubio_specdesc_decrease (aubio_specdesc_t * o, cvec_t * spec,
    36     fvec_t * desc);
    37 void aubio_specdesc_rolloff (aubio_specdesc_t * o, cvec_t * spec,
    38     fvec_t * desc);
    39 
    40 
    41 smpl_t cvec_sum (cvec_t * s);
    42 smpl_t cvec_mean (cvec_t * s);
    43 smpl_t cvec_centroid (cvec_t * s);
    44 smpl_t cvec_moment (cvec_t * s, uint_t moment);
    45 
    46 smpl_t
    47 cvec_sum (cvec_t * s)
     25void aubio_specdesc_centroid (aubio_specdesc_t * o, const cvec_t * spec,
     26    fvec_t * desc);
     27void aubio_specdesc_spread (aubio_specdesc_t * o, const cvec_t * spec,
     28    fvec_t * desc);
     29void aubio_specdesc_skewness (aubio_specdesc_t * o, const cvec_t * spec,
     30    fvec_t * desc);
     31void aubio_specdesc_kurtosis (aubio_specdesc_t * o, const cvec_t * spec,
     32    fvec_t * desc);
     33void aubio_specdesc_slope (aubio_specdesc_t * o, const cvec_t * spec,
     34    fvec_t * desc);
     35void aubio_specdesc_decrease (aubio_specdesc_t * o, const cvec_t * spec,
     36    fvec_t * desc);
     37void aubio_specdesc_rolloff (aubio_specdesc_t * o, const cvec_t * spec,
     38    fvec_t * desc);
     39
     40
     41smpl_t cvec_sum (const cvec_t * s);
     42smpl_t cvec_mean (const cvec_t * s);
     43smpl_t cvec_centroid (const cvec_t * s);
     44smpl_t cvec_moment (const cvec_t * s, uint_t moment);
     45
     46smpl_t
     47cvec_sum (const cvec_t * s)
    4848{
    4949  uint_t j;
     
    5656
    5757smpl_t
    58 cvec_mean (cvec_t * s)
     58cvec_mean (const cvec_t * s)
    5959{
    6060  return cvec_sum (s) / (smpl_t) (s->length);
     
    6262
    6363smpl_t
    64 cvec_centroid (cvec_t * spec)
     64cvec_centroid (const cvec_t * spec)
    6565{
    6666  smpl_t sum = 0., sc = 0.;
     
    7878
    7979smpl_t
    80 cvec_moment (cvec_t * spec, uint_t order)
     80cvec_moment (const cvec_t * spec, uint_t order)
    8181{
    8282  smpl_t sum = 0., centroid = 0., sc = 0.;
     
    9595
    9696void
    97 aubio_specdesc_centroid (aubio_specdesc_t * o UNUSED, cvec_t * spec,
     97aubio_specdesc_centroid (aubio_specdesc_t * o UNUSED, const cvec_t * spec,
    9898    fvec_t * desc)
    9999{
     
    102102
    103103void
    104 aubio_specdesc_spread (aubio_specdesc_t * o UNUSED, cvec_t * spec,
     104aubio_specdesc_spread (aubio_specdesc_t * o UNUSED, const cvec_t * spec,
    105105    fvec_t * desc)
    106106{
     
    109109
    110110void
    111 aubio_specdesc_skewness (aubio_specdesc_t * o UNUSED, cvec_t * spec,
     111aubio_specdesc_skewness (aubio_specdesc_t * o UNUSED, const cvec_t * spec,
    112112    fvec_t * desc)
    113113{
     
    123123
    124124void
    125 aubio_specdesc_kurtosis (aubio_specdesc_t * o UNUSED, cvec_t * spec,
     125aubio_specdesc_kurtosis (aubio_specdesc_t * o UNUSED, const cvec_t * spec,
    126126    fvec_t * desc)
    127127{
     
    137137
    138138void
    139 aubio_specdesc_slope (aubio_specdesc_t * o UNUSED, cvec_t * spec,
     139aubio_specdesc_slope (aubio_specdesc_t * o UNUSED, const cvec_t * spec,
    140140    fvec_t * desc)
    141141{
     
    165165
    166166void
    167 aubio_specdesc_decrease (aubio_specdesc_t *o UNUSED, cvec_t * spec,
     167aubio_specdesc_decrease (aubio_specdesc_t *o UNUSED, const cvec_t * spec,
    168168    fvec_t * desc)
    169169{
     
    183183
    184184void
    185 aubio_specdesc_rolloff (aubio_specdesc_t *o UNUSED, cvec_t * spec,
     185aubio_specdesc_rolloff (aubio_specdesc_t *o UNUSED, const cvec_t * spec,
    186186    fvec_t *desc)
    187187{
Note: See TracChangeset for help on using the changeset viewer.