Initialize a Music object.

Music objects represent whole music pieces.

Music()

Value

A list with class Music.

Details

A typical workflow with Music objects:

  1. Initialize an empty Music object with Music().

  2. Add components to it with +.Music().

  3. Print it, or display it as musical score or audio file with show(), to check its structure.

  4. Keep adding components and checking it until you get what you want.

  5. Sometimes you may want to export the final Music object with export().

See also

+.Music() for adding components to a Music object.

show() for displaying a Music object as musical score and audio file.

export() for exporting a Music object to various file formats.

Examples

# initialize a Music object
Music()
#> Music 

# print a Music object to check its structure
m <- Music() + Meter(4, 4) + Line(list("C4"), list(4))
m
#> Music
#> 
#> Line 1
#> 
#> * as part 1 staff 1 voice 1
#> * of length 1
#> * of pitch C4
#> * of duration 4
#> 
#> Meter 4/4