NAME
ly-fu - play or display lilypond snippets
SYNOPSIS
$ export MIDI_EDITOR=timidity
$ export SCORE_VIEWER=xpdf
$ ly-fu --instrument=banjo c des ees c des bes c aes
$ ly-fu -i=trumpet --open "c8 g'4 c,8 g'4 c,8 g'2"
$ echo c e g | ly-fu -
This utility assumes Mac OS X and timidity by default; set the MIDI_EDITOR and SCORE_VIEWER environment variables, or adjust this code as necessary. zathura
is a handy PDF viewer, if available:
function open {
zathura "$@" 2>/dev/null &|
}
DESCRIPTION
Plays and possibly displays lilypond snippets entered at the command line. The MIDI_EDITOR
environment variable should be set to a program that can play MIDI files, and the SCORE_VIEWER
optionally set to a PDF viewer. (Or edit the source code as necessary.)
http://www.lilypond.org/ and in particular the Learning and Notation manuals should be consulted to understand the lilypond syntax.
OPTIONS
This program currently supports the following command line switches:
- --absolute
-
Assume lilypond absolute notation.
- --instrument=instrument
-
Set MIDI instrument (see lilypond docs and ZSH compdef script).
- --layout
-
Save the MIDI and other various files (they are unlinked by default).
- --open
-
Show the score via the
SCORE_VIEWER
program. - --partial=lilypond fragment
-
A lilypond fragment played once at the beginning.
- --relative=note
-
Specify what note the input is relative to.
- --repeats=count
-
How many times to repeat the (non-partial) input.
- --silent
-
Do not play the MIDI.
- --sleep=seconds
-
Kluge sleep before unlinking temporary files (if
SCORE_VIEWER
is slow, or so forth). - --tempo=tempo
-
What the tempo is (in quarter notes, e.g.
120
or the like). - --verbose
-
Show output from lilypond and the MIDI player.
FILES
A ZSH completion script is available in the zsh-compdef/
directory of the App::MusicTools distribution. Install this to a $fpath
directory.
BUGS
Reporting Bugs
If the bug is in the latest version, send a report to the author. Patches that fix problems or add new features are welcome.
http://github.com/thrig/App-MusicTools
Known Issues
STDERR hidden by default, so if you feed lilypond bad input, you will not see or hear anything, besides the PDF failing to open, or the music failing to play. Hence the --verbose flag.
SEE ALSO
AUTHOR
Jeremy Mates
COPYRIGHT
Copyright (C) 2012-2013 by Jeremy Mates
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.16 or, at your option, any later version of Perl 5 you may have available.