<?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[From CSV to sonification &#x2F; visualization]]></title><description><![CDATA[<p>Hello everyone,<br />
I'm relatively new to PD, tough I've worked a lot with MAX MSP in the past (quite far now) doing some generative music with objects (arduino and so on). Needless to say, It's been too long since I opened a patch, so right now It's quite hard to know all that is possible and not be able to do it... <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/frowning.png" title=":(" alt=":(" /><br />
Currently I'm trying to help a colleague who would like the present some data that we've extracted from users of the products that we develop. It may be a very simple sonification or visualization.<br />
I thought it would be quite simpl,e, but honestly I'm struggling to find out just how to extract the data in the columns of our .csv into pd.<br />
So far I've managed to use qlist and textfiles and to load the content, but the textfile window and the console really don't help me since I can't use this data and make a list or any other action.<br />
I've made a good amount of research in the forum, but so far the only examples that I've been able to find are quite complex and it doesn't really help at this stage.<br />
So, if anyone has a VERY simple patch (I'm afraid that even the most basic explanation at this point is confusing to me;I just found out how to copy a patch from text, so you can imagine that my skills are far beyond my intentions <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/wink.png" title=";)" alt=";)" />) in order to help me find out how to get the data from my csv (i converted it into a .txt file with ; ) in the ACTUAL patch, either into a message, a symbol, or any other thing that I can start to work with.</p>
<p>Thanks to all for your kind help.<br />
Best,<br />
Melissa</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14013/from-csv-to-sonification-visualization</link><generator>RSS for Node</generator><lastBuildDate>Sat, 14 Nov 2026 09:05:32 GMT</lastBuildDate><atom:link href="http://forum.pdpatchrepo.info/topic/14013.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 28 Jul 2022 14:25:19 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to From CSV to sonification &#x2F; visualization on Thu, 28 Jul 2022 14:25:19 GMT]]></title><description><![CDATA[<p>Hello everyone,<br />
I'm relatively new to PD, tough I've worked a lot with MAX MSP in the past (quite far now) doing some generative music with objects (arduino and so on). Needless to say, It's been too long since I opened a patch, so right now It's quite hard to know all that is possible and not be able to do it... <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/frowning.png" title=":(" alt=":(" /><br />
Currently I'm trying to help a colleague who would like the present some data that we've extracted from users of the products that we develop. It may be a very simple sonification or visualization.<br />
I thought it would be quite simpl,e, but honestly I'm struggling to find out just how to extract the data in the columns of our .csv into pd.<br />
So far I've managed to use qlist and textfiles and to load the content, but the textfile window and the console really don't help me since I can't use this data and make a list or any other action.<br />
I've made a good amount of research in the forum, but so far the only examples that I've been able to find are quite complex and it doesn't really help at this stage.<br />
So, if anyone has a VERY simple patch (I'm afraid that even the most basic explanation at this point is confusing to me;I just found out how to copy a patch from text, so you can imagine that my skills are far beyond my intentions <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/wink.png" title=";)" alt=";)" />) in order to help me find out how to get the data from my csv (i converted it into a .txt file with ; ) in the ACTUAL patch, either into a message, a symbol, or any other thing that I can start to work with.</p>
<p>Thanks to all for your kind help.<br />
Best,<br />
Melissa</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14013/from-csv-to-sonification-visualization</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14013/from-csv-to-sonification-visualization</guid><dc:creator><![CDATA[lavirgenmarea]]></dc:creator><pubDate>Thu, 28 Jul 2022 14:25:19 GMT</pubDate></item><item><title><![CDATA[Reply to From CSV to sonification &#x2F; visualization on Thu, 28 Jul 2022 21:46:27 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/lavirgenmarea">@lavirgenmarea</a> I'd bet that if you were to post a small csv file together with examples of the kinds of Pd messages you'd like to extract from it that someone in this forum would write a beautifully clear example for you (maybe even me if it weren't for the out-of-town wedding I have to attend).  I also think that it's probably easier to do the data manipulation and transposition in the spreadsheet software before importing it into Pd.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14013/from-csv-to-sonification-visualization/2</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14013/from-csv-to-sonification-visualization/2</guid><dc:creator><![CDATA[jameslo]]></dc:creator><pubDate>Thu, 28 Jul 2022 21:46:27 GMT</pubDate></item><item><title><![CDATA[Reply to From CSV to sonification &#x2F; visualization on Fri, 29 Jul 2022 00:23:22 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/lavirgenmarea">@lavirgenmarea</a> If the data are arranged as:</p>
<p>number number number number number;<br />
number number number number number;<br />
number number number number number;<br />
number number number number number;<br />
number number number number number;</p>
<p>... (space-delimited, with semicolons) then [text] can turn these into lists.</p>
<p>As a test, I wrote out a text file from SuperCollider like this:</p>
<pre><code>(
f = File(&quot;~/matrix.txt&quot;.standardizePath, &quot;w&quot;);
if(f.isOpen) {
    protect {
        5.do {
            5.do { |i|
                if(i &gt; 0) { f &lt;&lt; &quot; &quot; };
                f &lt;&lt; 1.0.rand;
            };
            f &lt;&lt; &quot;;&quot; &lt;&lt; 10.asAscii;
        }
    } { f.close };
} { &quot;huh?&quot;.postln };
)
</code></pre>
<p>(<s>[text] chokes on <code>\n</code> newlines</s> -- ascii code 10 for newline is OK -- first try, <code>\n</code> didn't work, but now it does. Weird.)[text] chokes on <code>\n</code> newlines</p>
<p>Then:</p>
<p><img src="/uploads/files/1659053122577-pd-text.png" alt="pd-text.png" class="img-responsive img-markdown" /></p>
<p>hjh</p>
<p>PS FWIW, SuperCollider has <code>CSVFileReader(&quot;/path/to/my.csv&quot;).collect { |row| row.collect { |string| string.asFloat } }</code></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14013/from-csv-to-sonification-visualization/3</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14013/from-csv-to-sonification-visualization/3</guid><dc:creator><![CDATA[ddw_music]]></dc:creator><pubDate>Fri, 29 Jul 2022 00:23:22 GMT</pubDate></item><item><title><![CDATA[Reply to From CSV to sonification &#x2F; visualization on Fri, 29 Jul 2022 10:03:49 GMT]]></title><description><![CDATA[<p>Hello again !<br />
Thanks <a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/ddw_music">@ddw_music</a>, I can now print the lines.. thanks!<br />
I still can't figure out how to get the data INTO the patch. I'm afraid I'll have to leave Supercollider out of my spectrum for a while ...<br />
So as <a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/jameslo">@jameslo</a> kindly suggested, here you'll find a sample of what my csv will look like.<br />
I'm willing to edit my csv (take the text away) or treat each column separately (I think this will be better in the end). But I still don't know how to bring it back to my patch. I would be interested in knowing how to do it both with numbers (f) or words (s),<br />
Sorry for the basic question, but all the info I find brings me back to the &quot;print&quot; and I'm stuck.<br />
Thanks for your help !!<br />
And enjoy the wedding ! <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/wink.png" title=";)" alt=";)" /><a href="/uploads/files/1659089023815-exp%C3%A9riencetest.csv">ExpérienceTest.csv</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14013/from-csv-to-sonification-visualization/4</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14013/from-csv-to-sonification-visualization/4</guid><dc:creator><![CDATA[lavirgenmarea]]></dc:creator><pubDate>Fri, 29 Jul 2022 10:03:49 GMT</pubDate></item><item><title><![CDATA[Reply to From CSV to sonification &#x2F; visualization on Fri, 29 Jul 2022 11:16:23 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/lavirgenmarea">@lavirgenmarea</a> The [text] objects are probably what you want to use but you will want to replace your semicolons with spaces, with the semi colons each cell would be its own line. Here are a few things to get you started,  shows how to read the file into [text] and how to get a column as a list or get the floats or symbols from a list. The help files for [text] should provide the rest of your answers and how to do things like get a single cell. Just edit the message box so path/to/expériencetest.csv is the actual path to the file and then click it to read it into the [text] object.<br />
<a href="/uploads/files/1659093291564-csv.pd">csv.pd</a><br />
<img src="/uploads/files/1659093217584-untitled.png" alt="Untitled.png" class="img-responsive img-markdown" /><br />
Edit: and make sure to set the column number in the number box or you will just get the entire file.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14013/from-csv-to-sonification-visualization/5</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14013/from-csv-to-sonification-visualization/5</guid><dc:creator><![CDATA[oid]]></dc:creator><pubDate>Fri, 29 Jul 2022 11:16:23 GMT</pubDate></item><item><title><![CDATA[Reply to From CSV to sonification &#x2F; visualization on Fri, 29 Jul 2022 13:43:45 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/oid">@oid</a> Thanks a lot ! This patch is super helpful, it really shows me  how to do both &quot;techniques&quot; and to start from there.<br />
I only need to figure out how to get this numbers into the <strong>working patch</strong> (into an object? message? symbol?) and not just in the print console.<br />
Any hints on how to do this will be very useful.<br />
Thanks for your help!</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14013/from-csv-to-sonification-visualization/6</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14013/from-csv-to-sonification-visualization/6</guid><dc:creator><![CDATA[lavirgenmarea]]></dc:creator><pubDate>Fri, 29 Jul 2022 13:43:45 GMT</pubDate></item><item><title><![CDATA[Reply to From CSV to sonification &#x2F; visualization on Sat, 30 Jul 2022 00:18:08 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/lavirgenmarea">@lavirgenmarea</a> Like this.</p>
<pre><code>Identifiant Groupe Valence-1 Arousal-1 Motivation-1 Taux\ d'erreur_Stroop Taux\ d'erreur_quiz Valence-2 Arousal-2 Motivation-2;
1 1 7 6 23 0 0.4 7 7 21;
2 1 7 1 25 0.0833333333333334 0 8 1 36;
3 2 8 3 28 0 0.2 7 5 27;
4 2 5 2 28 0 0.4 5 3 21;
5 1 6 3 20 0.0833333333333334 0.2 5 4 21;
6 2 7 4 19 0.25 0 6 4 18;
7 1 6 4 24 0 0.2 5 3 23;
8 2 6 5 19 0.0833333333333334 0 6 5 19;
9 NA NA NA NA NA NA NA NA NA;
10 NA NA NA NA NA NA NA NA NA;
</code></pre>
<p>Find/replace manual editing in a text editor. (One trick is: backslashes before spaces within cells.)</p>
<p><img src="/uploads/files/1659140179127-pd-read-rows.png" alt="pd-read-rows.png" class="img-responsive img-markdown" /></p>
<p><img src="/uploads/files/1659140185891-pd-rows.png" alt="pd-rows.png" class="img-responsive img-markdown" /></p>
<p>hjh</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14013/from-csv-to-sonification-visualization/7</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14013/from-csv-to-sonification-visualization/7</guid><dc:creator><![CDATA[ddw_music]]></dc:creator><pubDate>Sat, 30 Jul 2022 00:18:08 GMT</pubDate></item><item><title><![CDATA[Reply to From CSV to sonification &#x2F; visualization on Sat, 30 Jul 2022 00:35:25 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/lavirgenmarea">@lavirgenmarea</a> said:</p>
<blockquote>
<p>I only need to figure out how to get this numbers into the <strong>working patch</strong> (into an object? message? symbol?) and not just in the print console.</p>
</blockquote>
<p>And... here, you encounter a bit of a blind spot... the software is called Pure Data but it takes a long, long time to figure out how to work with... well... data.</p>
<p>In any case, out of the [text get] object, you get lists of numbers, which you can use in the same way that you would use any other list of numbers.</p>
<p>For example, if you wanted to loop over each row and map each number onto a frequency, it might look like this. I'm not sure this is a particularly meaningful mapping, but I went this way to flatten out the few values that are much higher than the others.</p>
<p><img src="/uploads/files/1659141321903-pd-sonify.png" alt="pd-sonify.png" class="img-responsive img-markdown" /></p>
<p>hjh</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14013/from-csv-to-sonification-visualization/8</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14013/from-csv-to-sonification-visualization/8</guid><dc:creator><![CDATA[ddw_music]]></dc:creator><pubDate>Sat, 30 Jul 2022 00:35:25 GMT</pubDate></item><item><title><![CDATA[Reply to From CSV to sonification &#x2F; visualization on Mon, 01 Aug 2022 09:05:49 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/ddw_music">@ddw_music</a> That's perfect <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/exclamation.png" title="!!!" alt="!!!" /><br />
Indeed, à steep learning curve hehe... But it's much better than the first time. Thanks for your kind help.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14013/from-csv-to-sonification-visualization/9</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14013/from-csv-to-sonification-visualization/9</guid><dc:creator><![CDATA[lavirgenmarea]]></dc:creator><pubDate>Mon, 01 Aug 2022 09:05:49 GMT</pubDate></item></channel></rss>