types.ts 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. import { AbcElem } from "abcjs";
  2. export interface INote {
  3. /** 临时升降记号 */
  4. accidental: string | "^^" | "^" | "_" | "__" | "=";
  5. /** 音符 */
  6. content: string;
  7. /** 音符类型 */
  8. noteType: string;
  9. /** 拍号 */
  10. meter: string;
  11. /** 谱号 */
  12. clef: string;
  13. /** 调号 */
  14. key: string;
  15. /** 演奏技法 */
  16. play: string[];
  17. /** 速度 */
  18. speed: string;
  19. /** 力度符号 */
  20. dynamics: string;
  21. /** 渐强渐弱关联 */
  22. dCode: string;
  23. /** 延音 */
  24. tie: string;
  25. /** 连音关联 */
  26. tCode: string;
  27. /** 附点 */
  28. dot: string;
  29. /** 3连音 */
  30. slus: string
  31. /** 延音 */
  32. tieline: string
  33. }
  34. export interface IMeasure {
  35. /** 小节号 */
  36. measureNumber?: number;
  37. /** 小节内的音符 */
  38. notes: INote[];
  39. /** 小节线 */
  40. barline: string;
  41. /** 谱号 */
  42. celf: string;
  43. /** 调号 */
  44. key: string;
  45. /** 反复跳跃 */
  46. repeat: string;
  47. }
  48. export interface IAbc {
  49. /** 谱号 */
  50. celf?: string;
  51. /** 调号 */
  52. key?: string;
  53. /** 拍号 */
  54. meter?: string;
  55. minUnit?: string;
  56. /** 曲谱名 */
  57. title?: string;
  58. /** 速度 */
  59. speed: string;
  60. measures: IMeasure[];
  61. }
  62. export interface INoteActive extends AbcElem {
  63. /** 小节 index */
  64. measureIndex: number;
  65. /** 音符 index */
  66. noteIndex: number;
  67. /** 是否第一次选中小节 */
  68. isFirstChecked: boolean;
  69. averagepitch?: number;
  70. }