-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
README.Rmd
75 lines (48 loc) · 1.26 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
out.width = "100%"
)
```
# gm <img src="man/figures/logo.png" align="right" alt="logo" width="120"/>
<!-- badges: start -->
<!-- badges: end -->
Create music easily, and show musical scores and audio files in R Markdown
documents, R Jupyter Notebooks and RStudio.
## Hello! World
```r
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"))
```
![](man/figures/readme.png)
![](man/figures/readme_audio.png)
## Installation
Install gm:
``` r
install.packages("gm")
```
Or the development version from GitHub:
```r
# install.packages("devtools")
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 (支付宝):
<img src="man/figures/alipay.jpeg" alt="alipay" width="250">