Ignore:
Timestamp:
Aug 12, 2015, 7:21:38 PM (9 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:
60fc05b
Parents:
3a1a5d6 (diff), 7b2d740 (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 'develop' into notes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/ext/aubiomodule.c

    r3a1a5d6 rb257b60  
    22#include "aubio-types.h"
    33#include "aubio-generated.h"
     4#include "py-musicutils.h"
     5
     6static char aubio_module_doc[] = "Python module for the aubio library";
     7
     8static char Py_alpha_norm_doc[] = ""
     9"alpha_norm(fvec, integer) -> float\n"
     10"\n"
     11"Compute alpha normalisation factor on vector, given alpha\n"
     12"\n"
     13"Example\n"
     14"-------\n"
     15"\n"
     16">>> b = alpha_norm(a, 9)";
     17
     18static char Py_bintomidi_doc[] = ""
     19"bintomidi(float, samplerate = integer, fftsize = integer) -> float\n"
     20"\n"
     21"Convert bin (float) to midi (float), given the sampling rate and the FFT size\n"
     22"\n"
     23"Example\n"
     24"-------\n"
     25"\n"
     26">>> midi = bintomidi(float, samplerate = 44100, fftsize = 1024)";
     27
     28static char Py_miditobin_doc[] = ""
     29"miditobin(float, samplerate = integer, fftsize = integer) -> float\n"
     30"\n"
     31"Convert midi (float) to bin (float), given the sampling rate and the FFT size\n"
     32"\n"
     33"Example\n"
     34"-------\n"
     35"\n"
     36">>> bin = miditobin(midi, samplerate = 44100, fftsize = 1024)";
     37
     38static char Py_bintofreq_doc[] = ""
     39"bintofreq(float, samplerate = integer, fftsize = integer) -> float\n"
     40"\n"
     41"Convert bin number (float) in frequency (Hz), given the sampling rate and the FFT size\n"
     42"\n"
     43"Example\n"
     44"-------\n"
     45"\n"
     46">>> freq = bintofreq(bin, samplerate = 44100, fftsize = 1024)";
     47
     48static char Py_freqtobin_doc[] = ""
     49"freqtobin(float, samplerate = integer, fftsize = integer) -> float\n"
     50"\n"
     51"Convert frequency (Hz) in bin number (float), given the sampling rate and the FFT size\n"
     52"\n"
     53"Example\n"
     54"-------\n"
     55"\n"
     56">>> bin = freqtobin(freq, samplerate = 44100, fftsize = 1024)";
     57
     58static char Py_zero_crossing_rate_doc[] = ""
     59"zero_crossing_rate(fvec) -> float\n"
     60"\n"
     61"Compute Zero crossing rate of a vector\n"
     62"\n"
     63"Example\n"
     64"-------\n"
     65"\n"
     66">>> z = zero_crossing_rate(a)";
     67
     68static char Py_min_removal_doc[] = ""
     69"min_removal(fvec) -> float\n"
     70"\n"
     71"Remove the minimum value of a vector, in-place modification\n"
     72"\n"
     73"Example\n"
     74"-------\n"
     75"\n"
     76">>> min_removal(a)";
    477
    578extern void add_generated_objects ( PyObject *m );
    679extern void add_ufuncs ( PyObject *m );
    780extern int generated_types_ready(void);
    8 
    9 static char Py_alpha_norm_doc[] = "compute alpha normalisation factor";
    1081
    1182static PyObject *
     
    40111}
    41112
    42 static char Py_bintomidi_doc[] = "convert bin to midi";
    43 
    44113static PyObject *
    45114Py_bintomidi (PyObject * self, PyObject * args)
     
    57126}
    58127
    59 static char Py_miditobin_doc[] = "convert midi to bin";
    60 
    61128static PyObject *
    62129Py_miditobin (PyObject * self, PyObject * args)
     
    74141}
    75142
    76 static char Py_bintofreq_doc[] = "convert bin to freq";
    77 
    78143static PyObject *
    79144Py_bintofreq (PyObject * self, PyObject * args)
     
    91156}
    92157
    93 static char Py_freqtobin_doc[] = "convert freq to bin";
    94 
    95158static PyObject *
    96159Py_freqtobin (PyObject * self, PyObject * args)
     
    107170  return (PyObject *)PyFloat_FromDouble (output);
    108171}
    109 
    110 static char Py_zero_crossing_rate_doc[] = "compute zero crossing rate";
    111172
    112173static PyObject *
     
    139200  return result;
    140201}
    141 
    142 static char Py_min_removal_doc[] = "compute zero crossing rate";
    143202
    144203static PyObject *
     
    182241  {"zero_crossing_rate", Py_zero_crossing_rate, METH_VARARGS, Py_zero_crossing_rate_doc},
    183242  {"min_removal", Py_min_removal, METH_VARARGS, Py_min_removal_doc},
     243  {"level_lin", Py_aubio_level_lin, METH_VARARGS, Py_aubio_level_lin_doc},
     244  {"db_spl", Py_aubio_db_spl, METH_VARARGS, Py_aubio_db_spl_doc},
     245  {"silence_detection", Py_aubio_silence_detection, METH_VARARGS, Py_aubio_silence_detection_doc},
     246  {"level_detection", Py_aubio_level_detection, METH_VARARGS, Py_aubio_level_detection_doc},
     247  {"window", Py_aubio_window, METH_VARARGS, Py_aubio_window_doc},
    184248  {NULL, NULL} /* Sentinel */
    185249};
    186 
    187 static char aubio_module_doc[] = "Python module for the aubio library";
    188250
    189251PyMODINIT_FUNC
Note: See TracChangeset for help on using the changeset viewer.