From 03c7f74481a9659b69afaf6dbfdb08c96958281d Mon Sep 17 00:00:00 2001 From: flujoo Date: Tue, 20 Apr 2021 08:20:53 +0400 Subject: [PATCH] Update site --- docs/articles/cn.html | 10 ++--- docs/articles/gm.html | 72 +++++++++++++++--------------- docs/pkgdown.yml | 2 +- docs/reference/figures/readme.png | Bin 2779 -> 3981 bytes 4 files changed, 42 insertions(+), 42 deletions(-) diff --git a/docs/articles/cn.html b/docs/articles/cn.html index a94bc2aa..e347180b 100644 --- a/docs/articles/cn.html +++ b/docs/articles/cn.html @@ -133,7 +133,7 @@

show(m, c("score", "audio"))

-

+

@@ -195,14 +195,14 @@

 show(m)

-

+

gm 的语法有点像 ggplot2,你可以不断添加成分,然后查看,然后再添加,不断反复。

我们还可以加上拍速记号:

 m <- m + Tempo(120)
 show(m)

-

+

加上新的声部:

 m <- m + Line(
@@ -212,7 +212,7 @@ 

show(m)

-

+

这个过程可以继续,但我们在此打住。

@@ -232,7 +232,7 @@

show(m, to = c("score", "audio"))

-

+

diff --git a/docs/articles/gm.html b/docs/articles/gm.html index 1815be83..fe563fee 100644 --- a/docs/articles/gm.html +++ b/docs/articles/gm.html @@ -145,7 +145,7 @@

show(m, to = c("score", "audio"))

-

+

@@ -155,7 +155,7 @@

m <- m + Tempo(120) show(m)

-

+

Add another musical line as a part:

 m <- m + Line(
@@ -165,7 +165,7 @@ 

show(m)

-

+

Add another musical line as a voice:

 m <- m + Line(
@@ -177,7 +177,7 @@ 

show(m)

-

+

This process can keep going, but let’s stop here. If you want to go deeper, let’s first learn how to install and configure gm.

@@ -249,7 +249,7 @@

m <- Music() + Meter(4, 4) + l show(m)

-

+

As you may have noticed, to represent a musical line, we don’t directly supply notes, chords, or rests to Line() as input. Instead, we separate the line’s pitch and durational contents. This is more convenient, since you may always want to deal with one aspect and in the meantime ignore the other.

@@ -274,23 +274,23 @@

 pitches <- c(60, 62, 64, 65)

-

+

We can transpose them up by a fifth easily:

 pitches + 7
 #> [1] 67 69 71 72

-

+

However, this advantage comes at a cost: MIDI note numbers are always ambiguous. For example, the following three pitches are all equivalent to MIDI note number 73:

-

+

gm interprets MIDI note numbers based on keys and neighbor pitches. In the following example, MIDI note number 73 is interpreted as C5 sharp in the first measure, but as D5 flat in the second measure, for these two measures have different keys.

 l <- Line(list(73, 73), list(2, 2))
 m <- Music() + Meter(2, 4) + Key(7, bar = 1) + Key(-7, bar = 2) + l
 show(m)

-

+

gm is not perfect in interpreting MIDI note numbers, so if you want it to be precise, use pitch notations.

@@ -325,21 +325,21 @@

m <- Music() + Meter(6, 4) + Line(list(NA, NA, NA), list("w", "q", "32")) show(m)

-

+

The duration type or its abbreviation can be followed by zero to four dots, in a duration notation, as in the following example:

 l <- Line(rep(list(NA), 5), list("q", "q.", "q..", "q...", "q...."))
 m <- Music() + Meter(9, 4) + l
 show(m)

-

+

You can also append what we call “tupler” notations in gm to a duration notation to represent a tuplet:

 l <- Line(rep(list(NA), 3), list("q/3", "q/3", "q/3"))
 m <- Music() + Meter(1, 4) + l
 show(m)

-

+

In the above example, we use "q/3" to represent a triplet. You can read "q/3" as “divide a quarter note into three parts, and take one of them”. We will talk more about tuplets in the next section.

To sum up, a duration notation consists of

    @@ -357,7 +357,7 @@

    Duration notations can’t represent some complex tuplets.

    For example, how to represent the first tuplet in the following score:

    -

    +

    This tuplet can read as “divide a quarter note into three parts, take two of them”. We can’t express “take two” in any duration notation. This is where we need tuplet() and Tupler(). Let’s look at an example.

    We can express duration notation "quarter/3" with tuplet() and Tupler() as:

    @@ -384,7 +384,7 @@ 

    m <- Music() + Meter(1, 4) + Line(list(NA, NA, NA), list(t, t, t)) show(m)

    -

    +

    This may seem strange to you, but it’s syntactically valid.

    We can even create complex nested tuplets like in the following score:

    @@ -405,7 +405,7 @@

    m <- Music() + Meter(2, 4) + l show(m)

    -

    +

    Yes, there is something wrong with this score. MuseScore (which gm uses internally) has some bugs, so it can’t convert MusicXML (which gm uses to represent musical scores internally) containing nested tuplets to score correctly. So if there are nested tuplets in your Music object, you can export it to MusicXML file with export(), and open the file with other notation software like Finale. Below is a correct score generated in Finale:

    Note that in Line() objects, tuplets must form tuplet groups, or you will get an error. For example,

    @@ -438,7 +438,7 @@

    m <- Music() + Meter(4, 4) + l show(m)

    -

    +

    In tie = list(c(1, 1), c(2, 2), 3) in the above example,

    1. c(1, 1) means we add a tie to the first note of the first chord to connect it with the first note of the second chord. Note that to tie two adjacent notes, we only specify the position of the first note.

    2. @@ -450,7 +450,7 @@

      m <- Music() + Meter(1, 4) + Line(list("C5"), list(4)) show(m)

      -

      +

      The C5 whole note is automatically split into four tied quarter notes, because the time signature is 1/4.

      @@ -464,14 +464,14 @@

      m <- Music() + Meter(4, 4) + l show(m)

      -

      +

      We can insert it into the third measure after the second beat:

       l <- Line(list("C5", "D5", "E5"), list(1, 1, 1), bar = 3, offset = 2)
       m <- Music() + Meter(4, 4) + l
       show(m)

      -

      +

      @@ -483,7 +483,7 @@

      m <- Music() + Meter(4, 4) + l1 show(m)

      -

      +

      The Line object is named “a” with argument name.

      Below is another Line object named “b”:

      @@ -493,14 +493,14 @@ 

      l2 <- Line(list("C4", "G4"), list(2, 2), name = "b") show(m + l2)

      -

      +

      Line “b” is appended at the end by default. We can make Line “b” come before Line “a”, by specifying argument to and after:

       l2 <- Line(list("C4", "G4"), list(2, 2), name = "b", to = "a", after = FALSE)
       m <- m + l2
       show(m)

      -

      +

      to = "a" means we add Line “b” with Line “a” as a reference.

      The Music object contains two Line objects now. Let’s introduce a third Line object named “c”:

      @@ -518,14 +518,14 @@ 

      m <- m + l3 show(m)

      -

      +

      Finally, below is a fourth Line, let’s add it to Line “b” as another staff:

       l4 <- Line(list("E3"), list(4), to = "b", as = "staff", name = "d")
       m <- m + l4
       show(m)

      -

      +

      We can print this Music to check its structure:

       m
      @@ -597,7 +597,7 @@ 

      m <- m + Line(list("G4", "A4"), list(3, 0.5)) show(m)

      -

      +

      By specifying arguments actual_number and actual_unit, we can create pickup measures. For example,

       m <- Music() +
      @@ -615,7 +615,7 @@ 

      l <- Line(list("A4", "B4", "C5", "D5", "E5"), rep(list(1), 5)) show(m + l)

      -

      +

      The time signature which appears on the first measure is 4/4, but the actual one is 1/4. invisible = TRUE makes the second time signature invisible.

      @@ -659,7 +659,7 @@

      l <- Line(list(NA, NA, NA), list(1, 1, 1)) show(m + l)

      -

      +

      We can add a key signature to a specific part or staff, rather than to the whole score. For example, below is a musical score of two parts:

       m <- Music() + Meter(4, 4) +
      @@ -670,20 +670,20 @@ 

      show(m)

      -

      +

      We can change the key signature of only the first part:

       m <- m + Key(-2, to = 1)
       show(m)

      -

      +

      to = 1 means the Key object is added only to the part containing the first Line in the Music object.

      We can change the key signature of only the second staff of the second part:

       m <- m + Key(2, to = 4, scope = "staff")
       show(m)

      -

      +

      scope = "staff" means the key signature is added only to a specific staff.

      @@ -739,25 +739,25 @@

      m <- Music() + Meter(3, 4) + l show(m)

      -

      +

      If not satisfied, you can change it:

       m <- m + Clef("G", to = 1)
       show(m)

      -

      +

      You can also add a clef into other measures:

       m <- m + Clef("F", to = 1, bar = 2)
       show(m)

      -

      +

      Or even at other beat:

       m <- m + Clef("G", octave = -1, to = 1, bar = 3, offset = 2)
       show(m)

      -

      +

      @@ -783,7 +783,7 @@

      show(m, to = c("score", "audio"))

      -

      +

      @@ -860,7 +860,7 @@

      show(m, to = c("score", "audio"))

      -

      +

      diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 6b46e0c2..e43892d3 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -4,7 +4,7 @@ pkgdown_sha: ~ articles: cn: cn.html gm: gm.html -last_built: 2021-04-19T19:03Z +last_built: 2021-04-20T04:04Z urls: reference: https://flujoo.github.io/gm/reference article: https://flujoo.github.io/gm/articles diff --git a/docs/reference/figures/readme.png b/docs/reference/figures/readme.png index 50530ada83d3a66e7489960699b2324b311d6138..1483738295618fc9050ab2b0da5679430def82e1 100644 GIT binary patch literal 3981 zcma)9c|6qJ_n(EaWJyJKlk8%cv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