[chuck-users] problems with chubgraphs

Robin Haberkorn robin.haberkorn at googlemail.com
Thu Aug 30 09:00:08 EDT 2012

On 30/08/12 14:27, Robin Haberkorn wrote:
> ...
> The point is that you will need that code in virtually every Chubgraph
> implementation so it should be the default. As a workaround I will
> define some ChubgraphStd class I will use as a base class for new
> Chubgraphs.
> ...

Which leads me to another bug:

class ChubgraphStd extends Chubgraph {
	fun float
	gain(float g)
		return g => outlet.gain;
	fun float
		return outlet.gain();
	fun float
		return outlet.last();

ChubgraphStd c;

1 => (c $ UGen).gain;

setting the gain of a UGen casted to UGen usually works, I use it in
situations like that:

UGen @gens[3];
new SinOsc @=> gens[0];
10 => gens[i].gain;

but above example segfaults. It doesn't for a direct
"Chubgraph"-instance. So I guess it is a bug in ChucK's class system.

I have a bunch of test cases to segfault ChucK. Would be happy to post
them to a bug tracker of some sort...

More information about the chuck-users mailing list