[chuck-users] Greetings and an Object oriented question

Jim Hinds jahbini at romantictrances.com
Fri Oct 21 20:18:57 EDT 2005


Hail, MusicTech Ones of the Chuck persuasion.

I appreciate the elegance and difficulty of the design and  
implementation of Chuck (being a sysProg type).  Chuck is damn easy  
to get going and make great speed into shooting the foot manytimes.   
It's kind of like building airplanes out of balsa wood when I was a  
kid: nicks, cut fingers, noxious fumes,  Glue stains on mom's kitchen  
table.  But when your done, it FLIES!

So, we know we like chuck.  A good buddy.  great set of OK default  
parameters to get you going asap.  Low CPU load.  Good language  
structure.  Real-time modification to any parameter.  all the good  
stuff.  Even Objects and classes.

So that's where my question comes from: (Yes it's probably in the  
documentation somewhere,  maybe in the past or future, but I haven't  
found it)

For example, suppose I want a class of say, two filters:  Echo A and  
Echo B.  I want to have these echo filters internal to the objects,  
and be able to chuck into and out of the objects. Is this possible  
and how does the class look?

Class echoChamber {

Echo a => Echo b;

public fun void scrambleSomeInterestingStuff ( <some useful  
parameters> ) {

//inside here we do some magic and then set parameters on a or b
}

public fun void initializeMe ( ) {
//because we don't do constructors this week
}

//maybe something goes here
}

//Now we might want a structure like:
Mandolin m => echoChamber smallroom => dac;

So, my question is:  This seems like a reasonable thing for a chuck  
Object to do,  Can It?  And how?

Thanks,
JIm




More information about the chuck-users mailing list