chuck icon indicating copy to clipboard operation
chuck copied to clipboard

Chubgraph Stereo Support [Feature Request]

Open kureta opened this issue 8 years ago • 8 comments

I am trying to create reusable UGen chains that I can chuck in to my dac. Chubgraph looks like the way to go but it does not support stereo. It is almost completely useless this way.

kureta avatar Jul 12 '16 12:07 kureta

Yeah that will be a nice improvement, thanks for the feedback. We'll try to work on that for an upcoming release.

It is almost completely useless this way.

Im going to have to disagree with you here. Additionally, please do not use unnecessarily confrontational or hostile language in this forum- ChucK is a friendly and welcoming community and we're set on keeping it that way.

spencersalazar avatar Jul 12 '16 20:07 spencersalazar

I'm truly sorry. It wasn't my intention. Thanks for the response.

kureta avatar Jul 12 '16 22:07 kureta

Howdy - I took a crack at adding this feature and have it for perusal on my fork here:

https://github.com/cannerycoders/chuck/tree/chugraph2

I have an example of its use here:

https://github.com/cannerycoders/chuckdoc/blob/main/src/examples/extend/chugraph2a.ck

(i converted the docs to .md and have been trying to dust them off, fwiw).

I'm happy to contribute any of this work should it be of interest.

dbadb avatar Mar 22 '21 15:03 dbadb

@gewang : any chance this could make it for the imminent release? Happy to make a pull request as you see fit.

dbadb avatar May 18 '21 15:05 dbadb

You can use an array to pass multiple channels! Check the example here:

https://github.com/ccrma/chuck/blob/main/examples/stereo/array.ck

benrogmans avatar May 23 '21 19:05 benrogmans

This request is more about whether one can embody multichannel effects chains within the context of a reusable chugraph subclass.

Definitely nice that one can use arrays for multiple ugens.

dbadb avatar May 23 '21 19:05 dbadb

Right. I would really like that functionality built in as well and I'm looking forward for any feedback on your work on this!

In the mean time, here is how I use arrays as a workaround:

// If you want to apply the same processing on both channels
class Mono extends Chubgraph {
    inlet => JCRev reverb => outlet;
}

public class StereoGraph {
    Mono left;
    Mono right;

    Gain inputs[2];
    Gain outputs[2];

    inputs[0] => left => outputs[0];
    inputs[1] => right => outputs[1];
}

StereoGraph reverb;

// This is the sneaky part
adc => reverb.inputs; reverb.outputs => dac;

20::second => now;

But I would definitely prefer a (your) cleaner solution :-)

benrogmans avatar May 24 '21 11:05 benrogmans

Seems like a good workaround for a class of uses. Seems like Pan2 support might be needed.

dbadb avatar May 24 '21 14:05 dbadb