jwdj / EasyABC

EasyABC
GNU General Public License v2.0
90 stars 36 forks source link

Add Note Durations documentation confusing, not working #39

Open marcstober opened 3 years ago

marcstober commented 3 years ago

This is an issue with the feature than can be enabled by going to Settings > ABC Typing Assistance > Add note durations.

The documentation at https://www.nilsliberg.se/ksp/easyabc/ says:

Add note durations - when you hit the [Space] key and no explicit durations has been specified for the preciding group of notes EasyABC will try to add durations in order to make the notes add up to the length of a quater note. Let's assume that we have a tune with L:1/8. Then EasyABC will perform these subsitutions:

A + [Space] → A4 AB + [Space] → A2B2 ABC + [Space] → A2BC ABCD + [Space] → ABCD

Since this behaviour is not always desirable, it is deactivated by default.

First of all, I am not sure if this documentation is correct. If the tune has L:1/8 then I'd expect to get A2, not A4. (Side note: this seems to be documentation for an older version at the previous maintainer's site.)

Second, the feature does not seem to be working. From a little debugging, this seems to be at least in part because internally, the meter is stored using the Fraction class from Python, and, at least in Python 3.6, meters like 4/4 are reduced to 1/1. Musical meters aren't really fractions even though they kind of look similar, so it might make sense to make an internal change so that the meter isn't stored as a fraction.

I may be able to work on a patch for this but I want to confirm that my understanding of how this is supposed to work is correct first.