Hey guys
I know that it is possible to use Lua scripts in Pure Data using pd-lua. And the opposite, is it possible?
Is it possible to use patched from Pure Data in Lua?
Hey guys
I know that it is possible to use Lua scripts in Pure Data using pd-lua. And the opposite, is it possible?
I don't think there is such a library. Maybe Ofelia integrates Lua in a way that could sort of make something like this work, but again, that's in Pd. Dunno.
I'm not really sure what you mean by 'the opposite' (what would it mean to 'use' a pd patch in a lua script?), but it's probably possible to load lua code from a simple c application that uses libpd. (embed lua)
then you can make simple wrapper functions to 'open patch' or 'send value to x patch'
or, maybe it's possible to wrap libpd in a lua library
another option is to use fudi to send a running pd instance messages from a lua interpreter
@alexandros @seb-harmonik.ar Seb, you are right. I want to 'use' a Pd patch inside Lua.
For example, using the audio from my microphone (which is captured in Pure Data) in an application made in Lua.
I discovered this library (https://love2d.org/forums/viewtopic.php?t=90014&sid=055636f859e6b8ab0e470c4aaeb8c605) but it looks like it's only useful for the LOVE game engine.
@romulovieira-me luajack provides bindings for JACK which would allow you to use jack to send audio between pd and your lua application.
@oid Thanks for the answer.
I will run some tests with this tool and let you know the results.
@oid It look likes luajack package is broken =(
@romulovieira-me Howso? What were the problems you encountered?
It seems to work for me, I did have to futz with the Makefile to get it to compile on my computer, it assumes the lua
command points to lua5.3 which is not true on all systems and assumes /usr/lib/ is the lib dir which is also not always true in these multilib days. I have not given it a thorough test but it seems to work.
Oops! Looks like something went wrong!