chuck icon indicating copy to clipboard operation
chuck copied to clipboard

LiSa/LiSa10 and panning.

Open ericheep opened this issue 8 years ago • 8 comments

The panning functions of the LiSa UGen effectively mutes the UGen. These same functions work with LiSa10.

SinOsc sin => LiSa mic => dac;

1::second => dur DURATION;
mic.duration(DURATION);

mic.record(1);
DURATION => now;
mic.record(0);

// both pan and voicePan results in silence
//mic.pan(1.0);
mic.voicePan(0, 0.0);

mic.play(1);
while (true){
    second => now;
}

Also, it'd be nice if when using LiSa (as opposed to LiSa10), that the expected values range from -1.0 to 1.0 instead of 0.0 to 1.0.

ericheep avatar Sep 20 '16 03:09 ericheep

@ericheep interesting, what is LiSa10?

@spencersalazar should this and the other issues here be copied to https://github.com/ccrma/chuck? If so, I can do that and then you may close these.

heuermh avatar Sep 20 '16 12:09 heuermh

@heuermh LiSa10 is a 10 channel version of LiSa, and accepts [0.0 - (numchans - 1.0)], for its panning values.

ericheep avatar Sep 20 '16 15:09 ericheep

Basic LiSa is mono output so maybe pan should just do nothing. Or perhaps it switched to stereo output. I remember discussing this with @dantrueman a long time ago but don't remember the specific reasoning for the current design of LiSa/LiSa10. In general LiSa10 can be used for any multichannel situation of 10 channels or fewer simply by not panning to the extra channels, or otherwise dealing with ChucK's folding over of extra channels.

@heuermh Yeah that would make sense, although I see many of the issues you filed are regarding high-level design issues- these are great ideas, but I don't do much with that aspect of the language. If you still feel strongly about them it might be worth reaching out to Ge and Perry directly. I certainly agree that ChucK could use some leveling up in terms of its type system and other general programming language features.

spencersalazar avatar Sep 21 '16 00:09 spencersalazar

right, we mostly use LiSa10 for bussing situations, where we want to be able to bus individual grains to different places, for recording or processing; very very useful. Of course that could be used for panning and multichannel speaker situations too, and we’ve done that as well. having the mono LiSa be able to switch to stereo out would be fine and probably useful, i suppose

On Sep 20, 2016, at 8:07 PM, Spencer Salazar <[email protected]mailto:[email protected]> wrote:

Basic LiSa is mono output so maybe pan should just do nothing. Or perhaps it switched to stereo output. I remember discussing this with @dantruemanhttps://github.com/dantrueman a long time ago but don't remember the specific reasoning for the current design of LiSa/LiSa10. In general LiSa10 can be used for any multichannel situation of 10 channels or fewer simply by not panning to the extra channels, or otherwise dealing with ChucK's folding over of extra channels.

@heuermhhttps://github.com/heuermh Yeah that would make sense, although I see many of the issues you filed are regarding high-level design issues- these are great ideas, but I don't do much with that aspect of the language. If you still feel strongly about them it might be worth reaching out to Ge and Perry directly. I certainly agree that ChucK could use some leveling up in terms of its type system and other general programming language features.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/spencersalazar/chuck/issues/42#issuecomment-248473021, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AKpmtgdHsiQ2J_0qxHUh04-dy_ZbcB9Gks5qsHVZgaJpZM4KBLUq.

dantrueman avatar Sep 21 '16 03:09 dantrueman

@dantrueman I would definitely find a stereo LiSa with individual voice panning useful 🙂.

A workaround would be to use LiSa10 as if it were a stereo UGen and just pan from 0.0 to 1.0 for the individual voices, but a basic stereo version would be ideal.

Also, upon more testing, I found that only panning values that are<= 0.0 or >= 1.0 mute the basic LiSa UGen. The values in between lower the amplitude based on how close it they are to 0.0 or 1.0.

SinOsc sin => LiSa mic => dac;

0.1::second => dur DURATION;
mic.duration(DURATION);

mic.record(1);
DURATION => now;
mic.record(0);

mic.play(1);
0.0 => float inc;

while (true){
    (inc + 0.01) % Math.TWO_PI => inc;
    mic.voicePan(0, (Math.sin(inc) + 1.0)/2.0);
    0.01::second => now;
}

ericheep avatar Sep 21 '16 07:09 ericheep

but a basic stereo version would be ideal

I agree

Also, upon more testing, I found that only panning values that are<= 0.0 or >= 1.0 mutes the basic LiSa UGen. The values in between lower the amplitude based on how close it they are to 0.0 or 1.0.

yeah that’s just weird...

dantrueman avatar Sep 21 '16 12:09 dantrueman

Alright, so @dantrueman would you be alright with these changes:

  • LiSa switches to being a "naturally" stereo ugen (but would still effectively be mono if pan was not used)
  • LiSa.pan switched to standard [-1,1] range for L/R panning (only the stereo version; LiSa10 remains the same)
  • no change to LiSa10

Thanks to the design of LiSa's underlying implementation any changes like this are super easy to make, so whatever seems best moving forward should be good.

spencersalazar avatar Sep 21 '16 18:09 spencersalazar

yep, i am good with that!

On Sep 21, 2016, at 2:38 PM, Spencer Salazar <[email protected]mailto:[email protected]> wrote:

Alright, so @dantruemanhttps://github.com/dantrueman would you be alright with these changes:

  • LiSa switches to being a "naturally" stereo ugen (but would still effectively be mono if pan was not used)
  • LiSa.pan switched to standard [-1,1] range for L/R panning (only the stereo version; LiSa10 remains the same)
  • no change to LiSa10

Thanks to the design of LiSa's underlying implementation any changes like this are super easy to make, so whatever seems best moving forward should be good.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/spencersalazar/chuck/issues/42#issuecomment-248703423, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AKpmtqvFjHpW_Ef9WL0_o53-sI1BpgDvks5qsXm5gaJpZM4KBLUq.

dantrueman avatar Sep 21 '16 19:09 dantrueman