Hi Mike,
Great! Thank you so much for your help here. I’ll give this a try and let you all know how
it goes.
Cheers,
Hayden
From: chuck-users-request@lists.cs.princeton.edu
Subject: chuck-users Digest, Vol 83, Issue 9
To: chuck-users@lists.cs.princeton.edu
Date: Wed, 27 Jun 2012 11:03:21 -0400
Send chuck-users mailing list submissions to
chuck-users@lists.cs.princeton.edu
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
or, via email, send a message with subject or body 'help' to
chuck-users-request@lists.cs.princeton.edu
You can reach the person managing the list at
chuck-users-owner@lists.cs.princeton.edu
When replying, please edit your Subject line so it is more specific
than "Re: Contents of chuck-users digest..."
--Forwarded Message Attachment--
From: michaelclemow@gmail.com
To: chuck-users@lists.cs.princeton.edu
Date: Wed, 27 Jun 2012 11:03:00 -0400
Subject: Re: [chuck-users] Matlab data help
Hayden,
Your file is very simple:
[number],[number]
If I were you, I'd output (or process) this data file such that the two values are separated by white space instead of a comma and read this data with Chuck by using the FileIO objects (especially the tokenizer object -- see Chuck examples under the folder "io"). That will disintermediate the entire process and remove the need for using Open Sound Control to send the data into Chuck.
UNLESS, you mean to generate this data in realtime with Matlab and sonify it using Chuck, in which case, you should definitely use Open Sound Control to send the values to your Chuck script as they are generated. (The relevant Chuck examples will be found the folder called "osc". Those should tell you how to send and receive OSC messages.)
Also, if you're sending OSC from one local program to another on the same machine, you'll probably not have to change anything with regard to your firewall. On the other hand, if you're sending from one machine to another, then you might want to disable the firewall altogether in order to test the connection. Once you get it operating, then you should probably put the firewall back on and change the settings to allow connectivity through only the ports you're using.
Hope that helps! Good luck!
Mike
http://michaelclemow.com
http://semiotech.org
On Tue, Jun 26, 2012 at 9:27 PM, Hayden Dahmm
oh, wait, .m files. Is the data being generated by Matlab? I haven't tried
it, but there's an OSC implementation for Matlab here: http://opensoundcontrol.org/implementation/matlab-osc
Depending on how the data is generated, the simplest thing to do may be to just send OSC directly from Matlab to ChucK.
-jordan
On Saturday, June 23, 2012 at 6:45 PM, Jordan Orelli wrote:
the documentation isn't the greatest when it comes to parsing data from files, but it is possible in ChucK.
There are some examples on performing file i/o that you can read here: http://chuck.cs.princeton.edu/doc/examples/io/
There are some examples on performing string manipulations that you can read here: http://chuck.cs.princeton.edu/doc/examples/string/
The string examples aren't listed on the main examples page, but they can be found in the examples directory that comes with the language. It's definitely worth your time to look through those examples and listen to
them.
Do you have some sample files that you could post somewhere to share with us? It would be helpful to have a dozen or so data points just so we know what the format is.
How big are your data sets? I'm curious to know if they are small enough to fit in memory or if a streaming approach is required.
If I was in your position, I would probably use some other programming
language to handle the data itself, format it into OSC messages, and send it to ChucK through OSC, especially if the data sets are large and you can't fit them in memory. Of course, most other programming languages don't give
you the time guarantees that ChucK gives you, so I would probably have ChucK send an OSC message to request a data point, with some other process sending an OSC message back in response. In that way, you could iterate over a
large dataset without ever holding it in memory.
As an aside, do you have any recommendations on quadraphonic headphones?
Oh and, if you're just starting out with ChucK, make sure you have test
headphones to test new code, and don't wear them when learning new features. I blew out the cones in a pair of headphones by accidentally setting the pole position of a OnePole ugen to 0, so… be careful ;)
-jordan
On Saturday, June 23, 2012 at 3:26 PM, Hayden Dahmm wrote:
Hi everyone,
My name is Hayden, and I’m a blind student at Swarthmore College, where I
intend to major in Environmental Engineering. Over the summer, I’m working on learning ChucK so I can create auditory data displays. I’ve made decent progress so far, but I do have a couple questions.
I’m struggling to import data from cmv or .m files, forcing me to enter values in by hand. Does anyone have suggestions as to how I could circumvent this problem?
Also, I plan to use a pair of quadraphonic headphones to interrogate spatial data with a joystick or track pad. Has anybody tried using ChucK for this purpose before? If so, I would be very interested to hear your thoughts.
Thanks so much,
Hayden
hwdahmm@live.com
_______________________________________________
chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu
--Forwarded Message Attachment--
From: michaelclemow@gmail.com
To: chuck-users@lists.cs.princeton.edu
Date: Sat, 23 Jun 2012 21:54:30 -0400
Subject: Re: [chuck-users] Importing Data/Using Quadraphonic Headphones with ChucK
Format the data using something else so that it can read into chuck
scripts using the tokenizer and the put that into variables.
Jordan's got the right idea, I think. Also, OSC is great for this
kind of thing. Check out pyliblo OSC library for python. python's
great at data manipulation.
Peace,
Mike
Sent from my Computing Familiar.
On Jun 23, 2012, at 8:14 PM, Scott Hewitt
If the data is static another option is use to regex across the files
and import it in as variables not pretty put does work.
---------- visit me
@scotthewitt
http://www.inclusiveimprov.co.uk/
On 23 June 2012 23:54, Jordan Orelli
wrote:
oh, wait, .m files. Is the data being generated by Matlab? I haven't tried it, but there's an OSC implementation for Matlab here: http://opensoundcontrol.org/implementation/matlab-osc
Depending on how the data is generated, the simplest thing to do may be to just send OSC directly from Matlab to ChucK.
-jordan
On Saturday, June 23, 2012 at 6:45 PM, Jordan Orelli wrote:
the documentation isn't the greatest when it comes to parsing data from files, but it is possible in ChucK.
There are some examples on performing file i/o that you can read
here: http://chuck.cs.princeton.edu/doc/examples/io/
There are some examples on performing string manipulations that you can read
here: http://chuck.cs.princeton.edu/doc/examples/string/
The string examples aren't listed on the main examples page, but they can be
found in the examples directory that comes with the language. It's definitely worth your time to look through those examples and listen to them.
Do you have some sample files that you could post somewhere to share with
us? It would be helpful to have a dozen or so data points just so we know what the format is.
How big are your data sets? I'm curious to know if they are small enough to
fit in memory or if a streaming approach is required.
If I was in your position, I would probably use some other programming language to handle the data itself, format it into OSC messages, and send it
to ChucK through OSC, especially if the data sets are large and you can't fit them in memory. Of course, most other programming languages don't give you the time guarantees that ChucK gives you, so I would probably have ChucK
send an OSC message to request a data point, with some other process sending an OSC message back in response. In that way, you could iterate over a large dataset without ever holding it in memory.
As an aside, do you have any recommendations on quadraphonic headphones?
Oh and, if you're just starting out with ChucK, make sure you have test headphones to test new code, and don't wear them when learning new features.
I blew out the cones in a pair of headphones by accidentally setting the pole position of a OnePole ugen to 0, so… be careful ;)
-jordan
On Saturday, June 23, 2012 at 3:26 PM, Hayden Dahmm wrote:
Hi everyone,
My name is Hayden, and I’m a blind student at Swarthmore College, where I intend to major in Environmental Engineering. Over the summer, I’m working
on learning ChucK so I can create auditory data displays. I’ve made decent progress so far, but I do have a couple questions.
I’m struggling to import data from cmv or .m files, forcing me to enter
values in by hand. Does anyone have suggestions as to how I could circumvent this problem?
Also, I plan to use a pair of quadraphonic headphones to interrogate spatial
data with a joystick or track pad. Has anybody tried using ChucK for this purpose before? If so, I would be very interested to hear your thoughts.
Thanks so much,
Hayden
hwdahmm@live.com
_______________________________________________ chuck-users mailing list
chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu
_______________________________________________
chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users