Commit graph

86 commits

Author SHA1 Message Date
Werner Schweer
c5f46bb208 rename Xml() -> XmlWriter() 2016-11-19 11:51:21 +01:00
Werner Schweer
5248e0842b fix #139601 Crash by deleting lyrics containing hyphens 2016-11-02 15:13:27 +01:00
lasconic
b149f9caff add more style to be compatible with SMuFL engravingDefaults 2016-10-10 23:05:51 +02:00
werner
9f572b57f7 fix #123501 LYrics hyphen gets positioned too low 2016-09-08 10:54:44 +02:00
werner
9f57c06f51 fix text layout regressions 2016-09-04 16:17:33 +02:00
werner
47cedec1a7 fix editing of lyrics above staves 2016-08-27 13:09:42 +02:00
werner
653fc53a4e style option for lyrics verse number alignment 2016-08-26 13:42:59 +02:00
werner
49ceda6bfb update lyrics properties 2016-08-26 12:43:43 +02:00
CombatCube
141a1d2d80 Fix #120101 - inconsistent vertical position of dashes 2016-08-25 00:09:34 -07:00
werner
416b98bed1 fix lyrics up/down 2016-08-24 18:09:10 +02:00
werner
7c5e99a358 implement lyrics above stave 2016-08-24 14:49:51 +02:00
Joachim Schmitz
a18cbea5c5 lyrics dash and melisma should have same color as preceding syllable
see https://musescore.org/en/node/121851
2016-08-21 18:35:25 +02:00
Nicolas Froment
4965fd2054 Merge pull request #2785 from Jojo-Schmitz/lyrics-dash-distance
fix #88171: Lyrics dash max distance as a parameter
2016-08-17 14:43:21 +02:00
werner
9faf3f79e7 autoplace for lyrics 2016-08-17 12:52:35 +02:00
Joachim Schmitz
ab9ffd633c fix #88171: Lyrics dash max distance as a parameter
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
2016-08-15 14:32:33 +02:00
lasconic
158dacedf7 fix potential crash in lyric separator layout 2016-07-08 08:21:39 +02:00
werner
22d16c3615 inspector updates; misc. cleanups 2016-06-09 09:33:19 +02:00
ws
3f1aa2ed1f misc. updates to layout 2016-04-13 12:05:46 +02:00
ws
bbd802f8ae framework for partial relayout 2016-04-13 11:35:21 +02:00
ws
9ec1d02471 code cleanups & speed optimizations 2016-04-13 11:18:14 +02:00
Eric Fontaine
7aa8c7e6cd fix #96971 suppress benign make release warnings
This commit removes some -Wempty-body, -Wmaybe-uninitialized, -Wunused-variable, and -Wstrict-overflow compiler warnings that arise on my x86-64 and ARM arch linux machines when compiling release.
These compiler warnings don't seem to cause any bugs, but since they pollute the build output, they make it harder to spot potentially important warnings that might arise, so I'm making these small changes to keep the build output clean.
The "empty-body" warnings occur because the Q_ASSERT statements are removed for release compiles, causing the else blocks to be empty.  Surrounding the Q_ASSERT with brackets will let the compiler know we aren't unintentionally having an empty else body.
The "maybe-uninitialized" warnings are handled by assigning the variables to 0 either at initialization or in a switch default block.
The "unused-variable" warning is due to PeriodItem updatePeriods[] in preferences.cpp being defined but never used, so I've removed PeriodItem.  Also a recent commit has an unused "int staves", which I've removed.
The "strict-overflow" warning is due to compiler wanting to perform an optimization which would cause signed overflow during a comparison operation.  I've made the compiler happy by casting the barIndex'es into unsigned ints, so it doesn't have to worry.
2016-02-12 01:28:16 -05:00
Maurizio M. Gavioli
8c017d8536 Lyrics: Better dash control
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:
2015-10-03 23:55:33 +02:00
Maurizio M. Gavioli
79ea7ff7d9 LYRICS: avoid small blanks when no room for a full dash
__Background__: When between two lyrics with a dash there is no room for at least a minimal length dash, no dash is drawn at all and a small blank is potentially left between the syllables.

__Fix__: In such a case, this fix shifts the second lyrics left to avoid the blank.

