Changeset 1ba8e60 for python


Ignore:
Timestamp:
Jan 29, 2015, 3:09:31 PM (10 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:
048dd6c
Parents:
c18981e
Message:

ext/aubiomodule.c: improve documentation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/ext/aubiomodule.c

    rc18981e r1ba8e60  
    33#include "aubio-generated.h"
    44
     5static char aubio_module_doc[] = "Python module for the aubio library";
     6
     7static char Py_alpha_norm_doc[] = ""
     8"alpha_norm(fvec, integer) -> float\n"
     9"\n"
     10"Compute alpha normalisation factor on vector, given alpha\n"
     11"\n"
     12"Example\n"
     13"-------\n"
     14"\n"
     15">>> b = alpha_norm(a, 9)";
     16
     17static char Py_bintomidi_doc[] = ""
     18"bintomidi(float, samplerate = integer, fftsize = integer) -> float\n"
     19"\n"
     20"Convert bin (float) to midi (float), given the sampling rate and the FFT size\n"
     21"\n"
     22"Example\n"
     23"-------\n"
     24"\n"
     25">>> midi = bintomidi(float, samplerate = 44100, fftsize = 1024)";
     26
     27static char Py_miditobin_doc[] = ""
     28"miditobin(float, samplerate = integer, fftsize = integer) -> float\n"
     29"\n"
     30"Convert midi (float) to bin (float), given the sampling rate and the FFT size\n"
     31"\n"
     32"Example\n"
     33"-------\n"
     34"\n"
     35">>> bin = miditobin(midi, samplerate = 44100, fftsize = 1024)";
     36
     37static char Py_bintofreq_doc[] = ""
     38"bintofreq(float, samplerate = integer, fftsize = integer) -> float\n"
     39"\n"
     40"Convert bin number (float) in frequency (Hz), given the sampling rate and the FFT size\n"
     41"\n"
     42"Example\n"
     43"-------\n"
     44"\n"
     45">>> freq = bintofreq(bin, samplerate = 44100, fftsize = 1024)";
     46
     47static char Py_freqtobin_doc[] = ""
     48"freqtobin(float, samplerate = integer, fftsize = integer) -> float\n"
     49"\n"
     50"Convert frequency (Hz) in bin number (float), given the sampling rate and the FFT size\n"
     51"\n"
     52"Example\n"
     53"-------\n"
     54"\n"
     55">>> bin = freqtobin(freq, samplerate = 44100, fftsize = 1024)";
     56
     57static char Py_zero_crossing_rate_doc[] = ""
     58"zero_crossing_rate(fvec) -> float\n"
     59"\n"
     60"Compute Zero crossing rate of a vector\n"
     61"\n"
     62"Example\n"
     63"-------\n"
     64"\n"
     65">>> z = zero_crossing_rate(a)";
     66
     67static char Py_min_removal_doc[] = ""
     68"min_removal(fvec) -> float\n"
     69"\n"
     70"Remove the minimum value of a vector, in-place modification\n"
     71"\n"
     72"Example\n"
     73"-------\n"
     74"\n"
     75">>> min_removal(a)";
     76
    577extern void add_generated_objects ( PyObject *m );
    678extern void add_ufuncs ( PyObject *m );
    779extern int generated_types_ready(void);
    8 
    9 static char Py_alpha_norm_doc[] = "compute alpha normalisation factor";
    1080
    1181static PyObject *
     
    40110}
    41111
    42 static char Py_bintomidi_doc[] = "convert bin to midi";
    43 
    44112static PyObject *
    45113Py_bintomidi (PyObject * self, PyObject * args)
     
    57125}
    58126
    59 static char Py_miditobin_doc[] = "convert midi to bin";
    60 
    61127static PyObject *
    62128Py_miditobin (PyObject * self, PyObject * args)
     
    74140}
    75141
    76 static char Py_bintofreq_doc[] = "convert bin to freq";
    77 
    78142static PyObject *
    79143Py_bintofreq (PyObject * self, PyObject * args)
     
    91155}
    92156
    93 static char Py_freqtobin_doc[] = "convert freq to bin";
    94 
    95157static PyObject *
    96158Py_freqtobin (PyObject * self, PyObject * args)
     
    107169  return (PyObject *)PyFloat_FromDouble (output);
    108170}
    109 
    110 static char Py_zero_crossing_rate_doc[] = "compute zero crossing rate";
    111171
    112172static PyObject *
     
    139199  return result;
    140200}
    141 
    142 static char Py_min_removal_doc[] = "compute zero crossing rate";
    143201
    144202static PyObject *
     
    184242  {NULL, NULL} /* Sentinel */
    185243};
    186 
    187 static char aubio_module_doc[] = "Python module for the aubio library";
    188244
    189245PyMODINIT_FUNC
Note: See TracChangeset for help on using the changeset viewer.