<?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[Passing Sound File Path As An Argument]]></title><description><![CDATA[<p>Hello,</p>
<p>First of all I'm a true newbie with PD.</p>
<p>We've been trying to use PD and Python to play sound files on PD for a school project. What we try to achieve is; using netreceive object, passing a file path from Python script to the PD and then do some stuff there. However, we couldn't manage to do it. When we pass the path to &quot;read $1 s&quot; object(or message, as I said I'm a newbie), it says $1 argument out of range. All the examples on the web I could find is done with OpenPanel but I think it should be fairly straightforward to do it this way.</p>
<p>I would greatly appreciate any help.</p>
<p>Best</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/9233/passing-sound-file-path-as-an-argument</link><generator>RSS for Node</generator><lastBuildDate>Sun, 08 Nov 2026 23:42:39 GMT</lastBuildDate><atom:link href="http://forum.pdpatchrepo.info/topic/9233.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 13 Apr 2015 15:14:23 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Passing Sound File Path As An Argument on Mon, 13 Apr 2015 15:14:23 GMT]]></title><description><![CDATA[<p>Hello,</p>
<p>First of all I'm a true newbie with PD.</p>
<p>We've been trying to use PD and Python to play sound files on PD for a school project. What we try to achieve is; using netreceive object, passing a file path from Python script to the PD and then do some stuff there. However, we couldn't manage to do it. When we pass the path to &quot;read $1 s&quot; object(or message, as I said I'm a newbie), it says $1 argument out of range. All the examples on the web I could find is done with OpenPanel but I think it should be fairly straightforward to do it this way.</p>
<p>I would greatly appreciate any help.</p>
<p>Best</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/9233/passing-sound-file-path-as-an-argument</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/9233/passing-sound-file-path-as-an-argument</guid><dc:creator><![CDATA[karttinen]]></dc:creator><pubDate>Mon, 13 Apr 2015 15:14:23 GMT</pubDate></item><item><title><![CDATA[Reply to Passing Sound File Path As An Argument on Mon, 13 Apr 2015 15:38:50 GMT]]></title><description><![CDATA[<p>Hi and welcome to this forum,</p>
<p>The path information received by the <strong>[netreceive]</strong> and which will be the argument of the message <strong>[read $1(</strong> needs to be a &quot;symbol&quot;. But a simple string of text received by Pd will be considered as a mere text message that hasn't been defined as a &quot;symbol&quot; and so Pd cannot determine which data type it is (a message containing a symbol looks like <strong>[symbol dog(</strong> instead of <strong>[dog(</strong>. With floats (numbers), you can have the data type implicit, so both <strong>[4(</strong> and <strong>[float 4(</strong> work equally well. More about symbols and floats here: <a href="http://en.flossmanuals.net/pure-data/dataflow-tutorials/messages/" rel="nofollow">http://en.flossmanuals.net/pure-data/dataflow-tutorials/messages/</a>). So you can simply do something like this:</p>
<pre><code>[netreceive]
|
[symbol]
|
[read $1(
</code></pre>
<p>Alternatively, you can pass your path from Python to Pd as <code>symbol /path/folder/file</code> instead of <code>/path/folder/file</code>.</p>
<p>Hope this helps. Take care,<br />
Gilberto</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/9233/passing-sound-file-path-as-an-argument/2</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/9233/passing-sound-file-path-as-an-argument/2</guid><dc:creator><![CDATA[gsagostinho]]></dc:creator><pubDate>Mon, 13 Apr 2015 15:38:50 GMT</pubDate></item></channel></rss>