|
@@ -665,10 +665,13 @@ export const onEnded = () => {
|
|
};
|
|
};
|
|
|
|
|
|
// 根据当前小节动态设置,右上角展示的速度
|
|
// 根据当前小节动态设置,右上角展示的速度
|
|
-const dynamicShowPlaySpeed = (index: number) => {
|
|
|
|
|
|
+const dynamicShowPlaySpeed = (index: number, isPlaying?: boolean) => {
|
|
if (!headerColumnHide.value) {
|
|
if (!headerColumnHide.value) {
|
|
- // console.log('动态计算速度')
|
|
|
|
const item: any = state.times[index];
|
|
const item: any = state.times[index];
|
|
|
|
+ if (state.section.length === 2 && item.MeasureNumberXML === state.sectionFirst.MeasureNumberXML) {
|
|
|
|
+ state.speed = state.section[0].measureSpeed || state.speed
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
if (item && item.measureSpeed ) {
|
|
if (item && item.measureSpeed ) {
|
|
// console.log('速度1',item.measureSpeed)
|
|
// console.log('速度1',item.measureSpeed)
|
|
const newSpeed = Math.floor(state.basePlayRate * item.measureSpeed)
|
|
const newSpeed = Math.floor(state.basePlayRate * item.measureSpeed)
|
|
@@ -771,7 +774,7 @@ const handlePlaying = () => {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
gotoNext(item);
|
|
gotoNext(item);
|
|
- dynamicShowPlaySpeed(item.i);
|
|
|
|
|
|
+ dynamicShowPlaySpeed(item.i, true);
|
|
}
|
|
}
|
|
|
|
|
|
// 评测不播放叮咚节拍器
|
|
// 评测不播放叮咚节拍器
|
|
@@ -1488,10 +1491,17 @@ function initMusicSource(data: any, tracks: string[], partIndex: number, workRec
|
|
accompanyObj = musicSheetAccompanimentList.find((item: any) => {
|
|
accompanyObj = musicSheetAccompanimentList.find((item: any) => {
|
|
return item.audioPlayType === "PLAY"
|
|
return item.audioPlayType === "PLAY"
|
|
})
|
|
})
|
|
- // 是否全声部(isAllSubject)为true 时候没有乐器只有一个原音(比如节奏练习,这个曲子全部乐器都支持);当前用户有乐器就匹配 不然取第一个原音
|
|
|
|
- musicObj = musicSheetSoundList.find((item: any) => {
|
|
|
|
- return isAllSubject ? item.audioPlayType === "PLAY" : (item.audioPlayType === "PLAY" && item.musicalInstrumentId == instrumentId)
|
|
|
|
- })
|
|
|
|
|
|
+ // 如果specialInstrumentIds有多个,是打击乐的声部,打击乐声部可能有多个乐器id
|
|
|
|
+ if (storeData.user?.specialInstrumentIds?.length) {
|
|
|
|
+ musicObj = musicSheetSoundList.find((item: any) => {
|
|
|
|
+ return isAllSubject ? item.audioPlayType === "PLAY" : (item.audioPlayType === "PLAY" && storeData.user?.specialInstrumentIds?.includes(item.musicalInstrumentId))
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ // 是否全声部(isAllSubject)为true 时候没有乐器只有一个原音(比如节奏练习,这个曲子全部乐器都支持);当前用户有乐器就匹配 不然取第一个原音
|
|
|
|
+ musicObj = musicSheetSoundList.find((item: any) => {
|
|
|
|
+ return isAllSubject ? item.audioPlayType === "PLAY" : (item.audioPlayType === "PLAY" && item.musicalInstrumentId == instrumentId)
|
|
|
|
+ })
|
|
|
|
+ }
|
|
// 当没有找到原音的时候,并且instrumentId没有值的时候,取默认第一个乐器
|
|
// 当没有找到原音的时候,并且instrumentId没有值的时候,取默认第一个乐器
|
|
if(!musicObj && !instrumentId){
|
|
if(!musicObj && !instrumentId){
|
|
musicObj = musicSheetSoundList.find((item: any) => {
|
|
musicObj = musicSheetSoundList.find((item: any) => {
|