Chapter 4. The LilyPond menu

Table of Contents

Almost all features of LilyTool are available from the menu and the toolbar. The toolbar contains buttons for some frequently used tasks, and the LilyPond menu. The LilyPond menu is also available from Plugins>LilyPond. The toolbar can be turned on and off in Plugins>Plugin Options...

You can define shortcuts for all menu commands in Utilities>Global Options...

All toolbar buttons have ther equivalent menu item in the menu, so in the following sections we will only describe the menus.

Process/view

The commands in this menu are about processing your document and viewing the results. Some commands has their button on the toolbar.

Note

To use these features Windows users must have bash in their system path or set bash's location in Plugins>Plugin Options...

Run lilypond

This command runs lilypond on the current buffer. LilyPond is run via the Console plugin using the LilyPond shell.

Convert to newer version

This command will run convert-ly on the current document. It will only work if you have a version tag in your document (like \version "2.4.2").

Note

You must to reload the document after running the conversion (use File>Reload)

View output (DVI and PS)

You can view the processed score with these commands. See the section called “Viewing and playing” for details.

Play midi

You can listen to the generated midi file. Note that .midi file is generated only when there is a

\midi { }

block in your score

Score

Here you find features that help you manipulating your whole score's properties.

Insert tempo marking

This command will insert a tempo marking as a markup string at the cursor position. For example you would like to make a tempo indication like this:

Choose LilyPond>Insert tempo marking, and fill the dialog box with the following values, then press OK.

LilyTool will generate the following fragment:

^\markup { \bold "Moderato " \tiny \note #"4" #0.7 "= 85"}

As you can see, it doesn't contain the parentheses, nor the 'cca.' But you can edit this markup as you wish. So assuming that the markup is to be put above a note, the final markup will look like this:

f4^\markup { \bold "Moderato " "(" \tiny \note #"4" #0.7 "= cca. 85)"}

For details on markups see the LilyPond manual.

Page layout

You can set the various parameters of page layout here.

No bar numbers

Turn off measure numbering.

Set score size

Sets the global staff size. See the LilyPond manual for common values.

Staff/voice

Features that are useful in the given staff/voice are presented here.

Count beats in selection

LilyTool will count and show the beat number in the selected text. For example, if you select six measures, when each one is 4/4, the status bar will show: 'Beats: 6/1'.

Insert repeat

Repeat syntax can be quite difficult to remember. This dialog helps you setting up repeats. If you click the Help button, you can read about the kinds of repeat in the LilyPond manual.

Ottava brackets

This command helps you setting up ottava brackets. You can set the octavation (1 is 8va, -1 is 8va bassa, 2 is 15ma), and the (optional) custom text for the octavation markup.

LilyTool will automatically put the necessary settings before and after the selected notes.

Center rests

In vocal music rests are often merged when occuring in the same time in two voices on the same staff.

Text spanner

This command will put a text spanner beginning at the starting note of the selection and ending at the last note of the selection. If you don't select anything you'll have to manually put the necessary \startTextSpan and \stopTextSpan commands.

Source editing

You find here commands that help editing the score. These commands are not directly related to the music, but instead to the structure.

Enable point-and-click

You can use this command if needed to enable point-and-click in the DVI viewer. (Note that the Document Wizard will automatically put the necessary line into the document.)

Wizards

You can find various wizards here that help you solve relatively complicated tasks. The most important one is the Document Setup Wizard.

Document Setup Wizard

You can use the Document Wizard to quickly set up your score. The Document Wizard is based on Velocity templates and BeanShell macros, so you can easily include it in your own templates.

Creating your own templates using the Document Wizard

You can use the document wizard for your own templates. You just have to make a Velocity template according to the documentation of the Templates plugin, and include the line

#parse ( "lilytool/templates/documentWizard.bsh" )

Then you can start your template (including the document wizard) by clicking you template's name in the Templates Tree.

Here is a very simple custom template as an example:

#parse ( "lilytool/templates/documentWizard.bsh" )
\header {
    title = "$titlingMap.title"
}

\score {
    \notes {
        \key $signMap.key
        \time $signMap.timeFraction
    }
}

This simple template just puts the title, the key signature and the time signature together. For your own templates you can use the variables that are set in the document wizard. Most variables are grouped into maps, according to the screens of the wizard, where the user can set them. In the following table you can see variables you can use in your templates.

Table 4.1. Variables that are set running the Document Wizard

Variable nameDescription
$finishedtrue if the wizard has been finished, false otherwise
$selectedInstrumentsList of instruments. The instruments have their own properties: staffName (e.g. SopranoI), staffType (e.g. single), name, midiName, hasLyrics, clef, voiceName (eg. melodySop), transposingNote
$titlingMap.title, $titlingMap.poet, etc.Title, Poet, etc.
$finalMap.generate-commentsTrue if comments should be generated
$finalMap.includeSelected note name language include file name (e.g. deutsch.ly)
$finalMap.languageSelected note name language (e.g. Deutsch)
$finalMap.lily-versionLilyPond version
$finalMap.pickup-durationPickup measure selected duration
$finalMap.pickup-timeHow many durations in pickup
$finalMap.set-tempoTrue if tempo should be set in midi
$finalMap.set-tempo-markTrue if tempo should be set on score
$finalMap.tempo-mark-durationTempo mark duration
$finalMap.tempo-mark-beatTempo mark beat
$lyricsMap.include-lyricsTrue if lyrics should be included in score
$lyricsMap.stanzasNumber of stanzas
$lyricsMap.include-chordstrue if chord names should be included in score
$lyricsMap.chord-modifiernone, germanChords or semiGermanchords
$signMap.timeFractionFraction for selected time
$signMap.keySelected key (according to the selected language)
$signMap.flavourSelected key flavour (major or minor)