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

Remove 960 ticks upper limit for tpq. #122

Merged
merged 3 commits into from
Dec 16, 2019
Merged

Conversation

CNelias
Copy link
Member

@CNelias CNelias commented Dec 14, 2019

Remove 960 ticks upper limit for tpq, add tpq keyword argument for Notes() constructor function.

Remove 960 ticks upper limit for tpq, add tpq keyword argument for `Notes()` constructor function.
src/note.jl Outdated
end
Notes{N}(notes, tpq)
end

Notes() = Notes{Note}(Vector{Note}[], 960)
Notes() = Notes{Note}(Vector{Note}[], tpq = 960)
Copy link
Member

@Datseris Datseris Dec 14, 2019

Choose a reason for hiding this comment

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

This is not a keyword constructor. In fact, this change does not achieve anything, it is syntactically equivalent with the above. What you want to do instead is define:

Notes(;tpq = 960) = Notes{Note}(Vector{Note}[], tpq)

The keyword arguments are defined on the function definition (left hand side), not on the function call (right hand side).

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh yes you are right. It's corrected.

src/note.jl Outdated Show resolved Hide resolved
@Datseris
Copy link
Member

Alright, LGTM. Thanks!

@Datseris Datseris merged commit cf99e27 into JuliaMusic:master Dec 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants