Changeset b257b60 for python/ext/aubiomodule.c
- Timestamp:
- Aug 12, 2015, 7:21:38 PM (10 years ago)
- 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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/ext/aubiomodule.c
r3a1a5d6 rb257b60 2 2 #include "aubio-types.h" 3 3 #include "aubio-generated.h" 4 #include "py-musicutils.h" 5 6 static char aubio_module_doc[] = "Python module for the aubio library"; 7 8 static 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 18 static 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 28 static 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 38 static 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 48 static 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 58 static 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 68 static 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)"; 4 77 5 78 extern void add_generated_objects ( PyObject *m ); 6 79 extern void add_ufuncs ( PyObject *m ); 7 80 extern int generated_types_ready(void); 8 9 static char Py_alpha_norm_doc[] = "compute alpha normalisation factor";10 81 11 82 static PyObject * … … 40 111 } 41 112 42 static char Py_bintomidi_doc[] = "convert bin to midi";43 44 113 static PyObject * 45 114 Py_bintomidi (PyObject * self, PyObject * args) … … 57 126 } 58 127 59 static char Py_miditobin_doc[] = "convert midi to bin";60 61 128 static PyObject * 62 129 Py_miditobin (PyObject * self, PyObject * args) … … 74 141 } 75 142 76 static char Py_bintofreq_doc[] = "convert bin to freq";77 78 143 static PyObject * 79 144 Py_bintofreq (PyObject * self, PyObject * args) … … 91 156 } 92 157 93 static char Py_freqtobin_doc[] = "convert freq to bin";94 95 158 static PyObject * 96 159 Py_freqtobin (PyObject * self, PyObject * args) … … 107 170 return (PyObject *)PyFloat_FromDouble (output); 108 171 } 109 110 static char Py_zero_crossing_rate_doc[] = "compute zero crossing rate";111 172 112 173 static PyObject * … … 139 200 return result; 140 201 } 141 142 static char Py_min_removal_doc[] = "compute zero crossing rate";143 202 144 203 static PyObject * … … 182 241 {"zero_crossing_rate", Py_zero_crossing_rate, METH_VARARGS, Py_zero_crossing_rate_doc}, 183 242 {"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}, 184 248 {NULL, NULL} /* Sentinel */ 185 249 }; 186 187 static char aubio_module_doc[] = "Python module for the aubio library";188 250 189 251 PyMODINIT_FUNC
Note: See TracChangeset
for help on using the changeset viewer.