|
@@ -1219,9 +1219,11 @@ export const formateTimes = (osmd: OpenSheetMusicDisplay) => {
|
|
|
const staffEntries = note.sourceMeasure.verticalMeasureList?.[0]?.staffEntries || [];
|
|
|
//计算第一个小节里面的音符时值是否等于整个小节的时值
|
|
|
staffEntries.forEach((_a: any) => {
|
|
|
- if (_a?.sourceStaffEntry?.voiceEntries?.[0]?.notes?.[0]?.length?.realValue) {
|
|
|
- _firstMeasureRealValue += _a.sourceStaffEntry.voiceEntries[0].notes[0].length.realValue;
|
|
|
- }
|
|
|
+ // 需要过滤掉倚音音符
|
|
|
+ const matchNote = _a?.sourceStaffEntry?.voiceEntries?.length > 1 ? _a?.sourceStaffEntry?.voiceEntries.find((item: any) => !item.isGrace) : _a?.sourceStaffEntry?.voiceEntries?.[0]
|
|
|
+ if (matchNote?.notes?.[0]?.length?.realValue) {
|
|
|
+ _firstMeasureRealValue += matchNote.notes[0].length.realValue;
|
|
|
+ }
|
|
|
});
|
|
|
if (_firstMeasureRealValue < vRealValue) {
|
|
|
// console.log(_firstMeasureRealValue, vRealValue)
|