[MEI-L] Questions about Beaming

Roland, Perry D. (pdr4h) pdr4h at eservices.virginia.edu
Tue Aug 12 00:09:06 CEST 2014



Hi Christopher,



It’s good to hear from you again.  That means you haven’t given up working on the MEI -> Music21 conversion.  ;-)



Precedence is not an issue for <beam> and <beamSpan>, since they operate at the same level.  That is, a single beam construct shouldn't be indicated by both <beam> and <beamSpan> elements.  One or the other should be used, never both.  <beam> will only work, however, when the beam doesn't cross a bar line.  <beamSpan> will work in all cases.



@beam is really an analytical mechanism and in the next release of MEI I’d like to place it in the analytical domain, meaning it can be "turned off" at will.  Therefore, it must take a lower precedence than the other two for rendering purposes.  I might go so far as to say that it should never be relied on for rendering, but if it’s the only beaming indication you’ve got ...



The fact that <beam> can contain <beam> is a side effect of the MEI class system.  Since <beam> contains events, and a beam element is effectively an event, it follows that syntactically <beam> can contain <beam>.  However, that kind of markup is not likely to be very useful.  (N.B. Exclusions; that is, rules specifying that <beam> can contain any event EXCEPT <beam>, were allowed in SGML but are not in XML unfortunately.)



For overlapping beams, <beamSpan> elements should be used, for instance where a run of eighth notes has beams beginning on the first and 5th notes *and* on the 2nd and 6th notes, e.g.,



[In case you can’t see the inline images, the examples are also attached.]



[beamExample.png]

[cid:image004.jpg at 01CFB58F.56EEB8F0]

(I can’t replicate the situation exactly with the Bach font, so you have to imagine the 2 lines of notes superimposed.)



(Very abbreviated) markup for this example:



<note xml:id=”n1” dur=”8”/>

<note xml:id=”n2” dur=”8”/>

<note xml:id=”n3” dur=”8”/>

<note xml:id=”n4” dur=”8”/>

<note xml:id=”n5” dur=”8”/>

<note xml:id=”n6” dur=”8”/>

<note xml:id=”n7” dur=”8”/>

<note xml:id=”n8” dur=”8”/>

[barLine]

<note xml:id=”n9” dur=”8”/>



<beamSpan startid=”#n1” endid=”#n4”/>

<beamSpan startid=”#n2” endid=”#n5”/

<beamSpan startid=”#n5” endid=”#n8”/>

<beamSpan startid=”#n6” endid=”#n9”/>



Of course, this only occurs in special circumstances.  And, of course, <beamSpan> can be used instead of <beam>.  <beam> is just easier to deal with when one is creating the markup by hand.



Remember that secondary (tertiary, etc.) beams are *not* indicated in MEI by adding more <beam> elements.  The following example is *INCORRECT*.



<beam>

  <beam>

    <note dur=”16”/>

    <note dur=”16”/>

    <note dur=”16”/>

    <note dur=”16”/>

  </beam>

</beam>



A set of beamed notes is marked up with a single <beam> element, regardless of the durations under the beam.  (Maybe a better name for this element would have been <beamedGroup>, but that presented difficulties of a different nature.)  In any case, the element indicates a *set of beamed notes*, not individual beam “lines” (for want of a better term for the horizontal “bars”).  In other words, in MEI 8th note groups, 16th note groups, or mixed groups all only have 1 beam element because they’re all part of the same “beamed group”.  For example,



<beam>

  <note dur=”8”/>

  <note dur=”8”/>

</beam>



OR



<beam>

  <note dur=”16”/>

  <note dur=”16”/>

  <note dur=”16”/>

  <note dur=”16”/>

</beam>



OR EVEN



<beam>

  <note dur=”8”/>

  <note dur=”16”/>

  <note dur=”16”/>

</beam>



As you say, they all share the same primary beam.  And it’s the primary beam we’re most concerned about.  In every case, the rendering engine can figure out how many beams to draw and where to draw them based on the note durations.  When there’s a question about where to break the secondary beam(s), the @breaksec attribute is needed.  For example,



