Tuesday 19 January 2010

Playing with LilyPond

I’ve downloaded and installed LilyPond for Linux on my Acer Aspire One and spent an hour or so playing with it. It’s so neat! The excellent Learning Manual explains how to write music in LilyPond format. For instance, I’ve created this test file file.ly:
{
 \clef bass
  b,,1 e,1 a,1 d1 g1 c'1
}
To generate sheet music from this file, run LilyPond on the command line like this:
lilypond file.ly
By default, the output is saved as file.ps and file.pdf, but if you type
lilypond --png file.ly
it will generate file.png — this one:

B E A D G C

(Yes, this is the “standard” six-string bass tuning.)

5 comments:

  1. Cool. I just started using LilyPond (and I program too).

    Do you still use it? If so, do you know of a way to listen to the music you've written?

    I plan to try out MuseScore soon too...

    ReplyDelete
    Replies
    1. Hi David,

      I don't know any direct way of listening to .ly files. However you can produce a MIDI file with LilyPond, if it is of any use.

      To do that, you have to add the following within your \score{ ... } block:

      \midi{}
      \layout{}

      Then as you compile your score, you'll get the .midi output.

      Read more here

      Delete
    2. Hey - thanks! I appreciate this a lot. I think this might be the way for me to go with regard to writing sheet music and similar things.

      Delete
  2. Question - would you happen to know how to solve this issue with Lilypond? http://answers.yahoo.com/question/index?qid=20120406191049AAgSMHD

    ReplyDelete
    Replies
    1. Sorry I don't know how to do it elegantly with LilyPond. Did you try Denemo? This program should be able to do many things you're after (including playback). I did not try it myself yet though

      Delete