Showing posts with label python. Show all posts
Showing posts with label python. Show all posts

Monday, December 7, 2009

Tut 6: Ardour Control using OSC & Python

Hey all, today a slight change of topic.
Controlling Ardour using OSC messages. Weapon of choice for this will be Python, a great interpreted Object Orientated scripting language.
This language can be used to run files (.py scripts), or from the command line.

Google for BPython if your looking for some fun experimentation with python.

OSC messages & python is quite easy. I'm on Debian linux, so a quick
browse over here and you've got all you need, follow thier instructions on building & installing. (its not hard.. but if there's problems, let me know.)

On to the fun part. I've written a small library which provides and Ardour class, on which you can call methods that control Ardour. Eg: (in BPython)


So you see all methods attached to the Ardour class, after that, its just about calling these methods using your own script. I primarily wrote this to get functionality to my Alphatrack, (which is supported by linux if you compile a kernel module).

More Examples:
ardour.Ardour():




Here shown: ardour.Ardour() 's
attribute & methods.

All OSC functions of Ardour are currently supported




So you see that its quite trivial to get ardour to react to python. All Ardours OSC functionality is provided in the current python library, who knows what the future will entail... :-D


Grab the .zip archive of the library and a Wiimote Demo from here.

For those Arduino users out there, enjoy, I plan to build a little Ardour-ino too.
All the best, -Harry

PS: I'm aware that  Sampo Savolainen did great work & added the WiiMote to ardours control surfaces, using ardour's internal control mechanisms. This is an OSC library, which allows any "Python-capable" device to interact with ardour.