|
@@ -180,6 +180,8 @@ export default defineComponent({
|
|
|
let skip = false;
|
|
|
const datas = [];
|
|
|
let selectTimes = state.times;
|
|
|
+ // 选段评测前面小节的listen、play标识
|
|
|
+ let preLyricsContent = ''
|
|
|
let unitTestIdx = 0;
|
|
|
let preTime = 0;
|
|
|
let preTimes = [];
|
|
@@ -224,6 +226,22 @@ export default defineComponent({
|
|
|
if (state.section.length === 2 && firstNoteTime === 0 && state.section[0]?.MeasureNumberXML === state.firstMeasureNumber + 1 && state.times[0].fixtime) {
|
|
|
actualBeatLength = actualBeatLength + Math.round((state.times[0].fixtime * 1000) / 1)
|
|
|
}
|
|
|
+ // 找到选段评测,开始小节前面最近的是play或者listen的小节
|
|
|
+ if (preTimes.length) {
|
|
|
+ for (let index = preTimes.length-1; index >= 0; index--) {
|
|
|
+ const item = preTimes[index]
|
|
|
+ const note = getNoteByMeasuresSlursStart(item)
|
|
|
+ if (note.formatLyricsEntries.contains('Play') || note.formatLyricsEntries.contains('Play...')) {
|
|
|
+ preLyricsContent = 'Play'
|
|
|
+ break
|
|
|
+ }
|
|
|
+ if (note.formatLyricsEntries.contains('Listen')) {
|
|
|
+ preLyricsContent = 'Listen'
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ preLyricsContent = preLyricsContent ? preLyricsContent : 'Play'
|
|
|
+ }
|
|
|
for (let index = 0; index < selectTimes.length; index++) {
|
|
|
const item = selectTimes[index];
|
|
|
const note = getNoteByMeasuresSlursStart(item);
|
|
@@ -236,6 +254,10 @@ export default defineComponent({
|
|
|
const end = difftime + (item.sourceRelaEndtime || item.relaEndtime) - starTime;
|
|
|
const isStaccato = note.noteElement.voiceEntry.isStaccato();
|
|
|
const noteRate = isStaccato ? 0.5 : 1;
|
|
|
+ // 如果选段评测,开始小节没有注脚,则取前面最近的小节的注脚
|
|
|
+ if (index == 0 && !note.formatLyricsEntries.length) {
|
|
|
+ ListenMode = preLyricsContent === 'Play' ? false : preLyricsContent === 'Listen' ? true : false
|
|
|
+ }
|
|
|
if (note.formatLyricsEntries.contains("Play") || note.formatLyricsEntries.contains("Play...")) {
|
|
|
ListenMode = false;
|
|
|
}
|