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 -

Or, to instead save the generated lilypond somewhere:

$ ly-fu --show-code e e e c1 > masterpiece.ly

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.

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).

--language=language

Specify the lilypond language to use, by default the lilypond default of nederlands. If using note names from Music::PitchNum::German,

... | ly-fu --language=deutsch ...

may be of some use. "Note names in other languages" in the lilypond notation reference contains the full list of supported languages.

--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.

--rhythmic-staff

Make the staff a lilypond RhythmicStaff instead of the usual one.

--show-code

Prints the generated lilypond data to standard out, then exits the program. The score is not shown, nor the music played.

--silent

Do not play the MIDI.

--sleep=seconds

Kluge sleep before unlinking temporary files (might be handy if SCORE_VIEWER is slow to start).

--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

NOTE This program makes heavy use of temporary files. On a shared system, the lilypond generated output files might introduce /tmp security problems (arbitrary file clobber or unlink against the user running the code). These can be avoided by employing a private temporary directory, for example by pointing the TMPDIR environment variable to such a directory.

A ZSH completion script is available in the zsh-compdef/ directory of the App::MusicTools distribution. Install this to a $fpath directory.

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

SEE ALSO

http://www.lilypond.org/

AUTHOR

Jeremy Mates

COPYRIGHT

Copyright (C) 2012-2015 by Jeremy Mates

This module is free software; you can redistribute it and/or modify it under the Artistic License (2.0).