[chuck-users] MIDI channel / Interfaces / Machine.Remove / Functors (!)

mieslings at i12.com mieslings at i12.com
Sun Jun 17 05:29:26 EDT 2007


Hello - this is my first post here but I've been experimenting with ChucK 
for quite a while, and have a few questions I can't manage to find the 
answers to by myself...
I'm more familiar with the likes of OpenMusic or MaxMSP but enjoy the power 
of the ChucK language as well as the fact that all it requires is 
chuck.exe!!! (and the manual ;) 

1. Is there a way to retrieve from MidiIn/MidiOut objects the channel 
originally passed to open or do I need to encapsulate open in a method of my 
own in a derived class? (I would override open but with super not 
implemented yet, I don't know how to call the implementation of open in the 
superclass) 

2. If I'm not mistaken, ChucK only accepts single inheritance; are you (the 
language designers behind ChucK :) planning to implement some sort of 
mechanism similar to Java/.NET interfaces?
I've implemented a dispatching mechanism for MidiIn (so that I don't have 
take care again and again of the synchronisation issues etc. and have a 
simple, reusable mechanism to map say a note on message with some onNoteOn 
callback each time I use MidiIn). I now would like to generalise it and I 
don't know how without multiple inheritance/interfaces... 

3. Machine.remove(shred.id()) terminates a shred (great feature!) but could 
someone clarifies what happens behind the scene? In particular, is there a 
callback method automatically called when a shred exits that users could 
hijack to perform some cleanup? 

4. Finally, does ChucK support functors (perhaps even through some clever 
mechanism to the same effect)? 

   Mies 


More information about the chuck-users mailing list