< Back to IRCAM Forum

Controller creation inside of Lua

Hi there!

I am trying to learn how to write a lua script that wraps the creation of objects, controllers, access, etc and connect their outputs appropriately. Here’s a very simple patch where I want create a phasor controller inside of lua, whose output is transformed in the update function via an expression before being output directly to a point-ouput. You are normally allowed to pass controllers directly to a point-output. However the final run script (of modalys~) overrules luas output definition and puts instead a random controller as point-output (something I did not specify).

No error is signalized, so what did I miss? Please compare the lua script with the run script of modalys~ and you’ll see the two don’t comply. Any hints to correct lua syntax is very wellcome.

Kindly Hans Peter

lua_Phasor-Oscillator-[EDIT]-v2.maxpat (9.9 KB)

BTW if you look to the mlys.phasor helpfile you’ll notice that the two lua controllers both are empty (just having the default lua script). So its impossible to know what the help patch is trying to demonstrate. Would be great if the phasor helpfile could be updated to include the correct lua scripts.

Kindly Hans Peter

Hi Hans Peter,

I will take a look as soon as possible. I am currently wrapping up a Snail release, and I will switch back to Modalys as soon as this is done.

Thanks for your great testing and patience!
Robert