fingering-config.ts 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788
  1. import { CSSProperties } from "vue";
  2. import relationships from "./fingering-relationships";
  3. export type ITypeFingering = {
  4. json: any;
  5. relationship: any;
  6. height?: number | string;
  7. width?: number | string;
  8. maxWidth?: number;
  9. styles?: CSSProperties;
  10. } | null;
  11. export type IFingering = {
  12. name?: IVocals;
  13. direction?: "vertical" | "transverse";
  14. width?: string;
  15. height?: string;
  16. /* 横向乐器(transverse) 在功能按钮显示的时候会缩放偏移 */
  17. scaleData?: {
  18. scale: string
  19. offset: string
  20. }
  21. /** 禁用替指 */
  22. disabledFinger?: boolean;
  23. /** 横竖屏 0:横屏 1: 竖屏 */
  24. orientation?: number;
  25. code?: string;
  26. /** 是否有替指 */
  27. hasTizhi?: boolean;
  28. /** 乐器code匹配的id */
  29. id?: number;
  30. };
  31. type ITypeContent = {
  32. [key: string | number]: IFingering;
  33. };
  34. export type IVocals =
  35. | "flute"
  36. | "clarinet"
  37. | "saxophone"
  38. | "trumpet"
  39. | "horn"
  40. | "trombone"
  41. | "up-bass-horn"
  42. | "small-drum"
  43. | "tuba"
  44. | "piccolo"
  45. | "piccolo1"
  46. | "piccolo2"
  47. | "hulusi-flute"
  48. | "hulusi-flute1"
  49. | "hulusi-flute2"
  50. | "pan-flute"
  51. | "pan-flute1"
  52. | "pan-flute2"
  53. | "pan-flute3"
  54. | "pan-flute4"
  55. | "ocarina"
  56. | "ocarina1"
  57. | "ocarina2"
  58. | "melodica"
  59. | "melodica1"
  60. | "baroque-recorder"
  61. | "baroque-recorder1"
  62. | "baroque-recorder2"
  63. | "whistling"
  64. | "whistling1"
  65. | "whistling2";
  66. /** 映射声部ID */
  67. export const mappingVoicePart = (id: number | string, soruce: "GYM" | "COLEXIU" | "ORCHESTRA" | "INSTRUMENT" | "ENSEMBLE"): number => {
  68. if (soruce === "GYM") {
  69. return Number(id);
  70. } else if (soruce === "COLEXIU") {
  71. const subject: { [_key: string | number]: number } = {
  72. Flute: 2,
  73. Clarinet: 4,
  74. Trombone: 14,
  75. Tuba: 17,
  76. Trumpet: 12,
  77. Horn: 13,
  78. AltoSaxophone: 6,
  79. TenorSaxophone: 6,
  80. Saxophone: 6,
  81. UpBassHorn: 15,
  82. Melodica: 137,
  83. HulusiFlute: 136,
  84. PanFlute: 135,
  85. Ocarina: 134,
  86. Recorder: 120,
  87. Ukulele: 130,
  88. Mouthorgan: 140,
  89. Piano: 150,
  90. };
  91. return subject[id];
  92. } else if (soruce === "ORCHESTRA") {
  93. const subject: { [_key: string | number]: number } = {
  94. 1: 23,
  95. 2: 2,
  96. 3: 5,
  97. 4: 4,
  98. 5: 12,
  99. 6: 14,
  100. 7: 13,
  101. 8: 15,
  102. 9: 17,
  103. };
  104. return subject[id];
  105. } else if (soruce === "INSTRUMENT") {
  106. let code = id;
  107. if (typeof code === "string") {
  108. code = code.toLocaleLowerCase().replace(/ /g, "");
  109. }
  110. const subject: { [_key: string | number]: any } = {
  111. flute: 2,
  112. clarinet: 4,
  113. trombone: 14,
  114. tuba: 17,
  115. trumpet: 12,
  116. horn: 13,
  117. altosaxophone: 6,
  118. tenorsaxophone: 6,
  119. saxophone: 6,
  120. upbasshorn: 15,
  121. // melodica: 137,
  122. hulusiFlute: 136,
  123. panflute: 135,
  124. recorder: 120,
  125. ukulele: 130,
  126. mouthorgan: 140,
  127. piano: 150,
  128. baroquerecorder: "baroque-recorder",
  129. 4: "piccolo",
  130. 3: "hulusi-flute",
  131. 1: "pan-flute",
  132. 2: "ocarina",
  133. 5: "melodica",
  134. 23: 2,
  135. 24: 6,
  136. 25: 4,
  137. 26: 12,
  138. 27: 14,
  139. 28: 13,
  140. 29: 15,
  141. 30: 17,
  142. tenorrecorder: "piccolo",
  143. germanrecorder: "piccolo",
  144. woodwind: "hulusi-flute",
  145. hulusi: "hulusi-flute",
  146. panpipes: "pan-flute",
  147. ocarina: "ocarina", // 陶笛
  148. altoocarina: "ocarina", // 陶笛
  149. whistling: "whistling", // 高音陶笛
  150. nai: "melodica",
  151. melodica: "melodica", // 口风琴
  152. 15: "baroque-recorder",
  153. 16: "baroque-recorder",
  154. };
  155. return subject[code] || 0;
  156. } else if (soruce === "ENSEMBLE") {
  157. let code = id;
  158. const subject: { [_key: string | number]: any } = {
  159. Piccolo: "piccolo",
  160. Flute: 2,
  161. "Flute 1": 2,
  162. "Flute 2": 2,
  163. Oboe: 1,
  164. "Clarinet in Bb 1": 4,
  165. "Clarinet in Bb 2": 4,
  166. "Alto Clarinet in Eb": 4,
  167. "Bass Clarinet in Bb": 4,
  168. Bassoon: 1,
  169. "Alto Saxophone": 5,
  170. "Tenor Saxophone": 5,
  171. "Baritone Saxophone": 5,
  172. "Trumpet in Bb 1": 12,
  173. "Trumpet in Bb 2": 12,
  174. "Horn in F": 13,
  175. "Horn in F 1": 13,
  176. "Horn in F 2": 13,
  177. "Trombone 1": 14,
  178. "Trombone 2": 14,
  179. "Trombone 3": 14,
  180. Euphonium: 15,
  181. Tuba: 17,
  182. Chimes: 1,
  183. Bells: 1,
  184. Xylophone: 1,
  185. "Snare Drum": 1,
  186. "Bass Drum": 1,
  187. Triangle: 1,
  188. "Suspended Cymbal": 1,
  189. "Crash Cymbals": 1,
  190. "Concert Toms": 1,
  191. Timpani: 1,
  192. flute: 2,
  193. oboe: 4,
  194. clarinet: 4,
  195. trombone: 14,
  196. tuba: 17,
  197. trumpet: 12,
  198. horn: 13,
  199. altosaxophone: 6,
  200. tenorsaxophone: 6,
  201. saxophone: 6,
  202. upbasshorn: 15,
  203. melodica: 137,
  204. hulusiFlute: 136,
  205. panflute: 135,
  206. recorder: 120,
  207. ukulele: 130,
  208. mouthorgan: 140,
  209. piano: 150,
  210. 4: "piccolo",
  211. 3: "hulusi-flute",
  212. 1: "pan-flute",
  213. 2: "ocarina",
  214. 5: "melodica",
  215. 26: 12,
  216. tenorrecorder: "piccolo",
  217. woodwind: "hulusi-flute",
  218. panpipes: "pan-flute",
  219. ocarina: "ocarina",
  220. nai: "melodica",
  221. BaroqueRecorder: "baroque-recorder",
  222. };
  223. let _track;
  224. if (typeof code === "string") {
  225. for (let sKey in subject) {
  226. if (sKey === code) {
  227. _track = subject[sKey];
  228. break;
  229. }
  230. }
  231. } else {
  232. _track = subject.code;
  233. }
  234. return _track;
  235. }
  236. return 0;
  237. };
  238. /** 映射声部指法,单曲根据声部codeId,合奏曲根据分轨track */
  239. export const matchVoicePart = (id: number | string, type: "SINGLE" | "CONCERT"): number => {
  240. if (type === "SINGLE") {
  241. const subject: { [_key: string | number]: any } = {
  242. 33: "pan-flute",
  243. 34: "ocarina",
  244. 35: "hulusi-flute",
  245. 37: "piccolo",
  246. 36: "melodica",
  247. 38: "baroque-recorder",
  248. 39: "whistling",
  249. 1: 2,
  250. 5: 5,
  251. 3: 4,
  252. 11: 12,
  253. 13: 14,
  254. 12: 13,
  255. 14: 15,
  256. 16: 17,
  257. };
  258. return subject[id];
  259. } else {
  260. let code = id;
  261. const subject: { [_key: string | number]: any } = {
  262. Piccolo: "piccolo",
  263. Flute: 2,
  264. "Flute 1": 2,
  265. "Flute 2": 2,
  266. Oboe: 1,
  267. "Clarinet in Bb": 4,
  268. "Clarinet in Bb 1": 4,
  269. "Clarinet in Bb 2": 4,
  270. "Alto Clarinet in Eb": 4,
  271. "Bass Clarinet in Bb": 4,
  272. Bassoon: 1,
  273. "Alto Saxophone": 5,
  274. "Alto Saxophone1": 5,
  275. "Alto Saxophone2": 5,
  276. "Tenor Saxophone": 5,
  277. "Baritone Saxophone": 5,
  278. "Trumpet in Bb 1": 12,
  279. "Trumpet in Bb 2": 12,
  280. "Horn in F": 13,
  281. "Horn in F 1": 13,
  282. "Horn in F 2": 13,
  283. "Trombone 1": 14,
  284. "Trombone 2": 14,
  285. "Trombone 3": 14,
  286. Euphonium: 15,
  287. Tuba: 17,
  288. Chimes: 1,
  289. Bells: 1,
  290. Xylophone: 1,
  291. "Snare Drum": 1,
  292. "Bass Drum": 1,
  293. Triangle: 1,
  294. "Suspended Cymbal": 1,
  295. "Crash Cymbals": 1,
  296. "Concert Toms": 1,
  297. Timpani: 1,
  298. flute: 2,
  299. oboe: 4,
  300. clarinet: 4,
  301. trombone: 14,
  302. tuba: 17,
  303. trumpet: 12,
  304. horn: 13,
  305. altosaxophone: 6,
  306. tenorsaxophone: 6,
  307. saxophone: 6,
  308. upbasshorn: 15,
  309. melodica: 137,
  310. hulusiFlute: 136,
  311. panflute: 135,
  312. recorder: 120,
  313. ukulele: 130,
  314. mouthorgan: 140,
  315. piano: 150,
  316. 4: "piccolo",
  317. 3: "hulusi-flute",
  318. 1: "pan-flute",
  319. 2: "ocarina",
  320. 5: "melodica",
  321. 26: 12,
  322. tenorrecorder: "piccolo",
  323. germanrecorder: "piccolo",
  324. woodwind: "hulusi-flute",
  325. panpipes: "pan-flute",
  326. ocarina: "ocarina",
  327. whistling: "whistling",
  328. nai: "melodica",
  329. BaroqueRecorder: "baroque-recorder",
  330. "Drum Set": 24,
  331. Marimba: 26,
  332. Vibraphone: 27,
  333. "Tubular Bells": 30,
  334. Mallets: 32,
  335. };
  336. let _track;
  337. if (typeof code === "string") {
  338. code = code.toLocaleLowerCase().replace(/ /g, "");
  339. for (let sKey in subject) {
  340. let pitchKey = sKey;
  341. if (typeof sKey === "string") {
  342. pitchKey = pitchKey.toLocaleLowerCase().replace(/ /g, "");
  343. pitchKey = pitchKey.replace(/[_0-9]+$/, '');
  344. }
  345. if (typeof sKey === "string") {
  346. // 去掉声轨后面的数字
  347. code = code.replace(/[_0-9]+$/, '');
  348. }
  349. if (pitchKey === code) {
  350. _track = subject[sKey];
  351. break;
  352. }
  353. }
  354. } else {
  355. _track = subject.code;
  356. }
  357. return _track;
  358. }
  359. return 0;
  360. };
  361. /** 声部的指法配置信息 */
  362. export const subjectFingering = (subjectId: number | string): IFingering => {
  363. switch (subjectId) {
  364. case 2: // 长笛
  365. return {
  366. name: "flute",
  367. direction: "transverse",
  368. height: "1.6rem",
  369. scaleData: {
  370. scale: "0.8",
  371. offset: "3.64rem"
  372. },
  373. hasTizhi: true,
  374. id: 1,
  375. };
  376. case 4: // 单簧管
  377. return {
  378. name: "clarinet",
  379. direction: "vertical",
  380. width: "3rem",
  381. hasTizhi: true,
  382. id: 3,
  383. };
  384. case 5: // 萨克斯
  385. case 6: // 中音萨克斯
  386. return {
  387. name: "saxophone",
  388. direction: "vertical",
  389. width: "4.34rem",
  390. hasTizhi: true,
  391. id: 5,
  392. };
  393. case 12: // 小号
  394. return {
  395. name: "trumpet",
  396. direction: "transverse",
  397. height: "1.6rem",
  398. scaleData: {
  399. scale: "0.8",
  400. offset: "3.64rem"
  401. },
  402. hasTizhi: false,
  403. id: 11,
  404. };
  405. case 13: // 圆号
  406. return {
  407. name: "horn",
  408. direction: "vertical",
  409. width: "4.98rem",
  410. hasTizhi: false,
  411. id: 12,
  412. };
  413. case 14: // 长号
  414. return {
  415. name: "trombone",
  416. direction: "transverse",
  417. height: "1.6rem",
  418. scaleData: {
  419. scale: "0.8",
  420. offset: "3.64rem"
  421. },
  422. hasTizhi: false,
  423. id: 13,
  424. };
  425. case 15: // 上低音号
  426. return {
  427. name: "up-bass-horn",
  428. direction: "vertical",
  429. width: "4.34rem",
  430. hasTizhi: false,
  431. id: 14,
  432. };
  433. case 17: // 大号
  434. return {
  435. name: "tuba",
  436. direction: "vertical",
  437. width: "4.34rem",
  438. hasTizhi: false,
  439. id: 16,
  440. };
  441. case 120: // 短笛
  442. return {
  443. name: "piccolo",
  444. direction: "vertical",
  445. width: "3rem",
  446. orientation: 0,
  447. hasTizhi: true,
  448. id: 2,
  449. };
  450. // case "piccolo": // 德式竖笛
  451. // return {
  452. // name: "piccolo",
  453. // direction: "vertical",
  454. // width: "3rem",
  455. // orientation: 0,
  456. // code: "竖笛",
  457. // hasTizhi: true,
  458. // id: 37,
  459. // };
  460. case "hulusi-flute": // 葫芦丝
  461. return {
  462. name: "hulusi-flute",
  463. direction: "vertical",
  464. width: "3rem",
  465. orientation: 0,
  466. code: "葫芦丝",
  467. hasTizhi: false,
  468. id: 35,
  469. };
  470. case "pan-flute": // 排箫
  471. return {
  472. name: "pan-flute",
  473. direction: "transverse",
  474. height: "2rem",
  475. scaleData: {
  476. scale: "0.8",
  477. offset: "3.64rem"
  478. },
  479. disabledFinger: true,
  480. orientation: 0,
  481. code: "排箫",
  482. hasTizhi: false,
  483. id: 33,
  484. };
  485. case "ocarina": // 陶笛
  486. return {
  487. name: "ocarina",
  488. direction: "vertical",
  489. width: "3rem",
  490. disabledFinger: true,
  491. orientation: 0,
  492. code: "陶笛",
  493. hasTizhi: false,
  494. id: 34,
  495. };
  496. case "whistling": // 高音陶笛
  497. return {
  498. name: "whistling",
  499. direction: "vertical",
  500. width: "3rem",
  501. disabledFinger: true,
  502. orientation: 0,
  503. code: "陶笛",
  504. hasTizhi: false,
  505. id: 39,
  506. };
  507. case "melodica": // 口风琴
  508. return {
  509. name: "melodica",
  510. direction: "transverse",
  511. height: "2rem",
  512. scaleData: {
  513. scale: "0.8",
  514. offset: "3.64rem"
  515. },
  516. orientation: 0,
  517. code: "口风琴",
  518. hasTizhi: false,
  519. id: 36,
  520. };
  521. case "baroque-recorder": // 英式竖笛
  522. return {
  523. name: "baroque-recorder",
  524. direction: "vertical",
  525. width: "3rem",
  526. orientation: 0,
  527. code: "竖笛",
  528. hasTizhi: true,
  529. id: 38,
  530. };
  531. default:
  532. return typeof subjectId === "number" ? { id: subjectId } : {};
  533. }
  534. };
  535. export const getFingeringConfig = async (type: IVocals | undefined, source?: string): Promise<ITypeFingering> => {
  536. switch (type) {
  537. case "flute":
  538. const flute = await import(`./fingering-img/flute/index.json`);
  539. return {
  540. json: flute.default,
  541. relationship: relationships.flute,
  542. height: "60px",
  543. styles: {},
  544. };
  545. case "clarinet":
  546. const clarinet = await import(`./fingering-img/clarinet/index.json`);
  547. return {
  548. json: clarinet.default,
  549. relationship: relationships.clarinet,
  550. styles: {
  551. marginLeft: ".4rem",
  552. marginRight: ".7rem",
  553. },
  554. };
  555. case "trumpet":
  556. const trumpet = await import(`./fingering-img/trumpet/index.json`);
  557. return {
  558. json: trumpet.default,
  559. relationship: relationships.trumpet,
  560. // maxWidth: 150,
  561. };
  562. case "horn":
  563. const horn = await import(`./fingering-img/horn/index.json`);
  564. return {
  565. json: horn.default,
  566. relationship: relationships.horn,
  567. height: "212px",
  568. width: "252px",
  569. };
  570. case "tuba":
  571. const tuba = await import(`./fingering-img/tuba/index.json`);
  572. return {
  573. json: tuba.default,
  574. relationship: relationships.tuba,
  575. };
  576. case "piccolo":
  577. const piccolo = await import(`./fingering-img/piccolo/index.json`);
  578. return {
  579. json: piccolo.default,
  580. relationship: relationships.piccolo,
  581. };
  582. case "piccolo1":
  583. const piccolo1 = await import(`./fingering-img/piccolo1/index.json`);
  584. return {
  585. json: piccolo1.default,
  586. relationship: relationships.piccolo,
  587. };
  588. case "piccolo2":
  589. const piccolo2 = await import(`./fingering-img/piccolo2/index.json`);
  590. return {
  591. json: piccolo2.default,
  592. relationship: relationships.piccolo,
  593. };
  594. case "up-bass-horn":
  595. const upBassHorn = await import(`./fingering-img/up-bass-horn/index.json`);
  596. return {
  597. json: upBassHorn.default,
  598. relationship: relationships["up-bass-horn"],
  599. };
  600. case "trombone":
  601. const trombone = await import(`./fingering-img/trombone/index.json`);
  602. return {
  603. json: trombone.default,
  604. relationship: relationships["trombone"],
  605. };
  606. case "saxophone":
  607. const saxophone = await import(`./fingering-img/saxophone/index.json`);
  608. return {
  609. json: saxophone.default,
  610. relationship: relationships["saxophone"],
  611. styles: {
  612. marginLeft: ".2rem",
  613. marginRight: ".3rem",
  614. },
  615. };
  616. case "small-drum":
  617. const smallDrum = await import(`./fingering-img/small-drum/index.json`);
  618. return {
  619. json: smallDrum.default,
  620. relationship: relationships["up-bass-horn"],
  621. width: "180px",
  622. };
  623. case "hulusi-flute":
  624. const hulusi = source === 'musicDetail' ? await import(`./fingering-img/hulusi-flute0/index.json`) : await import(`./fingering-img/hulusi-flute/index.json`);
  625. return {
  626. json: hulusi.default,
  627. relationship: relationships.hulusi,
  628. // width: '180px',
  629. styles: {
  630. marginLeft: ".6rem",
  631. marginRight: ".7rem",
  632. },
  633. };
  634. case "hulusi-flute1":
  635. const hulusi1 = await import(`./fingering-img/hulusi-flute1/index.json`);
  636. return {
  637. json: hulusi1.default,
  638. relationship: relationships.hulusi,
  639. // width: '180px',
  640. styles: {
  641. marginLeft: ".6rem",
  642. marginRight: ".7rem",
  643. },
  644. };
  645. case "hulusi-flute2":
  646. const hulusi2 = await import(`./fingering-img/hulusi-flute2/index.json`);
  647. return {
  648. json: hulusi2.default,
  649. relationship: relationships.hulusi,
  650. // width: '180px',
  651. styles: {
  652. marginLeft: ".6rem",
  653. marginRight: ".7rem",
  654. },
  655. };
  656. case "pan-flute":
  657. const pan = await import(`./fingering-img/pan-flute/index.json`);
  658. return {
  659. json: pan.default,
  660. relationship: relationships.pan,
  661. };
  662. case "pan-flute1":
  663. const pan1 = await import(`./fingering-img/pan-flute1/index.json`);
  664. return {
  665. json: pan1.default,
  666. relationship: relationships.pan,
  667. };
  668. case "pan-flute2":
  669. const pan2 = await import(`./fingering-img/pan-flute2/index.json`);
  670. return {
  671. json: pan2.default,
  672. relationship: relationships.pan,
  673. };
  674. case "pan-flute3":
  675. const pan3 = await import(`./fingering-img/pan-flute3/index.json`);
  676. return {
  677. json: pan3.default,
  678. relationship: relationships.pan,
  679. };
  680. case "ocarina":
  681. const ocarina = await import(`./fingering-img/ocarina/index.json`);
  682. return {
  683. json: ocarina.default,
  684. relationship: relationships.ocarina,
  685. width: "180px",
  686. styles: {
  687. marginTop: "auto",
  688. },
  689. };
  690. case "ocarina1":
  691. const ocarina1 = await import(`./fingering-img/ocarina1/index.json`);
  692. return {
  693. json: ocarina1.default,
  694. relationship: relationships.ocarina,
  695. width: "180px",
  696. styles: {
  697. marginTop: "auto",
  698. },
  699. };
  700. case "ocarina2":
  701. const ocarina2 = await import(`./fingering-img/ocarina2/index.json`);
  702. return {
  703. json: ocarina2.default,
  704. relationship: relationships.ocarina,
  705. width: "180px",
  706. styles: {
  707. marginTop: "auto",
  708. },
  709. };
  710. case "whistling":
  711. const whistling = await import(`./fingering-img/whistling/index.json`);
  712. return {
  713. json: whistling.default,
  714. relationship: relationships.ocarina,
  715. width: "180px",
  716. styles: {
  717. marginTop: "auto",
  718. },
  719. };
  720. case "whistling1":
  721. const whistling1 = await import(`./fingering-img/whistling1/index.json`);
  722. return {
  723. json: whistling1.default,
  724. relationship: relationships.ocarina,
  725. width: "180px",
  726. styles: {
  727. marginTop: "auto",
  728. },
  729. };
  730. case "whistling2":
  731. const whistling2 = await import(`./fingering-img/whistling2/index.json`);
  732. return {
  733. json: whistling2.default,
  734. relationship: relationships.ocarina,
  735. width: "180px",
  736. styles: {
  737. marginTop: "auto",
  738. },
  739. };
  740. case "melodica":
  741. const melodica = await import(`./fingering-img/melodica/index.json`);
  742. return {
  743. json: melodica.default,
  744. relationship: relationships.melodica,
  745. height: "80px",
  746. styles: {
  747. marginTop: "auto",
  748. },
  749. };
  750. case "melodica1":
  751. const melodica1 = await import(`./fingering-img/melodica1/index.json`);
  752. return {
  753. json: melodica1.default,
  754. relationship: relationships.melodica,
  755. height: "80px",
  756. styles: {
  757. marginTop: "auto",
  758. },
  759. };
  760. case "baroque-recorder":
  761. const baroqueRecorder = await import(`./fingering-img/baroque-recorder/index.json`);
  762. return {
  763. json: baroqueRecorder.default,
  764. relationship: relationships.baroqueRecorder,
  765. };
  766. case "baroque-recorder1":
  767. const baroqueRecorder1 = await import(`./fingering-img/baroque-recorder1/index.json`);
  768. return {
  769. json: baroqueRecorder1.default,
  770. relationship: relationships.baroqueRecorder,
  771. };
  772. case "baroque-recorder2":
  773. const baroqueRecorder2 = await import(`./fingering-img/baroque-recorder2/index.json`);
  774. return {
  775. json: baroqueRecorder2.default,
  776. relationship: relationships.baroqueRecorder,
  777. };
  778. default:
  779. return null;
  780. }
  781. };