-
Notifications
You must be signed in to change notification settings - Fork 5
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 Duration runtime constructor errors #93
Comments
This has the added bonus that technically a breve/double-whole-note is now possible with |
I really like this. I used the other way as it is more immediately intuitive (I personally don't think of rhythmic subdivision values by their power of two). Perhaps for now, we could keep both. Wanna open a PR which adds: extension Duration {
init(_ numerator: Beats, power: Power) { ... }
}
Nevermind, misunderstood. This would be an excellent idea! And no new types needed. |
Re: dependent types: very interesting project: https://github.com/silt-lang/silt |
It might actually make things easier down the line if the power was the actual stored value. See |
Interesting. Yes trying to make sense of it at the moment! |
|
At present
let badDur: Duration = 1/>31
causes an error, because 31 is not a power of 2.Proposed eradication of these errors: A constructor of the following form.
where
Power
may be implemented asInt
asSubdivision
is now.The text was updated successfully, but these errors were encountered: