Commit graph

168 commits

Author SHA1 Message Date
Kumar Kartikay
a87cc9e6cc Create Score Tree Model
This commit adds virtual functions treeChild, treeParent and
treeChildCount to ScoreElement and implements them in most non-leaf-node
classes. An iterator is also added to ScoreElement class to iterate over
the children of any element.

In this model, Spanners, Beams and Ties are given a single parent, which
is the starting element of the spanner, beam or tie. Also, to ensure
consistency in the model, spanners, beams, and ties appear in the
children list only for their starting element. Children of spanner
elements are SpannerSegments, one for each system the spanner appears
in.
2020-06-23 12:44:57 +05:30
Igor Korsukov
45b9887603 changed code style 2020-05-28 09:50:45 +02:00
anatoly-os
a10ec7027a
Merge pull request #5817 from Marr11317/mn-red
Measure numbers
2020-04-28 15:05:09 +03:00
anatoly-os
e9864d1e83
Merge pull request #5371 from mattmcclinch/294085-has-voices
fix #294085: all elements set to normal position if all rests in voices other than voice 1 are deleted
2020-04-20 15:51:47 +03:00
Marr11317
8ea3e54ea0 Make measure numbers deletable 2020-04-18 12:04:40 -04:00
Dmitri Ovodok
98e483bd0b Add spacingFactor parameter to position searching functions
This allows to define a ratio which is used to split canvas between
the adjacent segments, systems etc.
2020-04-17 00:05:37 +03:00
Dmitri Ovodok
265b5f9b2b Extract searchSegment function to search a segment by its x coordinate 2020-04-17 00:05:32 +03:00
Matt McClinch
472cb6bfb5 fix #294085: all elements set to normal position if all rests in voices other than voice 1 are deleted
This factors out the inner workings of Measure::checkMultiVoices() into a variant of Measure::hasVoices() that takes a start tick and a length in addition to a staff index.

Co-authored-by: Howard-C <howardc@pku.edu.cn>
2020-04-08 08:22:07 -04:00
anatoly-os
9916086f6b
Merge pull request #5874 from igorkorsukov/tracker_292631_glissandos
fix #292631 fixed crash on spanners (glissandos) layout
2020-04-07 09:50:53 +02:00
Igor Korsukov
0aecb0a173 fixed virtual methods 2020-03-27 10:01:06 +02:00
Igor Korsukov
a2bfb02954 fix #292631 fixed spanners (glissandos) layout 2020-03-26 16:41:36 +02:00
Joachim Schmitz
a53bac4711 replace slashStyle with stemless
and all related things along with it, including a compatibility layer
2019-08-19 15:07:30 +02:00
Dmitri Ovodok
754ddfd307 fix #291698: ensure consistent state of two-notes tremolo after file reading 2019-07-06 15:35:18 +03:00
Matt McClinch
d14f5e8eb2 fix #284481: Automatic placement of single rests in multiple voice areas 2019-06-14 01:21:17 -04:00
Dmitri Ovodok
7de0e50452 fix #289721: disallow breaking MIDI rendering chunk at repeat measure 2019-05-27 11:57:49 +02:00
Marc Sabatella
ade9f8ce28 fix #281651: stretch not having much affect on mmrests 2019-04-17 13:22:00 -06:00
Josh Wood
ff2907b90f Rename isMeasureRest() to isEmpty() in measure.cpp 2019-03-27 21:36:06 +00:00
Margus Niitsoo
62e85582e9 Tool to unroll repeats. Fix #283592
As a by-product, also Fix ##100246
2019-03-19 16:27:33 +02:00
ws
ec3be9a99a Replacd integer midi tick values by fractions.
- 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
2019-02-18 11:46:05 +01:00
Dmitri Ovodok
73bdf0c3ad fix #151256, part 2: don't allow lyrics cross barlines
Melisma are not affected by this patch and still can cross barlines

