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

SplayAz fails when input is not an array #1044

Closed
telephon opened this issue Mar 1, 2014 · 3 comments
Closed

SplayAz fails when input is not an array #1044

telephon opened this issue Mar 1, 2014 · 3 comments
Labels
bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs.

Comments

@telephon
Copy link
Member

telephon commented Mar 1, 2014

x = { Dust.ar(10) };
{ SplayAz.ar(2, x) }.play;

This returns a nan in the SplayAz, which throws a very cryptic error. It would be better to just convert the input to an array:


*ar { arg numChans = 4, inArray, spread = 1, level = 1, width = 2, center = 0.0,
            orientation = 0.5, levelComp = true;

        var n = max(1, inArray.asArray.size); // <--------------------

        var pos = [ center - spread, center + spread ].resamp1(n);

        if (levelComp) {
            level = level * n.reciprocal.sqrt
        };

        ^(PanAz.ar(numChans, inArray, pos, level, width, orientation).flop.collect(Mix(_)))
    }
@danstowell
Copy link
Member

Sounds good to me. I'd suggest do it in Splay and SplayZ too of course...

@telephon
Copy link
Member Author

telephon commented Mar 3, 2014

Good - for some reason, this current issue didn't show up on the list for me, so I created another one: #1045

@telephon
Copy link
Member Author

See #1045

@crucialfelix crucialfelix added the bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. label Jan 18, 2016
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.
Projects
None yet
Development

No branches or pull requests

3 participants