Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent panning behavior of Grain ugens #2230

Closed
nhthn opened this issue Jul 14, 2016 · 2 comments
Closed

Inconsistent panning behavior of Grain ugens #2230

nhthn opened this issue Jul 14, 2016 · 2 comments
Labels
bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. comp: server plugins fix proposed

Comments

@nhthn
Copy link
Contributor

nhthn commented Jul 14, 2016

Following #2136, I want to recap and figure out the scope of this issue.

The following behavior is the standard we want to strive for:

  • with 1 channel, pan is ignored.
  • with 2 channels, pan behaves like Pan2.
  • with more than 2 channels, pan behaves like PanAz.

However, none of the grain ugens implement this correctly:

  • GrainSin, GrainBuf, GrainIn, GrainFM: for 2 channels, the pan behavior outside of (-1,+1) folds around rather than clipping like Pan2.
  • TGrains (and TGrains2/TGrains3 from sc3-plugins): doesn't support 1 channel. for 2 channels, the pan behavior outside of (-1,+1) wraps around.

I feel this bug really exemplifies the disappointing level of quality control we have in our ugens. I am wondering if we can get some kind of test suite going for the server plugins, and if anyone wants to continue discussion on that, we can start a new issue or a thread on sc-dev (don't discuss it here, please).

@nhthn nhthn added bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. comp: server plugins labels Jul 14, 2016
@joshpar
Copy link
Member

joshpar commented Jul 14, 2016

On Jul 13, 2016, at 10:13 PM, Nathan Ho notifications@github.com wrote:

GrainSin, GrainBuf, GrainIn, GrainFM: for 2 channels, the pan behavior outside of (-1,+1) folds around rather than clipping like Pan2.

These are wrong and should be fixed. The fix will also make the panning more efficient (since it should index the stored sine table, rather than use the sin / cos functions ).

Josh

@nhthn
Copy link
Contributor Author

nhthn commented Jul 14, 2016

There is some duplicated code in these ugens for the pan calculations. I wonder if we can move some math into the plugin headers. The mono/Pan2/PanAz convention is useful to other plugin developers making their own granular ugens, and also makes it easy to fix these problems in TGrains2 and TGrains3 while keeping things DRY.

edit: ehh I'm probably overthinking things. Wasn't too hard to fix them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. comp: server plugins fix proposed
Projects
None yet
Development

No branches or pull requests

2 participants