|
@@ -381,7 +381,7 @@ const formatTimes = () => {
|
|
|
preLyricsContent = preLyricsContent ? preLyricsContent : 'Play'
|
|
|
}
|
|
|
// 阶段评测beatLength需要加上预备小节的持续时长
|
|
|
- actualBeatLength = preTimes.length ? actualBeatLength + preTimes[preTimes.length - 1].duration * 1000 : actualBeatLength
|
|
|
+ actualBeatLength = preTimes.length ? actualBeatLength + preTimes[preTimes.length - 1].measureLength * 1000 : actualBeatLength
|
|
|
let measureIndex = -1
|
|
|
let recordMeasure = -1
|
|
|
let firstNoteTime = unitTestIdx > 1 ? preTime : 0
|
|
@@ -432,7 +432,8 @@ const formatTimes = () => {
|
|
|
nextFrequency: formatPitch(item.noteElement?.pitch?.nextFrequency),
|
|
|
prevFrequency: formatPitch(item.noteElement?.pitch?.prevFrequency),
|
|
|
measureIndex: measureIndex, //note.measureOpenIndex,
|
|
|
- measureRenderIndex: note.noteElement.sourceMeasure.measureListIndex,
|
|
|
+ // measureRenderIndex: note.noteElement.sourceMeasure.measureListIndex,
|
|
|
+ measureRenderIndex: item.measureNumberPrinted >= 1 ? item.measureNumberPrinted - 1 : note.noteElement.sourceMeasure.measureListIndex,
|
|
|
dontEvaluating: ListenMode || dontEvaluatingMode || item.skipMode,
|
|
|
musicalNotesIndex: index, //item.i,
|
|
|
denominator: note.noteElement?.Length.denominator,
|
|
@@ -448,11 +449,13 @@ const formatTimes = () => {
|
|
|
}
|
|
|
}
|
|
|
const connect = async () => {
|
|
|
+ detailState.firstNoteTime = 0;
|
|
|
const search = useOriginSearch()
|
|
|
connentLoading.value = true
|
|
|
const behaviorId = sessionStorage.getItem('behaviorId') || search.behaviorId || initBehaviorId
|
|
|
const rate = runtime.speed / detailState.baseSpeed //1
|
|
|
calculateInfo = formatTimes()
|
|
|
+ detailState.firstNoteTime = calculateInfo.firstNoteTime;
|
|
|
const content = {
|
|
|
musicXmlInfos: calculateInfo.datas,
|
|
|
firstNoteTime: calculateInfo.firstNoteTime,
|
|
@@ -816,6 +819,7 @@ const sendResult = (evt?: IPostMessage) => {
|
|
|
}
|
|
|
}
|
|
|
const setEvaluatings = (note: any, data: any, dontTransition = false) => {
|
|
|
+ // console.log('note',note,data)
|
|
|
const startNote = getBoundingBoxByverticalNote(note)
|
|
|
// console.log(detailState.evaluatings, startNote)
|
|
|
detailState.evaluatings = {
|
|
@@ -843,13 +847,16 @@ const sendResult = (evt?: IPostMessage) => {
|
|
|
setEvaluatings(time, data)
|
|
|
} else {
|
|
|
for (const item of time.noteElement.tie.notes) {
|
|
|
+ const currentMeasureNum = time.noteElement.measureNumber;
|
|
|
const note = getParentNote(item)
|
|
|
if (!note) continue
|
|
|
- setEvaluatings(
|
|
|
- note,
|
|
|
- data,
|
|
|
- item.NoteToGraphicalNoteObjectId !== time.noteElement.tie.StartNote?.NoteToGraphicalNoteObjectId
|
|
|
- )
|
|
|
+ if (note.measureNumberPrinted === currentMeasureNum) {
|
|
|
+ setEvaluatings(
|
|
|
+ note,
|
|
|
+ data,
|
|
|
+ item.NoteToGraphicalNoteObjectId !== time.noteElement.tie.StartNote?.NoteToGraphicalNoteObjectId
|
|
|
+ )
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
break
|