Git Product home page Git Product logo

Comments (2)

craigsapp avatar craigsapp commented on June 23, 2024

The example in the documentation of non lazy beaming contains a k signifier that is not explained (I'm sorry if I'm missing something). In fact, if removed the result is the same

The k means a flag (partial beam) on the note that extends to the left. A K means a partial beam to the right. k vs. K cannot be controlled in verovio (I believe), so that is one reason why the result is the same). These controls probably have an effect in mup, which was the original notation system used for Humdrum data (via the ms command in the Humdrum Toolkit).

Here is an example of K and k in the same beam:

kK

the second flag on the third note is incorrectly positioned to the left (k), and should go to the right (K), but there is no control to correct it in verovio currently.


Somewhat related explanations:

MEI (and by extension verovio) only does lazy beaming, which is another reason why beaming information might not change. To control the visual aspect of the beams (such as how many beam lines), note@dur is used (and [email protected] gives the "true" duration if it conflicts with the visual duration).

Here are examples of how to control the beaming in MEI from Humdrum (where the beaming is always interpreted as lazy):

beaming

There are two methods:

(1) Use an *rscale tandem interpretation to set a rhythmic scaling. In the example, the durations of the notes are multiplied by 2 to convert from sixteenth notes to eighth notes. Then use *rscale:1 to cancel the rhythmic scaling.

(2) Use a note layout parameter !LO:N to control the visual rhythm of each note (making all of them appear like eighth notes in this case). This method is more suitable for changing the visual duration of single notes, while the rscale method is best for changing a sequence of notes by the same factor.

Humdrum data for example:

**kern
=1
16cLL
16d
16e
16fJJ
*rscale:2
16cLL
16d
16e
16fJJ
*rscale:1
16cLL
16d
16e
16fJJ
!LO:N:vis=8
16cLL
!LO:N:vis=8
16d
!LO:N:vis=8
16e
!LO:N:vis=8
16fJJ
*-

MEI conversion

<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="https://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<mei xmlns="http://www.music-encoding.org/ns/mei" meiversion="4.0.0">
    <meiHead>
        <fileDesc>
            <titleStmt>
                <title />
            </titleStmt>
            <pubStmt />
        </fileDesc>
        <encodingDesc>
            <appInfo>
                <application isodate="2020-04-25T11:30:10" version="2.7.0-dev-9b84e3d">
                    <name>Verovio</name>
                    <p>Transcoded from Humdrum</p>
                </application>
            </appInfo>
        </encodingDesc>
        <workList>
            <work>
                <title />
            </work>
        </workList>
    </meiHead>
    <music>
        <body>
            <mdiv xml:id="mdiv-0000000340418143">
                <score xml:id="score-0000001581373570">
                    <scoreDef xml:id="scoredef-0000001825449832">
                        <staffGrp xml:id="staffgrp-0000000684956137">
                            <staffDef xml:id="staffdef-0000000033103376" n="1" lines="5">
                                <clef xml:id="clef-0000000136949060" shape="G" line="2" />
                            </staffDef>
                        </staffGrp>
                    </scoreDef>
                    <section xml:id="section-L1F1">
                        <measure xml:id="measure-L1" right="invis" n="1">
                            <staff xml:id="staff-0000002137158120" n="1">
                                <layer xml:id="layer-L1F1N1" n="1">
                                    <beam xml:id="beam-L3F1-L6F1">
                                        <note xml:id="note-L3F1" dur="16" oct="4" pname="c" accid.ges="n" />
                                        <note xml:id="note-L4F1" dur="16" oct="4" pname="d" accid.ges="n" />
                                        <note xml:id="note-L5F1" dur="16" oct="4" pname="e" accid.ges="n" />
                                        <note xml:id="note-L6F1" dur="16" oct="4" pname="f" accid.ges="n" />
                                    </beam>
                                    <beam xml:id="beam-L8F1-L11F1">
                                        <note xml:id="note-L8F1" dur.ges="16" dur="8" oct="4" pname="c" accid.ges="n" />
                                        <note xml:id="note-L9F1" dur.ges="16" dur="8" oct="4" pname="d" accid.ges="n" />
                                        <note xml:id="note-L10F1" dur.ges="16" dur="8" oct="4" pname="e" accid.ges="n" />
                                        <note xml:id="note-L11F1" dur.ges="16" dur="8" oct="4" pname="f" accid.ges="n" />
                                    </beam>
                                    <beam xml:id="beam-L13F1-L16F1">
                                        <note xml:id="note-L13F1" dur="16" oct="4" pname="c" accid.ges="n" />
                                        <note xml:id="note-L14F1" dur="16" oct="4" pname="d" accid.ges="n" />
                                        <note xml:id="note-L15F1" dur="16" oct="4" pname="e" accid.ges="n" />
                                        <note xml:id="note-L16F1" dur="16" oct="4" pname="f" accid.ges="n" />
                                    </beam>
                                    <beam xml:id="beam-L18F1-L24F1">
                                        <note xml:id="note-L18F1" dur.ges="16" dur="8" oct="4" pname="c" accid.ges="n" />
                                        <note xml:id="note-L20F1" dur.ges="16" dur="8" oct="4" pname="d" accid.ges="n" />
                                        <note xml:id="note-L22F1" dur.ges="16" dur="8" oct="4" pname="e" accid.ges="n" />
                                        <note xml:id="note-L24F1" dur.ges="16" dur="8" oct="4" pname="f" accid.ges="n" />
                                    </beam>
                                </layer>
                            </staff>
                        </measure>
                    </section>
                </score>
            </mdiv>
        </body>
    </music>
