feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change
on this file since efa62ce was
efa62ce,
checked in by Paul Brossier <piem@piem.org>, 9 years ago
|
ext/py-musicutils.c: complete window implementation
|
-
Property mode set to
100644
|
File size:
523 bytes
|
Line | |
---|
1 | #include "aubio-types.h" |
---|
2 | |
---|
3 | PyObject * |
---|
4 | Py_aubio_window(PyObject *self, PyObject *args) |
---|
5 | { |
---|
6 | char_t *wintype = NULL; |
---|
7 | uint_t winlen = 0; |
---|
8 | fvec_t *window = NULL; |
---|
9 | |
---|
10 | if (!PyArg_ParseTuple (args, "|sI", &wintype, &winlen)) { |
---|
11 | PyErr_SetString (PyExc_ValueError, "failed parsing arguments"); |
---|
12 | return NULL; |
---|
13 | } |
---|
14 | |
---|
15 | window = new_aubio_window(wintype, winlen); |
---|
16 | if (window == NULL) { |
---|
17 | PyErr_SetString (PyExc_ValueError, "failed computing window"); |
---|
18 | return NULL; |
---|
19 | } |
---|
20 | |
---|
21 | return (PyObject *) PyAubio_CFvecToArray(window); |
---|
22 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.