fingering-config.ts 19 KB

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