File: running.docbook

package info (click to toggle)
frescobaldi 1.1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 4,240 kB
  • ctags: 2,434
  • sloc: python: 15,614; lisp: 28; sh: 25; makefile: 2
file content (222 lines) | stat: -rw-r--r-- 7,558 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<chapter id="running">
<title>Running &lilypond;</title>

<sect1 id="pdf_output">
<title>Creating PDF output</title>

<para>
There are currently three different ways you can run &lilypond; on your document.
</para>

<para>
The default one (by pressing the toolbar button or <keycap>Ctrl+M</keycap>) is to output a PDF
preview document. This document contains clickable notes and other objects. If
you click on a note or other object, &frescobaldi; will put the text cursor in the
correct place (and even open the document for you if needed). You can also select fragments
of the &lilypond; input by clicking a note and then shift-clicking another one.
</para>

<para>
In the <guilabel>&lilypond;</guilabel> menu, you can also find the command <guilabel>Run &lilypond; (publish)</guilabel>.
This option also runs &lilypond;, but with clickable notes disabled. The resulting PDF
is much smaller and better suitable for distribution via e-mail or the Web. With
large musical scores, disabling the clickable notes can make the PDF many times
smaller.
</para>

<para>
The third possibility is the command <guilabel>Run &lilypond; (custom)</guilabel>.
This option shows a dialog where you can set some parameters for this run, overriding default settings.
If you have <link linkend="multiple-versions">multiple versions of &lilypond;</link> installed,
you can choose which &lilypond; you want to run.
</para>

<figure>
  <title>The custom Run LilyPond dialog</title>
  <mediaobject>
  <imageobject><imagedata format="PNG" fileref="run-lilypond1.png"/></imageobject>
  <textobject>
  <phrase>The custom Run LilyPond dialog</phrase>  
  </textobject>
  </mediaobject>
</figure>

<para>
While &lilypond; is running, you can follow its progress in the log view. If
&lilypond; encounters errors, you can click on the messages to place the text
cursor in the offending line and column. If there are many errors you want to
correct without waiting for &lilypond; to be finished, you can click the &lilypond;
button again to abort the running &lilypond; process.
</para>

<para>
When you want to run &lilypond; but your document has not been saved yet,
or has been saved to a non-local directory,
&frescobaldi; copies the document contents to a file in a temporary directory
on you local drive, and then runs &lilypond; on it.
</para>

<para>
If your document is on the local drive but has been modified,
&frescobaldi; asks you to save it first. (&frescobaldi; does not use a temporary directory
for files that are already on the local drive.)
If you want &frescobaldi; to always save your last local modifications before running
&lilypond;, check the box &quot;Don't ask this question again.&quot;
(Under
<menuchoice>
  <guimenu>Settings</guimenu>
  <guimenuitem>Configure &frescobaldi;...</guimenuitem>
</menuchoice> you can re-enable this warning if you want.)
</para>

<para>
After a succesful &lilypond; run, you will see some buttons appear at the bottom
of the Log view.
</para>

<para>
If &lilypond; created a PDF, buttons will be shown to open the PDF in the default
PDF viewer, and to print the PDF document.
</para>

</sect1>

<sect1 id="midi_output">
<title>Creating MIDI output</title>

<para>
If &lilypond; created a MIDI file, a button will be shown to play the MIDI in the
default MIDI player. If you want &lilypond; to create a MIDI file, add a <userinput>\midi { }</userinput>
line in your <userinput>\score { }</userinput> section, like this:
</para>

<programlisting>
<![CDATA[\score {
  \relative c'' {
    \time 7/4
    c2 bes4 a2 g a bes4 a( g) f2
  }
  \addlyrics {
    Join us now and share the soft -- ware!
  }
  \layout { }
  \midi { }
}]]>
</programlisting>

<para>
Be sure to also add a <userinput>\layout { }</userinput> line if you add a <userinput>\midi { }</userinput> line, otherwise
&lilypond; will not generate a PDF.
</para>

<para>
Also an email button is shown, allowing you to easily send the source and output
documents to someone else using your default mail client.
</para>

</sect1>

<sect1 id="include">
<title>&lilypond; files that include other files</title>

<para>
When working on large music scores, it might be possible that you divide the
musical score in different files, and include them from a "master" file. Such a
master file, named e.g. <filename>NewSong.ly</filename>, might look like:
</para>

<programlisting>
<![CDATA[\version "2.12.0"

\header {
  title = "New Song"
}

\include "LayoutSettings.ly"

\include "SopranoPart.ly"
\include "PianoPart.ly"

\score {
  <<
    \new Staff = "soprano" \sopranoMusic
    \new Lyrics \lyricsto "soprano" \sopranoText
    \new PianoStaff <<
      \new Staff = "right" \rightHandMusic
      \new Staff = "left" \leftHandMusic
    >>
  >>
}]]>
</programlisting>

<para>
The files <filename>SopranoPart.ly</filename> and <filename>PianoPart.ly</filename> just contain the music definitions and
<filename>LayoutSettings.ly</filename> has some settings for font and page layout etc. Neither one of
them has a <userinput>\score { }</userinput> section in it. So pressing <keycap>Ctrl+M</keycap> and running &lilypond;
while you are working on such an included document might not make much sense, as
it would probably not generate a PDF output file (the document only contains
music expressions that are assigned to variables).
</para>

<para>
In such cases, you can tell &frescobaldi; that another file is the "master" file
for the current document. When you run &lilypond;, &frescobaldi; will run &lilypond;
on the master document rather than the current document. So in <filename>SopranoPart.ly</filename>
and <filename>PianoPart.ly</filename> you add a special line that is just a &lilypond; comment. But
&frescobaldi; will read the line and understand that you want &lilypond; to be run
on the master file. Here is an example how <filename>SopranoPart.ly</filename> would look like:
</para>

<programlisting>
<![CDATA[\version "2.12.0"

% Soprano part

sopranoMusic = \relative c' {
  c d e f g f e d
}

sopranoText = \lyricmode {
  Boer er ligt een kip in't wa -- ter
}

%%master: NewSong.ly
]]></programlisting>

<para>
The last line <userinput>%%master: &lt;filename&gt;</userinput> directs &frescobaldi; to compile <filename>NewSong.ly</filename>
instead of the current document when &lilypond; is started.
</para>

<para>
There are two related special comments: <userinput>%%master-preview:</userinput> and <userinput>%%master-publish:</userinput>.
Those will only compile the named file in either preview or publish mode. That
can be useful if you include several movements or e.g. hymns in a master file,
where every source file has it's own score section. If you e.g. use
<userinput>%%master-publish</userinput>, running in preview mode will just show the current document,
but running in publish mode will compile the master document so you get a view
on the whole score or book. 
</para>

<para>
"Master" and include files only work with documents that are on your local hard drive.
</para>
</sect1>


<sect1 id="multiple-versions">
<title>Using multiple &lilypond; versions</title>

<para>
If you have multiple versions of &lilypond; installed you can add them to &frescobaldi;
under &menu.settings.lilypond;.
One of the &lilypond; instances can be set as the default.
It is also possible to automatically start a &lilypond; instance with a version closest
to the <userinput>\version</userinput> statement in your document.
See <link linkend="settings-lilypond">Settings Dialog, &lilypond; Preferences</link> for more information.
</para>

</sect1>


</chapter>