chuck
chuck copied to clipboard
Chubgraphs and ChuGens don't support stereo operation
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
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;
see also: https://github.com/ccrma/chuck/issues/71