aboutsummaryrefslogtreecommitdiffhomepage
path: root/backends/python.h
blob: 10411cad8df3d2357185a6dae2fc848dc3a3bca3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include "midimonster.h"

MM_PLUGIN_API int init();
static int python_configure(char* option, char* value);
static int python_configure_instance(instance* inst, char* option, char* value);
static int python_instance(instance* inst);
static channel* python_channel(instance* inst, char* spec, uint8_t flags);
static int python_set(instance* inst, size_t num, channel** c, channel_value* v);
static int python_handle(size_t num, managed_fd* fds);
static int python_start(size_t n, instance** inst);
static int python_shutdown(size_t n, instance** inst);

typedef struct /*_python_channel_data*/ {
	char* name;
	PyObject* handler;
	double in;
	double out;
} mmpython_channel;

typedef struct /*_python_instance_data*/ {
	PyThreadState* interpreter;
	size_t channels;
	mmpython_channel* channel;
	mmpython_channel* current_channel;
} python_instance_data;