<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
<P class=ecxMsoNormal><FONT size=3 face=Calibri>Hi guys,</FONT></P>
<P class=ecxMsoNormal><FONT size=3 face=Calibri> </FONT></P>
<P class=ecxMsoNormal><FONT size=3 face=Calibri>Thank you so much for your advice!<SPAN>  </SPAN>I hadn’t realized the meaning of OSC, so I really appreciate you bringing this to my attention.<SPAN>  </SPAN>I’m still a novice at programming, so I might need some time to digest the codes and examples. </FONT></P>
<P class=ecxMsoNormal><FONT size=3 face=Calibri> </FONT></P>
<P class=ecxMsoNormal><FONT size=3 face=Calibri>I’m still a bit confused about how to plug OSC outputs from Matlab into Chuck.<SPAN>  </SPAN>I understand that I could eventually save the OSC values in a variable, but would I need to use UDP and take down my firewall?</FONT></P>
<P class=ecxMsoNormal><FONT size=3 face=Calibri> </FONT></P>
<P class=ecxMsoNormal><FONT size=3 face=Calibri>As was suggested, I’ve attached one of the data sets I’m working with.<SPAN>  </SPAN>It’s a csv with some 3,000 data points representing the stress-strain diagram for aluminum.<SPAN>  </SPAN>I’m hoping to put the values in the left column (strain) in a time array and the values in the right column (stress) in a frequency array.<SPAN>  </SPAN>These values were converted from matlab.</FONT></P>
<P class=ecxMsoNormal><FONT size=3 face=Calibri> </FONT></P>
<P class=ecxMsoNormal><FONT size=3 face=Calibri>Thanks again for your help!</FONT></P>
<P class=ecxMsoNormal><FONT size=3 face=Calibri> </FONT></P>
<P class=ecxMsoNormal><FONT size=3 face=Calibri>Cheers,</FONT></P>
<P class=ecxMsoNormal><FONT size=3 face=Calibri>Hayden</FONT></P>
<P class=ecxMsoNormal><FONT size=3 face=Calibri>hwdahmm@live.com</FONT></P>
<BR> <BR>
<DIV>
<DIV id=ecxSkyDrivePlaceholder></DIV>From: chuck-users-request@lists.cs.princeton.edu<BR>Subject: chuck-users Digest, Vol 83, Issue 7<BR>To: chuck-users@lists.cs.princeton.edu<BR>Date: Sun, 24 Jun 2012 12:00:02 -0400<BR><BR><PRE>Send chuck-users mailing list submissions to<BR>     chuck-users@lists.cs.princeton.edu<BR> <BR>To subscribe or unsubscribe via the World Wide Web, visit<BR>      <A href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target=_blank>https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</A><BR>or, via email, send a message with subject or body 'help' to<BR>       chuck-users-request@lists.cs.princeton.edu<BR> <BR>You can reach the person managing the list at<BR>  chuck-users-owner@lists.cs.princeton.edu<BR> <BR>When replying, please edit your Subject line so it is more specific<BR>than "Re: Contents of chuck-users digest..."<BR></PRE><BR><BR>--Forwarded Message Attachment--<BR>From: witt0191@gmail.com<BR>To: chuck-users@lists.cs.princeton.edu<BR>Date: Sun, 24 Jun 2012 01:13:29 +0100<BR>Subject: Re: [chuck-users] Importing Data/Using Quadraphonic Headphones with ChucK<BR><BR><PRE>If the data is static another option is use to regex across the files<BR>and import it in as variables not pretty put does work.<BR> <BR> <BR>----------<BR>visit me<BR> <BR><A href="http://www.scotthewitt.co.uk/" target=_blank>http://www.scotthewitt.co.uk</A><BR>@scotthewitt<BR> <BR><A href="http://www.theaudiopodcast.co.uk/" target=_blank>http://www.theaudiopodcast.co.uk</A><BR><A href="http://www.ablelemon.co.uk/" target=_blank>http://www.ablelemon.co.uk</A><BR><A href="http://www.inclusiveimprov.co.uk/" target=_blank>http://www.inclusiveimprov.co.uk/</A><BR> <BR> <BR>On 23 June 2012 23:54, Jordan Orelli <jordanorelli@gmail.com> wrote:<BR>> oh, wait, .m files.  Is the data being generated by Matlab?  I haven't tried<BR>> it, but there's an OSC implementation for Matlab<BR>> here: <A href="http://opensoundcontrol.org/implementation/matlab-osc" target=_blank>http://opensoundcontrol.org/implementation/matlab-osc</A><BR>><BR>> Depending on how the data is generated, the simplest thing to do may be to<BR>> just send OSC directly from Matlab to ChucK.<BR>><BR>> -jordan<BR>><BR>> On Saturday, June 23, 2012 at 6:45 PM, Jordan Orelli wrote:<BR>><BR>> the documentation isn't the greatest when it comes to parsing data from<BR>> files, but it is possible in ChucK.<BR>><BR>> There are some examples on performing file i/o that you can read<BR>> here: <A href="http://chuck.cs.princeton.edu/doc/examples/io/" target=_blank>http://chuck.cs.princeton.edu/doc/examples/io/</A><BR>><BR>> There are some examples on performing string manipulations that you can read<BR>> here:  <A href="http://chuck.cs.princeton.edu/doc/examples/string/" target=_blank>http://chuck.cs.princeton.edu/doc/examples/string/</A><BR>><BR>> The string examples aren't listed on the main examples page, but they can be<BR>> found in the examples directory that comes with the language.  It's<BR>> definitely worth your time to look through those examples and listen to<BR>> them.<BR>><BR>> Do you have some sample files that you could post somewhere to share with<BR>> us?  It would be helpful to have a dozen or so data points just so we know<BR>> what the format is.<BR>><BR>> How big are your data sets?  I'm curious to know if they are small enough to<BR>> fit in memory or if a streaming approach is required.<BR>><BR>> If I was in your position, I would probably use some other programming<BR>> language to handle the data itself, format it into OSC messages, and send it<BR>> to ChucK through OSC, especially if the data sets are large and you can't<BR>> fit them in memory.  Of course, most other programming languages don't give<BR>> you the time guarantees that ChucK gives you, so I would probably have ChucK<BR>> send an OSC message to request a data point, with some other process sending<BR>> an OSC message back in response.  In that way, you could iterate over a<BR>> large dataset without ever holding it in memory.<BR>><BR>> As an aside, do you have any recommendations on quadraphonic headphones?<BR>><BR>> Oh and, if you're just starting out with ChucK, make sure you have test<BR>> headphones to test new code, and don't wear them when learning new features.<BR>>  I blew out the cones in a pair of headphones by accidentally setting the<BR>> pole position of a OnePole ugen to 0, so… be careful ;)<BR>><BR>> -jordan<BR>><BR>> On Saturday, June 23, 2012 at 3:26 PM, Hayden Dahmm wrote:<BR>><BR>> Hi everyone,<BR>><BR>><BR>><BR>> My name is Hayden, and I’m a blind student at Swarthmore College, where I<BR>> intend to major in Environmental Engineering.  Over the summer, I’m working<BR>> on learning ChucK so I can create auditory data displays.  I’ve made decent<BR>> progress so far, but I do have a couple questions.<BR>><BR>><BR>><BR>> I’m struggling to import data from cmv or .m files, forcing me to enter<BR>> values in by hand.  Does anyone have suggestions as to how I could<BR>> circumvent this problem?<BR>><BR>><BR>><BR>> Also, I plan to use a pair of quadraphonic headphones to interrogate spatial<BR>> data with a joystick or track pad.  Has anybody tried using ChucK for this<BR>> purpose before?  If so, I would be very interested to hear your thoughts.<BR>><BR>><BR>><BR>> Thanks so much,<BR>><BR>> Hayden<BR>><BR>> hwdahmm@live.com<BR>><BR>> _______________________________________________<BR>> chuck-users mailing list<BR>> chuck-users@lists.cs.princeton.edu<BR>> <A href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target=_blank>https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</A><BR>><BR>><BR>><BR>><BR>> _______________________________________________<BR>> chuck-users mailing list<BR>> chuck-users@lists.cs.princeton.edu<BR>> <A href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target=_blank>https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</A><BR>><BR> <BR></PRE><BR><BR>--Forwarded Message Attachment--<BR>From: michaelclemow@gmail.com<BR>To: chuck-users@lists.cs.princeton.edu<BR>Date: Sat, 23 Jun 2012 21:54:30 -0400<BR>Subject: Re: [chuck-users] Importing Data/Using Quadraphonic Headphones with ChucK<BR><BR><PRE>Format the data using something else so that it can read into chuck<BR>scripts using the tokenizer and the put that into variables.<BR> <BR>Jordan's got the right idea, I think.  Also, OSC is great for this<BR>kind of thing.  Check out pyliblo OSC library for python. python's<BR>great at data manipulation.<BR> <BR>Peace,<BR>Mike<BR> <BR>Sent from my Computing Familiar.<BR> <BR>On Jun 23, 2012, at 8:14 PM, Scott Hewitt <witt0191@gmail.com> wrote:<BR> <BR>> If the data is static another option is use to regex across the files<BR>> and import it in as variables not pretty put does work.<BR>><BR>><BR>> ----------<BR>> visit me<BR>><BR>> <A href="http://www.scotthewitt.co.uk/" target=_blank>http://www.scotthewitt.co.uk</A><BR>> @scotthewitt<BR>><BR>> <A href="http://www.theaudiopodcast.co.uk/" target=_blank>http://www.theaudiopodcast.co.uk</A><BR>> <A href="http://www.ablelemon.co.uk/" target=_blank>http://www.ablelemon.co.uk</A><BR>> <A href="http://www.inclusiveimprov.co.uk/" target=_blank>http://www.inclusiveimprov.co.uk/</A><BR>><BR>><BR>> On 23 June 2012 23:54, Jordan Orelli <jordanorelli@gmail.com> wrote:<BR>>> oh, wait, .m files.  Is the data being generated by Matlab?  I haven't tried<BR>>> it, but there's an OSC implementation for Matlab<BR>>> here: <A href="http://opensoundcontrol.org/implementation/matlab-osc" target=_blank>http://opensoundcontrol.org/implementation/matlab-osc</A><BR>>><BR>>> Depending on how the data is generated, the simplest thing to do may be to<BR>>> just send OSC directly from Matlab to ChucK.<BR>>><BR>>> -jordan<BR>>><BR>>> On Saturday, June 23, 2012 at 6:45 PM, Jordan Orelli wrote:<BR>>><BR>>> the documentation isn't the greatest when it comes to parsing data from<BR>>> files, but it is possible in ChucK.<BR>>><BR>>> There are some examples on performing file i/o that you can read<BR>>> here: <A href="http://chuck.cs.princeton.edu/doc/examples/io/" target=_blank>http://chuck.cs.princeton.edu/doc/examples/io/</A><BR>>><BR>>> There are some examples on performing string manipulations that you can read<BR>>> here:  <A href="http://chuck.cs.princeton.edu/doc/examples/string/" target=_blank>http://chuck.cs.princeton.edu/doc/examples/string/</A><BR>>><BR>>> The string examples aren't listed on the main examples page, but they can be<BR>>> found in the examples directory that comes with the language.  It's<BR>>> definitely worth your time to look through those examples and listen to<BR>>> them.<BR>>><BR>>> Do you have some sample files that you could post somewhere to share with<BR>>> us?  It would be helpful to have a dozen or so data points just so we know<BR>>> what the format is.<BR>>><BR>>> How big are your data sets?  I'm curious to know if they are small enough to<BR>>> fit in memory or if a streaming approach is required.<BR>>><BR>>> If I was in your position, I would probably use some other programming<BR>>> language to handle the data itself, format it into OSC messages, and send it<BR>>> to ChucK through OSC, especially if the data sets are large and you can't<BR>>> fit them in memory.  Of course, most other programming languages don't give<BR>>> you the time guarantees that ChucK gives you, so I would probably have ChucK<BR>>> send an OSC message to request a data point, with some other process sending<BR>>> an OSC message back in response.  In that way, you could iterate over a<BR>>> large dataset without ever holding it in memory.<BR>>><BR>>> As an aside, do you have any recommendations on quadraphonic headphones?<BR>>><BR>>> Oh and, if you're just starting out with ChucK, make sure you have test<BR>>> headphones to test new code, and don't wear them when learning new features.<BR>>>  I blew out the cones in a pair of headphones by accidentally setting the<BR>>> pole position of a OnePole ugen to 0, so… be careful ;)<BR>>><BR>>> -jordan<BR>>><BR>>> On Saturday, June 23, 2012 at 3:26 PM, Hayden Dahmm wrote:<BR>>><BR>>> Hi everyone,<BR>>><BR>>><BR>>><BR>>> My name is Hayden, and I’m a blind student at Swarthmore College, where I<BR>>> intend to major in Environmental Engineering.  Over the summer, I’m working<BR>>> on learning ChucK so I can create auditory data displays.  I’ve made decent<BR>>> progress so far, but I do have a couple questions.<BR>>><BR>>><BR>>><BR>>> I’m struggling to import data from cmv or .m files, forcing me to enter<BR>>> values in by hand.  Does anyone have suggestions as to how I could<BR>>> circumvent this problem?<BR>>><BR>>><BR>>><BR>>> Also, I plan to use a pair of quadraphonic headphones to interrogate spatial<BR>>> data with a joystick or track pad.  Has anybody tried using ChucK for this<BR>>> purpose before?  If so, I would be very interested to hear your thoughts.<BR>>><BR>>><BR>>><BR>>> Thanks so much,<BR>>><BR>>> Hayden<BR>>><BR>>> hwdahmm@live.com<BR>>><BR>>> _______________________________________________<BR>>> chuck-users mailing list<BR>>> chuck-users@lists.cs.princeton.edu<BR>>> <A href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target=_blank>https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</A><BR>>><BR>>><BR>>><BR>>><BR>>> _______________________________________________<BR>>> chuck-users mailing list<BR>>> chuck-users@lists.cs.princeton.edu<BR>>> <A href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target=_blank>https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</A><BR>>><BR>> _______________________________________________<BR>> chuck-users mailing list<BR>> chuck-users@lists.cs.princeton.edu<BR>> <A href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target=_blank>https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</A><BR> <BR></PRE></DIV>                                         </div></body>
</html>