On Mon 13 May 2024 at 03:21:35 (+0000), Peter Baughman wrote:
> I have a few .ly files that work great and produce lovely pictures when I 
> build then with a command like:
> 
> lilypond --png my_song.ly​
> 
> I started to play around with midi output and was a little suprised to find 
> that I needed to add a \midi code block to my file (instead of some other 
> command-line flag when building) but this was not a big deal - After 20 or 30 
> minutes I figured out how to do it and got some lovely sound output.
> 
> I was surprised, though to discover that when I built my songs they were no 
> longer producing png output.
> 
> Is there a way to get both PNG and midi output from the same .ly file, or do 
> I need to invent some preprocessor step that adds a \midi​ block to a file or 
> perhaps removes one from a file to get png output?

In the absence of both \layout { } and \midi { }, LP produces a
score. If you add a \midi { } and you still want a score, you must
add a \layout { } too.

Cheers,
David.

Reply via email to