</mei>

from vhv-documentation.

craigsapp avatar craigsapp commented on June 23, 2024

For the second example:

If we want to encode the same number of beams of the example we need to use a non-lazy approach, we get no note beamed

You had a typo in the example: there is a missing J on the last note of the beamed group (you have two, but there should be three):

balance

The converter from Humdrum to MEI will refuse to convert any beam on a staff in a measure if the 'L' and 'J' counts do not match (this is true of both lazy and non-lazy beaming where they always have to match). This is mostly for visually identifying unbalanced beaming in the notation. When cross-beaming is allowed, I will have to think how to deal with this rule (such as allow the sum of two adjacent measures to have balanced 'L' and 'J', or mark somehow that a beam is allowed to cross the staff.


The exact beaming is needed in this case if you want to capture the beam depth of "1" over the clef. By default verovio will choose two beamlets in this case. And to break the beamlet to the primary beam, note@breaksec="1" needs to be added to change to 1 beam instead of 2. This is controlled in the converter from Humdrum to MEI with the non-lazy beaming method:

beambreak

MEI conversion:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="https://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<mei xmlns="http://www.music-encoding.org/ns/mei" meiversion="4.0.0">
    <meiHead>
        <fileDesc>
            <titleStmt>
                <title />
            </titleStmt>
            <pubStmt />
        </fileDesc>
        <encodingDesc>
            <appInfo>
                <application isodate="2020-04-25T12:15:54" version="2.7.0-dev-9b84e3d">
                    <name>Verovio</name>
                    <p>Transcoded from Humdrum</p>
                </application>
            </appInfo>
        </encodingDesc>
        <workList>
            <work>
                <title />
            </work>
        </workList>
    </meiHead>
    <music>
        <body>
            <mdiv xml:id="mdiv-0000000023058483">
                <score xml:id="score-0000000431115248">
                    <scoreDef xml:id="scoredef-0000000586266704">
                        <staffGrp xml:id="staffgrp-0000001700744968">
                            <staffDef xml:id="staffdef-0000001406253599" n="1" lines="5">
                                <clef xml:id="clef-0000000315455034" shape="G" line="2" />
                            </staffDef>
                        </staffGrp>
                    </scoreDef>
                    <section xml:id="section-L1F1">
                        <measure xml:id="measure-L1">
                            <staff xml:id="staff-0000000109353177" n="1">
                                <layer xml:id="layer-L1F1N1" n="1">
                                    <beam xml:id="beam-L3F1-L6F1">
                                        <note xml:id="note-L3F1" dur="32" oct="4" pname="c" accid.ges="n" />
                                        <note xml:id="note-L4F1" dur="32" oct="4" pname="d" accid.ges="n" />
                                        <note xml:id="note-L5F1" dur="32" oct="4" pname="e" accid.ges="n" />
                                        <note xml:id="note-L6F1" dur="32" oct="4" pname="f" accid.ges="n" />
                                    </beam>
                                    <beam xml:id="beam-L7F1-L10F1">
                                        <note xml:id="note-L7F1" dur="32" oct="4" pname="c" accid.ges="n" />
                                        <note xml:id="note-L8F1" breaksec="2" dur="32" oct="4" pname="d" accid.ges="n" />
                                        <note xml:id="note-L9F1" dur="32" oct="4" pname="e" accid.ges="n" />
                                        <note xml:id="note-L10F1" dur="32" oct="4" pname="f" accid.ges="n" />
                                    </beam>
                                    <beam xml:id="beam-L11F1-L14F1">
                                        <note xml:id="note-L11F1" dur="32" oct="4" pname="c" accid.ges="n" />
                                        <note xml:id="note-L12F1" breaksec="1" dur="32" oct="4" pname="d" accid.ges="n" />
                                        <note xml:id="note-L13F1" dur="32" oct="4" pname="e" accid.ges="n" />
                                        <note xml:id="note-L14F1" dur="32" oct="4" pname="f" accid.ges="n" />
                                    </beam>
                                </layer>
                            </staff>
                        </measure>
                    </section>
                </score>
            </mdiv>
        </body>
    </music>
</mei>

This can also be done by lazy beaming, by placing LL at the start of the beam, JJ at the end of the beam, and then using J/L to control the location of beam break(s) within the measure.


For the second beam, lazy beaming will work. The first note of the beam should have a K for non-lazy beaming, but k/K are currently ignored when converting from Humdrum to MEI.

Starting the beam on the rests is causing a bug in verovio. Verovio beaming was recently redone, and the bug probably happened at that time. The problem is that the rest has no stem, so some very low default value is being used.

from vhv-documentation.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.