1 #ifndef PY_AUBIO_MUSICUTILS_H
2 #define PY_AUBIO_MUSICUTILS_H
4 static char Py_aubio_window_doc[] = ""
5 "window(string, integer) -> fvec\n"
12 ">>> window('hanningz', 1024)\n"
13 "array([ 0.00000000e+00, 9.41753387e-06, 3.76403332e-05, ...,\n"
14 " 8.46982002e-05, 3.76403332e-05, 9.41753387e-06], dtype=float32)";
16 PyObject * Py_aubio_window(PyObject *self, PyObject *args);
18 static char Py_aubio_level_lin_doc[] = ""
19 "level_lin(fvec) -> fvec\n"
21 "Compute sound level on a linear scale.\n"
23 "This gives the average of the square amplitudes.\n"
28 ">>> level_Lin(numpy.ones(1024))\n"
31 PyObject * Py_aubio_level_lin(PyObject *self, PyObject *args);
33 static char Py_aubio_db_spl_doc[] = ""
34 "Compute sound pressure level (SPL) in dB\n"
36 "This quantity is often wrongly called 'loudness'.\n"
38 "This gives ten times the log10 of the average of the square amplitudes.\n"
43 ">>> db_spl(numpy.ones(1024))\n"
46 PyObject * Py_aubio_db_spl(PyObject *self, PyObject *args);
48 static char Py_aubio_silence_detection_doc[] = ""
49 "Check if buffer level in dB SPL is under a given threshold\n"
51 "Return 0 if level is under the given threshold, 1 otherwise.\n"
56 ">>> import numpy\n"""
57 ">>> silence_detection(numpy.ones(1024, dtype=\"float32\"), -80)\n"
60 PyObject * Py_aubio_silence_detection(PyObject *self, PyObject *args);
62 static char Py_aubio_level_detection_doc[] = ""
63 "Get buffer level in dB SPL if over a given threshold, 1. otherwise.\n"
68 ">>> import numpy\n"""
69 ">>> level_detection(0.7*numpy.ones(1024, dtype=\"float32\"), -80)\n"
72 PyObject * Py_aubio_level_detection(PyObject *self, PyObject *args);
74 #endif /* PY_AUBIO_MUSICUTILS_H */