[CM] Re: CM: subclassing "f" for lots of parameters

Larry Troxler lt@westnet.com
Wed, 28 Aug 2002 21:43:35 -0400


Larry Troxler wrote:
> 
> Hello.
> 
> I'm glad to see that CM now has an "f" class to output f-statements.
> 
> However, it seems to me that making a usefull subclass of this is not
> quite straightforward, because typically, there are a large and unknown
> number of parameters to an f-statement.
> 
> I suppose that I can make one additional parameter in the subclass that
> will simply be a list of all the additional csound parameters.
> 
> But then, I would need to modify or redefine one or more functions, like
> "csound-print-parameters".
> 
> Since it seems that any usefull subclass of "f" would require some such
> solution, has anyone already done this work?
> 
> Regards
> 
> Larry Troxler

Now I've just discovered Craig's ftables-demo.cm, which apparently
skirts around the problem by using a string for the variable number of
additional parameters. But this seems a bit convoluted - why not fix
csound-print-parameters to handle a list of numbers? This is what I did
in my own project and so far it seems to work fine - isn't this a more
straightforward solution?

The downside is that I had to redefine "csound-print-parameters" in the
CM distribution to make this work - I couldn't figure out a way to
subclass this method without duplicating most of the code.

Larry