- tick names a position on the time axis
- tick is always a Fraction()
- only Measure() and Segment() (and Tuplet?) have a tick value
- tick() for an generic element return only a sensible value if isMeasure() or isSegment() or isSegment(parent())
- "ticks" names a duration stored in a Fraction()
- the tick value for an Segment is relative to its measure
- rename "duration" to "ticks"
- rename afrac() to tick()
- rename rfrac() to rtick()
- rename some variables, changing "fraction" into "tick"
(example: actualFraction() into actualTicks())
- Lyrics ticks are written as Fraction, on read if xmlreader sees a "/" it reads a fraction
else midi ticks for backwards compatibility
All enumerations defined directly in Ms namespace had to be moved
to types.h due as Q_NAMESPACE cannot be used multiple times in one
namespace, see https://bugreports.qt.io/browse/QTBUG-68611
Turns the previously hard-coded max. distance between multiple dashes
into a user configurable score style.
__References__:
- Issue: https://musescore.org/en/node/88171
- Original request with discussion and screen-shots:
https://musescore.org/en/node/87841
Shamelessly stolen from PR #2294, which needed a non-trivial rebase
This patch gives better control on lyrics dash management and it is intended to supersede https://github.com/musescore/MuseScore/pull/2213 which did not suit the taste of several forum users; for a discussion, see https://musescore.org/en/node/76021 .
Adds 3 new score style parameters:
- `lyricsDashMinLength` to control the minimum dash length (default: 0.4sp)
- `lyricsDashMaxLength` to control the maximum dash length (default: 0.8sp)
- `lyricsDashForce`: if set to __true__, a dash is always generated between two syllables of a word and, if there is not enough space for the min dash length, more space is added between the syllables to accommodate it; if set to __false__, no extra space is added and the two syllables are joined together (default: true)
The effect of the last parameter is exemplified by the following screen-shots:
Current situation (before this patch); if there is no room for the min dash length, the dash is skipped and some blank is left between syllables:
Patch with `lyricsDashForce = true`; chords are further spaced and a min-length dash is inserted:
Patch with `lyricsDashForce = false`: the second syllable is moved (slightly) to the left to reclaim the blank:
Properties are also sorted in alphabetical order for easier identification.
No attempt made to evaluate what to include and what to exclude from documentation: anything which is currently documented is retained. Case by case decisions can always be made.
Also completed update for `Accidental`.
**Deleting measures** When measures are deleted, spans of lyrics melismas and dashes involved (`LyricsLine`s) were not correctly adjusted.
Also fixes the general case of removing or adding some time span intersecting `LyricsLine` spans.
**Rewriting measures** while rewriting measures (as for time changes), existing `LyricsLine`s were left over and then re-added. Now they are deleted while removing measures (`InsertRemoveMeasures::removeMeasures()`).
While entering a melisma, the first underscore has no specific visual effect.
This patch displays a short melisma after the first underscore, by setting a conventional non-0 lyrics `_ticks` value.
Note: If no second underscore is entered (edit mode is exited or a new syllable is entered in the following chord), the short melisma is left behind as a left-over. It may be the case to reset to 0 the melisma ticks (= no melisma at all) for instance when the score is saved, or read back.
Implements melisma and dash lines for lyrics spanning several systems.
The melisma and dash line is based on the `SLine` class and its segments on the `LineSegment` class. Both the whole line and its segments are not selectable, marked as generated and not saved in the score file, which is not changed in any way.
For very wide dash segments, several dashes are drawn; the distance between the dashes is not configurable.
Lyrics layout code in `Measure` class and in `layout.cpp` file has been commented out as the lyrics line layout is all contained in the lyrics.cpp file
The line is registered with the `Score` (to have its layout delayed until all elements are positioned) with a mechanism similar to other `Spanner`'s, but in a different container (`_unmanagedSpanner`), as the owning `Lyrics` should decide when create, register, unregister and delete its line.
The line segments are registered with the `System` they belong to (to have them drawn), in the same way as other `Spanner`'s.
There is code for using the dash metrics of the lyrics font, but it is turned off via a conditional directive, as there does not seem to be a reliable way to determine the dash metrics; conventional values (determined by trials and errors and based on my taste!) are used when the conditional directive is off.