[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: C++ Binding
- From: "Michael Gogins" <gogins@...>
- Date: Tue, 5 Sep 2006 21:20:43 -0400
Hello again...
I am the author of Silence, a programmable computer music system for
algorithmic composition and synthesis. In the past, this existed as a Lua
project but has been dormant for years. I am now reviving it because I
believe that LuaJIT achieves the high performance essential to actually
being able to compete with Csound, Pure Data, et al. The idea is that there
is C++ code for the digital signal processing signal flow graph and unit
generators. To write new software instruments, the user will subclass the
Instrument base class and write Lua code to generate sound, calling on
oscillators, envelope generators, etc. that are written in C++ and have Lua
bindings to do so. Using Lua for this purpose saves me from having to create
my own language.
I have a working C++ prototype of the system and now wish to create the Lua
binding.
I have two main questions:
What is the best general-purpose binding tool? There will be hundreds of C++
classes that need to be wrapped.
I need to be able to define a base class in C++, derive a new Lua class from
the C++ class, and have virtual functions called from the C++ base class
dispatch into Lua code. This is already possible in Python using SWIG with
its "director" feature. What is the best way to do this in Lua?
Thanks for any help you can provide,
Mike Gogins