<?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[OSC parsing data problem in pd]]></title><description><![CDATA[<p>As with most things that you learn the curve in the beginning is a little overwhelming and the simplest things can be missed. After much ado (2 days of internet searches) I must humbly ask for assistance. I am building a processing sketch that uses position to determine frequencies to send to pd. These are passed along as the (float freq) variable in the function. Everything is good going leaving processing and into pd but I can't seem to parse the pdOscMessage correctly once it gets to pd. What am I missing?</p>
<p>NetAddress puredata;</p>
<p>oscP5 = new OscP5(this, 9000);<br />
puredata = new NetAddress(&quot;127.0.0.1&quot;,9000);</p>
<p>Processing Osc Function</p>
<p>void pdMessage(float freq) {</p>
<p><a href="//Osc">//Osc</a> Bundle creation<br />
OscBundle myBundle = new OscBundle();</p>
<p><a href="//New">//New</a> OSC Message creation<br />
OscMessage pdOscMessage = new OscMessage(&quot;/ &quot; + freq);</p>
<p><a href="//Filter">//Filter</a> freq and Add an integer (midi) to the message to Pure Data NetAddress</p>
<p>if (freq == 417) {<br />
oscP5.send(pdOscMessage.add(freq), puredata);</p>
<p>}<br />
if (freq == 528) {<br />
oscP5.send(pdOscMessage.add(freq), puredata);</p>
<p>}<br />
if (freq == 639) {<br />
oscP5.send(pdOscMessage.add(freq), puredata);</p>
<p>}<br />
if (freq == 741) {<br />
oscP5.send(pdOscMessage.add(freq), puredata);</p>
<p>}</p>
<p>println(&quot;pdMessage: &quot;, pdOscMessage);</p>
<p><a href="//Add">//Add</a> message to the bundle<br />
myBundle.add(pdOscMessage);</p>
<p><a href="//Clearing">//Clearing</a> message<br />
pdOscMessage.clear();<br />
}</p>
<p>}</p>
<p>Pd Canvas</p>
<p>import mrpeach</p>
<p>[udpreceive 9000]<br />
|<br />
|<br />
[upackOSC]<br />
|<br />
|<br />
[routeOSC /s /f ]<br />
\<br />
\<br />
[t b]<br />
|<br />
|<br />
[0\<br />
|<br />
|<br />
[osc~]<br />
|<br />
|<br />
[*~.1]<br />
|<br />
|<br />
[dac~]</p>
<p>Thanks.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7926/osc-parsing-data-problem-in-pd</link><generator>RSS for Node</generator><lastBuildDate>Sun, 19 Apr 2026 18:25:00 GMT</lastBuildDate><atom:link href="http://forum.pdpatchrepo.info/topic/7926.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 14 Dec 2013 19:37:35 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to OSC parsing data problem in pd on Sat, 14 Dec 2013 19:37:35 GMT]]></title><description><![CDATA[<p>As with most things that you learn the curve in the beginning is a little overwhelming and the simplest things can be missed. After much ado (2 days of internet searches) I must humbly ask for assistance. I am building a processing sketch that uses position to determine frequencies to send to pd. These are passed along as the (float freq) variable in the function. Everything is good going leaving processing and into pd but I can't seem to parse the pdOscMessage correctly once it gets to pd. What am I missing?</p>
<p>NetAddress puredata;</p>
<p>oscP5 = new OscP5(this, 9000);<br />
puredata = new NetAddress(&quot;127.0.0.1&quot;,9000);</p>
<p>Processing Osc Function</p>
<p>void pdMessage(float freq) {</p>
<p><a href="//Osc">//Osc</a> Bundle creation<br />
OscBundle myBundle = new OscBundle();</p>
<p><a href="//New">//New</a> OSC Message creation<br />
OscMessage pdOscMessage = new OscMessage(&quot;/ &quot; + freq);</p>
<p><a href="//Filter">//Filter</a> freq and Add an integer (midi) to the message to Pure Data NetAddress</p>
<p>if (freq == 417) {<br />
oscP5.send(pdOscMessage.add(freq), puredata);</p>
<p>}<br />
if (freq == 528) {<br />
oscP5.send(pdOscMessage.add(freq), puredata);</p>
<p>}<br />
if (freq == 639) {<br />
oscP5.send(pdOscMessage.add(freq), puredata);</p>
<p>}<br />
if (freq == 741) {<br />
oscP5.send(pdOscMessage.add(freq), puredata);</p>
<p>}</p>
<p>println(&quot;pdMessage: &quot;, pdOscMessage);</p>
<p><a href="//Add">//Add</a> message to the bundle<br />
myBundle.add(pdOscMessage);</p>
<p><a href="//Clearing">//Clearing</a> message<br />
pdOscMessage.clear();<br />
}</p>
<p>}</p>
<p>Pd Canvas</p>
<p>import mrpeach</p>
<p>[udpreceive 9000]<br />
|<br />
|<br />
[upackOSC]<br />
|<br />
|<br />
[routeOSC /s /f ]<br />
\<br />
\<br />
[t b]<br />
|<br />
|<br />
[0\<br />
|<br />
|<br />
[osc~]<br />
|<br />
|<br />
[*~.1]<br />
|<br />
|<br />
[dac~]</p>
<p>Thanks.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7926/osc-parsing-data-problem-in-pd</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7926/osc-parsing-data-problem-in-pd</guid><dc:creator><![CDATA[Architek1]]></dc:creator><pubDate>Sat, 14 Dec 2013 19:37:35 GMT</pubDate></item><item><title><![CDATA[Reply to OSC parsing data problem in pd on Sat, 14 Dec 2013 21:05:28 GMT]]></title><description><![CDATA[<p>could you put a [print] right after [unpackOSC] and tell us what you get ?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7926/osc-parsing-data-problem-in-pd/2</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7926/osc-parsing-data-problem-in-pd/2</guid><dc:creator><![CDATA[baptiste_c]]></dc:creator><pubDate>Sat, 14 Dec 2013 21:05:28 GMT</pubDate></item><item><title><![CDATA[Reply to OSC parsing data problem in pd on Sat, 14 Dec 2013 21:09:43 GMT]]></title><description><![CDATA[<p>Sure thing. It's</p>
<p>/ 417.0 417</p>
<p>or whatever float is passed in the pdOscMessage</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7926/osc-parsing-data-problem-in-pd/3</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7926/osc-parsing-data-problem-in-pd/3</guid><dc:creator><![CDATA[Architek1]]></dc:creator><pubDate>Sat, 14 Dec 2013 21:09:43 GMT</pubDate></item><item><title><![CDATA[Reply to OSC parsing data problem in pd on Mon, 16 Dec 2013 04:44:28 GMT]]></title><description><![CDATA[<p>I have switched my OSC messages to come from Iannix now for sake of speed instead of building a processing sketch every time.</p>
<p>Pd Canvas</p>
<p>[import mrpeach]</p>
<p>[udpreceive 9000]<br />
|<br />
|<br />
[upackOSC]<br />
|<br />
|<br />
[routeOSC /cursor ]<br />
\<br />
| \<br />
| [print cursor] returns- cursor: 12 0.293095 0.851835 0.5 -2.75861 2.75459 0<br />
|<br />
|<br />
[routeOSC /f1 /f2 /f3]<br />
|<br />
|<br />
[print] returns nothing on any outlets except the last one which is the same as above</p>
<p>Anyone with any ideas on how to parse this? I know this has got to be easier than it seems <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/grinning.png" title=":)" alt=":)" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7926/osc-parsing-data-problem-in-pd/4</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7926/osc-parsing-data-problem-in-pd/4</guid><dc:creator><![CDATA[Architek1]]></dc:creator><pubDate>Mon, 16 Dec 2013 04:44:28 GMT</pubDate></item><item><title><![CDATA[Reply to OSC parsing data problem in pd on Mon, 16 Dec 2013 06:53:27 GMT]]></title><description><![CDATA[<p>if your output of [routeOSC /cursor ] is 12 0.293095 0.851835 0.5 -2.75861 2.75459 0, then you no longer need to use the routeOSC object, as these are all just floats.</p>
<p>just use [unpack f f f f f f] , which will spit out those 6 float values to 6 outlets.</p>
<p>..edit: and to debug this yourself in future, just put the [print] object at various sections of the chain to see what comes out.</p>
<p>If you get something like /cursor/6.8956778 then that is an OSC message, and will need to be parsed with routeOSC. But if you just get 'normal' symbols or floats (ie, without the /***/**** form), then you can just split them up with a normal [route] object.</p>
<p>..edit #2: also, this kinda worries me:</p>
<p>[t b]<br />
|<br />
|<br />
[0\<br />
|<br />
|<br />
[osc~]</p>
<p>you're triggering a float of zero, going into an oscillator's pitch input? you do realize that the oscillator will have a frequency of zero, yeah??? ie, no sound.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7926/osc-parsing-data-problem-in-pd/5</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7926/osc-parsing-data-problem-in-pd/5</guid><dc:creator><![CDATA[mod]]></dc:creator><pubDate>Mon, 16 Dec 2013 06:53:27 GMT</pubDate></item></channel></rss>