davidrizo / im3

IM3 library (still unstable)
2 stars 0 forks source link

MIDI tempo #2

Open craigsapp opened 6 years ago

craigsapp commented 6 years ago

Playing back in VHV is very slow. It might be nice to add a tempo to make it easier to hear closer to performance tempo.

Here is a first approximation to the tempo:

                    <scoreDef midi.bpm="400">

More refined tempo would depend on the mensuration and the time period of the composition.

davidrizo commented 6 years ago

I suggest encoding someway in **mens the transcription equivalence of notes, that, in many cases depend on the choice of the musicologist.

As an example, in figure of page 98 of Apel's book, in C (i.e. [2,2]) mensuration, a brevis is transcribed as a half, and in C· (i.e. [2,3]) mensuration as a dotted half, but other authors (or depending on the time period) it may be encoded as other figure.

In order to avoid the perfection changes, I would encode the moden figure equivalence to an imperfect brevis.

Thus, in the Apel's example, we could encode (using TR as "transcription" - any other characters can be used) : *TRSi 2 that means transcribe imperfect as a half note

A similar thing should be encoded in MEI. While it is not encoded in MEI we can infer the suitable midi.bpm attribute

craigsapp commented 6 years ago

In **kern data I use *rscale to do the same, which means "rhythmic scaling". TR is a bit confusing since it is similar to *ITrand *Tr which is used for transposition in **kern data: http://extras.humdrum.org/man/transpose

Here is an example of *rscale in action:

screen shot 2018-04-23 at 8 51 23 am
**kern  **kern
=1  =1
*rscale:2   *
4c  4c
4d  4d
*rscale:1/4 *
4e  4e
4f  4f
*rscale:1   *
=   =
*-  *-

The *rscale indication should be sufficient for allowing reduced rhythmic notation. And when converting to **kern data, this token can be transferred directly.

I suggest encoding someway in **mens the transcription equivalence of notes, that, in many cases depend on the choice of the musicologist. As an example, in figure of page 98 of Apel's book, in C (i.e. [2,2]) mensuration, a brevis is transcribed as a half, and in C· (i.e. [2,3]) mensuration as a dotted half, but other authors (or depending on the time period) it may be encoded as other figure.

It also depends on the time period. Apel's book was published in 1942 and describes the choices of modern editors of his time. The more modern (post 1980) editorial style for scholarly editions of early music is to use the original note shapes in the modern transcription, such that breve is represented by a double-whole note (or "breve" in England), semi-breve is represented by a whole note, etc.

See the New Josquin Edition, as well as the Josquin Research Project scores, and also Karen Desmond's transcriptions of even earlier music, all of which do not do rhythmic reduction in the modern transcription.

The midi.bpm would remain tied to the semi-minim level regardless of the **rscale value.

In MEI, the above example is:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="http://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="http://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="2018-04-23T09:06:20" version="2.0.0-dev-1c60b86">
                    <name>Verovio</name>
                    <p>Transcoded from Humdrum</p>
                </application>
            </appInfo>
        </encodingDesc>
        <workDesc>
            <work>
                <titleStmt>
                    <title />
                </titleStmt>
            </work>
        </workDesc>
    </meiHead>
    <music>
        <body>
            <mdiv xml:id="mdiv-0000001917088260">
                <score xml:id="score-0000001921613552">
                    <scoreDef xml:id="scoredef-0000000645887639">
                        <staffGrp xml:id="staffgrp-0000000313354508" symbol="brace" barthru="true">
                            <staffDef xml:id="staffdef-0000001766549984" clef.shape="G" clef.line="2" n="1" lines="5">
                                <label xml:id="label-0000000660271023" />
                            </staffDef>
                            <staffDef xml:id="staffdef-0000002028126508" clef.shape="G" clef.line="2" n="2" lines="5" />
                        </staffGrp>
                    </scoreDef>
                    <section xml:id="section-0000000405322190">
                        <measure xml:id="measure-L2" n="1">
                            <staff xml:id="staff-L2F2N1" n="1">
                                <layer xml:id="layer-L2F2N1" n="1">
                                    <note xml:id="note-L4F2" dur="4" oct="4" pname="c" accid.ges="n" />
                                    <note xml:id="note-L5F2" dur="4" oct="4" pname="d" accid.ges="n" />
                                    <note xml:id="note-L7F2" dur="4" oct="4" pname="e" accid.ges="n" />
                                    <note xml:id="note-L8F2" dur="4" oct="4" pname="f" accid.ges="n" />
                                </layer>
                            </staff>
                            <staff xml:id="staff-L2F1N1" n="2">
                                <layer xml:id="layer-L2F1N1" n="1">
                                    <note xml:id="note-L4F1" dur.ges="4" dur="2" oct="4" pname="c" accid.ges="n" />
                                    <note xml:id="note-L5F1" dur.ges="4" dur="2" oct="4" pname="d" accid.ges="n" />
                                    <note xml:id="note-L7F1" dur.ges="4" dur="16" oct="4" pname="e" accid.ges="n" />
                                    <note xml:id="note-L8F1" dur.ges="4" dur="16" oct="4" pname="f" accid.ges="n" />
                                </layer>
                            </staff>
                        </measure>
                    </section>
                </score>
            </mdiv>
        </body>
    </music>
</mei>

The first two note are scaled by a factor of two, making the quarter notes twice as long to become half notes. The second two notes are scaled by a factor of 1/4, making the quarter notes 1/4 as long to become sixteenth notes.

Notice the first note in the bottom staff:

<note xml:id="note-L4F1" dur.ges="4" dur="2" oct="4" pname="c" accid.ges="n" />

@dur.ges is the "real" duration for calculating MIDI data and alignment with other parts, and @dur is the "visual" duration.

I have a tool in Humdrum Extras, called rscale, that will also convert the actual rhythms according to the given rhythmic scaling (equivalent to changing @dur in MEI files): http://extras.humdrum.org/man/rscale