summaryrefslogtreecommitdiffstats
path: root/src/bindings
diff options
context:
space:
mode:
Diffstat (limited to 'src/bindings')
-rw-r--r--src/bindings/Makefile.am5
-rw-r--r--src/bindings/ingen.i5
-rwxr-xr-xsrc/bindings/test_ingen.py35
3 files changed, 25 insertions, 20 deletions
diff --git a/src/bindings/Makefile.am b/src/bindings/Makefile.am
index 48a5ad4f..cb86a915 100644
--- a/src/bindings/Makefile.am
+++ b/src/bindings/Makefile.am
@@ -10,6 +10,11 @@ bindings_LTLIBRARIES = libingen_bindings.la
libingen_bindings_la_LDFLAGS = -no-undefined -module -avoid-version
libingen_bindings_la_LIBADD = @RAUL_LIBS@ @GLIBMM_LIBS@ #../libs/module/libingen_module.la
libingen_bindings_la_SOURCES = ingen_wrap.cxx ingen_bindings.cpp ingen_bindings.hpp
+libingen_bindings_la_CXXFLAGS = \
+ @SLV2_CFLAGS@ @RAUL_CFLAGS@ @GLIBMM_CFLAGS@ \
+ -I$(top_srcdir)/ingen/src/common \
+ -I$(top_srcdir)/ingen/src/libs \
+ -I/usr/include/python2.4
swig: ingen.i
swig -c++ -Wall $(FLAGS) -python ingen.i
diff --git a/src/bindings/ingen.i b/src/bindings/ingen.i
index 719ece20..5eb942d9 100644
--- a/src/bindings/ingen.i
+++ b/src/bindings/ingen.i
@@ -42,6 +42,11 @@ namespace Ingen { namespace Shared {
return Ingen::Shared::ingen_world;
}
}
+
+ void iteration() {
+ Ingen::Shared::script_iteration($self);
+ }
+
/*SLV2World slv2() { return $self->me->slv2_world; }*/
};
diff --git a/src/bindings/test_ingen.py b/src/bindings/test_ingen.py
index 4109dd21..9b925155 100755
--- a/src/bindings/test_ingen.py
+++ b/src/bindings/test_ingen.py
@@ -1,40 +1,34 @@
#!/usr/bin/env python
+
import ingen
import time
world = ingen.World()
class PythonClient(ingen.Client):
- #def __init__(self):
- # ingen.Client(self)
- # print "Client"
-
- def bundle_begin():
- print "Bundle {"
+ def error(self, msg):
+ print "*** Received error:", msg
+ def bundle_begin(self):
+ print "*** Receiving Bundle {"
+
+ def bundle_end(self):
+ print "*** }"
def new_port(self, path, data_type, is_output):
- print "Port:", path, data_type, is_output
+ print "*** Received Port:", path, data_type, is_output
+
+ def new_node(self, plugin_uri, path, polyphonic, nports):
+ print "*** Received Node:", plugin_uri, path, polyphonic, nports
c = PythonClient()
-c.thisown = 0
-print "C OWN", c.thisown
-#print c.__base__
+c.enable()
e = world.engine
-print "E OWN", e.thisown
-e.thisown = 0
-#print e
-
e.activate()
-#e.register_client("foo", c)
c.subscribe(e)
-c.enable()
-#c.new_patch("/foo/bar", 1)
-
-
e.create_port("/I", "ingen:midi", False)
e.create_port("/made", "ingen:audio", False)
e.create_port("/these", "ingen:audio", False)
@@ -43,5 +37,6 @@ e.create_port("/a", "ingen:audio", True)
e.create_port("/script", "ingen:audio", True)
while True:
- time.sleep(1)
+ world.iteration()
+ time.sleep(0.1)