0.1.1 • Published 5 years ago

remark-music v0.1.1

Weekly downloads
5
License
MIT
Repository
github
Last release
5 years ago

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: 24
T:Clouds Thicken
C:Paul Rosen
S:Copyright 2005, Paul Rosen
M:6/8
L:1/8
Q:3/8=116
R:Creepy Jig
K: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 or 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