소스 검색

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

close #803
sschmid 5 년 전
부모
커밋
09fc5e74e4
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  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