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

Topic fix as score offset expansion #3544

Merged

Conversation

telephon
Copy link
Member

No description provided.

Now the score function correctly expands the timing values that the
usual play function expands. This fixes supercollider#3543
@nhthn
Copy link
Contributor

nhthn commented Feb 28, 2018

what issue does this fix? thanks.

@mossheim
Copy link
Contributor

Fixes #3543

var events, score, onsetTimes;
events = [(x: 0, lag: 0.5), (x: 1, dur: 0.5), (x: 2, lag: 0.5)];
score = Pseq(events).asScore(3);
onsetTimes = score.score.drop(1).postcs.select { |x| x[2] == \default }.collect { |x| x.first };
Copy link
Contributor

Choose a reason for hiding this comment

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

can you please remove the postcs from these tests?

Copy link
Contributor

Choose a reason for hiding this comment

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

also, using collect(_.first) at the end might make it more readable. personally i think it would be clearest to break this into two lines with an extra variable

Copy link
Member Author

Choose a reason for hiding this comment

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

ok, done!

@mossheim mossheim merged commit bce4abd into supercollider:3.9 Mar 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: class library SC class library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants