simplify_phrase | R Documentation |
This function can be used to simplify the LilyPond syntax of a phrase. Not intended for direct use. See details.
simplify_phrase(phrase)
phrase |
a phrase object. |
This function not intended to be used directly, but is available so that you
can see how LilyPond syntax for phrases will be transformed by default in
the process of creating a LilyPond file. This function is used by the
lilypond()
function and associated render_*
functions. When using
lilypond()
directly, this can be controlled by the simplify
argument.
The result of this function is a character string containing simpler, more
efficient LilyPond syntax. It can be coerced back to a phrase with
as_phrase()
, but its print method colors will no longer display properly.
More importantly, this simplification removes any possibility of transforming
the phrase back to its original inputs. The more complex but nicely
structured original representation does a better job at maintaining
reasonable possibility of one to one transformation between a phrase object
and the inputs that it was built from.
character
notes <- "a~ a b c' c'e'g'~ c'e'g'"
info <- "8.. 8..-. 8- 8-^ 4.^ 4."
(x <- p(notes, info))
as_phrase(simplify_phrase(x))
(x <- p(notes, info, 5))
as_phrase(simplify_phrase(x))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.