powered by
Write a score to a LilyPond format (.ly) text file for later use by LilyPond or subsequent editing outside of R.
.ly
lilypond(score, file, key = "c", time = "4/4", tempo = "2 = 60", header = NULL, string_names = NULL, paper = NULL, endbar = TRUE, midi = TRUE, path = NULL)
a score object.
character, LilyPond output file ending in .ly. May include an absolute or relative path.
character, key signature, e.g., c, b_, f#m, etc.
c
b_
f#m
character, defaults to "4/4".
"4/4"
character, defaults to "2 = 60".
"2 = 60"
a named list of arguments passed to the header of the LilyPond file. See details.
label strings at beginning of tab staff. NULL (default) for non-standard tunings only, TRUE or FALSE for force on or off completely.
NULL
TRUE
FALSE
a named list of arguments for the LilyPond file page layout. See details.
character, the end bar.
logical, add midi inclusion specification to LilyPond file.
character, optional output directory prefixed to file, may be an absolute or relative path. If NULL (default), only file is used.
file
nothing returned; a file is written.
All header list elements are character strings. The options for header include:
header
title
subtitle
composer
album
arranger
instrument
meter
opus
piece
poet
copyright
tagline
All paper list elements are numeric except page_numbers, which is logical. The options for paper include:
paper
page_numbers
textheight
linewidth
indent
first_page_number
fontsize
tab, midily,
tab
midily
# NOT RUN { x <- phrase("c ec'g' ec'g'", "4 4 2", "5 432 432") x <- track(x) x <- score(x) outfile <- file.path(tempdir(), "out.ly") lilypond(x, outfile) # }
Run the code above in your browser using DataLab