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

Incorrect calculation of duration for grace notes #34

Closed
cwitkowitz opened this issue Feb 20, 2023 · 3 comments
Closed

Incorrect calculation of duration for grace notes #34

cwitkowitz opened this issue Feb 20, 2023 · 3 comments

Comments

@cwitkowitz
Copy link

If the aim of GraceEffect.durationTime is to return the time of the grace note in ticks, I believe the contents of the function are incorrect:

return int(Duration.quarterTime / 16 * self.duration)

and should be int(Duration.quarterTime * 4 / self.duration) instead. This is also reflected in parts of the Duration class.

@Perlence
Copy link
Owner

Hey @cwitkowitz, you are right.

However, what do you mean, it's reflected in parts of the Duration class?

Perlence added a commit that referenced this issue Feb 20, 2023
@cwitkowitz
Copy link
Author

Thanks for fixing this. I simply meant that a similar formula is followed to compute time in the Duration class:

minTime = quarterTime * 4 // sixtyFourth * 2 // 3

result = self.quarterTime * 4 // self.value

@Perlence
Copy link
Owner

I see, got it!

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