[chuck-users] global UGen effects processing

Graham Coleman gc at gehennom.net
Sun Sep 24 13:05:32 EDT 2006

Chuck architects,

In some cases, you may wish to filter sounds originating in several
shreds. For example, dynamics processing, or just to provide a dramatic

I attempted to do this using a global HPF defined as a static variable,
but it doesn't quite work the way it seems it should. I also figured out
how to make it work as expected.

The class in superfilt.ck:

public class SuperFilt {
  static HPF @ highPass;

new HPF @=> SuperFilt.highPass; //instantiate
SuperFilt.highPass => dac; //connect to dac

The test class, superfilt-test.ck:

StifKarp inst => SuperFilt.highPass; //connect to filter
SuperFilt.highPass.gain( 0.4 );
SuperFilt.highPass.freq( 1000 );

while ( true ) {
    std.mtof(std.rand2(10,70))=>inst.freq; //random note
    inst.noteOn( 0.5 );
    200::ms => now;

As I was writing this post, I figured out how to fix it.
Connect the filter to the dac in the instrument shred:

StifKarp inst => SuperFilt.highPass => dac; //connect to filter & dac

And things seem to work fine. But wierd. Maybe the ticking or copying is



More information about the chuck-users mailing list