Shapes change hack makes horizontal spacing apply only for the
specified spacing type even in case of zero-width shape. That way
chord symbols can cross barlines again.
2019-01-10 11:00:20 +03:00
ws
a1977db22f fix #275379 Segno symbol collides with measure number text 2018-12-09 15:11:26 +01:00
mirabilos
77983234c8
some spelling fixes
most from the spell checker built into Debian’s automated
package checking tool lintian, two from me during applying
those lintian-suggested fixes
2018-11-27 22:49:18 +01:00
ws
8a42030a4c fix measure number layout 2018-10-24 10:40:19 +02:00
Dmitri Ovodok
c354eb24c3 Remove read300 functions 2018-09-19 01:57:37 +03:00
alexandr
34cf407404 fix #271616: Fermata tempo is not applied when importing 2.X->3.0 score
Add reading timeStretch for feramta from mscz
Add calculating ticks for segments before first using fermata
Add fermata.mscx to unit tests
2018-09-14 09:09:29 +02:00
ws
b232149321 remove measure staff shapes, replace with skyline 2018-09-11 16:30:47 +02:00
anatoly-os
61b040899b Revert "Merge pull request #3926 from handrok/fix#271616-Fermata_tempo"
This reverts commit cb6a5c911f.
These changes crash MuseScore when open some 2.06 scores.
2018-09-09 01:47:38 +02:00
alexandr
8422a7d410 fix #271616: Fermata tempo is not applied when importing 2.X->3.0 score 2018-09-06 14:30:44 +02:00
Dmitri Ovodok
44fb6c46c0 Write voices within <voice> tags when saving score to file 2018-08-16 19:10:29 +03:00
Dmitri Ovodok
104898195b Read and write spanners using the connectors framework
Remove IDs for spanners
2018-08-16 19:10:28 +03:00
Dmitri Ovodok
8fa920b7df Backup old MSC read functions, add a test for fileformats compatibility
Use old read functions for reading 1.x and 2.x fileformats

Assign version number 3.01 to the new MSCX format flavor
2018-08-16 19:08:45 +03:00
ws
33d1cd7fb4 rename StyleIdx -> Sid and P_ID -> Pid 2018-03-27 15:36:00 +02:00
ws
1a4bd0feb9 add tuplet shape to segment/measure shape; properties update 2018-03-16 10:58:31 +01:00
Werner Schweer
b46b55fa1e fix ties from/to grace notes; add 'final' to classes were appropriate 2017-12-21 14:08:44 +01:00
Werner Schweer
0e4211e2d0 update let ring, palm mute 2017-11-27 16:55:52 +01:00
Werner Schweer
c4af0c22bc fix for auto layout lyrics/slurs 2017-09-19 15:20:06 +02:00
Werner Schweer
ac41fa396e update edit infrastructure 2017-03-31 13:03:30 +02:00
lasconic
c08b67ff90 fix #183846 split irreg-len meas shouldn't add rest
This fixes an bug which produced corrupted measures when splitting irregular length measures.  In Score::cmdSplitMeasure() after the newly split measures are first created, if their new actual length was greater than their nominal length, then Measure::adjustToLen() would append additional padding rests at the end of the measure.  However, the subsequent range.write() assumed that the measures were entirely empty before copying contents from the original measure into the new measures.  The extra padding rests were unnecessary, and caused the resulting measures to contain too many notes than their actual length, hence the corruption.

The fix here is to add a default boolean parameter to adjustToLen() called appendRestsIfNecessary which is true by default so as to not change behavior when it is called without specifiying the parameter. However, cmdSplitMeasure() will call adjustToLen with that boolean explicitly false, so that the new measures don't get unnecessary rests.
2017-03-24 17:31:25 +01:00
lasconic
752bafc8e9 fix #99146: File > Save Selection… leads to corrupt score if selection is not 4/4 and does not start with time signature 2017-03-09 23:55:10 +01:00
Werner Schweer
867f2582f6 move Segment::Type into SegmentType 2017-03-08 13:12:26 +01:00
Werner Schweer
90b1991912 replace Q_OBJECT with Q_GADGET for all Element based classes 2017-02-17 15:48:28 +01:00
Werner Schweer
1d4c6b2f21 move Element::type() to ScoreElement 2017-01-18 14:16:33 +01:00
Werner Schweer
1a52a38164 update BarLine, mtests 2016-12-28 16:36:59 +01:00
Werner Schweer
6e7e05aaec impl. staff type changes 2016-12-18 14:31:34 +01:00
Werner Schweer
cb7485f6f8 hide MStaff 2016-12-14 15:40:26 +01:00
Werner Schweer
6dd13e4074 hide MStaff elements 2016-12-14 15:40:26 +01:00
Werner Schweer
b502a5d377 implement framework for 'global insert' 2016-12-03 13:46:58 +01:00
Werner Schweer
dfe4c7b433 in Range(): allow tuplets to be split in the middle 2016-11-28 17:25:37 +01:00
Werner Schweer
c5f46bb208 rename Xml() -> XmlWriter() 2016-11-19 11:51:21 +01:00
Werner Schweer
bfde93fa44 small optimizations 2016-11-07 09:59:18 +01:00