[PD] Lua and PD

Mike McGonagle mjmogo at gmail.com
Tue Mar 4 21:53:01 CET 2008


Wow Claude, last night I rewrote several of my old externals that were
originally in C, in Lua last night... And they required about 1/4 of the
code that C requires. I am pretty much sold on using Lua now...
I guess one of the things that seemed to scream out at me was "How would Lua
and PD work together"? While I know this is a pretty broad and general
question, I was wondering, with you as the developer of the Lua stuff, just
how do you see Lua fitting in with PD? What sorts of things would be best
done in each language? One of the things that I like (if I understand this
correctly) about using Lua, as that everything is now accessible
programmatically.

I do have a couple of questions...

1. Is it possible to access from Lua, the elements of a table object that is
defined in PD?
2. Can data struct's be accessed from Lua?
3. Is it possible to load Lua objects using a path? (ie
[my-lua-directory/my-lua-external.lua]) If something written in Lua is
supposed to look like other PD externals, then I would think this would work
with Lua externals as well.
4. Are there things that you wouldn't do in Lua? For performance reasons?
Other reasons?

I guess I am asking these things because I could see it possible that I
could rewrite almost everything in Lua, and then passing on the control data
to the PD objects to generate the sound. One of the "line of division" that
I was thinking about for my own stuff would be to write all the control
stuff in Lua, and then feed that data to PD for the audio generation.

Thanks for this work you have done (and to others, as well).

Mike


-- 
Peace may sound simple—one beautiful word— but it requires everything we
have, every quality, every strength, every dream, every high ideal.
—Yehudi Menuhin (1916–1999), musician
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20080304/4cfcfa48/attachment.htm>


More information about the Pd-list mailing list