I'm happy to announce the release of the first version of my Lua plugin for Quartz Composer.
The source with a sample composition is available at: http://qcluaplugin.googlecode.com/files/LuaScript_1.0a2.zip while a binary (i.e. the bare plugin to install and the sample) is at: http://qcluaplugin.googlecode.com/files/LuaScript_1.0a2_Binary.zip FEATURES Lua ( http://www.lua.org (c) 2006-2008 PUC-Rio ) is a scripting language especially thought to be used as an extension language inside regular applications: as such, it has an extensive set of facilities aimed at embedding an interpreter that can communicate with the main application easily. It's also known to be very efficient and fast (see: http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=lua ) In the few years since its birth, it has been embedded in a whole bunch of software, commercial or not, especially games (Blizzard's World of Warcraft is a perfect example) and professional apps (e.g. Adobe Lightroom). More details at: http://lua-users.org/wiki/LuaUses The version used in the plugin is the 5.1.4 (in library form), the latest available at the moment. USAGE The plugin must be installed in the standard location(s) for QC plugins: when inserting the patch in a composition, you'll find under the "Settings" tab a sample source, commented about the typical use. Only inputs of type String, Number and Boolean are mapped directly to Lua equivalents: Structures have some form of limited support as tables (for example, you can define Structures of Strings, but not Structures of Structures), or can be used (like Color) as opaque references ("Light Userdata" in Lua-speak) to be passed around but not processed. - The global table "inputs" will contain the plugin inputs, that will be generated dynamically while editing the source. - Similarly, the global table "outputs" will define the plugin outlets - The "main()" function will be called whenever an input value is changed: you'll typically put here the code that calculates some output values from inputs values. If you want to be called periodically, create an input connected to the patch time or similar timing facility. A sample composition (a game in QC!) is included, that shows how flexible the concept is. TODO - Better documentation - Better syntax coloring - Use of a JIT version ( http://www.luajit.org or http://code.google.com/p/llvm-lua ) - Whatever interesting ideas come up! LICENSE The code is released under the simplified BSD License. For Lua itself, license is at: http://www.lua.org/license.html Obviously, I'd love to hear comments and ideas: let me know how you think to use it! Enjoy Paolo _______________________________________________ Do not post admin requests to the list. They will be ignored. Quartzcomposer-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com This email sent to [email protected]

