chuck icon indicating copy to clipboard operation
chuck copied to clipboard

Chubgraphs and ChuGens don't support stereo operation

Open heuermh opened this issue 7 years ago • 2 comments

From an email thread:

Chubgraphs (and ChuGens) don't support stereo operation at this time. Its something we've thought a lot about, but wanted to focus on getting mono operation right before venturing into stereo/multichannel. Thanks for bringing this issue up though.

For what its worth Chugins do support arbitrary numbers of I/O channels, but of course requires implementation in C++.

Added as an issue here for tracking purposes.

Migrated from https://github.com/spencersalazar/chuck/issues/37

heuermh avatar Jan 16 '18 17:01 heuermh

Here's a way around it, I think...

// class MyGraph extends Chubgraph { // we're avoiding Chubgraph!
class MyGraph {
    // make your true subgraph here:
    SinOsc s => NRev rev => Pan2 pan => Gain myOutlet;

    // We can't extend Chubgraph, so we need an init hack.
    fun void init(Gain outlet) {
        myOutlet => outlet;
    }
}

// MyGraph => dac; // Not allowed because MyGraph doesn't actually extend Chubgraph!
MyGraph graph;
Gain gain;
graph.init(gain);
// insert anything you want between gain and dac.
gain => dac;

or maybe this...

// class MyGraph extends Chubgraph { // we're avoiding Chubgraph!
class MyGraph {
    Gain outlet;
    // make your true subgraph here:
    SinOsc s => NRev rev => Pan2 pan => outlet;
}

// MyGraph => dac; // Not allowed because MyGraph doesn't actually extend Chubgraph!
MyGraph graph;
graph.outlet => dac;

DBraun avatar Sep 27 '20 02:09 DBraun

see also: https://github.com/ccrma/chuck/issues/71

dbadb avatar Mar 22 '21 16:03 dbadb