fingering-config.ts 19 KB

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