feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change
on this file since e5757cf was
9b23eb31,
checked in by Paul Brossier <piem@piem.org>, 15 years ago
|
interfaces/python: add cvec and filter types
|
-
Property mode set to
100644
|
File size:
847 bytes
|
Rev | Line | |
---|
[ae6e15c] | 1 | #include <Python.h> |
---|
| 2 | #include <structmember.h> |
---|
| 3 | #define NO_IMPORT_ARRAY |
---|
| 4 | #include <numpy/arrayobject.h> |
---|
| 5 | #include <aubio.h> |
---|
| 6 | |
---|
[9b23eb31] | 7 | #define Py_default_vector_length 1024 |
---|
| 8 | #define Py_default_vector_channels 1 |
---|
| 9 | |
---|
| 10 | #define Py_aubio_default_samplerate 44100 |
---|
[352fd5f] | 11 | |
---|
| 12 | #ifdef HAVE_AUBIO_DOUBLE |
---|
| 13 | #define AUBIO_FLOAT NPY_FLOAT |
---|
| 14 | #else |
---|
| 15 | #define AUBIO_FLOAT NPY_LONG |
---|
| 16 | #endif |
---|
| 17 | |
---|
| 18 | /** |
---|
| 19 | |
---|
| 20 | Defining this constant to 1 will allow PyAubio_CastToFvec to convert from data |
---|
| 21 | types different than NPY_FLOAT to and fvec, and therefore creating a copy of |
---|
| 22 | it. |
---|
| 23 | |
---|
| 24 | */ |
---|
| 25 | #define AUBIO_DO_CASTING 0 |
---|
| 26 | |
---|
[ae6e15c] | 27 | typedef struct |
---|
| 28 | { |
---|
[9b23eb31] | 29 | PyObject_HEAD |
---|
| 30 | fvec_t * o; |
---|
[ae6e15c] | 31 | uint_t length; |
---|
| 32 | uint_t channels; |
---|
| 33 | } Py_fvec; |
---|
| 34 | extern PyTypeObject Py_fvecType; |
---|
[352fd5f] | 35 | |
---|
[9b23eb31] | 36 | extern PyTypeObject Py_cvecType; |
---|
| 37 | |
---|
| 38 | extern PyTypeObject Py_filterType; |
---|
| 39 | |
---|
[352fd5f] | 40 | extern PyObject *PyAubio_FvecToArray (Py_fvec * self); |
---|
| 41 | |
---|
| 42 | extern Py_fvec *PyAubio_ArrayToFvec (PyObject * self); |
---|
Note: See
TracBrowser
for help on using the repository browser.