Hey all,
I have this bioinformation.csv file. How can I use this information to control an oscillator frequency?
Thanks
How to use .csv files to control an oscillator?
Hey all,
I have this bioinformation.csv file. How can I use this information to control an oscillator frequency?
Thanks
@blurryface I would use a text editor to replace every instance of comma with space, and every instance of \n (end of line) with ";\n" (semicolon eol) and save it to a different file. Then I'd load that file into [text].
Edit: also search this forum, e.g. https://forum.pdpatchrepo.info/topic/14013/from-csv-to-sonification-visualization
@blurryface You csv file seems to just be one datapoint per line and you can load this right into a [text] and just get the required field number.
[text] can also deal with csv files that have comma separated fields, right outlet tells you if the line ends with a comma or a semicolon, just takes some simple logic, the helpfile for [text] should provide the answers.
@oid said:
[text] can also deal with csv files that have comma separated fields, right outlet tells you if the line ends with a comma or a semicolon, just takes some simple logic, the helpfile for [text] should provide the answers.
Can you write a little more on how to make this work? For instance, when I use this csv file test.csv
[text] loads the commas and treats the new lines as whitespace
plus I don't get any notification on the right outlet. What am I missing?
@jameslo said:
[text] loads the commas and treats the new lines as whitespace
IIRC there is a flag that specifies whether newlines should advance to the next line, or if a semicolon is required to break lines. The default requires semicolons.
I forget whether this is a property of the [text define] object or of the "read" message, but I'm sure it's documented in [text] help.
hjh
@ddw_music Ah, OK, I see that @oid is probably referring to the right outlet of [text get]. Things are still a little strange when newlines are treated as whitespace though.
@jameslo [read -c test.csv( might work for [text define].... it is documented for "write" but says that it will interpret carriage returns as separators for "read" and for "write".
David.
@whale-av That totally worked, thanks. I must be going blind because I didn't see that flag in the help until you sent me looking for it.
@jameslo It's easy to miss. I only spotted it because I am going blind...... so I have to look a lot harder...
David.
Oops! Looks like something went wrong!