Merge pull request #4260 from dmitrio95/122561-tab-rests
fix #122561: layout rests in tablatures
This commit is contained in:
commit
960fcfca27
4 changed files with 996 additions and 13 deletions
|
@ -83,6 +83,18 @@ void Score::rebuildBspTree()
|
|||
page->rebuildBspTree();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
// layoutSegmentElements
|
||||
//---------------------------------------------------------
|
||||
|
||||
static void layoutSegmentElements(Segment* segment, int startTrack, int endTrack)
|
||||
{
|
||||
for (int track = startTrack; track < endTrack; ++track) {
|
||||
if (Element* e = segment->element(track))
|
||||
e->layout();
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
// layoutChords1
|
||||
// - layout upstem and downstem chords
|
||||
|
@ -92,16 +104,18 @@ void Score::rebuildBspTree()
|
|||
void Score::layoutChords1(Segment* segment, int staffIdx)
|
||||
{
|
||||
const Staff* staff = Score::staff(staffIdx);
|
||||
const int startTrack = staffIdx * VOICES;
|
||||
const int endTrack = startTrack + VOICES;
|
||||
|
||||
if (staff->isTabStaff(segment->tick()))
|
||||
if (staff->isTabStaff(segment->tick())) {
|
||||
layoutSegmentElements(segment, startTrack, endTrack);
|
||||
return;
|
||||
}
|
||||
|
||||
std::vector<Note*> upStemNotes;
|
||||
std::vector<Note*> downStemNotes;
|
||||
int upVoices = 0;
|
||||
int downVoices = 0;
|
||||
int startTrack = staffIdx * VOICES;
|
||||
int endTrack = startTrack + VOICES;
|
||||
qreal nominalWidth = noteHeadWidth() * staff->mag(segment->tick());
|
||||
qreal maxUpWidth = 0.0;
|
||||
qreal maxDownWidth = 0.0;
|
||||
|
@ -510,11 +524,7 @@ void Score::layoutChords1(Segment* segment, int staffIdx)
|
|||
layoutChords3(notes, staff, segment);
|
||||
}
|
||||
|
||||
for (int track = startTrack; track < endTrack; ++track) {
|
||||
Element* e = segment->element(track);
|
||||
if (e)
|
||||
e->layout();
|
||||
}
|
||||
layoutSegmentElements(segment, startTrack, endTrack);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
|
|
|
@ -531,7 +531,14 @@
|
|||
</Chord>
|
||||
<FiguredBass>
|
||||
<ticks>480</ticks>
|
||||
<text>Figured_bass</text>
|
||||
<FiguredBassItem>
|
||||
<brackets b0="0" b1="0" b2="0" b3="0" b4="0"/>
|
||||
<digit>5</digit>
|
||||
</FiguredBassItem>
|
||||
<FiguredBassItem>
|
||||
<brackets b0="0" b1="0" b2="0" b3="0" b4="0"/>
|
||||
<digit>3</digit>
|
||||
</FiguredBassItem>
|
||||
</FiguredBass>
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
|
|
960
mtest/libmscore/layout_elements/layout_elements_tab.mscx
Normal file
960
mtest/libmscore/layout_elements/layout_elements_tab.mscx
Normal file
|
@ -0,0 +1,960 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<museScore version="3.01">
|
||||
<Score>
|
||||
<LayerTag id="0" tag="default"></LayerTag>
|
||||
<currentLayer>0</currentLayer>
|
||||
<Division>480</Division>
|
||||
<Style>
|
||||
<Spatium>1.76389</Spatium>
|
||||
</Style>
|
||||
<showInvisible>1</showInvisible>
|
||||
<showUnprintable>1</showUnprintable>
|
||||
<showFrames>1</showFrames>
|
||||
<showMargins>0</showMargins>
|
||||
<metaTag name="arranger"></metaTag>
|
||||
<metaTag name="composer"></metaTag>
|
||||
<metaTag name="copyright"></metaTag>
|
||||
<metaTag name="lyricist"></metaTag>
|
||||
<metaTag name="movementNumber"></metaTag>
|
||||
<metaTag name="movementTitle"></metaTag>
|
||||
<metaTag name="poet"></metaTag>
|
||||
<metaTag name="source"></metaTag>
|
||||
<metaTag name="translator"></metaTag>
|
||||
<metaTag name="workNumber"></metaTag>
|
||||
<metaTag name="workTitle">Tablature layout test</metaTag>
|
||||
<Part>
|
||||
<Staff id="1">
|
||||
<StaffType group="tablature">
|
||||
<name>tab6StrFull</name>
|
||||
<lines>6</lines>
|
||||
<lineDistance>1.5</lineDistance>
|
||||
<durations>0</durations>
|
||||
<durationFontName>MuseScore Tab Modern</durationFontName>
|
||||
<durationFontSize>15</durationFontSize>
|
||||
<durationFontY>0</durationFontY>
|
||||
<fretFontName>MuseScore Tab Serif</fretFontName>
|
||||
<fretFontSize>9</fretFontSize>
|
||||
<fretFontY>0</fretFontY>
|
||||
<linesThrough>0</linesThrough>
|
||||
<minimStyle>2</minimStyle>
|
||||
<onLines>1</onLines>
|
||||
<showRests>1</showRests>
|
||||
<stemsDown>1</stemsDown>
|
||||
<stemsThrough>1</stemsThrough>
|
||||
<upsideDown>0</upsideDown>
|
||||
<showTabFingering>1</showTabFingering>
|
||||
<useNumbers>1</useNumbers>
|
||||
</StaffType>
|
||||
<defaultClef>G8vb</defaultClef>
|
||||
</Staff>
|
||||
<Staff id="2">
|
||||
<StaffType group="tablature">
|
||||
<name>tab6StrCommon</name>
|
||||
<lines>6</lines>
|
||||
<lineDistance>1.5</lineDistance>
|
||||
<timesig>0</timesig>
|
||||
<durations>0</durations>
|
||||
<durationFontName>MuseScore Tab Modern</durationFontName>
|
||||
<durationFontSize>15</durationFontSize>
|
||||
<durationFontY>0</durationFontY>
|
||||
<fretFontName>MuseScore Tab Serif</fretFontName>
|
||||
<fretFontSize>9</fretFontSize>
|
||||
<fretFontY>0</fretFontY>
|
||||
<linesThrough>0</linesThrough>
|
||||
<minimStyle>1</minimStyle>
|
||||
<onLines>1</onLines>
|
||||
<showRests>0</showRests>
|
||||
<stemsDown>1</stemsDown>
|
||||
<stemsThrough>0</stemsThrough>
|
||||
<upsideDown>0</upsideDown>
|
||||
<useNumbers>1</useNumbers>
|
||||
</StaffType>
|
||||
<defaultClef>G8vb</defaultClef>
|
||||
</Staff>
|
||||
<trackName>Guitar [Tablature]</trackName>
|
||||
<Instrument>
|
||||
<longName>Guitar</longName>
|
||||
<shortName>Guit.</shortName>
|
||||
<trackName>Classical Guitar [Tablature]</trackName>
|
||||
<minPitchP>40</minPitchP>
|
||||
<maxPitchP>83</maxPitchP>
|
||||
<minPitchA>40</minPitchA>
|
||||
<maxPitchA>83</maxPitchA>
|
||||
<instrumentId>pluck.guitar.nylon-string</instrumentId>
|
||||
<clef>G8vb</clef>
|
||||
<StringData>
|
||||
<frets>19</frets>
|
||||
<string>40</string>
|
||||
<string>45</string>
|
||||
<string>50</string>
|
||||
<string>55</string>
|
||||
<string>59</string>
|
||||
<string>64</string>
|
||||
</StringData>
|
||||
<Articulation>
|
||||
<velocity>100</velocity>
|
||||
<gateTime>100</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="staccatissimo">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>33</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="staccato">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>50</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="portato">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>67</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="tenuto">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>100</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="marcato">
|
||||
<velocity>120</velocity>
|
||||
<gateTime>67</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="sforzato">
|
||||
<velocity>120</velocity>
|
||||
<gateTime>100</gateTime>
|
||||
</Articulation>
|
||||
<Channel>
|
||||
<program value="24"/>
|
||||
</Channel>
|
||||
</Instrument>
|
||||
</Part>
|
||||
<Staff id="1">
|
||||
<VBox>
|
||||
<height>10</height>
|
||||
<Text>
|
||||
<style>Title</style>
|
||||
<text>Tablature layout test</text>
|
||||
</Text>
|
||||
</VBox>
|
||||
<Measure>
|
||||
<voice>
|
||||
<TimeSig>
|
||||
<sigN>4</sigN>
|
||||
<sigD>4</sigD>
|
||||
</TimeSig>
|
||||
<Spanner type="HairPin">
|
||||
<HairPin>
|
||||
<subtype>0</subtype>
|
||||
</HairPin>
|
||||
<next>
|
||||
<location>
|
||||
<measures>1</measures>
|
||||
</location>
|
||||
</next>
|
||||
</Spanner>
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Spanner type="Slur">
|
||||
<Slur>
|
||||
</Slur>
|
||||
<next>
|
||||
<location>
|
||||
<measures>1</measures>
|
||||
</location>
|
||||
</next>
|
||||
</Spanner>
|
||||
<Note>
|
||||
<pitch>61</pitch>
|
||||
<tpc>21</tpc>
|
||||
<fret>2</fret>
|
||||
<string>1</string>
|
||||
<Spanner type="Glissando">
|
||||
<Glissando>
|
||||
<text>gliss.</text>
|
||||
<subtype>1</subtype>
|
||||
<diagonal>1</diagonal>
|
||||
<anchor>3</anchor>
|
||||
</Glissando>
|
||||
<next>
|
||||
<location>
|
||||
<fractions>1/4</fractions>
|
||||
</location>
|
||||
</next>
|
||||
</Spanner>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Note>
|
||||
<pitch>63</pitch>
|
||||
<tpc>23</tpc>
|
||||
<fret>4</fret>
|
||||
<string>1</string>
|
||||
<Spanner type="Glissando">
|
||||
<prev>
|
||||
<location>
|
||||
<fractions>-1/4</fractions>
|
||||
</location>
|
||||
</prev>
|
||||
</Spanner>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Note>
|
||||
<pitch>64</pitch>
|
||||
<tpc>18</tpc>
|
||||
<fret>0</fret>
|
||||
<string>0</string>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Note>
|
||||
<pitch>66</pitch>
|
||||
<tpc>20</tpc>
|
||||
<fret>2</fret>
|
||||
<string>0</string>
|
||||
</Note>
|
||||
</Chord>
|
||||
</voice>
|
||||
</Measure>
|
||||
<Measure>
|
||||
<voice>
|
||||
<StaffText>
|
||||
<text>Staff Text</text>
|
||||
</StaffText>
|
||||
<Dynamic>
|
||||
<subtype>f</subtype>
|
||||
<velocity>96</velocity>
|
||||
</Dynamic>
|
||||
<Spanner type="HairPin">
|
||||
<prev>
|
||||
<location>
|
||||
<measures>-1</measures>
|
||||
</location>
|
||||
</prev>
|
||||
</Spanner>
|
||||
<Tuplet>
|
||||
<normalNotes>2</normalNotes>
|
||||
<actualNotes>3</actualNotes>
|
||||
<baseNote>eighth</baseNote>
|
||||
<Number>
|
||||
<style>Tuplet</style>
|
||||
<text>3</text>
|
||||
</Number>
|
||||
</Tuplet>
|
||||
<Beam>
|
||||
<l1>24</l1>
|
||||
<l2>24</l2>
|
||||
</Beam>
|
||||
<Chord>
|
||||
<durationType>eighth</durationType>
|
||||
<Spanner type="Slur">
|
||||
<prev>
|
||||
<location>
|
||||
<measures>-1</measures>
|
||||
</location>
|
||||
</prev>
|
||||
</Spanner>
|
||||
<Note>
|
||||
<pitch>61</pitch>
|
||||
<tpc>21</tpc>
|
||||
<fret>2</fret>
|
||||
<string>1</string>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Chord>
|
||||
<durationType>eighth</durationType>
|
||||
<Note>
|
||||
<pitch>63</pitch>
|
||||
<tpc>23</tpc>
|
||||
<fret>4</fret>
|
||||
<string>1</string>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Chord>
|
||||
<durationType>eighth</durationType>
|
||||
<Note>
|
||||
<pitch>64</pitch>
|
||||
<tpc>18</tpc>
|
||||
<fret>0</fret>
|
||||
<string>0</string>
|
||||
</Note>
|
||||
</Chord>
|
||||
<endTuplet/>
|
||||
<Chord>
|
||||
<dots>1</dots>
|
||||
<durationType>half</durationType>
|
||||
<Note>
|
||||
<Spanner type="Tie">
|
||||
<Tie>
|
||||
</Tie>
|
||||
<next>
|
||||
<location>
|
||||
<measures>1</measures>
|
||||
<fractions>-1/4</fractions>
|
||||
</location>
|
||||
</next>
|
||||
</Spanner>
|
||||
<pitch>68</pitch>
|
||||
<tpc>22</tpc>
|
||||
<fret>4</fret>
|
||||
<string>0</string>
|
||||
</Note>
|
||||
</Chord>
|
||||
</voice>
|
||||
</Measure>
|
||||
<Measure>
|
||||
<voice>
|
||||
<StaffText>
|
||||
<style>Expression</style>
|
||||
<text>Expression</text>
|
||||
</StaffText>
|
||||
<Spanner type="HairPin">
|
||||
<HairPin>
|
||||
<subtype>0</subtype>
|
||||
<beginText><sym>dynamicMezzo</sym><sym>dynamicForte</sym></beginText>
|
||||
<beginTextAlign>left,center</beginTextAlign>
|
||||
</HairPin>
|
||||
<next>
|
||||
<location>
|
||||
<measures>1</measures>
|
||||
</location>
|
||||
</next>
|
||||
</Spanner>
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Note>
|
||||
<Spanner type="Tie">
|
||||
<prev>
|
||||
<location>
|
||||
<measures>-1</measures>
|
||||
<fractions>1/4</fractions>
|
||||
</location>
|
||||
</prev>
|
||||
</Spanner>
|
||||
<pitch>68</pitch>
|
||||
<tpc>22</tpc>
|
||||
<fret>4</fret>
|
||||
<string>0</string>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Chord>
|
||||
<durationType>half</durationType>
|
||||
<Note>
|
||||
<pitch>68</pitch>
|
||||
<tpc>22</tpc>
|
||||
<fret>4</fret>
|
||||
<string>0</string>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Beam>
|
||||
<l1>18</l1>
|
||||
<l2>18</l2>
|
||||
</Beam>
|
||||
<Chord>
|
||||
<durationType>eighth</durationType>
|
||||
<Note>
|
||||
<pitch>69</pitch>
|
||||
<tpc>17</tpc>
|
||||
<fret>5</fret>
|
||||
<string>0</string>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Chord>
|
||||
<durationType>eighth</durationType>
|
||||
<Note>
|
||||
<pitch>71</pitch>
|
||||
<tpc>19</tpc>
|
||||
<fret>7</fret>
|
||||
<string>0</string>
|
||||
</Note>
|
||||
</Chord>
|
||||
</voice>
|
||||
</Measure>
|
||||
<Measure>
|
||||
<voice>
|
||||
<Fermata>
|
||||
<subtype>fermataAbove</subtype>
|
||||
</Fermata>
|
||||
<Spanner type="HairPin">
|
||||
<prev>
|
||||
<location>
|
||||
<measures>-1</measures>
|
||||
</location>
|
||||
</prev>
|
||||
</Spanner>
|
||||
<Chord>
|
||||
<durationType>eighth</durationType>
|
||||
<acciaccatura/>
|
||||
<Note>
|
||||
<pitch>67</pitch>
|
||||
<tpc>15</tpc>
|
||||
<fret>3</fret>
|
||||
<string>0</string>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Chord>
|
||||
<durationType>whole</durationType>
|
||||
<Note>
|
||||
<pitch>67</pitch>
|
||||
<tpc>27</tpc>
|
||||
<fret>3</fret>
|
||||
<string>0</string>
|
||||
</Note>
|
||||
</Chord>
|
||||
</voice>
|
||||
</Measure>
|
||||
<Measure>
|
||||
<voice>
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Note>
|
||||
<Symbol>
|
||||
<name>noteheadParenthesisLeft</name>
|
||||
</Symbol>
|
||||
<Symbol>
|
||||
<name>noteheadParenthesisRight</name>
|
||||
</Symbol>
|
||||
<pitch>69</pitch>
|
||||
<tpc>17</tpc>
|
||||
<fret>5</fret>
|
||||
<string>0</string>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Note>
|
||||
<pitch>71</pitch>
|
||||
<tpc>19</tpc>
|
||||
<fret>7</fret>
|
||||
<string>0</string>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Note>
|
||||
<pitch>73</pitch>
|
||||
<tpc>21</tpc>
|
||||
<fret>9</fret>
|
||||
<string>0</string>
|
||||
</Note>
|
||||
<Tremolo>
|
||||
<subtype>r8</subtype>
|
||||
</Tremolo>
|
||||
</Chord>
|
||||
<Breath>
|
||||
<symbol>breathMarkTick</symbol>
|
||||
</Breath>
|
||||
<Rest>
|
||||
<durationType>quarter</durationType>
|
||||
</Rest>
|
||||
</voice>
|
||||
</Measure>
|
||||
<Measure>
|
||||
<voice>
|
||||
<Rest>
|
||||
<durationType>measure</durationType>
|
||||
<duration>4/4</duration>
|
||||
</Rest>
|
||||
</voice>
|
||||
</Measure>
|
||||
<Measure>
|
||||
<voice>
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Note>
|
||||
<Fingering>
|
||||
<text>1</text>
|
||||
</Fingering>
|
||||
<pitch>48</pitch>
|
||||
<tpc>14</tpc>
|
||||
<fret>3</fret>
|
||||
<string>4</string>
|
||||
</Note>
|
||||
<Note>
|
||||
<Fingering>
|
||||
<text>3</text>
|
||||
</Fingering>
|
||||
<pitch>52</pitch>
|
||||
<tpc>18</tpc>
|
||||
<fret>2</fret>
|
||||
<string>3</string>
|
||||
</Note>
|
||||
<Note>
|
||||
<Fingering>
|
||||
<text>5</text>
|
||||
</Fingering>
|
||||
<pitch>55</pitch>
|
||||
<tpc>15</tpc>
|
||||
<fret>0</fret>
|
||||
<string>2</string>
|
||||
</Note>
|
||||
<Arpeggio>
|
||||
<subtype>0</subtype>
|
||||
</Arpeggio>
|
||||
</Chord>
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Note>
|
||||
<pitch>48</pitch>
|
||||
<tpc>14</tpc>
|
||||
<fret>3</fret>
|
||||
<string>4</string>
|
||||
<Spanner type="Glissando">
|
||||
<Glissando>
|
||||
<text>gliss.</text>
|
||||
<diagonal>1</diagonal>
|
||||
<anchor>3</anchor>
|
||||
</Glissando>
|
||||
<next>
|
||||
<location>
|
||||
<fractions>1/4</fractions>
|
||||
</location>
|
||||
</next>
|
||||
</Spanner>
|
||||
</Note>
|
||||
</Chord>
|
||||
<FiguredBass>
|
||||
<ticks>480</ticks>
|
||||
<FiguredBassItem>
|
||||
<brackets b0="0" b1="0" b2="0" b3="0" b4="0"/>
|
||||
<digit>5</digit>
|
||||
</FiguredBassItem>
|
||||
<FiguredBassItem>
|
||||
<brackets b0="0" b1="0" b2="0" b3="0" b4="0"/>
|
||||
<digit>3</digit>
|
||||
</FiguredBassItem>
|
||||
</FiguredBass>
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Note>
|
||||
<pitch>55</pitch>
|
||||
<tpc>15</tpc>
|
||||
<fret>0</fret>
|
||||
<string>2</string>
|
||||
<Spanner type="Glissando">
|
||||
<prev>
|
||||
<location>
|
||||
<fractions>-1/4</fractions>
|
||||
</location>
|
||||
</prev>
|
||||
</Spanner>
|
||||
</Note>
|
||||
</Chord>
|
||||
<FiguredBass>
|
||||
<onNote>0</onNote>
|
||||
<ticks>480</ticks>
|
||||
<text></text>
|
||||
</FiguredBass>
|
||||
<Rest>
|
||||
<durationType>quarter</durationType>
|
||||
</Rest>
|
||||
</voice>
|
||||
</Measure>
|
||||
<Measure>
|
||||
<voice>
|
||||
<Rest>
|
||||
<durationType>half</durationType>
|
||||
</Rest>
|
||||
<Rest>
|
||||
<durationType>half</durationType>
|
||||
</Rest>
|
||||
</voice>
|
||||
</Measure>
|
||||
<Measure>
|
||||
<voice>
|
||||
<Rest>
|
||||
<durationType>whole</durationType>
|
||||
</Rest>
|
||||
</voice>
|
||||
</Measure>
|
||||
</Staff>
|
||||
<Staff id="2">
|
||||
<Measure>
|
||||
<voice>
|
||||
<KeySig>
|
||||
<accidental>0</accidental>
|
||||
</KeySig>
|
||||
<TimeSig>
|
||||
<sigN>4</sigN>
|
||||
<sigD>4</sigD>
|
||||
</TimeSig>
|
||||
<FretDiagram>
|
||||
<string no="0">
|
||||
<marker>88</marker>
|
||||
</string>
|
||||
<string no="1">
|
||||
<dot>3</dot>
|
||||
</string>
|
||||
<string no="2">
|
||||
<dot>2</dot>
|
||||
</string>
|
||||
<string no="3">
|
||||
<marker>79</marker>
|
||||
</string>
|
||||
<string no="4">
|
||||
<dot>1</dot>
|
||||
</string>
|
||||
<string no="5">
|
||||
<marker>79</marker>
|
||||
</string>
|
||||
</FretDiagram>
|
||||
<Spanner type="Pedal">
|
||||
<Pedal>
|
||||
<endHookType>1</endHookType>
|
||||
<beginText><sym>keyboardPedalPed</sym></beginText>
|
||||
</Pedal>
|
||||
<next>
|
||||
<location>
|
||||
<measures>1</measures>
|
||||
</location>
|
||||
</next>
|
||||
</Spanner>
|
||||
<Chord>
|
||||
<durationType>32nd</durationType>
|
||||
<grace32/>
|
||||
<Note>
|
||||
<pitch>66</pitch>
|
||||
<tpc>20</tpc>
|
||||
<fret>2</fret>
|
||||
<string>0</string>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Note>
|
||||
<pitch>64</pitch>
|
||||
<tpc>18</tpc>
|
||||
<fret>0</fret>
|
||||
<string>0</string>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Rest>
|
||||
<durationType>quarter</durationType>
|
||||
</Rest>
|
||||
<Rest>
|
||||
<durationType>half</durationType>
|
||||
</Rest>
|
||||
</voice>
|
||||
</Measure>
|
||||
<Measure>
|
||||
<voice>
|
||||
<Spanner type="Pedal">
|
||||
<prev>
|
||||
<location>
|
||||
<measures>-1</measures>
|
||||
</location>
|
||||
</prev>
|
||||
</Spanner>
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Lyrics>
|
||||
<syllabic>begin</syllabic>
|
||||
<text>Ly</text>
|
||||
</Lyrics>
|
||||
<Note>
|
||||
<pitch>73</pitch>
|
||||
<tpc>21</tpc>
|
||||
<fret>9</fret>
|
||||
<string>0</string>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Lyrics>
|
||||
<syllabic>end</syllabic>
|
||||
<ticks>480</ticks>
|
||||
<text>rics</text>
|
||||
</Lyrics>
|
||||
<Note>
|
||||
<pitch>76</pitch>
|
||||
<tpc>18</tpc>
|
||||
<fret>12</fret>
|
||||
<string>0</string>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Note>
|
||||
<pitch>78</pitch>
|
||||
<tpc>20</tpc>
|
||||
<fret>14</fret>
|
||||
<string>0</string>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Lyrics>
|
||||
<syllabic>begin</syllabic>
|
||||
<text>ly</text>
|
||||
</Lyrics>
|
||||
<Note>
|
||||
<pitch>76</pitch>
|
||||
<tpc>18</tpc>
|
||||
<fret>12</fret>
|
||||
<string>0</string>
|
||||
</Note>
|
||||
</Chord>
|
||||
</voice>
|
||||
</Measure>
|
||||
<Measure>
|
||||
<voice>
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Note>
|
||||
<pitch>73</pitch>
|
||||
<tpc>21</tpc>
|
||||
<fret>9</fret>
|
||||
<string>0</string>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Lyrics>
|
||||
<syllabic>middle</syllabic>
|
||||
<align>left,baseline</align>
|
||||
<text>rics</text>
|
||||
</Lyrics>
|
||||
<Note>
|
||||
<pitch>76</pitch>
|
||||
<tpc>18</tpc>
|
||||
<fret>12</fret>
|
||||
<string>0</string>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Chord>
|
||||
<durationType>half</durationType>
|
||||
<Lyrics>
|
||||
<syllabic>end</syllabic>
|
||||
<text>ly</text>
|
||||
</Lyrics>
|
||||
<Note>
|
||||
<pitch>64</pitch>
|
||||
<tpc>18</tpc>
|
||||
<fret>0</fret>
|
||||
<string>0</string>
|
||||
</Note>
|
||||
</Chord>
|
||||
</voice>
|
||||
</Measure>
|
||||
<Measure>
|
||||
<voice>
|
||||
<Rest>
|
||||
<durationType>measure</durationType>
|
||||
<duration>4/4</duration>
|
||||
</Rest>
|
||||
</voice>
|
||||
</Measure>
|
||||
<Measure>
|
||||
<voice>
|
||||
<Rest>
|
||||
<durationType>measure</durationType>
|
||||
<duration>4/4</duration>
|
||||
</Rest>
|
||||
</voice>
|
||||
</Measure>
|
||||
<Measure>
|
||||
<voice>
|
||||
<Rest>
|
||||
<durationType>measure</durationType>
|
||||
<duration>4/4</duration>
|
||||
</Rest>
|
||||
</voice>
|
||||
</Measure>
|
||||
<Measure>
|
||||
<voice>
|
||||
<Spanner type="Ottava">
|
||||
<Ottava>
|
||||
<subtype>8va</subtype>
|
||||
</Ottava>
|
||||
<next>
|
||||
<location>
|
||||
<fractions>1/4</fractions>
|
||||
</location>
|
||||
</next>
|
||||
</Spanner>
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Note>
|
||||
<pitch>69</pitch>
|
||||
<tpc>17</tpc>
|
||||
<fret>5</fret>
|
||||
<string>0</string>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Spanner type="Ottava">
|
||||
<prev>
|
||||
<location>
|
||||
<fractions>-1/4</fractions>
|
||||
</location>
|
||||
</prev>
|
||||
</Spanner>
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Note>
|
||||
<pitch>70</pitch>
|
||||
<tpc>12</tpc>
|
||||
<fret>6</fret>
|
||||
<string>0</string>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Note>
|
||||
<pitch>72</pitch>
|
||||
<tpc>14</tpc>
|
||||
<fret>8</fret>
|
||||
<string>0</string>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Note>
|
||||
<pitch>74</pitch>
|
||||
<tpc>16</tpc>
|
||||
<fret>10</fret>
|
||||
<string>0</string>
|
||||
</Note>
|
||||
</Chord>
|
||||
</voice>
|
||||
</Measure>
|
||||
<Measure>
|
||||
<voice>
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Note>
|
||||
<pitch>76</pitch>
|
||||
<tpc>18</tpc>
|
||||
<fret>12</fret>
|
||||
<string>0</string>
|
||||
</Note>
|
||||
</Chord>
|
||||
<TremoloBar>
|
||||
<point time="0" pitch="0" vibrato="0"/>
|
||||
<point time="30" pitch="-100" vibrato="0"/>
|
||||
<point time="60" pitch="0" vibrato="0"/>
|
||||
</TremoloBar>
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Note>
|
||||
<pitch>77</pitch>
|
||||
<tpc>13</tpc>
|
||||
<fret>13</fret>
|
||||
<string>0</string>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Harmony>
|
||||
<root>14</root>
|
||||
</Harmony>
|
||||
<Chord>
|
||||
<durationType>half</durationType>
|
||||
<Note>
|
||||
<Spanner type="Tie">
|
||||
<Tie>
|
||||
</Tie>
|
||||
<next>
|
||||
<location>
|
||||
<measures>1</measures>
|
||||
<fractions>-1/2</fractions>
|
||||
</location>
|
||||
</next>
|
||||
</Spanner>
|
||||
<pitch>69</pitch>
|
||||
<tpc>17</tpc>
|
||||
<fret>14</fret>
|
||||
<string>2</string>
|
||||
</Note>
|
||||
<Note>
|
||||
<Spanner type="Tie">
|
||||
<Tie>
|
||||
</Tie>
|
||||
<next>
|
||||
<location>
|
||||
<measures>1</measures>
|
||||
<fractions>-1/2</fractions>
|
||||
</location>
|
||||
</next>
|
||||
</Spanner>
|
||||
<pitch>72</pitch>
|
||||
<tpc>14</tpc>
|
||||
<fret>13</fret>
|
||||
<string>1</string>
|
||||
</Note>
|
||||
<Note>
|
||||
<Spanner type="Tie">
|
||||
<Tie>
|
||||
</Tie>
|
||||
<next>
|
||||
<location>
|
||||
<measures>1</measures>
|
||||
<fractions>-1/2</fractions>
|
||||
</location>
|
||||
</next>
|
||||
</Spanner>
|
||||
<pitch>76</pitch>
|
||||
<tpc>18</tpc>
|
||||
<fret>12</fret>
|
||||
<string>0</string>
|
||||
</Note>
|
||||
</Chord>
|
||||
<location>
|
||||
<fractions>-1/8</fractions>
|
||||
</location>
|
||||
<Harmony>
|
||||
<root>16</root>
|
||||
</Harmony>
|
||||
</voice>
|
||||
</Measure>
|
||||
<Measure>
|
||||
<voice>
|
||||
<Chord>
|
||||
<durationType>half</durationType>
|
||||
<Note>
|
||||
<Spanner type="Tie">
|
||||
<prev>
|
||||
<location>
|
||||
<measures>-1</measures>
|
||||
<fractions>1/2</fractions>
|
||||
</location>
|
||||
</prev>
|
||||
</Spanner>
|
||||
<pitch>69</pitch>
|
||||
<tpc>17</tpc>
|
||||
<fret>14</fret>
|
||||
<string>2</string>
|
||||
</Note>
|
||||
<Note>
|
||||
<Spanner type="Tie">
|
||||
<prev>
|
||||
<location>
|
||||
<measures>-1</measures>
|
||||
<fractions>1/2</fractions>
|
||||
</location>
|
||||
</prev>
|
||||
</Spanner>
|
||||
<pitch>72</pitch>
|
||||
<tpc>14</tpc>
|
||||
<fret>13</fret>
|
||||
<string>1</string>
|
||||
</Note>
|
||||
<Note>
|
||||
<Spanner type="Tie">
|
||||
<prev>
|
||||
<location>
|
||||
<measures>-1</measures>
|
||||
<fractions>1/2</fractions>
|
||||
</location>
|
||||
</prev>
|
||||
</Spanner>
|
||||
<pitch>76</pitch>
|
||||
<tpc>18</tpc>
|
||||
<fret>12</fret>
|
||||
<string>0</string>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Rest>
|
||||
<durationType>half</durationType>
|
||||
</Rest>
|
||||
</voice>
|
||||
</Measure>
|
||||
</Staff>
|
||||
</Score>
|
||||
</museScore>
|
|
@ -15,6 +15,7 @@
|
|||
#include "libmscore/measure.h"
|
||||
#include "libmscore/page.h"
|
||||
#include "libmscore/score.h"
|
||||
#include "libmscore/staff.h"
|
||||
#include "libmscore/system.h"
|
||||
#include "libmscore/tuplet.h"
|
||||
|
||||
|
@ -22,10 +23,6 @@
|
|||
|
||||
using namespace Ms;
|
||||
|
||||
//namespace Ms {
|
||||
//extern void dumpTags();
|
||||
//};
|
||||
|
||||
//---------------------------------------------------------
|
||||
// TestBechmark
|
||||
//---------------------------------------------------------
|
||||
|
@ -41,6 +38,7 @@ class TestLayoutElements : public QObject, public MTest
|
|||
private slots:
|
||||
void initTestCase();
|
||||
void tstLayoutElements() { tstLayoutAll("layout_elements.mscx"); }
|
||||
void tstLayoutTablature() { tstLayoutAll("layout_elements_tab.mscx"); }
|
||||
void tstLayoutMoonlight() { tstLayoutAll("moonlight.mscx"); }
|
||||
// FIXME goldberg.mscx does not pass the test because of some
|
||||
// TimeSig and Clef elements. Need to check it later!
|
||||
|
@ -74,6 +72,14 @@ static void isLayoutDone(void* data, Element* e)
|
|||
// TODO: how to check this case?
|
||||
return;
|
||||
}
|
||||
if (e->isTimeSig()) {
|
||||
const Staff* st = e->staff();
|
||||
if (!st->staffType(e->tick())->genTimesig()) {
|
||||
// Some staff types require not to have a time
|
||||
// signature displayed. This is a valid exception.
|
||||
return;
|
||||
}
|
||||
}
|
||||
// If layout of element is done it (usually?) has a valid
|
||||
// bounding box (bbox).
|
||||
if (e->visible() && !e->bbox().isValid()) {
|
||||
|
|
Loading…
Reference in a new issue