<?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[PD file read for heterogenous data file]]></title><description><![CDATA[<p>Hi,</p>
<p>I have the following problem: I have a text file, which contains some heterogenous data. Let me show you some example:</p>
<p>LRSObjectFile;<br />
0;<br />
1;<br />
test.ogg;<br />
3;</p>
<p>The first Line tells PD that the file is intended for the patch. The second line<br />
tells PD what type of object to load (may be a constant later down the road) and the<br />
rest contains data specific for that object (I have many dynamic objects which I compose<br />
on the fly through dyn~ external).</p>
<p>Now what I am doing to parse such a file is highly stupid and I'd like to find some more elegant solution:</p>
<p>I am using three textfile objects (each for one line). What I'd like to have is one textfile object and figure, how to route the reading logic so that the output from the textfile is routed to the branch I need. Here is some pseudocode through tmp status variable:</p>
<p>int status = 0;</p>
<p>switch(status)<br />
{<br />
case 0:<br />
read_and_verify_header();<br />
status = 1;<br />
break;<br />
case 1:<br />
read_object_typ();<br />
status = 2;<br />
break;<br />
case 2:<br />
read_and_fill_object_data_to the_end_of_the_file();<br />
}</p>
<p>But I found this very hard to construct in PD. Any ideas or pointers in completely different direction?</p>
<p>Thanks a lot for giving this a thought.</p>
<p>Edit: for some spelling.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/413/pd-file-read-for-heterogenous-data-file</link><generator>RSS for Node</generator><lastBuildDate>Tue, 08 Sep 2026 16:18:25 GMT</lastBuildDate><atom:link href="http://forum.pdpatchrepo.info/topic/413.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 18 Jun 2006 12:05:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to PD file read for heterogenous data file on Sun, 18 Jun 2006 12:05:31 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>I have the following problem: I have a text file, which contains some heterogenous data. Let me show you some example:</p>
<p>LRSObjectFile;<br />
0;<br />
1;<br />
test.ogg;<br />
3;</p>
<p>The first Line tells PD that the file is intended for the patch. The second line<br />
tells PD what type of object to load (may be a constant later down the road) and the<br />
rest contains data specific for that object (I have many dynamic objects which I compose<br />
on the fly through dyn~ external).</p>
<p>Now what I am doing to parse such a file is highly stupid and I'd like to find some more elegant solution:</p>
<p>I am using three textfile objects (each for one line). What I'd like to have is one textfile object and figure, how to route the reading logic so that the output from the textfile is routed to the branch I need. Here is some pseudocode through tmp status variable:</p>
<p>int status = 0;</p>
<p>switch(status)<br />
{<br />
case 0:<br />
read_and_verify_header();<br />
status = 1;<br />
break;<br />
case 1:<br />
read_object_typ();<br />
status = 2;<br />
break;<br />
case 2:<br />
read_and_fill_object_data_to the_end_of_the_file();<br />
}</p>
<p>But I found this very hard to construct in PD. Any ideas or pointers in completely different direction?</p>
<p>Thanks a lot for giving this a thought.</p>
<p>Edit: for some spelling.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/413/pd-file-read-for-heterogenous-data-file</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/413/pd-file-read-for-heterogenous-data-file</guid><dc:creator><![CDATA[metamorphium]]></dc:creator><pubDate>Sun, 18 Jun 2006 12:05:31 GMT</pubDate></item><item><title><![CDATA[Reply to PD file read for heterogenous data file on Mon, 19 Jun 2006 19:50:03 GMT]]></title><description><![CDATA[<p>hello,<br />
it's difficult to understand what you really want to do.</p>
<p>what are &quot;heterogenous data&quot;?</p>
<p>It seems that you are looking for a way to store internal messages in a textfile for dynamic patching,<br />
with error detections.</p>
<p>Am I right?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/413/pd-file-read-for-heterogenous-data-file/2</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/413/pd-file-read-for-heterogenous-data-file/2</guid><dc:creator><![CDATA[megale]]></dc:creator><pubDate>Mon, 19 Jun 2006 19:50:03 GMT</pubDate></item><item><title><![CDATA[Reply to PD file read for heterogenous data file on Mon, 19 Jun 2006 20:31:49 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>I'll try to make myself a little bit more clear:</p>
<p>I need to read a textfile and according to the contents of this file invoke different pd abstractions. The idea of this is that I already have a mechanism, which allows me to register an object which can be basically anything from ring modulation to playing a sample. My mechanism allows me to store this kind of object to the text file (database would have been much better, but I need to write some mysql external for that first <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/grinning.png" title=":)" alt=":)" />)</p>
<p>Then when the patch enters the performance mode, I dynamically load the text files (according to the time queue) and construct the patch accordingly, but the parser doesn't know, what data's are inside. So first line is the header which describes, that the file indeed is intended for the system usage. Second line is so called object descriptor, which determines what kind of data will follow.<br />
Then I invoke specific loader for each object, which already knows how to treat the data inside of the file.</p>
<p>My problem is with the textfile object itself. If I could get and object descriptor and use the same file on various places, the problem would have been solved for me, but right now it's very awkward.</p>
<p>Sorry for not making myself clear on the first occasion and thanks again. I hope this clarify a bit, what I'm trying to do.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/413/pd-file-read-for-heterogenous-data-file/3</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/413/pd-file-read-for-heterogenous-data-file/3</guid><dc:creator><![CDATA[metamorphium]]></dc:creator><pubDate>Mon, 19 Jun 2006 20:31:49 GMT</pubDate></item><item><title><![CDATA[Reply to PD file read for heterogenous data file on Wed, 21 Jun 2006 10:30:00 GMT]]></title><description><![CDATA[<p>Nevermind. I found a solution through a series of spigot objects. <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/grinning.png" title=":)" alt=":)" /></p>
<p>Thanks again.</p>
<p>Edit: and after discovering cyclone [gate] object the solution is elegant in the way I wanted to have it. <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/413/pd-file-read-for-heterogenous-data-file/4</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/413/pd-file-read-for-heterogenous-data-file/4</guid><dc:creator><![CDATA[metamorphium]]></dc:creator><pubDate>Wed, 21 Jun 2006 10:30:00 GMT</pubDate></item><item><title><![CDATA[Reply to PD file read for heterogenous data file on Mon, 26 Jun 2006 20:39:33 GMT]]></title><description><![CDATA[<p>Hello,<br />
let me afford myself to suggest [demultiplex] or [demux] from zexy library for doing the job in a more elegant manner</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/413/pd-file-read-for-heterogenous-data-file/5</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/413/pd-file-read-for-heterogenous-data-file/5</guid><dc:creator><![CDATA[megale]]></dc:creator><pubDate>Mon, 26 Jun 2006 20:39:33 GMT</pubDate></item><item><title><![CDATA[Reply to PD file read for heterogenous data file on Mon, 26 Jun 2006 20:42:02 GMT]]></title><description><![CDATA[<p>Also, your use of [dyn~] is very interesting, if you share this project on internet, we would be glad to have a sight.<br />
Best regards.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/413/pd-file-read-for-heterogenous-data-file/6</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/413/pd-file-read-for-heterogenous-data-file/6</guid><dc:creator><![CDATA[megale]]></dc:creator><pubDate>Mon, 26 Jun 2006 20:42:02 GMT</pubDate></item><item><title><![CDATA[Reply to PD file read for heterogenous data file on Tue, 27 Jun 2006 09:58:23 GMT]]></title><description><![CDATA[<p>thanks for the support! Yes. As soon as my project reaches beta stage, I'll set a site for it together with a download. I'll definitely look into those two objects, thanks for the advice.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/413/pd-file-read-for-heterogenous-data-file/7</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/413/pd-file-read-for-heterogenous-data-file/7</guid><dc:creator><![CDATA[metamorphium]]></dc:creator><pubDate>Tue, 27 Jun 2006 09:58:23 GMT</pubDate></item></channel></rss>