Learn R Programming

musicXML (version 1.0.1)

toMXL.score: Score to MXL (MusicXML)

Description

Convert an object of class 'score' into the corresponding MusicXML chunk

Usage

# S3 method for score
toMXL(x)

Value

A MusicXML string.

Arguments

x

score to be converted.

Examples

Run this code
m1 <- measure(number=1,notes=list(note(p=pitch('Db5'),d=duration(2)),
                                  note(p=pitch('B5'),d=duration(2))))
m2 <- measure(number=2,notes=list(note(p=pitch('A5'),d=duration(2)),
                                  note(p=pitch('B5'),d=duration(2))))
s <- score(list(m1,m2))
toMXL(s)

Run the code above in your browser using DataLab