The package lilyglyphs
provides a set of macros for incorporating Lilypond fonts easily into XeLaTeX files. That package is available here. I am using TeXLive 2013.
With the following MWE it works as expected with XeLaTeX:
\documentclass{memoir}
\usepackage{fontspec}
\usepackage{lilyglyphs}
\begin{document}
\lilyTimeC
\end{document}
Running it with LuaLaTeX results in the following error:
! Undefined control sequence. \lilyGetGlyph #1^^@-\XeTeXglyph
\XeTeXglyphindex "#1"
I traced this back to the core/genericAccess.inp
file which contains the following line:
\newcommand*{\lilyGetGlyph}[1]{\XeTeXglyph\XeTeXglyphindex"#1" }
OK, that's a XeTeX-specific command. I need the LuaTeX version in order to make this work with LuaLaTeX. I found this answer which suggests something like this:
\def\lilyGetGlyph#1{\directlua{fonts.otf.char("#1")}}
But when I run LuaLaTeX on the MWE I get the following error:
! LuaTeX error [string "\directlua "]:1: attempt to index field 'otf' (a nil value)
stack traceback:
[string "\directlua "]:1: in main chunk.
\lilyGetGlyph ...\directlua {fonts.otf.char("#1")}
I have no idea what that means but neither do I understand the syntax of my attempted fix (I just keep putting in words and symbols hoping something will work).
So what I'm looking for is the LuaTeX version of that XeLaTeX bit of code that will allow the package lilyglyphs
to work with LuaLaTeX. Assuming, of course, that's the proper way to fix this.