Closed slurmulon closed 6 years ago
For instance, 6/8 will be reduced to 3/4 (undesired).
6/8
3/4
This stems from Clojure's core logic around ratios. It will always to reduce them to their simplest form.
If you do (numerator 6/8) the result will be 3 because it reduces 6/8 to 3/4 before returning the function.
(numerator 6/8)
3
To fix this, the use of ratios should be removed entirely (if possible) and replaced with a fixed-sized vector (i.e. 6/8 should instead become [6 8]).
[6 8]
Resolved by introducing the :meter grammar construct.
:meter
Avoided the need to remove the use of ratios.
https://github.com/slurmulon/warble/commit/bd9f42f7de2c586b30171ed20fb07a0af8e9bc6e
For instance,
6/8
will be reduced to3/4
(undesired).This stems from Clojure's core logic around ratios. It will always to reduce them to their simplest form.
If you do
(numerator 6/8)
the result will be3
because it reduces6/8
to3/4
before returning the function.To fix this, the use of ratios should be removed entirely (if possible) and replaced with a fixed-sized vector (i.e.
6/8
should instead become[6 8]
).