Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow graphical notes in tempo settings #129

Closed
jacekiwaszko1 opened this issue Jul 16, 2018 · 4 comments
Closed

Allow graphical notes in tempo settings #129

jacekiwaszko1 opened this issue Jul 16, 2018 · 4 comments
Assignees

Comments

@jacekiwaszko1
Copy link
Collaborator

When there is a tempo setting in terms of metronome values, allow for a graphical note to be displayed. For example [quarter] = 60 MM, where [quarter] is a graphical quarter note.

This will be encoded by placing the name of the rhythm in square brackets, such as given above. This pattern will then be converted into a graphical note when converting into MEI (as a unicode symbol for a quarter note in this case.

For dotted quarter notes: [quarter-dot] should be the text representation. Also allow [whole], [half], [eighth], and [sixteenth], and [breve] for a double whole note.

craigsapp added a commit to rism-digital/verovio that referenced this issue Jul 16, 2018
@craigsapp
Copy link
Member

Partially implemented with commit rism-digital/verovio@f34343b

Only [quarter] and [eighth] will be converted to notes at the moment, along with their dotted forms: [quarter-dot] and [eighth-dot].

Examples:

screen shot 2018-07-16 at 4 21 37 pm

screen shot 2018-07-16 at 4 22 11 pm

screen shot 2018-07-16 at 4 22 51 pm

screen shot 2018-07-16 at 4 23 08 pm

@craigsapp
Copy link
Member

Now implemented in VHV:

Screen Shot 2020-01-12 at 02 43 06

Test data:

**kern
*clefG2
*M4/4
=1
!LO:TX:a:t=[breve]=80 MM
1c
=2
!LO:TX:a:t=[whole-dot]=60 M.M.
1d
=3
!LO:TX:a:t=([half]=60)
1e
=4
!LO:TX:a:t=[[quarter-dot]=60]
1f
=5
!LO:TX:a:t=Lento ([eighth]=60)
1g
=6
!LO:TX:a:t=[eighth-dot]=50
1a
=7
!LO:TX:a:t=[8]=110
1b
=8
!LO:TX:a:t=[8.]=120
1cc
=9
!LO:TX:a:t=[8-dot]=130
1dd
=10
!LO:TX:a:t=[sixteenth]=140
1ee
=10
!LO:TX:a:t=[32.]=150
1ff
=10
!LO:TX:a:t=[64]=160
1ee
=10
!LO:TX:a:t=[128]=170
1dd
=10
!LO:TX:a:t=[256]=180
1cc
=10
!LO:TX:a:t=[512]=190
1b
=10
!LO:TX:a:t=[1024.]=190
1a
==
*-

conversion from MusicXML to Humdrum is also mostly implemented.

@craigsapp
Copy link
Member

Reopen, because I should also implement !!!OMD method as well.

Note that tempo interpretations, such as *MM60, need to be added in order to actually control the tempo in MIDI rendering or in timing analysis of the data.

Note that [half]=60 is paired with *MM120, since *MM tempo information is always in reference to the quarter note.

@craigsapp craigsapp reopened this Jan 12, 2020
@craigsapp
Copy link
Member

Here is an example with !!!OMD: tempo markings.

Screen Shot 2020-01-12 at 18 06 27

Humdrum data:

!!!OMD: Allegro ([quarter-dot] = 80)
**kern
*M6/8
*MM120
=1
8cL
8d
8eJ
8cL
8d
8eJ
=2
!!!OMD: Presto ([4.] = 120)
*MM180
8cL
8d
8eJ
8cL
8d
8eJ
=2
*MM180
!LO:TX:a:t=a tempo ([quarter-dot] = 80)
8cL
8d
8eJ
8cL
8d
8eJ
==
*-

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-01-12T18:07:13" version="2.4.0-dev-f414c2d-dirty">
     <name>Verovio</name>
     <p>Transcoded from Humdrum</p>
    </application>
   </appInfo>
  </encodingDesc>
  <workList>
   <work>
    <title />
   </work>
  </workList>
  <extMeta>
   <frames xmlns="http://www.humdrum.org/ns/humxml">
    <metaFrame n="0" token="!!!OMD: Allegro ([quarter-dot] = 80)" xml:id="L1">
     <frameInfo>
      <startTime float="0" />
      <frameType>reference</frameType>
      <referenceKey>OMD</referenceKey>
      <referenceValue>Allegro ([quarter-dot] = 80)</referenceValue>
     </frameInfo>
    </metaFrame>
    <metaFrame n="12" token="!!!OMD: Presto ([4.] = 120)" xml:id="L13">
     <frameInfo>
      <startTime float="3" />
      <frameType>reference</frameType>
      <referenceKey>OMD</referenceKey>
      <referenceValue>Presto ([4.] = 120)</referenceValue>
     </frameInfo>
    </metaFrame>
   </frames>
  </extMeta>
 </meiHead>
 <music>
  <body>
   <mdiv xml:id="mdiv-0000001518978466">
    <score xml:id="score-0000000185482526">
     <scoreDef xml:id="scoredef-0000001732822319" midi.bpm="120">
      <staffGrp xml:id="staffgrp-0000000552538887">
       <staffDef xml:id="staffdef-0000000449355207" n="1" lines="5">
        <clef xml:id="clef-0000000537221906" shape="G" line="2" />
        <meterSig xml:id="metersig-L3F1" count="6" unit="8" />
       </staffDef>
      </staffGrp>
     </scoreDef>
     <section xml:id="section-L2F1">
      <measure xml:id="measure-L1">
       <staff xml:id="staff-0000000880364599" n="1">
        <layer xml:id="layer-L2F1N1" n="1">
         <beam xml:id="beam-L6F1-L8F1">
          <note xml:id="note-L6F1" dur="8" oct="4" pname="c" accid.ges="n" />
          <note xml:id="note-L7F1" dur="8" oct="4" pname="d" accid.ges="n" />
          <note xml:id="note-L8F1" dur="8" oct="4" pname="e" accid.ges="n" />
         </beam>
         <beam xml:id="beam-L9F1-L11F1">
          <note xml:id="note-L9F1" dur="8" oct="4" pname="c" accid.ges="n" />
          <note xml:id="note-L10F1" dur="8" oct="4" pname="d" accid.ges="n" />
          <note xml:id="note-L11F1" dur="8" oct="4" pname="e" accid.ges="n" />
         </beam>
        </layer>
       </staff>
       <tempo xml:id="tempo-L1F1" staff="1" tstamp="1.000000">Allegro (<rend xml:id="rend-0000001023267855" fontname="VerovioText"></rend> = 80)</tempo>
      </measure>
      <measure xml:id="measure-L12" n="2">
       <staff xml:id="staff-L12F1N1" n="1">
        <layer xml:id="layer-L12F1N1" n="1">
         <beam xml:id="beam-L15F1-L17F1">
          <note xml:id="note-L15F1" dur="8" oct="4" pname="c" accid.ges="n" />
          <note xml:id="note-L16F1" dur="8" oct="4" pname="d" accid.ges="n" />
          <note xml:id="note-L17F1" dur="8" oct="4" pname="e" accid.ges="n" />
         </beam>
         <beam xml:id="beam-L18F1-L20F1">
          <note xml:id="note-L18F1" dur="8" oct="4" pname="c" accid.ges="n" />
          <note xml:id="note-L19F1" dur="8" oct="4" pname="d" accid.ges="n" />
          <note xml:id="note-L20F1" dur="8" oct="4" pname="e" accid.ges="n" />
         </beam>
        </layer>
       </staff>
       <tempo xml:id="tempo-L13F1" staff="1" tstamp="1.000000">Presto (<rend xml:id="rend-0000001124222060" fontname="VerovioText"></rend> = 120)</tempo>
      </measure>
      <measure xml:id="measure-L21" right="end" n="2">
       <staff xml:id="staff-L21F1N1" n="1">
        <layer xml:id="layer-L21F1N1" n="1">
         <beam xml:id="beam-L24F1-L26F1">
          <note xml:id="note-L24F1" dur="8" oct="4" pname="c" accid.ges="n" />
          <note xml:id="note-L25F1" dur="8" oct="4" pname="d" accid.ges="n" />
          <note xml:id="note-L26F1" dur="8" oct="4" pname="e" accid.ges="n" />
         </beam>
         <beam xml:id="beam-L27F1-L29F1">
          <note xml:id="note-L27F1" dur="8" oct="4" pname="c" accid.ges="n" />
          <note xml:id="note-L28F1" dur="8" oct="4" pname="d" accid.ges="n" />
          <note xml:id="note-L29F1" dur="8" oct="4" pname="e" accid.ges="n" />
         </beam>
        </layer>
       </staff>
       <tempo xml:id="tempo-L24F1" place="above" staff="1" tstamp="1.000000">a tempo (<rend xml:id="rend-0000000810288529" fontname="VerovioText"></rend> = 80)</tempo>
      </measure>
     </section>
    </score>
   </mdiv>
  </body>
 </music>
</mei>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants