|
@@ -1121,8 +1121,8 @@ export const formateTimes = (osmd: OpenSheetMusicDisplay) => {
|
|
|
// 范围内小节
|
|
|
const inFiestOrLastMeasure = first.closedMeasureIndex !== measureListIndex && last.closedMeasureIndex !== measureListIndex;
|
|
|
if (inTheFirstMeasure || inTheLastMeasure || inFiestOrLastMeasure) {
|
|
|
- const startTime = state.gradualTimes[first.measureIndex+1];
|
|
|
- const endTime = state.gradualTimes[last.measureIndex+1];
|
|
|
+ const startTime = state.gradualTimes[first.measureIndex];
|
|
|
+ const endTime = state.gradualTimes[last.measureIndex];
|
|
|
if (startTime && endTime) {
|
|
|
const times = continuous - first.leftDuration / first.allDuration + last.leftDuration / last.allDuration;
|
|
|
const diff = dayjs(tranTime(endTime)).diff(dayjs(tranTime(startTime)), "millisecond");
|
|
@@ -1260,7 +1260,7 @@ export const formateTimes = (osmd: OpenSheetMusicDisplay) => {
|
|
|
*/
|
|
|
if (state.isEvxml && note.isRestFlag && note?.noteTimeInfo?.length === 0 && state.xmlHasTimes ) {
|
|
|
const idx = _notes.findIndex(item=>item.note === note);
|
|
|
- const allowRange = Math.abs(_notes[idx+1]?.note?.noteTimeInfo?.[0]?.begin - _notes[idx-1]?.note?.noteTimeInfo?.[0]?.end) < 10;
|
|
|
+ const allowRange = Math.abs(_notes[idx+1]?.note?.noteTimeInfo?.[0]?.begin*1000 - _notes[idx-1]?.note?.noteTimeInfo?.[0]?.end*1000) < 10;
|
|
|
if (allowRange) {
|
|
|
note.maxNoteNum = note.maxNoteNum - 1;
|
|
|
// 唱名时间补齐,当删除这个音符的时候,上个音符的持续时间要加上这个音符的时间
|