-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
addition of events/controlevents and timestamps
- Loading branch information
Showing
7 changed files
with
86 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
_guidelines-v4/01-introduction/02-basicconcepts/03-timestamps.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
version: "v4" | ||
title: "Timestamps in MEI" | ||
sectionid: "timestamps" | ||
--- | ||
|
||
In MEI, timestamps are treated in a slightly simplified way: they have no notion of *beat*. Instead, timestamps rely solely on the numbers given in the meter signature. In a measure of 4/4, timestamps will range from 1 to 4. The second eighth note will be 1.5 in this case. If the same measure would be given in 2/2, it would be 1.25 instead. | ||
|
||
{% include desc atts="att.timestamp.logical/tstamp" %} | ||
|
||
At this point, MEI uses real numbers only to express timestamps. In case of (nested or complex) tuplets, this solution is inferior to fractions because of rounding errors. It is envisioned to introduce a fraction-based value for timestamps in a future revision of MEI. For now, it is recommended to round the fractional part of the number to no more than five digits to avoid such problems. | ||
|
||
Durations may also be expressed based on timestamps. In this case, the values are a combination of the *count of measures* that need to be moved forward to reach the measure in which an encoded feature ends, and the *timestamp* within that measure. | ||
|
||
{% include desc atts="att.timestamp2.logical/tstamp2" %} | ||
|
||
The following example contains a number of {% include link elem="slur"%} examples illustrating durations expressed by timestamps. | ||
|
||
{% include mei example="shared/timestamp-durations1.txt" valid="" %} | ||
|
||
Sometimes, timestamps are used to indicate positions where no music *Events* are located (see {% include link id="eventsControlevents" %}). Therefore, the allowed range of timestamps stretches from 0 to the current meter count + 1. By definition, a timestamp of 1 indicates the position of the left barline, while a timestamp of 5 (in case of a 4/4 meter) indicates the right barline. This makes it possible to encode open-ended slurs in a graphical way. However, it should be kept in mind that such timestamps may not be converted to *@startid* and *@endid*, and not every application may be able to render them correctly, even though they are perfectly valid MEI, and sometimes are necessary to faithfully transcribe a source. |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<measure n="10"> | ||
<staff n="1"> | ||
<layer> | ||
<note pname="f" oct="4" dur="4"/> | ||
<note pname="g" oct="4" dur="4" xml:id="c4ded06ff"/> | ||
<note pname="a" oct="4" dur="4"/> | ||
<note pname="c" oct="5" dur="4"/> | ||
</layer> | ||
</staff> | ||
<dynam startid="#c4ded06ff">f</dynam> | ||
</measure> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<measure n="10"> | ||
<staff n="1"> | ||
<layer n="1"> | ||
<note pname="f" oct="4" dur="4"/> | ||
<note pname="g" oct="4" dur="4"/> | ||
<note pname="a" oct="4" dur="4"/> | ||
<note pname="c" oct="5" dur="4"/> | ||
</layer> | ||
</staff> | ||
<dynam staff="1" layer="1" tstamp="2">f</dynam> | ||
</measure> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<!-- slur starting on timestamp 1, ending on timestamp 4 of the same measure --> | ||
<slur tstamp="1" tstamp2="0m+4"/> | ||
|
||
<!-- slur ending on timestamp 1 of the following measure --> | ||
<slur tstamp="1" tstamp2="1m+1"/> | ||
|
||
<!-- slur ending on timestamp 2.5 in the second next measure --> | ||
<slur tstamp="1" tstamp2="2m+2.5"/> |