sc3-plugins icon indicating copy to clipboard operation
sc3-plugins copied to clipboard

TGrains2 does not respond to triggers from Impulse.ar

Open markHadman opened this issue 5 years ago • 6 comments

Environment

  • SuperCollider version: 3.10.4
  • Operating system: Linux 5.4.13-rt7-MANJARO
  • Other details (Qt version, audio driver, etc.): Qt 5.14.0, ALSA Driver version: k5.4.13-rt7-MANJARO, Library version: 1.2.1.2, Utilities version: 1.2.1, jack 0.125.0-8

Steps to reproduce

b = Buffer.read(s, Platform.resourceDir +/+ "sounds/a11wlk01.wav");
{TGrains2.ar(1,Impulse.ar(5),b)}.play

Expected vs. actual behavior

No sound is output. I would expect this to normally work, since the documentation for TGrains2 states that "If the trigger is audio rate then the grains will start with sample accuracy." Replacing Impulse.ar with Impulse.kr causes it to work. Changing to TGrains.ar causes it to work.

markHadman avatar Jan 30 '20 19:01 markHadman

TGrains2 is a third party UGen (and not core SC) - please file a report on sc3-plugins.

joshpar avatar Jan 30 '20 19:01 joshpar

At the moment, I'm not sure who will take a look at this. I would suggest using GrainBuf and creating a buffer with a triangular envelope.

joshpar avatar Jan 30 '20 20:01 joshpar

I believe I've got a local fix for this - let me see if I can push something in the next few days.

  • Scott

On Thu, Jan 30, 2020, 9:06 PM Joshua Parmenter [email protected] wrote:

At the moment, I'm not sure who will take a look at this. I would suggest using GrainBuf and creating a buffer with a triangular envelope.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/supercollider/sc3-plugins/issues/272?email_source=notifications&email_token=AABDNDOTVOFC77XLR43JV2TRAMXKRA5CNFSM4KN4ALZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKMLWHI#issuecomment-580434717, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABDNDPZWG7ZLXSFZCKPLNDRAMXKRANCNFSM4KN4ALZA .

scztt avatar Jan 30 '20 21:01 scztt

Looks pretty simple:

https://github.com/supercollider/sc3-plugins/blob/master/source/BhobUGens/BhobGrain.cpp#L353

prevtrig = trig; is outside of the audio calculation loop.

jamshark70 avatar Jan 31 '20 01:01 jamshark70

Just a note that TGrains3 is also affected by this bug.

markHadman avatar Feb 04 '20 04:02 markHadman

@scztt Would you mind also checking that the amp value is functional. I am running some code on a Bela board that still uses 3.10-Beta1 and the amp argument does not do anything. I can't test it in the latest version as the UGen is not currently working at all. Thanks! 🙂

dathinaios avatar Feb 22 '20 21:02 dathinaios