Disclaimer: I've never used LilyPond before.
Solution 1:
Inserting LilyPond files with the external material inset uses the following command:
Code: Select all
lilypond -dbackend=eps -dsafe --pdf YOURFILE.ly
If you run that manually, you will see that this produces full page EPS and PDF files. Further, these can't be cropped with, e.g. pdfcrop, because of the note (that you mentioned in your post also) at the bottom. To remove this note, take a look here (or just google the message followed by "remove"):
http://lilypond.1069038.n5.nabble.com/R ... 39566.html
You can modify the command run above by going to Tools > Preferences > File Handling > Converters
Solution 2:
In LyX, there is a LilyPond specific manual. It might be in the examples folder or in Help > Specific Manuals > LilyPond (I forget for 2.0.6-1). There you can see examples where the LilyPond code is put in directly to LyX. And as you can see in the output there are no full-page problems. The reason for this is that when you put the LilyPond code in directly, LyX passes all of the LaTeX code to LilyPond so that LilyPond knows to convert everything in-line (that is, understanding that there are things around it). It runs this command:
Code: Select all
lilypond-book --safe --pdf --latex-program=pdflatex --lily-output-dir=ly-pdf "lilypond.lytex"