Lilypond is a system for music engraving lilypond-book tool. An example is shown below, and this article describes how to typeset it with Texifier.

This is generated using a the following LaTeX source,
\documentclass{article}
\begin{document}
\section*{Typesetting Lilypond from within Texifier}
\begin{lilypond}[quote,fragment,staffsize=26]
\clef treble
\time 2/4
\key c \minor
r8 g'8 g'8 g'8 ees'2\fermata
\end{lilypond}
\end{document}
You can download this using the
Installing lilypond-book on macOS
lilypond-book is not generally distributed as part of a TeX distribution and most likely you will need to install it.
On macOS this can be done most easily with brew by running brew install lilypond on the command line.
Creating a lilypond-book Custom Build Script
As lilypond-book is not by default part of a TeX distributions, the support for it is not built into Texifier. You can however run the typeset from within Texifier by using a Custom Build Script apps/typesetting/typesetters/external/custom-typesetting
A simple example for lilypond is shown below.
#!/bin/bash
# A Texifier build script to run lilypond-book and generate a pdf
BareName="$(basename $TEXPAD_ROOTFILE_NO_EXT)"
mkdir -p "$TEXPAD_TEMPDIR"
lilypond-book "$TEXPAD_ROOTFILE" --output "$TEXPAD_TEMPDIR/$BareName.lytex" || {
exit 1
}
cd "$TEXPAD_TEMPDIR/$BareName.lytex" || {
echo "fatal: lilypond-book did not generate the output in the expected location"
exit 1
}
latex "$BareName.tex"
dvips "$BareName.dvi"
ps2pdf "$BareName.ps" || {
echo "fatal: ghostscript step failed"
exit 1
}
mv "$BareName.pdf" ../..
This is intended as a starting point for simple documents. It is possible that you require further features such as indices, bibliographies, etc that it does not cover and you should extend it for them.
To install the build script please follow the instructions here apps/typesetting/typesetters/external/custom-typesetting#4-local-and-global-scripts
