Inserting 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 a 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.
Samuel Hartmann, December 2006
You can download the latest version of OOoLilyPond from sourceforge.net:
http://sourceforge.net/project/showfiles.php?group_id=177831
The macro has been tested on the following systems:
Ubuntu 6.06 with OpenOffice.org 2.0.2 and LilyPond 2.6.3, 2.8.6 amd 2.10.5.
Windows XP with OpenOffice.org 2.0.2 and LilyPond 2.8.6
Mac OS X
It is supposed to work an all Unix like operating systems with OpenOffice.org 2.0.0 or higher installed. For newer or older versions of LilyPond the templates may need to be adjusted. To create templates for other versions of LilyPond, use the lilpond-book command with an example you find in the lilypond manual.
Install LilyPond, if not already done. LilyPond is included in most Linux distributions.
Unpack the OOoLilyPond-0.3.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"
- Click "Append..."
- In the file dialog open the file "~/OOoLilyPond/basic/script.xlb"
- In the "Append Libraries" dialog 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 (or another shortcut as you like)
- Select "OpenOffice.org Macros/user/OOoLilyPond/Main" as Functions
Category
- Select "main" as Funtion
- Click "Modify"
If not already installed, download LilyPond from www.lilypond.org and install it.
Download and unpack the file OOoLilyPond-0.3.zip. Move the extracted folder “OOoLilyPond” to your program files folder. For example on english versions of Windows move the folder to “C:\Program Files\OOoLilyPond” on a german Windows move it to “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"
- Select the radio button "OpenOffice.org"
- Click "Append..."
- In the file dialog open the file "C:\Program Files\basic\script.xlb"
- In the "Append Libraries" dialog 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 file OOoLilyPond-0.3.zip. 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 "Append..." or "Insert.." (depends on the version of
OpenOffice.org)
- In the file dialog open the file "~/OOoLilyPond/basic/script.xlb"
- In the "Append Libraries" dialog 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 LilyPond Executable field type
"/Applications/LilyPond.app/Contents/Resources/bin/lilypond"
- Click "OK"
These instructions were contributed by Andy May.
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 discribed 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 paths 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. |
|