[notes]: Lilypond notation in Pd

It is sometimes the case that one needs to generate scores with traditional musical notation with a Pure Data patch.

The “notes” external object for Pure Data fits information generated on a patch into traditional music notation, and encodes it in lilypond syntax. See notes-help.pd to see what syntax must be used inside Pd to input information into notes.

notes will generate .ly scores and you will need Lilypond to compile it and output sheet music in .pdf format. LilyPond is an open source music engraving program. 

There are binaries for OS X and Linux, so you most probably won’t need to compile. Just open the notes-help.pd file to make sure the external is loading properly; you’ll see a “notes… can’t create message” if it doesn’t. If you do need to compile the externals, just cd into the main notes_lib directory and run make. If you have any trouble, try make clean and then make again.

If Lilypond is installed, the object will also compile the score directly and produce a .pdf document from within Pd. Go here to learn more about lilypond and how to install it. In OS X, you must follow additional steps that will allow you to run it from the command line which is a prerequisite for the external to compile the score automatically from within Pd. In linux, make sure you are running version 2.18 or later for full compatibility. More instructions on installation below.

notes is programmed by Jaime Oliver La Rosa () at the NYU Waverly Labs and is released under the GPL License. It is currently in testing stage, so all comments are welcome, ideally in the Pd list.

You can download the code from sourceforge here.

Subscribe on the sidebar to receive information on Waverly Labs activities and updates on software versions.

INSTALLATION AND CONFIGURATION TIPS:

Before running the “notes-help.pd” file inside the notes_lib folder, follow the steps below according to your OS.

OS X:

1. Download and install the latest stable version of Lilypond from here.

2. In that same link, follow all the steps specified below the text: “Running on the command-line”.

3. Troubleshooting: If the external is loading properly, but you don’t see a pdf, something may have gone wrong in step number 2. To test that it is working properly run the following in “terminal”:
cd ~/bin
./lilypond
The output should state the lilypond version in the first line, so something like:
GNU LilyPond 2.18.2

LINUX:

1. Download the latest stable version of Lilypond from here. Choose the appropriate version according to your architecture.

2. cd into that folder; generally ~/downloads

3. make sure it is executable with: chmod +x lilypond-2.18.2-1.linux-x86.sh (adjust to your version in all cases)

4. run the script with sh lilypond-2.18.2-1.linux-x86.sh or  ./lilypond-2.18.2-1.linux-x86.sh.

5. this will install lilypond in the default ~/lilypond folder. In order to execute it from the command line therefore allowing [notes] to find it, you need to set the path once with export PATH=$PATH:$HOME/lilypond/usr/bin before you run Pd, or

6. set the path permanently with echo 'export PATH=$PATH:$HOME/lilypond/usr/bin' >> ~/.bashrc. You’ll need to reboot for it to show up in all your shell windows.

 WINDOWS:

I don’t have a windows computer so if there is a knowledgeable windows developer interested in working with me to compile a binary and test, .