Sfoglia il codice sorgente

Merge branch 'feature-tianyong' into klx-test

TIANYONG 2 mesi fa
parent
commit
abffae9305

+ 1 - 0
src/constant/instruments.ts

@@ -156,6 +156,7 @@ const instruments: any = {
 	Melodica: '口风琴',
 	'Snare Drum': '小军鼓',
 	'Horn in F': '圆号',
+	'Horns in F': '圆号',
 	Triangle: '三角铁',
 	Vibrato: '颤音琴',
 	'Suspend Cymbals': '吊镲',

+ 1 - 1
src/constant/instrumentsClassfiy.ts

@@ -3,7 +3,7 @@ const instrumentsClassfiy: any = {
 	"4": ["Clarinet"],
 	"6": ["Soprano Sax", "Alto Sax", "Tenor Sax", "Baritone Sax", "Soprano Saxophone", "Alto Saxophone", "Tenor Saxophone", "Baritone Saxophone"],
 	"12": ["Trumpet", "Muted Trumpet"],
-	"13": ["Horn in F", "French Horn"],
+	"13": ["Horn in F", "French Horn", "Horns in F"],
 	"14": ["Trombone"],
 	"15": ["Euphonium"],
 	"17": ["Tuba"],

+ 0 - 13
src/helpers/customMusicScore.ts

@@ -1073,19 +1073,6 @@ export const setGlobalMusicSheet = () => {
 	}
 }
 
-/** 设置自定义渐慢 */
-export const setCustomGradual = () => {
-	if (state.gradualTimes) {
-		const detailId = state.cbsExamSongId + "";
-		const partIndex = state.partIndex + "";
-		if (["12280"].includes(detailId) && ["24"].includes(partIndex)) {
-			state.gradualTimes["8"] = "00:26:10";
-			state.gradualTimes["66"] = "01:53:35";
-			state.gradualTimes["90"] = "02:41:40";
-		}
-	}
-};
-
 /** 设置自定义音符数据 */
 export const setCustomNoteRealValue = () => {
 	const detailId = state.cbsExamSongId + "";

+ 3 - 3
src/helpers/formateMusic.ts

@@ -364,7 +364,7 @@ export const isRepeatWord = (text: string): boolean => {
 export const onlyVisible = (xml: string, partIndex: number, resourceType?: string): string => {
 	if (!xml) return "";
 	// console.log('原始xml')
-	const detailId = state.examSongId + "";
+	const detailId = state.cbsExamSongId + "";
 	const xmlParse = new DOMParser().parseFromString(xml, "text/xml");
 	const partList = xmlParse.getElementsByTagName("part-list")?.[0]?.getElementsByTagName("score-part") || [];
 	const partListNames = Array.from(partList).map((item) => item.getElementsByTagName("part-name")?.[0]?.textContent?.trim() || "");
@@ -534,7 +534,7 @@ export const onlyVisible = (xml: string, partIndex: number, resourceType?: strin
 export const onlyVisible2 = (xml: string): string => {
 	if (!xml) return "";
 	// console.log('原始xml')
-	//const detailId = state.examSongId + "";
+	//const detailId = state.cbsExamSongId + "";
 	const xmlParse = new DOMParser().parseFromString(xml, "text/xml");
 	const partList = xmlParse.getElementsByTagName("part-list")?.[0]?.getElementsByTagName("score-part") || [];
 	//const partListNames = Array.from(partList).map((item) => item.getElementsByTagName("part-name")?.[0]?.textContent?.trim() || "");
@@ -815,7 +815,7 @@ export const formatXML = (xml: string, xmlUrl?: string): string => {
 export const formateTimes = (osmd: OpenSheetMusicDisplay) => {
 	const customNoteRealValue = customData.customNoteRealValue;
 	const customNoteCurrentTime = customData.customNoteCurrentTime;
-	const detailId = state.examSongId + "";
+	const detailId = state.cbsExamSongId + "";
 	const partIndex = state.partIndex + "";
 	//let fixtime = browserInfo.huawei ? 0.08 : 0; //getFixTime()
 	let fixtime = 0;

+ 1 - 2
src/page-instrument/simple-detail/index.tsx

@@ -6,7 +6,7 @@ import { getQuery } from "/src/utils/queryString";
 import { closeToast, showLoadingToast } from "vant";
 import store from "store";
 import { formateTimes } from "../../helpers/formateMusic";
-import { setCustomGradual, setCustomNoteRealValue } from "/src/helpers/customMusicScore"
+import { setCustomNoteRealValue } from "/src/helpers/customMusicScore"
 import { initSmoothAnimation, smoothAnimationState, destroySmoothAnimation, moveSmoothAnimationByPlayTime } from "../view-detail/smoothAnimation";
 import { api_cloudLoading, simple_musicPage } from "/src/helpers/communication";
 
@@ -127,7 +127,6 @@ export default defineComponent({
 			if (saveSpeed) {
 				handleSetSpeed(saveSpeed);
 			}
-			setCustomGradual();
 			setCustomNoteRealValue();
 			state.times = formateTimes(osmd);
 			console.log("🚀 ~ state.times:", state.times, state);

+ 1 - 2
src/page-instrument/view-detail/index.tsx

@@ -27,7 +27,7 @@ import TheMusicList, { isMusicList } from "../component/the-music-list";
 import { storeData } from "/src/store";
 import ViewFigner from "../view-figner";
 import ToggleMusicSheet from "/src/view/plugins/toggleMusicSheet";
-import { setCustomGradual, setCustomNoteRealValue } from "/src/helpers/customMusicScore";
+import { setCustomNoteRealValue } from "/src/helpers/customMusicScore";
 import { usePageVisibility } from "@vant/use";
 import { initMidi } from "/src/helpers/midiPlay";
 import TheAudio from "/src/components/the-audio";
@@ -224,7 +224,6 @@ export default defineComponent({
       // if (saveSpeed) {
       //   handleSetSpeed(saveSpeed);
       // }
-      setCustomGradual();
       setCustomNoteRealValue();
       state.times = formateTimes(osmd);
       // state.times = resetFrequency(state.times);

+ 2 - 0
src/view/fingering/fingering-config.ts

@@ -180,6 +180,7 @@ export const mappingVoicePart = (id: number | string, soruce: "GYM" | "COLEXIU"
       "Horn in F": 13,
       "Horn in F 1": 13,
       "Horn in F 2": 13,
+      "Horns in F": 13,
       "Trombone 1": 14,
       "Trombone 2": 14,
       "Trombone 3": 14,
@@ -292,6 +293,7 @@ export const matchVoicePart = (id: number | string, type: "SINGLE" | "CONCERT"):
       "Horn in F": 13,
       "Horn in F 1": 13,
       "Horn in F 2": 13,
+      "Horns in F": 13,
       "Trombone 1": 14,
       "Trombone 2": 14,
       "Trombone 3": 14,