[chuck-users] Importing Data/Using Quadraphonic Headphones with ChucK

mike clemow michaelclemow at gmail.com
Sat Jun 23 21:54:30 EDT 2012


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 <witt0191 at gmail.com> wrote:

> 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
>
> http://www.scotthewitt.co.uk
> @scotthewitt
>
> http://www.theaudiopodcast.co.uk
> http://www.ablelemon.co.uk
> http://www.inclusiveimprov.co.uk/
>
>
> On 23 June 2012 23:54, Jordan Orelli <jordanorelli at gmail.com> 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 at live.com
>>
>> _______________________________________________
>> chuck-users mailing list
>> chuck-users at lists.cs.princeton.edu
>> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>>
>>
>>
>>
>> _______________________________________________
>> chuck-users mailing list
>> chuck-users at lists.cs.princeton.edu
>> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>>
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users


More information about the chuck-users mailing list