__Notes__:
- This alters slightly the alignment of the lyrics with the note head, the worst case being 0.45sp (0.25 of minimum dash length + 0.1 of padding at either end); however, the greatly improved readability minimizes the impact of this (usually minimal) misalignment.
- kerning between the previous syllable last character and the first character of the next syllable is ignored.
- No provision is made for languages in which hyphenated spelling is different from continuous spelling (examples?)
2015-09-30 11:37:58 +02:00
Marc Sabatella
4e7737498e fix #64856: accented characters in lyrics not aligned correctly 2015-06-11 14:33:12 -06:00
lasconic
c184b5cf4f look for lyric line end in the same *staff* than the lyric 2015-03-15 18:34:58 +01:00
lasconic
d0af9f676a look for lyric line end in the same track than the lyric 2015-03-15 16:06:59 +01:00
Maurizio M. Gavioli
5dc6f9858b Potential multiple deletion of Lyrics separator in ~Lyrics. 2015-03-11 10:49:02 +01:00
Maurizio M. Gavioli
59ba1b5f10 Fix #48436 - Lyrics melisma and deleting measures / Fix #48491 - Lyrics melisma and time change
**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()`).
2015-03-10 11:38:27 +01:00
Marc Sabatella
843af8b224 handle underscore when pasting lyrics 2015-02-16 21:39:27 -07:00
Marc Sabatella
f23f42c198 fix #45586: alignment of melisma lyrics under whole notes 2015-01-26 21:05:09 -07:00
Werner Schweer
2fd869a60d Merge pull request #1678 from MarcSabatella/lyrics-trailing-punctuation
ignore trailing punctuation in lyrics alignment
2015-01-26 10:37:36 +01:00
Marc Sabatella
ce572cd52c ignore trailing punctuation in lyrics alignment 2015-01-25 22:58:15 -07:00
Maurizio M. Gavioli
1786f110d9 Fix typos and improve comments 2015-01-23 23:50:49 +01:00
Maurizio M. Gavioli
1153a1deca Make constants for lyrics syllabics accessible to other classes
Move constants for the syllabic metrics of lyrics to `lyrics.h` so they are accessible to other classes.
2015-01-23 20:58:01 +01:00
Maurizio M. Gavioli
74ba9fe551 Short lyrics syllabic dash at end of system
When a syll. dash is too short to fit between two syllables, it is skipped. This looks badly at system end, where room for a short dash is usually available within the note-to-barline distance + barline width.

With this patch, a syll. dash at the end of a system is always drawn with at least the shortest acceptable length (or more, if more room is available), even if under normal conditions it would not fit. In a position where the in-word status of a syllable is not easy to guess, the occasional dash (very) slightly extending beyond the bar line seems more acceptable that no dash at all.

This patch also limits the `LyricsLine`-specific correction in `SLine::linePos()` to melisma only, using common processing for syllabic dash lines.
2015-01-19 21:30:26 +01:00
Werner Schweer
4541a02f20 Merge pull request #1638 from MarcSabatella/melisma-manual
melisma updates
2015-01-19 21:19:00 +01:00
Maurizio M. Gavioli
dd41b196fe Show melisma line after first underscore
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.
2015-01-19 17:50:05 +01:00
Marc Sabatella
c96f9f28eb partial fix for #44421: vertical position of melisma continuation 2015-01-16 10:42:55 -07:00
Marc Sabatella
46864a1407 melisma updates 2015-01-14 18:37:38 -07:00
Maurizio M. Gavioli
26222afb83 44156 addendum - melisma line length correction
The melisma line had an undershooting length correction; with the latest change, it is now too short.

Correction changed to overshoot the chord by `minNoteDistance`, as it is definitely less massive than the chord itself.

Also removed a useless test in `line.cpp`.
2015-01-13 01:07:22 +01:00
Marc Sabatella
fd2695808b fix #44196: hyphenated syllables always left-aligned 2015-01-12 13:51:37 -07:00
Marc Sabatella
27695a68b5 fix #44156: melisma line too long 2015-01-12 13:03:03 -07:00
Maurizio M. Gavioli
c69d2a9262 Lyrics multi-system melisma and dashes
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.
2015-01-11 10:16:19 +01:00
Marc Sabatella
b1eed65018 fix #41721: bad layout of melisma lines in parts 2014-12-18 13:53:46 -07:00
Marc Sabatella
7013e0ad5d fix #40296: lyrics consisting of symbols offcenter 2014-11-30 08:05:19 -07:00
ws
e797d3b5f0 remove verse number from Lyric 2014-10-22 12:08:39 +02:00
Werner Schweer
da6215a3ac Merge pull request #1391 from MarcSabatella/36366-parse-verse
fix #36366: parse verse number, left align to syllable
2014-10-22 11:37:44 +02:00
Marc Sabatella
4f4e7b3a55 update 2014-10-19 14:36:08 -06:00
lasconic
dc48ff5bfa fix #37096: It is impossible to enter special characters from the F2 palette into lyrics 2014-10-19 15:16:24 +02:00
Marc Sabatella
0e9dd1a35e fix #36366: parse verse number, left align to syllable 2014-10-18 14:33:43 -06:00