+.Music {gm}R Documentation

Add Component to Music Object

Description

Add a component to a Music object.

Usage

## S3 method for class 'Music'
music + object

Arguments

music

A Music object.

object

An object of class Line, Meter, Key, Tempo, Clef, Instrument, Pedal, Slur, Hairpin, Notehead, Accidental, Velocity, Dynamic, Grace, Stem, Lyric, Tie, Articulation, Fermata, Breath, Trill, Turn, Mordent, Schleifer or Tremolo.

Value

A list of class Music.

See Also

Music() for initialization of a Music object.

Examples

# Initialize a `Music` object
music <- Music()

# Add a `Line`
music <- music + Line("C4", 1)
music

# Add a `Meter`
music <- music + Meter(4, 4)
music

# Generate the music score
if (interactive()) {
  show(music)
}

[Package gm version 2.0.0 Index]