<beam>

  <note dur=”16”/>

  <note dur=”16” breaksec=”1”/>

  <note dur=”16”/>

  <note dur=”16”/>

</beam>



indicates a break in the secondary beam following the 2nd note.  The value of @breaksec records how many beams should remain *unbroken*, resulting in a rendering like --



[beamExample2.png]

[cid:image001.png at 01CFB58A.0DECA2C0]



Does that help?



--

p.







> -----Original Message-----

> From: mei-l [mailto:mei-l-bounces at lists.uni-paderborn.de] On Behalf Of

> Christopher Antila

> Sent: Monday, August 11, 2014 4:24 PM

> To: Music Encoding Initiative

> Subject: [MEI-L] Questions about Beaming

>

> Greetings MEI List Members:

>

> I have another set of questions related to importing MEI to music21!

>

> This time I'm having issues with beams, so I hope someone can help

> clarify the MEI Guidelines. Though it may seem like I'm splitting hairs,

> I'm really looking for answers to two specific questions: (1) what's the

> order of precedence in beam specification? And (2) what do nested <beam>

> elements mean?

>

> Elaboration.

>

> 1.) There are (at least?) three ways to encode beams: <beam>,

> <beamSpan>, and @beam. What's the order of precedence for when more

> than

> one of these are specified for the same element? My feeling is that a

> <beamSpan> shall be overridden by a <beam>, which shall be overridden by

> the @beam attribute. Why? While <beamSpan> cannot indicate a beam

> number, <beam> can imply a beam number, and @beam specifically

> requires

> beam numbers. Even though an "order of precedence" is probably beyond

> the scope of what MEI will want to specify, it would be helpful to

> disambiguate the different levels of specificity in the Guideliness---if

> indeed I'm understanding the situation properly.

>

> 2.) On the topic of the <beam> element's implied beam numbers, what do

> nested <beam> elements mean? To me these seem to specify the primary

> then secondary then tertiary, etc., beams for deeper and deeper nesting.

> However, the Guidelines (pg.82) say the "visual rendition of a set of

> beamed notes is presumed to be handled by rendering processes," which

> implies that secondary beaming cannot be encoded with <beam> elements.

> In fact, we could take this further and say that primary beams also

> cannot be specified with <beam> elements: the elements between <beam>

> tags are merely "explicitly beamed," in that they have at least one

> beam, but the Guidelines do not actually specify that they must share

> *the same* beam, since that decision is a visual one, and therefore

> "presumed to be handled by rendering processes." (Except, of course,

> when something like @breaksec will specify an aspect of the visual

> rendition...?)

>

> An attempted "common sense" reading of the Guidelines suggests that

> everything within a set of <beam> tags will share the same primary beam.

> Secondary beams will be specified by some built-in default, by a

> @beam.group attribute, or the @breaksec attribute. If this is the

> intended interpretation, it leaves open the question of how to handled

> nested <beam> elements.

>

> Thank you in advance for your feedback. As always, I would be happy to

> help clarify my questions if required.

>

>

> Christopher
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.uni-paderborn.de/pipermail/mei-l/attachments/20140811/d783a716/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 480 bytes
Desc: image001.png
URL: <http://lists.uni-paderborn.de/pipermail/mei-l/attachments/20140811/d783a716/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.jpg
Type: image/jpeg
Size: 3861 bytes
Desc: image004.jpg
URL: <http://lists.uni-paderborn.de/pipermail/mei-l/attachments/20140811/d783a716/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: beamExample.png
Type: image/png
Size: 1838 bytes
Desc: beamExample.png
URL: <http://lists.uni-paderborn.de/pipermail/mei-l/attachments/20140811/d783a716/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: beamExample2.png
Type: image/png
Size: 463 bytes
Desc: beamExample2.png
URL: <http://lists.uni-paderborn.de/pipermail/mei-l/attachments/20140811/d783a716/attachment-0002.png>


More information about the mei-l mailing list