Sfoglia il codice sorgente

feat(Noteheads): support breve type (brevis) (#803)

close #803
sschmid 5 anni fa
parent
commit
09fc5e74e4
1 ha cambiato i file con 4 aggiunte e 1 eliminazioni
  1. 4 1
      src/MusicalScore/Graphical/VexFlow/VexFlowConverter.ts

+ 4 - 1
src/MusicalScore/Graphical/VexFlow/VexFlowConverter.ts

@@ -58,7 +58,10 @@ export class VexFlowConverter {
     public static duration(fraction: Fraction, isTuplet: boolean): string {
       const dur: number = fraction.RealValue;
 
-      if (dur >= 1) {
+      if (dur === 2) { // Breve
+        return "1/4";
+      }
+      if (dur >= 1) { // TODO consider long (4) and maxima (8)
           return "w";
       } else if (dur < 1 && dur >= 0.5) {
         // change to the next higher straight note to get the correct note display type