Showing the changes to python (1 of 1 file). Show all
Unified · Split
| @@ -2,12 +2,82 @@ · 1 unmodified line | ||
| 2 | 2 | #include "aubio-types.h" |
| 3 | 3 | #include "aubio-generated.h" |
| 4 | 4 | |
| 5 | +static char aubio_module_doc[] = "Python module for the aubio library"; | |
| 6 | + | |
| 7 | +static 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 | + | |
| 17 | +static 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 | + | |
| 27 | +static 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 | + | |
| 37 | +static 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 | + | |
| 47 | +static 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 | + | |
| 57 | +static 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 | + | |
| 67 | +static 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 | + | |
| 5 | 77 | extern void add_generated_objects ( PyObject *m ); |
| 6 | 78 | extern void add_ufuncs ( PyObject *m ); |
| 7 | 79 | extern int generated_types_ready(void); |
| 8 | 80 | |
| 9 | −static char Py_alpha_norm_doc[] = "compute alpha normalisation factor"; | |
| 10 | − | |
| 11 | 81 | static PyObject * |
| 12 | 82 | Py_alpha_norm (PyObject * self, PyObject * args) |
| 13 | 83 | { |
| @@ -39,8 +109,6 @@ Py_alpha_norm (PyObject * self, PyObject * args) · 25 unmodified lines | ||
| 39 | 109 | return result; |
| 40 | 110 | } |
| 41 | 111 | |
| 42 | −static char Py_bintomidi_doc[] = "convert bin to midi"; | |
| 43 | − | |
| 44 | 112 | static PyObject * |
| 45 | 113 | Py_bintomidi (PyObject * self, PyObject * args) |
| 46 | 114 | { |
| @@ -56,8 +124,6 @@ Py_bintomidi (PyObject * self, PyObject * args) · 9 unmodified lines | ||
| 56 | 124 | return (PyObject *)PyFloat_FromDouble (output); |
| 57 | 125 | } |
| 58 | 126 | |
| 59 | −static char Py_miditobin_doc[] = "convert midi to bin"; | |
| 60 | − | |
| 61 | 127 | static PyObject * |
| 62 | 128 | Py_miditobin (PyObject * self, PyObject * args) |
| 63 | 129 | { |
| @@ -73,8 +139,6 @@ Py_miditobin (PyObject * self, PyObject * args) · 9 unmodified lines | ||
| 73 | 139 | return (PyObject *)PyFloat_FromDouble (output); |
| 74 | 140 | } |
| 75 | 141 | |
| 76 | −static char Py_bintofreq_doc[] = "convert bin to freq"; | |
| 77 | − | |
| 78 | 142 | static PyObject * |
| 79 | 143 | Py_bintofreq (PyObject * self, PyObject * args) |
| 80 | 144 | { |
| @@ -90,8 +154,6 @@ Py_bintofreq (PyObject * self, PyObject * args) · 9 unmodified lines | ||
| 90 | 154 | return (PyObject *)PyFloat_FromDouble (output); |
| 91 | 155 | } |
| 92 | 156 | |
| 93 | −static char Py_freqtobin_doc[] = "convert freq to bin"; | |
| 94 | − | |
| 95 | 157 | static PyObject * |
| 96 | 158 | Py_freqtobin (PyObject * self, PyObject * args) |
| 97 | 159 | { |
| @@ -107,8 +169,6 @@ Py_freqtobin (PyObject * self, PyObject * args) · 9 unmodified lines | ||
| 107 | 169 | return (PyObject *)PyFloat_FromDouble (output); |
| 108 | 170 | } |
| 109 | 171 | |
| 110 | −static char Py_zero_crossing_rate_doc[] = "compute zero crossing rate"; | |
| 111 | − | |
| 112 | 172 | static PyObject * |
| 113 | 173 | Py_zero_crossing_rate (PyObject * self, PyObject * args) |
| 114 | 174 | { |
| @@ -139,8 +199,6 @@ Py_zero_crossing_rate (PyObject * self, PyObject * args) · 24 unmodified lines | ||
| 139 | 199 | return result; |
| 140 | 200 | } |
| 141 | 201 | |
| 142 | −static char Py_min_removal_doc[] = "compute zero crossing rate"; | |
| 143 | − | |
| 144 | 202 | static PyObject * |
| 145 | 203 | Py_min_removal(PyObject * self, PyObject * args) |
| 146 | 204 | { |
| @@ -184,8 +242,6 @@ static PyMethodDef aubio_methods[] = { · 37 unmodified lines | ||
| 184 | 242 | {NULL, NULL} /* Sentinel */ |
| 185 | 243 | }; |
| 186 | 244 | |
| 187 | −static char aubio_module_doc[] = "Python module for the aubio library"; | |
| 188 | − | |
| 189 | 245 | PyMODINIT_FUNC |
| 190 | 246 | init_aubio (void) |
| 191 | 247 | { |