simple-notation
TypeScript icon, indicating that this package has built-in type declarations

1.0.12 • Public • Published

简谱渲染

介绍

这是一个基于 TypeScript 开发的动态简谱渲染库,用户仅需文本输入,即可在网页上生成优美的简谱。

示例:https://simple-notation.vercel.app/

使用方法

const sn = new SimpleNotation(container, {
  debug: true,
});

sn.loadData({
  info: {
    title: '小星星',
    composer: 'Mozart, W.A.',
    lyricist: '佚名',
    time: '4',
    tempo: '88',
    key: 'C',
    beat: '4',
  },
  score: `1,1,5,5|6,6,5,-|4,4,3,3
2,2,1,-|5,5,4,4|3,3,2,-
5,5,4,4|3,3,2,-|1,1,5,5
6,6,5,-|4,4,3,3|2,2,1,-`,
  lyric: `一闪一闪亮晶晶-
满天都是小星星-
挂在天空放光明-
好像千颗小眼睛-
一闪一闪亮晶晶-
满天都是小星星`,
});

渲染结果

名字解释

  • simple notation : 简谱
  • score : 整个乐谱
  • stave : 一行乐谱,可包含多个小节
  • measure : 小节

更具体的可以参考此链接:音乐术语中音对照

Readme

Keywords

none

Package Sidebar

Install

npm i simple-notation

Weekly Downloads

39

Version

1.0.12

License

none

Unpacked Size

1.25 MB

Total Files

6

Last publish

Collaborators

  • encaik