Преглед на файлове

feat: 87拍,节拍指针位置修改

TIANYONG преди 5 месеца
родител
ревизия
4fc2648923
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  1. 4 0
      src/helpers/metronome.ts

+ 4 - 0
src/helpers/metronome.ts

@@ -437,6 +437,10 @@ class Metronome {
 						beatNum += CompoundTempoArr[j];
 						currentIdx = beatNum
 					}
+					// 如果是87拍,并且是3+2+2的组合,第二拍的节拍指针需要定位到第四个音符的位置
+					if (measure.numerator === 7 && measure.denominator === 8 && measure.CompoundTempo === '3+2+2' && j === 1) {
+						currentIdx += 1;
+					}
 					if (measure.stepList[currentIdx]) {
 						left = measure.stepList[currentIdx] + "px";
 					} else {