Learn R Programming

⚠️There's a newer version (2.0.0) of this package.Take me there.

gm

Create music easily, and show musical scores and audio files in R Markdown documents, R Jupyter Notebooks and RStudio.

Hello! World

library(gm)

m <- 
  # initialize a Music object
  Music() +
  # add a 4/4 time signature
  Meter(4, 4) +
  # add a musical line of four quarter notes
  Line(list("C5", "D5", "E5", "F5"), list(1, 1, 1, 1))
  
show(m, to = c("score", "audio"))

Installation

Install gm:

install.packages("gm")

Or the development version from GitHub:

devtools::install_github("flujoo/gm")

MuseScore, an open source and free notation software, is required. Get it from https://musescore.org/.

More

See vignette("gm", package = "gm") for a complete guide to gm.

Donation

https://ko-fi.com/flujoo

or Alipay (支付宝):

Copy Link

Version

Install

install.packages('gm')

Monthly Downloads

232

Version

1.0.2

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Renfei Mao

Last Published

April 17th, 2021

Functions in gm (1.0.2)

Tupler

Create Tupler Object
gm

gm: Generate Music Easily and Show Them Anywhere
Tempo

Create Tempo Object
Music

Initialize Music Object
Clef

Create Clef Object
Line

Create Line Object
Key

Create Key Object
show

Show Object
tuplet

Create Tuplet
inspect_errors

See Full Error Report
Meter

Create Meter Object
+.Music

Add Component to Music Object
export

Export Object
gm-internal

Internal gm Functions