source: interfaces/python/aubio-types.h @ c04d250

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since c04d250 was 03c3450, checked in by Paul Brossier <piem@piem.org>, 15 years ago

aubio-types.h: kill fvec and fmat, update proxy functions

  • 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#define AUBIO_UNSTABLE 1
6#include <aubio.h>
7
8#define Py_default_vector_length 1024
9#define Py_default_vector_height 1
10
11#define Py_aubio_default_samplerate 44100
12
13#if HAVE_AUBIO_DOUBLE
14#error "Ouch! Python interface for aubio has not been much tested yet."
15#define AUBIO_NPY_SMPL NPY_DOUBLE
16#else
17#define AUBIO_NPY_SMPL NPY_FLOAT
18#endif
19
20// special python type for cvec
21typedef struct
22{
23  PyObject_HEAD
24  cvec_t * o;
25  uint_t length;
26  uint_t channels;
27} Py_cvec;
28extern PyTypeObject Py_cvecType;
29extern PyObject *PyAubio_CvecToArray (Py_cvec * self);
30extern Py_cvec *PyAubio_ArrayToCvec (PyObject * self);
31
32// defined in aubio-proxy.c
33extern PyObject *PyAubio_CFvecToArray (fvec_t * self);
34extern fvec_t *PyAubio_ArrayToCFvec (PyObject * self);
35
36extern Py_cvec *PyAubio_CCvecToPyCvec (cvec_t * self);
37extern cvec_t *PyAubio_ArrayToCCvec (PyObject *input);
38
39extern PyObject *PyAubio_CFmatToArray (fmat_t * self);
40extern fmat_t *PyAubio_ArrayToCFmat (PyObject *input);
41
42// hand written wrappers
43extern PyTypeObject Py_filterType;
44
45extern PyTypeObject Py_filterbankType;
46
47extern PyTypeObject Py_fftType;
48
49extern PyTypeObject Py_pvocType;
50
Note: See TracBrowser for help on using the repository browser.