<div dir="ltr">Hey Michael,<div><br></div><div>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. </div>
<div><br></div><div style>For what its worth Chugins do support arbitrary numbers of I/O channels, but of course requires implementation in C++. </div><div><br></div><div style>spencer</div><div style><br></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Wed, Feb 13, 2013 at 3:18 PM, Michael Heuer <span dir="ltr"><<a href="mailto:heuermh@gmail.com" target="_blank">heuermh@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
Following up on my last email about panning at sample rate in a<br>
chubgraph, the following does not seg fault and sounds reasonable<br>
<br>
$ chuck --loop<br>
[chuck](VM): sporking incoming shred: 1 (panExample.ck)...<br>
dump 1.000000 1.000000 0.000000 1.000000 -0.019955 1.000000<br>
...<br>
dump -1.000000 -1.000000 -0.019955 1.000000 0.000000 1.000000<br>
<br>
<br>
panExample.ck:<br>
<br>
TriOsc osc;<br>
220.0 => osc.freq;<br>
1.0 => osc.gain;<br>
<br>
SqrOsc lfo => blackhole;<br>
0.4 => lfo.freq;<br>
1.0 => lfo.gain;<br>
<br>
osc => Pan2 pan => dac;<br>
<br>
spork ~ applyCv();<br>
spork ~ dump();<br>
<br>
20::second => now;<br>
<br>
<<<"done">>>;<br>
<br>
fun void applyCv()<br>
{<br>
    while (true)<br>
    {<br>
        1::samp => now;<br>
        lfo.last() => pan.pan;<br>
    }<br>
}<br>
<br>
fun void dump()<br>
{<br>
    while (true)<br>
    {<br>
        50::ms => now;<br>
        <<<"dump", lfo.last(), pan.pan(), pan.left.last(),<br>
pan.left.gain(), pan.right.last(), pan.right.gain()>>>;<br>
    }<br>
}<br>
<br>
<br>
But when constructed as a chubgraph as follows, the panning is not heard<br>
<br>
$ chuck --loop<br>
...<br>
[chuck](VM): sporking incoming shred: 240 (Pan2Module.ck)...<br>
"LiCK imported." : (string)<br>
[chuck](VM): sporking incoming shred: 1 (pan2ModuleExample.ck)...<br>
dump 1.000000 1.000000 0.000000 1.000000 -0.019955 1.000000<br>
...<br>
dump -1.000000 -1.000000 -0.019955 1.000000 0.000000 1.000000<br>
<br>
<br>
pan2ModuleExample.ck:<br>
<br>
TriOsc osc;<br>
220.0 => osc.freq;<br>
1.0 => osc.gain;<br>
<br>
SqrOsc lfo;<br>
0.4 => lfo.freq;<br>
1.0 => lfo.gain;<br>
<br>
Pan2Module pan;<br>
lfo => pan._cv;<br>
<br>
osc => pan => dac;<br>
<br>
spork ~ dump();<br>
<br>
20::second => now;<br>
<br>
<<<"done">>>;<br>
<br>
fun void dump()<br>
{<br>
    while (true)<br>
    {<br>
        50::ms => now;<br>
        <<<"dump", lfo.last(), pan.pan.pan(), pan.pan.left.last(),<br>
pan.pan.left.gain(), pan.pan.right.last(), pan.pan.right.gain()>>>;<br>
    }<br>
}<br>
<br>
Pan2Module.ck:<br>
<br>
public class Pan2Module extends Chubgraph<br>
{<br>
    Gain _cv;<br>
    inlet => Pan2 pan => outlet;<br>
<br>
    {<br>
        _cv => blackhole;<br>
        spork ~ _tickAtSampleRate();<br>
    }<br>
<br>
    fun void _tickAtSampleRate()<br>
    {<br>
        while (true)<br>
        {<br>
            1::samp => now;<br>
            _cv.last() => pan.pan;<br>
        }<br>
    }<br>
}<br>
<br>
<br>
If I use a different LFO, say<br>
<br>
SinOsc lfo;<br>
0.1 => lfo.freq;<br>
1.0 => lfo.gain;<br>
<br>
I hear some panning, but it is not as distinct as in the non-chubgraph<br>
version.  Is there some issue with channel routing between outlet and<br>
dac in a chubgraph?<br>
<br>
   michael<br>
_______________________________________________<br>
chuck-dev mailing list<br>
<a href="mailto:chuck-dev@lists.cs.princeton.edu">chuck-dev@lists.cs.princeton.edu</a><br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-dev" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-dev</a><br>
<br>
</blockquote></div><br></div>