<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How to send a variable number from Lua to Pure Data?]]></title><description><![CDATA[<p>I want to send a variable number (e.g. int 1) from a lua script to Pure Data? How can I do this?<br />
I'm trying [receive] object, but nothing happens.</p>
<p>This is my code in Lua. We also need pdlua to works.</p>
<p>local ginga = pd.Class:new():register(&quot;ginga&quot;)</p>
<p>function ginga:initialize(sel, atoms)<br />
self.inlets = 1<br />
self.outlets = 1<br />
return true<br />
end</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14345/how-to-send-a-variable-number-from-lua-to-pure-data</link><generator>RSS for Node</generator><lastBuildDate>Wed, 10 Jun 2026 21:26:36 GMT</lastBuildDate><atom:link href="http://forum.pdpatchrepo.info/topic/14345.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 24 Apr 2023 20:56:50 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to send a variable number from Lua to Pure Data? on Mon, 24 Apr 2023 20:56:50 GMT]]></title><description><![CDATA[<p>I want to send a variable number (e.g. int 1) from a lua script to Pure Data? How can I do this?<br />
I'm trying [receive] object, but nothing happens.</p>
<p>This is my code in Lua. We also need pdlua to works.</p>
<p>local ginga = pd.Class:new():register(&quot;ginga&quot;)</p>
<p>function ginga:initialize(sel, atoms)<br />
self.inlets = 1<br />
self.outlets = 1<br />
return true<br />
end</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14345/how-to-send-a-variable-number-from-lua-to-pure-data</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14345/how-to-send-a-variable-number-from-lua-to-pure-data</guid><dc:creator><![CDATA[romulovieira-me]]></dc:creator><pubDate>Mon, 24 Apr 2023 20:56:50 GMT</pubDate></item><item><title><![CDATA[Reply to How to send a variable number from Lua to Pure Data? on Tue, 25 Apr 2023 06:34:22 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/romulovieira-me">@romulovieira-me</a> In your Pd/bin folder you will find an executable.... pdsend.exe for windows...... or pd.darwin or pd.linux (I think) for other os's.<br />
You can tell Lua where to find it (maybe just copy it into a folder that Lua uses), and call it within your script.<br />
In Pd you would then use [netreceive] to receive the message.<br />
It will probably be a lot easier than creating a socket in Lua.<br />
I don't know Lua.<br />
You would use pdsend (in Python) and [netreceive] (in Pd) like this........    <a href="https://guitarextended.wordpress.com/2012/11/03/make-python-and-pure-data-communicate-on-the-raspberry-pi/" rel="nofollow">https://guitarextended.wordpress.com/2012/11/03/make-python-and-pure-data-communicate-on-the-raspberry-pi/</a><br />
You will need to work out how to script the Python equivalent in Lua.<br />
David.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14345/how-to-send-a-variable-number-from-lua-to-pure-data/2</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14345/how-to-send-a-variable-number-from-lua-to-pure-data/2</guid><dc:creator><![CDATA[whale-av]]></dc:creator><pubDate>Tue, 25 Apr 2023 06:34:22 GMT</pubDate></item></channel></rss>