MakeMusic
SmartMusic Finale Garritan MusicXML

ActorPreludeSample.xml sample, nested groups

Moderator: Michael Good

ActorPreludeSample.xml sample, nested groups

Postby Hans Vereyken » Fri Oct 17, 2014 5:44 am

While working on the 'group symbols' part of our software I got into trouble opening ActorPreludeSample.xml from the sample files.

The groups are nested in a weird way. Although I can't find anything in the MusicXML spec disapproving this way of declaring the groups, I think it can be done better.

This is the part-list (I deleted irrelevant lines)
Code: Select all
<part-group number="1" type="start">
  <group-symbol default-x="-7">bracket</group-symbol>
  <group-barline>yes</group-barline>
</part-group>
<score-part id="P1">
  <part-name>Piccolo</part-name>
</score-part>
<part-group number="2" type="start">
  <group-name>1-2</group-name>
  <group-barline>yes</group-barline>
</part-group>
<score-part id="P2">
  <part-name>Flutes</part-name>
</score-part>
<part-group number="2" type="stop"/>
<part-group number="2" type="start">
  <group-name>1-2</group-name>
  <group-barline>yes</group-barline>
</part-group>
<score-part id="P3">
  <part-name>Oboes</part-name>
</score-part>
<part-group number="2" type="stop"/>
<score-part id="P4">
  <part-name>English Horn</part-name> 
</score-part>
<part-group number="2" type="start">
  <group-name>1-2</group-name>
  <group-barline>yes</group-barline>
</part-group>
<score-part id="P5">
  <part-name>Clarinets in Bb</part-name>
</score-part>
<part-group number="2" type="stop"/>
<score-part id="P6">
  <part-name>Bass Clarinet in Bb</part-name>
</score-part>
<part-group number="2" type="start">
  <group-name>1-2</group-name>
  <group-barline>yes</group-barline>
</part-group>
<score-part id="P7">
  <part-name>Bassoons</part-name>
</score-part>
<part-group number="2" type="stop"/>
<part-group number="1" type="stop"/>
<part-group number="1" type="start">
  <group-name>Horns in F</group-name>
  <group-symbol default-x="-12">brace</group-symbol>
  <group-barline>no</group-barline>
</part-group>
<part-group number="2" type="start">
  <group-symbol default-x="-7">bracket</group-symbol>
  <group-barline>yes</group-barline>
</part-group>
<score-part id="P8">
  <part-name>1-2</part-name>
</score-part>
<score-part id="P9">
  <part-name>3-4</part-name> 
</score-part>
<part-group number="1" type="stop"/>
<part-group number="1" type="start">
  <group-name>1-2</group-name>
  <group-barline>yes</group-barline>
</part-group>
<score-part id="P10">
  <part-name>Trumpets in C</part-name>
  <score-instrument id="P10-I6">
</score-part>
<part-group number="1" type="stop"/>
<part-group number="1" type="start">
  <group-name>Trombones</group-name>
  <group-symbol default-x="-12">brace</group-symbol>
  <group-barline>yes</group-barline>
</part-group>
<score-part id="P11">
  <part-name>1-2</part-name> 
</score-part>
<score-part id="P12">
  <part-name>3</part-name>
</score-part>
<part-group number="1" type="stop"/>
<score-part id="P13">
  <part-name>Tuba</part-name>
</score-part>
<part-group number="2" type="stop"/>
<part-group number="2" type="start">
  <group-symbol default-x="-7">bracket</group-symbol>
  <group-barline>yes</group-barline>
</part-group>
<score-part id="P14">
  <part-name>Timpani</part-name>
</score-part>
<part-group number="1" type="start">
  <group-name>Percussion</group-name> 
  <group-symbol default-x="-12">brace</group-symbol>
  <group-barline>yes</group-barline>
</part-group>
<score-part id="P15">
  <part-name>1</part-name>
</score-part>
<score-part id="P16">
  <part-name>2</part-name>
</score-part>
<part-group number="2" type="stop"/>
<part-group number="1" type="stop"/>
<score-part id="P17">
  <part-name>Harp</part-name>
</score-part>
<part-group number="1" type="start">
  <group-symbol default-x="-7">bracket</group-symbol>
  <group-barline>yes</group-barline>
</part-group>
<score-part id="P18">
  <part-name>Violin I</part-name> 
  <score-instrument id="P18-I10">
</score-part>
<score-part id="P19">
  <part-name>Violin II</part-name>
</score-part>
<score-part id="P20">
  <part-name>Viola</part-name>
  <score-instrument id="P20-I14">
</score-part>
<score-part id="P21">
  <part-name>Violoncello</part-name>
