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

class library: improving Pstep input handling and documentation #2511

Merged
merged 4 commits into from Nov 28, 2016
Merged

class library: improving Pstep input handling and documentation #2511

merged 4 commits into from Nov 28, 2016

Conversation

mossheim
Copy link
Contributor

This is a fix for issue #2489. I pulled most of the description from PstepDur. While testing out the class I also noticed that it handles levels being a list but not durs, and I couldn't see a reason why not, so I added a single line to Pstep.init to take care of that.

@jamshark70
Copy link
Contributor

PstepDur is an extension from my ddwPatterns quark. Documentation of core classes should not refer to extensions as if every user will have them automatically.

Otherwise, at a quick glance, it looks ok.

@mossheim
Copy link
Contributor Author

Ah, didn't realize that. I thought it was odd that a subclass would be better documented than its super. Went back and removed those references.

@nhthn nhthn added the comp: help schelp documentation label Nov 25, 2016
@nhthn nhthn added this to the 3.9 milestone Nov 25, 2016
Copy link
Member

@telephon telephon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

otherwise fine, thank you!

@@ -4,7 +4,10 @@ Pstep : Pattern {
*new { arg levels, durs = 1, repeats = 1;
^super.newCopyArgs(levels, durs, repeats).init
}
init { if (list.isKindOf(Collection)) { list = Pseq(list); } }
init {
if (list.isKindOf(Collection)) { list = Pseq(list); };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of list.isKindOf(Collection) it should be list.isSequenceableCollection. A Set, e.g. won't work as an argument to Pseq.

@mossheim
Copy link
Contributor Author

changes made, thanks for catching that—I was naively duplicating what was already there. Out of curiosity I searched the repo to see if this was a recurring pattern; luckily it seems to be unique.

@telephon
Copy link
Member

it could be that, in the future, we might want to implement multichannel expansion for patterns, then this whole conversion might be in the way.

But it is there already, so let's go with it.

Thank you for making it more uniform, this is exactly the kind of changes we need!

@telephon telephon changed the title Documentation for Pstep class library: improving Pstep input handling and documentation Nov 28, 2016
@telephon telephon merged commit 3b9e912 into supercollider:master Nov 28, 2016
@mossheim
Copy link
Contributor Author

Glad to help!

@mossheim mossheim deleted the topic/schelp-pstep branch November 28, 2016 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: help schelp documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants