Using music notation in OpenOffice.org
OOoLilyPond is a macro for OpenOffice.org that simplifies the integration of music notation in OpenOffice.org Writer, Impress and Draw. It can be used to write a book on music theory or to write down exercises for music instruments or voices which need to be commented with lots of text.
The music expression is entered as text code in the LilyPond language and then rendered into an image. It needs some time to get familar with the LilyPond language but once learned, small pieces of music are entered much faster than with any other sofware.
The author likes to thank Geoffroy Piroux who has written the macro OOoLaTeX. OOoLilyPond has been derived from OOoLaTeX. Thanks also to Andy May for the installation instructions for Mac OS X and to Vern Takebayashi for testing. And of course many thanks to the authors of LilyPond.
Samuel Hartmann, July 2007
This is a bug fix release. There are no new features. Error handling has been improved.
Contains templates for LilyPond version 2.10. The template names have changed. The default template is now "a4". All other templates are based on the "a4" template and differ only in one property. The templates vary properties like staff size, line width and time signature visibility. The user is encouraged to create his own templates which combine the desired properties.
OOoLilyPond has been successfully tested on Mac OS X. The installation instructions on the web page are updated with the section for Mac OS X.
You can download the latest version of OOoLilyPond from sourceforge.net:
http://sourceforge.net/project/showfiles.php?group_id=177831
Linux/Unix:
OpenOffice.org 2.0 or higher.
LilyPond 2.6, 2.8, 2.10, not 2.11.
Windows:
Windows XP, may also work on Windows 2000.
OpenOffice.org 2.2, may also work with OpenOffice.org 2.1 but not with 2.0
LilyPond 2.6, 2.8, 2.10, not 2.11.
Mac OS X:
LilyPond 2.6, 2.8, 2.10, not 2.11.
Make sure that the following software is installed:
- LilyPond 2.10.x (versions 2.6 and 2.8 may also work)
- OpenOffice.org 2.2.x (versions 2.1.x may also work)
Download and unpack the newest OOoLilyPond archive (tar.gz file) in your home folder.
Start OpenOffice.org
Register the basic macro in OpenOffice.org
- Select from the Menu: "Tools" → "Macros" → "Organize Macros" → "OpenOffice.org Basic..."
- Click "Organizer..."
- Go to the tab "Libraries".
- Make sure that "My Macros & Dialogs" is selected for "Location".
- Click "Import..." (depending on the version of OpenOffice.org the button may also be labelled "Append..." or "Insert...")
- In the file dialog open the file "~\OOoLilyPond\basic\script.xlb".
- The "Import Libraries" dialog is popping up. Click "OK".
- Close all open dialog boxes
Associate a keyboard shortcut with the macro
- Create a new writer document
- Select from the Menu: "Tools" → "Customize..."
- Go to the tab "Keyboard"
- Select "Control-M" as Shortcut key
- Select "OpenOffice.org Macros/user/OOoLilyPond/Main" as Functions Category
- Select "main" as Funtion
- Click "Modify"
Make sure that the following software is installed:
- LilyPond 2.10.x (versions 2.6 and 2.8 may also work)
- OpenOffice.org 2.2.x (versions 2.1.x may also work)
Download and unpack the newest OOoLilyPond zip file. Move the extracted folder “OOoLilyPond” to your program files folder. On english versions of Windows the correct location is “C:\Program Files\OOoLilyPond” on a german Windows it is “C:\Programme\OOoLilyPond”.
Start OpenOffice.org
Register the basic macro in OpenOffice.org
- Select from the Menu: "Tools" → "Macros" → "Organize Macros" → "OpenOffice.org Basic..."
- Click "Organizer..."
- Go to the tab "Libraries".
- Make sure that "My Macros & Dialogs" is selected for "Location".
- Click "Import..." (depending on the version of OpenOffice.org the button may also be labelled "Append..." or "Insert...")
- In the file dialog open the file "C:\Program Files\OOoLilyPond\basic\script.xlb".
- The "Import Libraries" dialog is popping up. Click "OK".
- Close all open dialog boxes
Associate a keyboard shortcut with the macro
- Create a new writer document
- Select from the Menu: "Tools" → "Customize..."
- Go to the tab "Keyboard"
- Select "Control-M" as Shortcut key
- Select "OpenOffice.org Macros/user/OOoLilyPond/Main" as Functions Category
- Select "main" as Funtion
- Click "Modify"
If LilyPond is not already installed, download and install it from www.lilypond.org.
Download and unpack the latest OOoLilyPond zip file. Move the extracted folder “OOoLilyPond” to your home folder.
Register the basic macro in OpenOffice.org
- Select from the Menu: "Tools" → "Macros" → "Organise Macros" → "OpenOffice.org Basic..."
- Click "Organizer..."
- Go to the tab "Libraries"
- Click "Import..." (depending on the version of OpenOffice.org the button may also be labelled "Append..." or "Insert...")
- In the file dialog open the file "~/OOoLilyPond/basic/script.xlb"
- The "Import Libraries" dialog is popping up. Click "OK".
- Close all open dialog boxes
Associate a keyboard shortcut with the macro
- Create a new writer document
- Select from the Menu: "Tools" --> "Customize..."
- Go to the tab "Keyboard"
- Select the radio button "OpenOffice.org"
- Select "Control-M" as Shortcut key
- Select "OpenOffice.org Macros/user/OOoLilyPond/Main" as Functions Category
- Select "main" as Funtion
- Click "Modify"
Configure the Macro
- Type "Control-M" to bring up the OOoLilyPond window.
- Click "Config" button.
- In the field "LilyPond Executable" type "/Applications/LilyPond.app/Contents/Resources/bin/lilypond".
- Click "OK".
Place the cursor in a Writer document. Click Ctrl-M to open the OOoLilyPond Editor. Click the “Config” button. In the configuration dialog check whether the template path corrensponds to your lilypond version. There are currently templates available for 2.6, 2.8 and 2.10. Close the configruation dialog. Enter the LilyPond code. Here is an Example: \key c \minor \relative c'' { c16 es, d es c es d es c' es, d es c es d es } Click "LilyPond" to translate it to an image.
You can later on change the code by selecting the image and pressing Ctrl-M again. |
|
After having installed OOoLilyPond the way it is described above, you have the OooLilyPond folder either in your home folder (on Linux) or in the folder for program files (Windows). The only files still needed after the installation are the templates in OOoLilyPond/templates. If you like, you can move the templates to any other place. You just have to tell OOoLilyPond the new path in the configuration dialog. You can choose png or eps as output format. When choosing png OOoLilyPond renders the music notation to a bitmap of the specified resolution. The file size of your document may become large (depending on the resolution) and navigation in the document may become slow. It is better to use the eps format when possible (on Windows during testing it did not work). When using the eps format the images are only displayed as a low resolution preview. When printed, the music notation is rendered in the full printer resolution. |
|
When Compiling the code I get the following error:
lilypond: /usr/lib/openoffice/program/libstdc++.so.6: version
'CXXABI_1.3.1' not found (required by lilypond)
In OOOLilyPond's configuration dialog, change LilyPond Executable from
lilypond
to
env LD_LIBRARY_PATH= lilypond
(Note the space between = and lilypond!)