[Ironpython-users] Hello IronPython and anyone using VST.net?
Jeff Hardy
jdhardy at gmail.com
Wed Oct 3 07:51:09 CEST 2012
I don't know about using VST, but creating plugins with IronPython
isn't too bad, if a bit tedious.
The basic idea is that you create a C# plugin that hosts IronPython,
loads your Python code, and calls the necessary methods. This usually
looks something like (not VST-specific, obviously, but the general
pattern):
-- MyPlugin.cs
class MyPlugin : IPlugin {
dynamic plugin;
public MyPlugin() {
this.engine = Python.CreateEngine();
this.scope = this.engine.ExecuteFile('MyPlugin.py');
this.plugin = this.scope.GetVariable("MyPlugin")();
}
public void Foo() {
this.plugin.Foo();
}
public int Bar(int n) {
return this.plugin.Bar(n);
}
}
-- MyPlugin.py
class MyPlugin(object):
def Foo(self):
pass
def Bar(self, n):
return n + 1
There's a couple of pieces I left out but that's the gist of it. There
will be some improvements to make this much, much simpler in 2.7.4,
but I wouldn't hold your breath waiting for it - I'm thinking early
next year.
- Jeff
On Mon, Oct 1, 2012 at 3:25 PM, Andrew Evans <ade.canit at gmail.com> wrote:
> Hello my name is Andrew. Some what new to .net and IronPython but I have
> programmed lots with Python and a bit of WinAPI. Just wondering if anyone
> has built anything with VST.net either in C# or IronPython and can shed a
> bit of light to the API. So I can write my own VST software in IronPython
>
> *cheers
> _______________________________________________
> Ironpython-users mailing list
> Ironpython-users at python.org
> http://mail.python.org/mailman/listinfo/ironpython-users
>
More information about the Ironpython-users
mailing list