[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Suggestion: Use non powers of 2 for tuplets, Suggestion: Use non pow
From: |
Valentin Petzel |
Subject: |
Re: Suggestion: Use non powers of 2 for tuplets, Suggestion: Use non powers of 2 for tuplets |
Date: |
Fri, 26 Mar 2021 09:05:53 +0100 |
Hello Werner,
I just suggested these value as this seems to be what is commonly found with
music (and it is rhythmically viable nontheless). Basically we’re rounding a
division to the nearest power of 2 (it does not make a lot of sense to use 7
4th notes or something like 15 8th notes for such subdivisions, since 7 8th
notes or 15 16th notes would be much closer).
A pseudo code for this:
(number) → (duration):
Lower = 2**ilog(number, 2)
Upper = Lower*2
If (number - Lower <= Upper - number) return Lower*number/Lower
Else return Upper*number/Upper
These things are done during parsing, and I don’t know if there is any way to
pass flags or tokens to the parser. If it is possible, one could try to pass a
rounding flag, or one might even be able to modify this such that the user can
pass a scheme function for parsing. But I do not know enough about the parser
to know if such stuff is possible (the problem here is that the file that is
being parsed would have to tell the parser how to parse it, which can be quite
a hen and egg problem).
Cheers,
Valentin
signature.asc
Description: This is a digitally signed message part.
- Suggestion: Use non powers of 2 for tuplets, Valentin Petzel, 2021/03/25
- Re: Suggestion: Use non powers of 2 for tuplets, Shane Brandes, 2021/03/25
- Re: Suggestion: Use non powers of 2 for tuplets,Suggestion: Use non powers of 2 for tuplets, Werner LEMBERG, 2021/03/26
- Re: Suggestion: Use non powers of 2 for tuplets, Suggestion: Use non powers of 2 for tuplets,
Valentin Petzel <=
- Re: Suggestion: Use non powers of 2 for tuplets, ebenezer, 2021/03/26
- Re: Suggestion: Use non powers of 2 for tuplets, David Kastrup, 2021/03/26
- Re: Suggestion: Use non powers of 2 for tuplets, Werner LEMBERG, 2021/03/26
- Re: Suggestion: Use non powers of 2 for tuplets, David Kastrup, 2021/03/26
- Re: Suggestion: Use non powers of 2 for tuplets, Jean Abou Samra, 2021/03/26
- Re: Suggestion: Use non powers of 2 for tuplets, Jean Abou Samra, 2021/03/26
- Re: Suggestion: Use non powers of 2 for tuplets, Jean Abou Samra, 2021/03/26
- Re: Suggestion: Use non powers of 2 for tuplets, Kevin Barry, 2021/03/26
- Re: Suggestion: Use non powers of 2 for tuplets, David Kastrup, 2021/03/26
- Re: Suggestion: Use non powers of 2 for tuplets, Christian Masser, 2021/03/26