|
@@ -57,8 +57,7 @@ export type IVocals =
|
|
|
export const mappingVoicePart = (
|
|
|
id: number | string,
|
|
|
soruce: "GYM" | "COLEXIU" | "ORCHESTRA" | "INSTRUMENT"
|
|
|
-): number | string => {
|
|
|
- console.log(1)
|
|
|
+): number => {
|
|
|
if (soruce === "GYM") {
|
|
|
return Number(id);
|
|
|
} else if (soruce === "COLEXIU") {
|
|
@@ -98,41 +97,11 @@ export const mappingVoicePart = (
|
|
|
return subject[id];
|
|
|
} else if (soruce === "INSTRUMENT") {
|
|
|
let code = id;
|
|
|
- // if (typeof code === "string") {
|
|
|
- // //code = code.toLocaleLowerCase().replace(/ /g, "");
|
|
|
- // code = code.toLocaleLowerCase().split(' ')[0]
|
|
|
- // }
|
|
|
+ if (typeof code === "string") {
|
|
|
+ code = code.toLocaleLowerCase().replace(/ /g, "");
|
|
|
+ }
|
|
|
const subject: { [_key: string | number]: any } = {
|
|
|
- "Flute 1": 2,
|
|
|
- "Flute 2": 2,
|
|
|
- "Oboe": 4,
|
|
|
- "Clarinet in Bb 1": 4,
|
|
|
- "Clarinet in Bb 2": 4,
|
|
|
- "Alto Clarinet in Eb": 4,
|
|
|
- "Bass Clarinet in Bb": 4,
|
|
|
- "Bassoon": 1,
|
|
|
- "Alto Saxophone": 5,
|
|
|
- "Tenor Saxophone": 5,
|
|
|
- "Baritone Saxophone": 5,
|
|
|
- "Trumpet in Bb 1": 12,
|
|
|
- "Trumpet in Bb 2": 12,
|
|
|
- "Horn in F": 13,
|
|
|
- "Trombone 1": 14,
|
|
|
- "Trombone 2": 14,
|
|
|
- "Euphonium": 15,
|
|
|
- "Tuba": 17,
|
|
|
- "Chimes": 1,
|
|
|
- "Bells": 1,
|
|
|
- "Xylophone": 1,
|
|
|
- "Snare Drum": 1,
|
|
|
- "Bass Drum": 1,
|
|
|
- "Triangle": 1,
|
|
|
- "Suspended Cymbal": 1,
|
|
|
- "Crash Cymbals": 1,
|
|
|
- "Concert Toms": 1,
|
|
|
- "Timpani": 1,
|
|
|
flute: 2,
|
|
|
- oboe: 4,
|
|
|
clarinet: 4,
|
|
|
trombone: 14,
|
|
|
tuba: 17,
|
|
@@ -154,33 +123,19 @@ export const mappingVoicePart = (
|
|
|
1: "pan-flute",
|
|
|
2: "ocarina",
|
|
|
5: "melodica",
|
|
|
- 26: 12,
|
|
|
tenorrecorder: "piccolo",
|
|
|
woodwind: "hulusi-flute",
|
|
|
panpipes: "pan-flute",
|
|
|
ocarina: "ocarina",
|
|
|
nai: "melodica",
|
|
|
};
|
|
|
- let _track;
|
|
|
- if (typeof code === 'string') {
|
|
|
- for (let sKey in subject) {
|
|
|
- if(sKey === code) {
|
|
|
- _track = subject[sKey]
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- } else {
|
|
|
- _track = subject.code
|
|
|
- }
|
|
|
- // const _track = typeof code === 'string' ? Object.keys(subject).filter((key) => key.includes(String(code)) || String(code).includes(key))[0] : code
|
|
|
- return _track;
|
|
|
+ return subject[code] || 0;
|
|
|
}
|
|
|
return 0;
|
|
|
};
|
|
|
|
|
|
/** 声部的指法配置信息 */
|
|
|
export const subjectFingering = (subjectId: number | string): IFingering => {
|
|
|
- subjectId = isNaN(Number(subjectId)) ? subjectId : Number(subjectId)
|
|
|
switch (subjectId) {
|
|
|
case 2: // 长笛
|
|
|
return {
|