LyX has the marvellous property to accept insertion of Lilypond files, that then converts to the respective picture format (e.g. EPS). If the conversion command is not included in the distribution settings, it can be inserted through the following steps (e.g. for EPS):
- Open the card Tools > Preferences > File Handling > Converters.
- Select in "From format" LilyPond music, and in "To format" EPS.
- In the "converter" field type "lilypond -dbackend=eps $$i"
- Click on "Add" and then on "Save".