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

complex durations support #1

Open
Levitanus opened this issue Nov 8, 2021 · 1 comment
Open

complex durations support #1

Levitanus opened this issue Nov 8, 2021 · 1 comment

Comments

@Levitanus
Copy link

from quickly.dom import lily

print(lily.Duration(5 / 8).write())  # 2

When I have first seen the example with Duration(3/ 8).write() == "4." I was really excited as It was my first task in own project. But the example with 5/ 8 shows that some durations can be lost. I'm not sure that the best solution would be to make something like Duration(5/ 8).write() == "2~8" as it depends on the bar position. So here is an issue for discussion on the topic.

@wbsoft
Copy link
Contributor

wbsoft commented Dec 21, 2021

Indeed Duration can only express lengths in note-lengths and added dots, so a duration of 5/8 can't be expressed in one note. When constructing music you should break such durations in pieces, depending on the beats or bar positions.

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

No branches or pull requests

2 participants