remark-music
remark plugin to support abc music notation.
Install
npm install remark-music
Use
Just wrap your abc string into double section signs (§)
e.g.
§§X: 24T:Clouds ThickenC:Paul RosenS:Copyright 2005, Paul RosenM:6/8L:1/8Q:3/8=116R:Creepy JigK:Em|:"Em"EEE E2G|"C7"_B2A G2F|"Em"EEE E2G|\"C7"_B2A "B7"=B3|"Em"EEE E2G|"C7"_B2A G2F|"Em"GFE "D (Bm7)"F2D|\1"Em"E3-E3:|2"Em"E3-E2B|:"Em"e2e gfe|"G"g2ab3|"Em"gfeg2e|"D"fedB2A|"Em"e2e gfe|\"G"g2ab3|"Em"gfe"D"f2d|"Em"e3-e3:|§§
API
remark().use(music[, options])
Parse and stringify music.
Get’s useful when combined with [rehype-katex
][rehype-katex] or
[remark-html-katex
][remark-html-katex].
options
See abcjs options.
Notes
Escaping
You can escape section signs with a back slash (\
):
\§\alpha\§ §\alpha\§§ §§\beta\§§§
Security
Use of remark-music
itself doesn’t open you up to [cross-site scripting XSS attacks.
Always be wary of user input and use rehype-sanitize
.
License
MIT