You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The 'amp' argument given to TGrains2/3 does not seem to have any effect, all grains having maximum amplitude (though changing the window does have an effect).
b = Buffer.read(s, Platform.resourceDir +/+ "sounds/a11wlk01.wav");
{ // This should fade in... but starts at full volume
TGrains2.ar(2, Impulse.ar(15), b, centerPos: Line.ar(0, 5, 10, doneAction: 2), amp: Line.ar(0, 1, 10));
}.play;
What seems to be going wrong: in BhobGrains.cpp, a 'const float amp' is declared in both UGens and takes the value of the parameter, but this value is never actually used. It is later shadowed by the 'amp' variable declared in the GRAIN_AMP_2/3 macros, which is computed from the window and then used by GRAIN2_LOOP_BODY_1/2/4 in defining 'outval', such that 'outval' is never scaled to the 'amp' argument.
I have a local solution that stores the 'amp' argument in the Grain2 struct and uses it in the GRAIN_AMP_2/3 macros, but I am not aware of any code guidelines for this specific structure, also since a similar issue has been fixed in the past for TGrains.
The text was updated successfully, but these errors were encountered:
The best way is on each trigger to call a DEMANDINPUT(<input index>). This will work with normal ugens, but also with demand ugens like Dbrown for instance.
The 'amp' argument given to TGrains2/3 does not seem to have any effect, all grains having maximum amplitude (though changing the window does have an effect).
Taking the same example as a similar issue that was found in TGrains (supercollider/supercollider#2807):
What seems to be going wrong: in BhobGrains.cpp, a 'const float amp' is declared in both UGens and takes the value of the parameter, but this value is never actually used. It is later shadowed by the 'amp' variable declared in the GRAIN_AMP_2/3 macros, which is computed from the window and then used by GRAIN2_LOOP_BODY_1/2/4 in defining 'outval', such that 'outval' is never scaled to the 'amp' argument.
I have a local solution that stores the 'amp' argument in the Grain2 struct and uses it in the GRAIN_AMP_2/3 macros, but I am not aware of any code guidelines for this specific structure, also since a similar issue has been fixed in the past for TGrains.
The text was updated successfully, but these errors were encountered: