Serial or USB access?
Hi. First post to this list. Following up on mention of ChucK a few days ago on music-dsp. Using ChuckK, how would one access a headtracker or mouse from either a serial port (via Keyspan serial-USB adapter) or USB using OS X? Jerry
Hi Lance, Welcome to the list! At the moment, ChucK does not have enough implementation to adequately do what you ask - we are missing mouse input, as "explained" in this earlier post: https://lists.cs.princeton.edu/pipermail/chuck/2004-September/ 000074.html The new version coming out (which has been reschreduled for this or next month) should contain several ways to correctly handle real-time input. If the headtracker can output MIDI (if you have one of them commercials ones that emulate the mouse, then probably not?), that's one workaround for devices to talk with ChucK. Ajay Kapur once built a head-tracker using accelerometers, as part of his E-Sitar. He has since ported the project to ChucK, perhaps he has some example code. Ajay, are you around? On the subject of ChucK and real-time input devices, it is a long-standing goal to integrate (with earnest design) input with the timing mechanism and concurrency in ChucK. Much of it has been worked out in the new release, and we (Perry, Ananya, Ajay, and I) will be giving a workshop on programming / mapping controllers with ChucK at NIME 2005: http://hct.ece.ubc.ca/nime/2005/chuck.html We still need to write more code for several parts of it (OSC support, for example) - but support for everything there and more should be released long before May. Best, Ge! On Jan 16, 2005, at 10:17 PM, Lance Boyle wrote:
Hi. First post to this list. Following up on mention of ChucK a few days ago on music-dsp.
Using ChuckK, how would one access a headtracker or mouse from either a serial port (via Keyspan serial-USB adapter) or USB using OS X?
Jerry
_______________________________________________ chuck mailing list chuck@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck
Thanks, Ge. I'm still trying to evaluate how I might get a (possible) new project completed with the minimum fuss, and of course ChucK came to mind. I had thought of a MIDI head tracker but so far I haven't been able to discover one, or even to discover that one exists. I would appreciate any tips from anyone about MIDI head trackers. FWIW, the page at http://hct.ece.ubc.ca/nime/2005/chuck.html lists the date as May 25th, 2004. Also FWIW, my name is Jerry B a u c k, not Lance. Lance Boyle is a joke name that I used to get the free e-mail account from cwazy.co.uk that I use for mail lists and to keep my "Google space" from being polluted with trivial occurrences of my name 8^). I have a little web site at www.transaural.com that is audio (and business) related. Jerry On Jan 16, 2005, at 11:16 PM, Ge Wang wrote:
Hi Lance,
Welcome to the list!
At the moment, ChucK does not have enough implementation to adequately do what you ask - we are missing mouse input, as "explained" in this earlier post:
https://lists.cs.princeton.edu/pipermail/chuck/2004-September/ 000074.html
The new version coming out (which has been reschreduled for this or next month) should contain several ways to correctly handle real-time input.
If the headtracker can output MIDI (if you have one of them commercials ones that emulate the mouse, then probably not?), that's one workaround for devices to talk with ChucK. Ajay Kapur once built a head-tracker using accelerometers, as part of his E-Sitar. He has since ported the project to ChucK, perhaps he has some example code. Ajay, are you around?
On the subject of ChucK and real-time input devices, it is a long-standing goal to integrate (with earnest design) input with the timing mechanism and concurrency in ChucK. Much of it has been worked out in the new release, and we (Perry, Ananya, Ajay, and I) will be giving a workshop on programming / mapping controllers with ChucK at NIME 2005:
http://hct.ece.ubc.ca/nime/2005/chuck.html
We still need to write more code for several parts of it (OSC support, for example) - but support for everything there and more should be released long before May.
Best, Ge!
On Jan 16, 2005, at 10:17 PM, Lance Boyle wrote:
Hi. First post to this list. Following up on mention of ChucK a few days ago on music-dsp.
Using ChuckK, how would one access a headtracker or mouse from either a serial port (via Keyspan serial-USB adapter) or USB using OS X?
Jerry
_______________________________________________ chuck mailing list chuck@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck
_______________________________________________ chuck mailing list chuck@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck
I almost forgot--I'm going to need FIR filters. I see a general rational filter that will work, but I wonder about efficiency. I hope to run 15 256-tap FIRs on a 500 MHz G4 Mac. Of course there are FFT libraries around (FFTW, Apple's DSP library, etc.) but I wonder how hard it is to incorporate into ChucK. I apologize if this is covered in the docs, but I didn't see anything about adding external routines. Jerry
From: "Lance Boyle"
I almost forgot--I'm going to need FIR filters. I see a general rational filter that will work, but I wonder about efficiency. I hope to run 15 256-tap FIRs on a 500 MHz G4 Mac. Of course there are FFT libraries around (FFTW, Apple's DSP library, etc.) but I wonder how hard it is to incorporate into ChucK. I apologize if this is covered in the docs, but I didn't see anything about adding external routines.
This made me thinking. Brutefir seems like a good thing to build on: http://www.ludd.luth.se/~torger/brutefir.html Uses FFTW. However, hacking LADSPA support into Chuck should be a good thing, since there is already bunches of packages available there. Having ALSA/JACK support it shouldn't be such a challenge. Cheers, Magnus
On Jan 17, 2005, at 6:20 PM, Lance Boyle wrote:
Of course there are FFT libraries around (FFTW, Apple's DSP library, etc.) but I wonder how hard it is to incorporate into ChucK.
FFT and other transforms (DWT, DCT) will make their way into ChucK (eventually), and we also would like to import/access (parts of) audio analysis frameworks such as MARSYAS...
I apologize if this is covered in the docs, but I didn't see anything about adding external routines.
It is already possible to add unit generators and routines from C/C++ into ChucK (the STK ugens and the std/math/machine libraries are imported in this way) - but of course this hasn't yet been documented. It is mostly standard: header file and compiling into a .ckx bundle/library, which can be loaded dynamically at runtime. Libraries like FFTW and BruteFIR are good candidates to be imported soon. But first, we should document the thing. You should not have to apologize for anything involving the ChucK documentations at this time, since they don't much exist. (Adam Tindale and others are working hard to change this by version 1.2.0.0) Best, Ge!
OK--thanks, guys. I'll probably be quiet for a while but I'm still here. Jerry On Jan 19, 2005, at 9:11 AM, Ge Wang wrote:
On Jan 17, 2005, at 6:20 PM, Lance Boyle wrote:
Of course there are FFT libraries around (FFTW, Apple's DSP library, etc.) but I wonder how hard it is to incorporate into ChucK.
FFT and other transforms (DWT, DCT) will make their way into ChucK (eventually), and we also would like to import/access (parts of) audio analysis frameworks such as MARSYAS...
I apologize if this is covered in the docs, but I didn't see anything about adding external routines.
It is already possible to add unit generators and routines from C/C++ into ChucK (the STK ugens and the std/math/machine libraries are imported in this way) - but of course this hasn't yet been documented. It is mostly standard: header file and compiling into a .ckx bundle/library, which can be loaded dynamically at runtime. Libraries like FFTW and BruteFIR are good candidates to be imported soon. But first, we should document the thing.
You should not have to apologize for anything involving the ChucK documentations at this time, since they don't much exist. (Adam Tindale and others are working hard to change this by version 1.2.0.0)
Best, Ge!
_______________________________________________ chuck mailing list chuck@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck
Ge and I put up some example code for using headgear (as requested earlier) and the esitar on the ChucK site: http://wiki.cs.princeton.edu/index.php/ChucK_Programs Hope this helps. enjoy. Ajay and Ge.
On Jan 19, 2005, at 9:23 AM, Ajay Kapur wrote:
some example code for using headgear (as requested earlier) and the esitar on the ChucK site:
Thanks, Ajay! I also put up the 3rd file that you sent - E-Sitar + 8 robotic turntables (interesting). The framework posted should be generic enough to handle pretty much any MIDI device - the headgear skeleton code simply catches messages from the 2 axis accelerometer - the data ranges in the innermost if statements are hard-coded to match the output of the microcontroller that's reading the accelerometers. Other parts of the program specific to the E-Sitar mapping have been replaced by: // ************************************************************************ ********** // replace the following with useful code... // - change ugen parameter(s), // - connect / disconnect ugens // - spork a shred, // - or machine.add() a new program on the on-the-fly // - something else // ************************************************************************ ********** chout => "type: " => type => " data1: " => data1 => " data2: " => data2 => endl; It might not be much help to Jerry's headtracker, at least until we put mouse / serial support into ChucK (they are on the list). But for now, it illustrates one way to handle real-time input by polling. The code could be further simplified once there are arrays, events, and switch statements...
the page at http://hct.ece.ubc.ca/nime/2005/chuck.html lists the date as May 25th, 2004.
This has been corrected to May 25th, 2005. Thanks, Jerry, for catching this. Best, Ge!
participants (4)
-
Ajay Kapur
-
Ge Wang
-
Lance Boyle
-
Magnus Danielson