|
@@ -302,6 +302,8 @@ const formatTimes = () => {
|
|
// 阶段评测前一个节拍的标示
|
|
// 阶段评测前一个节拍的标示
|
|
let preLyricsContent = ''
|
|
let preLyricsContent = ''
|
|
let preTimes = []
|
|
let preTimes = []
|
|
|
|
+ let unitTestIdx = 0
|
|
|
|
+ let preTime = 0
|
|
if (unitTestData.isSelectMeasureMode) {
|
|
if (unitTestData.isSelectMeasureMode) {
|
|
const startIndex = detailState.times.findIndex(
|
|
const startIndex = detailState.times.findIndex(
|
|
(n: any) => n.NoteToGraphicalNoteObjectId == detailState.section[0].NoteToGraphicalNoteObjectId
|
|
(n: any) => n.NoteToGraphicalNoteObjectId == detailState.section[0].NoteToGraphicalNoteObjectId
|
|
@@ -309,6 +311,9 @@ const formatTimes = () => {
|
|
const endIndex = detailState.times.findIndex(
|
|
const endIndex = detailState.times.findIndex(
|
|
(n: any) => n.NoteToGraphicalNoteObjectId == detailState.section[1].NoteToGraphicalNoteObjectId
|
|
(n: any) => n.NoteToGraphicalNoteObjectId == detailState.section[1].NoteToGraphicalNoteObjectId
|
|
)
|
|
)
|
|
|
|
+ if (startIndex > 1) {
|
|
|
|
+ preTime = detailState.times[startIndex-1].time * 1000
|
|
|
|
+ }
|
|
times = detailState.times.filter((n: any, index: number) => {
|
|
times = detailState.times.filter((n: any, index: number) => {
|
|
return index >= startIndex && index <= endIndex
|
|
return index >= startIndex && index <= endIndex
|
|
})
|
|
})
|
|
@@ -318,6 +323,7 @@ const formatTimes = () => {
|
|
starTime = times[0].sourceRelativeTime || times[0].relativeTime
|
|
starTime = times[0].sourceRelativeTime || times[0].relativeTime
|
|
actualBeatLength = startIndex == 0 && !detailState.needTick ? actualBeatLength : 0
|
|
actualBeatLength = startIndex == 0 && !detailState.needTick ? actualBeatLength : 0
|
|
// console.log("🚀 ~ times", times, '开始小节', startIndex, actualBeatLength)
|
|
// console.log("🚀 ~ times", times, '开始小节', startIndex, actualBeatLength)
|
|
|
|
+ unitTestIdx = startIndex
|
|
}
|
|
}
|
|
// 找到阶段评测,开始小节前面最近的是play或者listen的小节
|
|
// 找到阶段评测,开始小节前面最近的是play或者listen的小节
|
|
if (preTimes.length) {
|
|
if (preTimes.length) {
|
|
@@ -337,7 +343,7 @@ const formatTimes = () => {
|
|
}
|
|
}
|
|
let measureIndex = -1
|
|
let measureIndex = -1
|
|
let recordMeasure = -1
|
|
let recordMeasure = -1
|
|
- let firstNoteTime = times[0].time * 1000
|
|
|
|
|
|
+ let firstNoteTime = unitTestIdx > 1 ? preTime : 0
|
|
for (let index = 0; index < times.length; index++) {
|
|
for (let index = 0; index < times.length; index++) {
|
|
const item = times[index]
|
|
const item = times[index]
|
|
const note = getNoteByMeasuresSlursStart(item)
|
|
const note = getNoteByMeasuresSlursStart(item)
|