feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change
on this file since 1c190d5 was
615ac7d,
checked in by Paul Brossier <piem@piem.org>, 15 years ago
|
.
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | #include <Python.h> |
---|
2 | #include <structmember.h> |
---|
3 | #define NO_IMPORT_ARRAY |
---|
4 | #include <numpy/arrayobject.h> |
---|
5 | #include <aubio.h> |
---|
6 | |
---|
7 | #define Py_default_vector_length 1024 |
---|
8 | #define Py_default_vector_channels 1 |
---|
9 | |
---|
10 | #define Py_aubio_default_samplerate 44100 |
---|
11 | |
---|
12 | #if HAVE_AUBIO_DOUBLE |
---|
13 | #error "Ouch! Python interface for aubio has not been much tested yet." |
---|
14 | #define AUBIO_NPY_SMPL NPY_DOUBLE |
---|
15 | #else |
---|
16 | #define AUBIO_NPY_SMPL NPY_FLOAT |
---|
17 | #endif |
---|
18 | |
---|
19 | /** |
---|
20 | |
---|
21 | Defining this constant to 1 will allow PyAubio_CastToFvec to convert from data |
---|
22 | types different than NPY_FLOAT to and fvec, and therefore creating a copy of |
---|
23 | it. |
---|
24 | |
---|
25 | */ |
---|
26 | #define AUBIO_DO_CASTING 0 |
---|
27 | |
---|
28 | typedef struct |
---|
29 | { |
---|
30 | PyObject_HEAD |
---|
31 | fvec_t * o; |
---|
32 | uint_t length; |
---|
33 | uint_t channels; |
---|
34 | } Py_fvec; |
---|
35 | extern PyTypeObject Py_fvecType; |
---|
36 | extern PyObject *PyAubio_FvecToArray (Py_fvec * self); |
---|
37 | extern Py_fvec *PyAubio_ArrayToFvec (PyObject * self); |
---|
38 | |
---|
39 | typedef struct |
---|
40 | { |
---|
41 | PyObject_HEAD |
---|
42 | cvec_t * o; |
---|
43 | uint_t length; |
---|
44 | uint_t channels; |
---|
45 | } Py_cvec; |
---|
46 | extern PyTypeObject Py_cvecType; |
---|
47 | extern PyObject *PyAubio_CvecToArray (Py_cvec * self); |
---|
48 | extern Py_cvec *PyAubio_ArrayToCvec (PyObject * self); |
---|
49 | |
---|
50 | extern PyTypeObject Py_filterType; |
---|
51 | |
---|
52 | extern PyTypeObject Py_filterbankType; |
---|
53 | |
---|
54 | extern PyTypeObject Py_fftType; |
---|
55 | |
---|
56 | extern PyTypeObject Py_pvocType; |
---|
Note: See
TracBrowser
for help on using the repository browser.