TGrains2 amp/pan arguments working incorrectly?

Firstly, hi, I’m Barrie and I haven’t used SC3 in about 10 years - back when I was at uni… and when I say “used” I mean I mostly cannibalised the code examples given in the help files.

Anyway, I decided to download SC 3.11 and have a fiddle with TGrains2 but the amp argument doesn’t seem to do anything. Additionally, if I set the pan to hard left or right, -1 or 1, the resulting audio is very loud and obviously clipping. (My original aim was to use two TGrains2 ugens - each loaded with the mono left or right channels from a stereo audio file and panned hard left and right respectively - to recreate the stereo image, kinda.

After some googling I found these two (closed… I think?) issues from back in 2017 on the SC3 github which reference the issue

But obviously, unless I’m missing something it still doesn’t appear to be working as intended… AM I missing something?

Hi and welcome back,

Two thoughts: there was one point with TGrains2 only taking kr args IIRC, secondly the amp arg in these UGens only affects whole grains, so with long grains you might get the impression that it doesn’t work. You can multiply the whole signal with amp instead.

Yup! TGrains2/3 is broken for ar args, and for LocalBuf. I’m working on some fixes for these issues - anything else you’ve discovered?

Thanks for the reply! I’m not going mad after all… the only other thing I discovered is just how little I remember about SC lol