</score-part>
<score-part id="P22">
  <part-name>Contrabass</part-name>
</score-part>
<part-group number="1" type="stop"/>

This section is what is wrong (in my opinion):
Code: Select all
<part-group number="1" type="start">
  <group-name>Horns in F</group-name>
  <group-symbol default-x="-12">brace</group-symbol>
  <group-barline>no</group-barline>
</part-group>
<part-group number="2" type="start">
  <group-symbol default-x="-7">bracket</group-symbol>
  <group-barline>yes</group-barline>
</part-group>
<score-part id="P8">
  <part-name>1-2</part-name>
</score-part>
<score-part id="P9">
  <part-name>3-4</part-name> 
</score-part>
<part-group number="1" type="stop"/>
<part-group number="1" type="start">
  <group-name>1-2</group-name>
  <group-barline>yes</group-barline>
</part-group>
<score-part id="P10">
  <part-name>Trumpets in C</part-name>
  <score-instrument id="P10-I6">
</score-part>
<part-group number="1" type="stop"/>
<part-group number="1" type="start">
  <group-name>Trombones</group-name>
  <group-symbol default-x="-12">brace</group-symbol>
  <group-barline>yes</group-barline>
</part-group>
<score-part id="P11">
  <part-name>1-2</part-name> 
</score-part>
<score-part id="P12">
  <part-name>3</part-name>
</score-part>
<part-group number="1" type="stop"/>
<score-part id="P13">
  <part-name>Tuba</part-name>
</score-part>
<part-group number="2" type="stop"/>

If you look at how the groups are nested this is what happens:
Code: Select all
<part-group number="1" type="start">
<part-group number="2" type="start">
<part-group number="1" type="stop"/>
<part-group number="1" type="start">
<part-group number="1" type="stop"/>
<part-group number="1" type="start">
<part-group number="2" type="stop"/>

I would suggest this would be better:
Code: Select all
<part-group number="2" type="start">
<part-group number="1" type="start">
<part-group number="1" type="stop"/>
<part-group number="1" type="start">
<part-group number="1" type="stop"/>
<part-group number="1" type="start">
<part-group number="2" type="stop"/>

And even better if the numbers are reversed:
Code: Select all
<part-group number="1" type="start">
<part-group number="2" type="start">
<part-group number="2" type="stop"/>
<part-group number="2" type="start">
<part-group number="2" type="stop"/>
<part-group number="2" type="start">
<part-group number="1" type="stop"/>

For me, this makes more sense, technically it's way easier to parse, semantically it's better.
I understand that this kind of nesting is necessary for (eg) slurs. For groups, I think, it isn't necessary and even confusing. I can't imagine a situation where one would need this flexibility to declare groups and its symbols. Altering the spec won't break backwards compatibility so maybe this can be an improvement?

I'd love to hear some thoughts on how other people think about this.
Hans Vereyken
 
Posts: 36
Joined: March, 2014
Reputation: 0

Re: ActorPreludeSample.xml sample, nested groups

Postby Michael Good » Fri Oct 17, 2014 6:06 pm

Hi Hans,

The reason that MusicXML is this flexible is that it represents not only nested groups, but also overlapping groups. That flexibility may be a bit more inconvenient for MusicXML readers, but it avoids restricting the music notation that can be represented in MusicXML files. The part-group doesn't only have braces and brackets, but also grouping for barlines and time signatures. Given these different kinds of groupings, overlaps are a distinct possibility.
Michael Good
VP of MusicXML Technologies
MakeMusic, Inc.
User avatar
Michael Good
 
Posts: 2197
Joined: March, 2014
Reputation: 0

Re: ActorPreludeSample.xml sample, nested groups

Postby Hans Vereyken » Mon Oct 20, 2014 2:20 am

Hi Michael,

Thanks for the quick reply.
I can't think of any score where one would need overlapping groups, if I look at it, it always is possible (and more clear) with nested groups. Can you give me an example of a score that needs overlapping groups to get correct results? I did search for this situations in experimental scores but even there I couldn't find an example.
Hans Vereyken
 
Posts: 36
Joined: March, 2014
Reputation: 0

Re: ActorPreludeSample.xml sample, nested groups

Postby Michael Good » Tue Oct 21, 2014 8:59 am

Hi Hans,

I don't have an example right now. I would expect it wouldn't be too hard to find in (for instance) manuscripts where barlines across staves and brackets may have been drawn inconsistently.
Michael Good
VP of MusicXML Technologies
MakeMusic, Inc.
User avatar
Michael Good
 
Posts: 2197
Joined: March, 2014
Reputation: 0

Who is online

Users browsing this forum: No registered users and 2 guests

cron