miditab | R Documentation |
Convert a MIDI file to sheet music/guitar tablature.
miditab(midi_file, file, keep_ly = FALSE, details = FALSE, ...)
midi_file |
character, MIDI file ( |
file |
character, output file ending in .pdf or .png. |
keep_ly |
logical, keep LilyPond file. |
details |
logical, set to |
... |
additional arguments passed to |
Under development/testing. See warning and details below.
Convert a MIDI file to a pdf or png music score using the LilyPond music
engraving program.
Output format is inferred from file
extension. This function is a wrapper
around midily()
, the function that converts the MIDI file to a LilyPond
(.ly
) file using a LilyPond command line utility.
WARNING: Even though the purpose of the command line utility is to convert
an existing MIDI file to a LilyPond file, it nevertheless generates a
LilyPond file that specifies inclusion of MIDI output.
This means when you subsequently process the LilyPond file with LilyPond or
if you use miditab()
to go straight from your MIDI file to pdf output,
the command line tool will also produce a MIDI file output. It will
overwrite your original MIDI file if it has the same file name and location!
On Windows systems, it may be necessary to specify a path in tabr_options()
to both midi2ly
and python
if they are not already added to the system
PATH variable.
nothing returned; a file is written.
midily()
, tab()
, lilypond()
## Not run:
if(tabr_options()$midi2ly != ""){
midi <- system.file("example.mid", package = "tabr")
outfile <- file.path(tempdir(), "out.pdf")
miditab(midi, outfile, details = FALSE) # requires LilyPond installation
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.