[chuck-users] stack class

Ge Wang gewang at CS.Princeton.EDU
Sun Nov 27 21:52:42 EST 2005


Hi Atte,

> 1) Did I reinvent a wheel? Is there alreasy a stack implemented in 
> chuck (I looked in the docs but didn't find one)?

Currently, there is no stack implemented in chuck's class library, 
though one is planned.
(I think reinventing the wheel is a general rule of thumb in chuck)

> 2) Is there a smarter/smaller/more elegant way of implementing a 
> legato instrument the way I want; latest note on is sounding?

Your solution seems like a good way to go, especially since state needs 
to be pushed.

> 3) Most importently (for my learning chuck): Is there a way of getting 
> rid of the static stack size (int stack_size)? In other words; can I 
> have a dynamically growing array in chuck?

At the moment, arrays in chuck are not dynamically "grow-able", but 
this feature is on the priority list (array.push_back, array.pop_back, 
array.size()).
For now, one may have to write a dynamic array wrapper class to use 
this feature.

Best,
Ge!



More information about the chuck-users mailing list