knitr::opts_chunk$set( collapse = TRUE, comment = "#>", out.width = "100%" ) # Cannot add audio files in GitHub README, so let pkgdown use `index.md` # rather than `README.md` to generate the home page. The two differences: # # <audio controls> # <source src="reference/figures/readme_audio.mp3" type="audio/mpeg"> # </audio> # # See `vignette("gm")` for a complete guide to gm.
Create music with R.
library(gm) music <- Music() + Meter(4, 4) + Line(c("C5", "D5", "E5", "F5")) show(music)
Install gm:
install.packages("gm") # Or install the development version from GitHub pak::pak("flujoo/gm")
Install MuseScore. MuseScore is open source and free notation software.
See vignette("gm")
for a complete guide to gm.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.