diff --git a/history.md b/history.md index 129f1d69..2bee8609 100644 --- a/history.md +++ b/history.md @@ -1,6 +1,10 @@ ### Version History +#### v0.8.11 +- Another bugfix: The `endid` of MEI `tie` elements was not properly resolved. + + #### v0.8.10 - Bugfix: If an MEI `space` element was in a `layer` environment, it was falsely interpreted as textual gap. However, it is a musical gap and should be interpreted as rest. diff --git a/src/meico/Meico.java b/src/meico/Meico.java index 8cb721fb..9dc45d56 100644 --- a/src/meico/Meico.java +++ b/src/meico/Meico.java @@ -5,7 +5,7 @@ * @author Axel Berndt */ public class Meico { - public static final String version = "0.8.10"; + public static final String version = "0.8.11"; public static void main(String[] args) { System.out.println("meico v" + Meico.version); diff --git a/src/meico/mei/Helper.java b/src/meico/mei/Helper.java index 3958e497..89a59fa4 100644 --- a/src/meico/mei/Helper.java +++ b/src/meico/mei/Helper.java @@ -915,7 +915,7 @@ private int getTie(String id) { protected void checkTies(Element e) { String id = "#" + Helper.getAttributeValue("id", e); // get id of the current element for (int j = this.getTie(id); j >= 0; j = this.getTie(id)) { // find all pending elements in the ties list to be finished at this element - Attribute a = this.ties.get(j).getAttribute("tie"); // get its tie attribute if it has one + Attribute a = e.getAttribute("tie"); // get its tie attribute if it has one if (a != null) { // if the note has already a tie attribute if (a.getValue().equals("i")) // but it says that the tie is initial a.setValue("m"); // make an intermediate tie out of it @@ -923,7 +923,7 @@ else if (a.getValue().equals("n")) // but it says "no t a.setValue("t"); // make a terminal tie out of it } else { // otherwise the element had no tie attribute - this.ties.get(j).addAttribute(new Attribute("tie", "t")); // hence, we add a terminal tie attribute + e.addAttribute(new Attribute("tie", "t")); // hence, we add a terminal tie attribute } this.ties.remove(j); // remove element from list, it is finished } diff --git a/src/meico/mei/Mei.java b/src/meico/mei/Mei.java index 8e6bd58c..27cbea27 100644 --- a/src/meico/mei/Mei.java +++ b/src/meico/mei/Mei.java @@ -2671,8 +2671,23 @@ else if (a.getValue().equals("n")) // but it says "no tie" note.addAttribute(new Attribute("tie", "i")); // hence, we add an initial tie attribute } - this.helper.ties.add(tie); // add the tie to the ties list - } + this.helper.ties.add(tie); // add the tie to the ties list + } + +// // find the endid note and set its tie attribute +// note = this.helper.allNotesAndChords.get(tie.getAttributeValue("endid").trim().replace("#", "")); +// if (note != null) { +// Attribute a = note.getAttribute("tie"); // get its tie attribute if it has one +// if (a != null) { // if the note has already a tie attribute +// if (a.getValue().equals("i")) // but it says that the tie starts here +// a.setValue("m"); // make an intermediate tie out of it +// else if (a.getValue().equals("n")) // but it says "no tie" +// a.setValue("t"); // make a terminal tie out of it +// } +// else { // otherwise the element had no tie attribute +// note.addAttribute(new Attribute("tie", "t")); // hence, we add an terminal tie attribute +// } +// } } /**