[PATCH] Tracker 836: Add facility to change output file-name for a \book block or to set a suffix to prevent multiple files over-writing each other during a compilation. This change allows user to to this via functions rather than having to do so by manipulating semi-documented parser variables. |
[ Thread Index |
Date Index
| More lilynet.net/frogs Archives
]
- Subject: [PATCH] Tracker 836: Add facility to change output file-name for a \book block or to set a suffix to prevent multiple files over-writing each other during a compilation. This change allows user to to this via functions rather than having to do so by manipulating semi-documented parser variables.
- From: Ian Hulin <ian@xxxxxxxxxxxx>
- Date: Tue, 27 Oct 2009 15:50:26 +0000
---
lily/parser.yy | 2 ++
ly/init.ly | 2 ++
ly/music-functions-init.ly | 16 +++++++++++++++-
scm/lily-library.scm | 37 +++++++++++++++++++++++++++++++------
4 files changed, 50 insertions(+), 7 deletions(-)
diff --git a/lily/parser.yy b/lily/parser.yy
index 813452e..fbdcaa3 100644
--- a/lily/parser.yy
+++ b/lily/parser.yy
@@ -672,6 +672,8 @@ book_body:
push_paper (PARSER, $$->paper_);
$$->header_ = PARSER->lexer_->lookup_identifier ("$defaultheader");
PARSER->lexer_->set_identifier (ly_symbol2scm ("$current-book"), $$->self_scm ());
+ PARSER->lexer_->set_identifier (ly_symbol2scm ("book-output-suffix"), SCM_BOOL_F);
+ PARSER->lexer_->set_identifier (ly_symbol2scm ("book-filename"), SCM_BOOL_F);
}
| BOOK_IDENTIFIER {
$$ = unsmob_book ($1);
diff --git a/ly/init.ly b/ly/init.ly
index 9304810..7bd9cf2 100644
--- a/ly/init.ly
+++ b/ly/init.ly
@@ -20,6 +20,8 @@
#(define expect-error #f)
#(define output-empty-score-list #f)
#(define output-suffix #f)
+#(define book-filename #f)
+#(define book-output-suffix #f)
#(use-modules (scm clip-region))
\maininput
%% there is a problem at the end of the input file
diff --git a/ly/music-functions-init.ly b/ly/music-functions-init.ly
index 4283157..eedee10 100644
--- a/ly/music-functions-init.ly
+++ b/ly/music-functions-init.ly
@@ -171,7 +171,21 @@ bendAfter =
(make-music 'BendAfterEvent
'delta-step delta))
-%% why a function?
+
+bookOutputName =
+#(define-music-function (parser location newfilename) (string?)
+ (_i "Direct output for the current book block to @var{newfilename}")
+ (set! book-filename newfilename)
+ (make-music 'SequentialMusic 'void #t))
+
+bookOutputSuffix =
+#(define-music-function (parser location newsuffix) (string?)
+ (_i "Set the output filename suffix for the current book block to
+@var{newsuffix}")
+ (set! book-output-suffix newsuffix)
+ (make-music 'SequentialMusic 'void #t))
+
+ %% why a function?
breathe =
#(define-music-function (parser location) ()
(_i "Insert a breath mark.")
diff --git a/scm/lily-library.scm b/scm/lily-library.scm
index 827fb24..da57f12 100644
--- a/scm/lily-library.scm
+++ b/scm/lily-library.scm
@@ -134,12 +134,37 @@
(ly:make-score music))
-
-(define (get-outfile-name parser base)
- (let* ((output-suffix (ly:parser-lookup parser 'output-suffix))
- (counter-alist (ly:parser-lookup parser 'counter-alist))
- (output-count (assoc-get output-suffix counter-alist 0))
- (result base))
+;; return any suffix value for output filename allowing for settings by
+;; calls to \bookOutputName
+(define (get-current-filename parser)
+ (let* (
+ (book-filename (ly:parser-lookup parser 'book-filename)))
+ (if (not book-filename)
+ (ly:parser-output-name parser)
+ (ly:parser-lookup parser 'book-filename))))
+
+;; return any suffix value for output filename allowing for settings by
+;; calls to \bookOutputSuffix
+(define (get-current-suffix parser)
+ (let* (
+ (book-output-suffix (ly:parser-lookup parser 'book-output-suffix)))
+ (if (string? book-output-suffix)
+ (ly:parser-lookup parser 'book-output-suffix)
+ (ly:parser-lookup parser 'output-suffix))))
+
+(define-public current-outfile-name #f) ; for use by regression tests
+
+(define (get-outfile-name parser)
+ ;; user can now override the base file name, so we have to use
+ ;; the file-name concatenated with any potential output-suffix value
+ ;; as the key to out internal a-list
+ (let* (
+ (base-name (get-current-filename parser))
+ (output-suffix (get-current-suffix parser))
+ (alist-key (format "~a~a" base-name output-suffix))
+ (counter-alist (ly:parser-lookup parser 'counter-alist))
+ (output-count (assoc-get alist-key counter-alist 0))
+ (result base-name))
;; Allow all ASCII alphanumerics, including accents
(if (string? output-suffix)
(set! result (format "~a-~a"
--
1.6.0.4
--------------090700060902070803050202
Content-Type: text/x-lilypond;
name="Exsultate.ly"
Content-Disposition: inline;
filename="Exsultate.ly"
Content-Transfer-Encoding: 7bit
%{
% This file should produce three backend files using the default namses:
% 1. Exsultate.pdf, .midi for the first \book
% 2. Exsultate-1.pdf, .midi for the second \book
% 3. Exsultate-2.pdf, .midi for the third \book
%}
\include "english.ly"
\version "2.13.4"
\header {
title = "Exsultate, Jubilate"
subtitle = "Motet"
subsubtitle = "K. 165"
instrument = "Soprano Solo and Orchestra"
composer = "W. A. Mozart"
opus = "KV 165"
}
movonesettings = {
\key f \major
\time 4/4
\tempo "Allegro" 4=128
}
oboesmovoneMusic = \relative c' {
r8 <a' c>8 <a c>8 <a c>8 <a c>4 r4 |
}
hornsmovoneMusic = \relative c' {
\key c \major r8 <c c'>8 <c c'>8 <c c'>8 <c c'>4 r4 |
}
VlnonemovoneMusic = \relative c' {
<a' f'>4 c4~ c8 d16 e f g a f |
}
VlntwomovoneMusic = \relative c' {
a'16 bflat c bflat a bflat c bflat a4 r4 |
}
VlamovoneMusic = \relative c' {
\clef alto c16 bf a bf c bf a bf c4 r4 |
}
SopranomovoneMusic = \relative c' {
R1 |
}
BCmovoneMusic = \relative c {
\clef bass f8 f f f f f f f |
}
\book {
\paper {
}
\bookpart {
\header {
subtitle = "I. Allegro"
}
\score {
\new StaffGroup {
<<
\new Staff = oboesmovone \with {instrumentName = "2 Oboi"
midiInstrument = "oboe"}
{
\movonesettings \oboesmovoneMusic
}
\new Staff = hornsmovone \with {instrumentName = "2 Corni in F"
midiInstrument = "french horn"}
{
\transposition f \time 4/4 \tempo "Allegro" \hornsmovoneMusic
}
\new GrandStaff
<<
\new Staff = Vlnonemovone \with {instrumentName = "Violino I"
midiInstrument = "violin"}
{
\movonesettings \VlnonemovoneMusic
}
\new Staff = Vlntwomovone \with {instrumentName = "Violino II"
midiInstrument = "violin"}
{
\movonesettings \VlntwomovoneMusic
}
>>
\new Staff = Vlamovone \with {instrumentName = "Viola"
midiInstrument = "viola"}
{
\movonesettings \VlamovoneMusic
}
\new Staff = Sopranomovone \with {instrumentName = "Soprano"
midiInstrument = "voice oohs"}
{
\movonesettings \SopranomovoneMusic
}
\new Staff = BCmovone \with { instrumentName = "Basso ed Organo"
midiInstrument = "contrabass"}
{
\movonesettings \BCmovoneMusic
}
>>
}
\midi {
}
\layout{
}
}
}
}
movtwosettings = {
\key a \major
\time 3/4
\tempo "Andante" 4=72
}
oboesmovtwoMusic = \relative c' {
\partial 8 r8
|R2. |
}
hornsmovtwoMusic = \relative c' {
\partial 8 r8 |
R2. |
}
VlnonemovtwoMusic = \relative c'' {
\partial 8 a8 |
e'4. d16( cs) b8 cs |
}
VlntwomovtwoMusic = \relative c'' {
\partial 8 a8 |
cs4. b16( a) gs8 a |
}
VlamovtwoMusic = \relative c' {
\clef alto
\partial 8 a8 |
e'4. d16( cs) b8 cs |
}
SopranomovtwoMusic = \relative c'' {
\partial 8 r8
|R2. |
}
BCmovtwoMusic = \relative c {
\clef bass
\partial 8 r8
r4 a'4 a, |
}
\book{
\paper {
}
\bookpart{
\header {
subtitle = "II. Andante"
}
\score {
\new StaffGroup {
<<
\new Staff = oboesmovtwo \with {instrumentName = "2 Oboi"
midiInstrument = "oboe"}
{
\movtwosettings \oboesmovtwoMusic
}
\new Staff = hornsmovtwo \with {instrumentName = "2 Corni in F"
midiInstrument = "french horn"}
{
\transposition f \time 4/4 \key e \major \tempo "Allegro" \hornsmovtwoMusic
}
\new GrandStaff <<
\new Staff = Vlnonemovtwo \with {instrumentName = "Violino I"
midiInstrument = "violin"}
{
\movtwosettings \VlnonemovtwoMusic
}
\new Staff = Vlntwomovtwo \with {instrumentName = "Violino II"
midiInstrument = "violin"}
{
\movtwosettings \VlntwomovtwoMusic
}
>>
\new Staff = Vlamovtwo \with {instrumentName = "Viola"
midiInstrument = "viola"}
{
\movtwosettings \VlamovtwoMusic
}
\new Staff = Sopranomovtwo \with {instrumentName = "Soprano"
midiInstrument = "voice oohs"}
{
\movtwosettings \SopranomovtwoMusic
}
\new Staff = BCmovtwo \with { instrumentName = "Basso ed Organo"
midiInstrument = "contrabass"}
{
\movtwosettings \BCmovtwoMusic
}
>>
}
\midi {
}
\layout{
}
}
}
}
movthreesettings = {
\key f \major
\time 2/4
\tempo "Vivace" 4=132
}
oboesmovthreeMusic = \relative c'' {
<c'(a>4. <d) bf>8 |
<d( bf>8 <c) a>8 <bf-. g-.> <a-. f-.> |
<a f>4 <a f>4 |
<a( fs>4 <bf) g >8 r8 |
}
hornsmovthreeMusic = \relative c' {
<c' c>4 r4 |
R2 |
<c e>4 <c e> |
g2 |
}
VlnonemovthreeMusic = \relative c'' {
c4.(\f d8 |
d8( c) bf-. a-. |
a4 a |
a4( bf8) r8 |
}
VlntwomovthreeMusic = \relative c'' {
a4.(\f bf8 ) |
bf8( a) g-. f-. |
f4 f4 |
fs4( g8) r8 |
}
VlamovthreeMusic = \relative c' {
\clef alto
f4\f r4 |
R2 |
c4 c4 |
c2 |
}
SopranomovthreeMusic = \relative c'' {
R2 |
R2 |
R2 |
R2 |
}
BCmovthreeMusic = \relative c {
\clef bass
f4\f r4 |
R2 |
f4 f4 |
e2 |
}
\book {
\paper {
}
\bookpart {
\score {
\new StaffGroup <<
\new Staff = oboesmovthree \with {instrumentName = "2 Oboi"
midiInstrument = "oboe"}
{
\movthreesettings \oboesmovthreeMusic
}
\new Staff = hornsmovthree \with {instrumentName = "2 Corni in F"
midiInstrument = "french horn"}
{
\transposition f \time 2/4 \key c \major \tempo "Vivace" 4=132
\hornsmovthreeMusic
}
\new GrandStaff <<
\new Staff = Vlonemovthree \with {instrumentName = "Violino I"
midiInstrument = "violin"}
{
\movthreesettings \VlnonemovthreeMusic
}
\new Staff = Vlntwomovtwo \with {instrumentName = "Violino II"
midiInstrument = "violin"}
{
\movthreesettings \VlntwomovthreeMusic
}
>>
\new Staff = Vlamovtwo \with {instrumentName = "Viola"
midiInstrument = "viola"}
{
\movthreesettings \VlamovthreeMusic
}
\new Staff = Sopranomovthree \with {instrumentName = "Soprano"
midiInstrument = "voice oohs"}
{
\movthreesettings \SopranomovthreeMusic
}
\new Staff = BCmovthree \with { instrumentName = "Basso ed Organo"
midiInstrument = "contrabass"}
{
\movthreesettings \BCmovthreeMusic
}
>>
\midi {
}
\layout{
}
}
}
}
--------------090700060902070803050202
Content-Type: text/x-lilypond;
name="Exsultate-Bsuffix.ly"
Content-Disposition: inline;
filename="Exsultate-Bsuffix.ly"
Content-Transfer-Encoding: 7bit
%{
% This file should produce three backend files using book-output-suffix:
% 1. Exsultate-Bsuffix-Allegro.pdf, .midi for the first \book
% 2. Exsultate-Bsuffix-Andante.pdf, .midi for the second \book
% 3. Exsultate-Bsuffix-Alleluia.pdf, .midi for the third \book
%}
\include "english.ly"
\version "2.13.4"
\header {
title = "Exsultate, Jubilate"
subtitle = "Motet"
subsubtitle = "K. 165"
instrument = "Soprano Solo and Orchestra"
composer = "W. A. Mozart"
opus = "KV 165"
}
movonesettings = {
\key f \major
\time 4/4
\tempo "Allegro" 4=128
}
oboesmovoneMusic = \relative c' {
r8 <a' c>8 <a c>8 <a c>8 <a c>4 r4 |
}
hornsmovoneMusic = \relative c' {
\key c \major r8 <c c'>8 <c c'>8 <c c'>8 <c c'>4 r4 |
}
VlnonemovoneMusic = \relative c' {
<a' f'>4 c4~ c8 d16 e f g a f |
}
VlntwomovoneMusic = \relative c' {
a'16 bflat c bflat a bflat c bflat a4 r4 |
}
VlamovoneMusic = \relative c' {
\clef alto c16 bf a bf c bf a bf c4 r4 |
}
SopranomovoneMusic = \relative c' {
R1 |
}
BCmovoneMusic = \relative c {
\clef bass f8 f f f f f f f |
}
\book {
\paper {
}
\bookOutputSuffix "Allegro"
\bookpart {
\header {
subtitle = "I. Allegro"
}
\score {
\new StaffGroup {
<<
\new Staff = oboesmovone \with {instrumentName = "2 Oboi"
midiInstrument = "oboe"}
{
\movonesettings \oboesmovoneMusic
}
\new Staff = hornsmovone \with {
instrumentName = \markup { \column {"2 Corni" "in F"}}
midiInstrument = "french horn"}
{
\transposition f \time 4/4 \tempo "Allegro" \hornsmovoneMusic
}
\new GrandStaff
<<
\new Staff = Vlnonemovone \with {instrumentName = "Violino I"
midiInstrument = "violin"}
{
\movonesettings \VlnonemovoneMusic
}
\new Staff = Vlntwomovone \with {instrumentName = "Violino II"
midiInstrument = "violin"}
{
\movonesettings \VlntwomovoneMusic
}
>>
\new Staff = Vlamovone \with {instrumentName = "Viola"
midiInstrument = "viola"}
{
\movonesettings \VlamovoneMusic
}
\new Staff = Sopranomovone \with {instrumentName = "Soprano"
midiInstrument = "voice oohs"}
{
\movonesettings \SopranomovoneMusic
}
\new Staff = BCmovone \with { instrumentName = "Basso ed Organo"
midiInstrument = "contrabass"}
{
\movonesettings \BCmovoneMusic
}
>>
}
\midi {
}
\layout{
}
}
}
}
movtwosettings = {
\key a \major
\time 3/4
\tempo "Andante" 4=72
}
oboesmovtwoMusic = \relative c' {
\partial 8 r8
|R2. |
}
hornsmovtwoMusic = \relative c' {
\partial 8 r8 |
R2. |
}
VlnonemovtwoMusic = \relative c'' {
\partial 8 a8 |
e'4. d16( cs) b8 cs |
}
VlntwomovtwoMusic = \relative c'' {
\partial 8 a8 |
cs4. b16( a) gs8 a |
}
VlamovtwoMusic = \relative c' {
\clef alto
\partial 8 a8 |
e'4. d16( cs) b8 cs |
}
SopranomovtwoMusic = \relative c'' {
\partial 8 r8
|R2. |
}
BCmovtwoMusic = \relative c {
\clef bass
\partial 8 r8
r4 a'4 a, |
}
\book{
\paper {
}
\bookOutputSuffix "Andante"
\bookpart{
\header {
subtitle = "II. Andante"
}
\score {
\new StaffGroup {
<<
\new Staff = oboesmovtwo \with {instrumentName = "2 Oboi"
midiInstrument = "oboe"}
{
\movtwosettings \oboesmovtwoMusic
}
\new Staff = hornsmovtwo \with {
instrumentName = \markup { \column {"2 Corni" "in F"}}
midiInstrument = "french horn"}
{
\transposition f \time 4/4 \key e \major \tempo "Allegro" \hornsmovtwoMusic
}
\new GrandStaff <<
\new Staff = Vlnonemovtwo \with {instrumentName = "Violino I"
midiInstrument = "violin"}
{
\movtwosettings \VlnonemovtwoMusic
}
\new Staff = Vlntwomovtwo \with {instrumentName = "Violino II"
midiInstrument = "violin"}
{
\movtwosettings \VlntwomovtwoMusic
}
>>
\new Staff = Vlamovtwo \with {instrumentName = "Viola"
midiInstrument = "viola"}
{
\movtwosettings \VlamovtwoMusic
}
\new Staff = Sopranomovtwo \with {instrumentName = "Soprano"
midiInstrument = "voice oohs"}
{
\movtwosettings \SopranomovtwoMusic
}
\new Staff = BCmovtwo \with { instrumentName = "Basso ed Organo"
midiInstrument = "contrabass"}
{
\movtwosettings \BCmovtwoMusic
}
>>
}
\midi {
}
\layout{
}
}
}
}
movthreesettings = {
\key f \major
\time 2/4
\tempo "Vivace" 4=132
}
oboesmovthreeMusic = \relative c'' {
<c'(a>4. <d) bf>8 |
<d( bf>8 <c) a>8 <bf-. g-.> <a-. f-.> |
<a f>4 <a f>4 |
<a( fs>4 <bf) g >8 r8 |
}
hornsmovthreeMusic = \relative c' {
<c' c>4 r4 |
R2 |
<c e>4 <c e> |
g2 |
}
VlnonemovthreeMusic = \relative c'' {
c4.(\f d8 |
d8( c) bf-. a-. |
a4 a |
a4( bf8) r8 |
}
VlntwomovthreeMusic = \relative c'' {
a4.(\f bf8 ) |
bf8( a) g-. f-. |
f4 f4 |
fs4( g8) r8 |
}
VlamovthreeMusic = \relative c' {
\clef alto
f4\f r4 |
R2 |
c4 c4 |
c2 |
}
SopranomovthreeMusic = \relative c'' {
R2 |
R2 |
R2 |
R2 |
}
BCmovthreeMusic = \relative c {
\clef bass
f4\f r4 |
R2 |
f4 f4 |
e2 |
}
\book {
\paper {
}
\bookOutputSuffix "Alleluia"
\bookpart {
\header {
subtitle = "III. Vivace - Alleluia"
}
\score {
\new StaffGroup <<
\new Staff = oboesmovthree \with {instrumentName = "2 Oboi"
midiInstrument = "oboe"}
{
\movthreesettings \oboesmovthreeMusic
}
\new Staff = hornsmovthree \with {
instrumentName = \markup { \column {"2 Corni" "in F"}}
midiInstrument = "french horn"}
{
\transposition f \time 2/4 \key c \major \tempo "Vivace" 4=132
\hornsmovthreeMusic
}
\new GrandStaff <<
\new Staff = Vlonemovthree \with {instrumentName = "Violino I"
midiInstrument = "violin"}
{
\movthreesettings \VlnonemovthreeMusic
}
\new Staff = Vlntwomovtwo \with {instrumentName = "Violino II"
midiInstrument = "violin"}
{
\movthreesettings \VlntwomovthreeMusic
}
>>
\new Staff = Vlamovtwo \with {instrumentName = "Viola"
midiInstrument = "viola"}
{
\movthreesettings \VlamovthreeMusic
}
\new Staff = Sopranomovthree \with {instrumentName = "Soprano"
midiInstrument = "voice oohs"}
{
\movthreesettings \SopranomovthreeMusic
}
\new Staff = BCmovthree \with {
instrumentName = \markup{ \column {"Basso ed" "Organo"}}
midiInstrument = "contrabass"}
{
\movthreesettings \BCmovthreeMusic
}
>>
\midi {
}
\layout{
}
}
}
}
--------------090700060902070803050202
Content-Type: text/x-lilypond;
name="Exsultate-Name.ly"
Content-Disposition: inline;
filename="Exsultate-Name.ly"
Content-Transfer-Encoding: 7bit
%{
% This file should produce three backend files using book-filename:
% 1. KV165-Allegro.pdf, .midi for the first \book
% 2. KV165-Andante.pdf, .midi for the second \book
% 3. KV165-Alleluia.pdf, .midi for the third \book
%}
\include "english.ly"
\version "2.13.4"
\header {
title = "Exsultate, Jubilate"
subtitle = "Motet"
subsubtitle = "K. 165"
instrument = "Soprano Solo and Orchestra"
composer = "W. A. Mozart"
opus = "KV 165"
}
\paper {
}
\midi {
}
\layout{
}
movonesettings = {
\key f \major
\time 4/4
\tempo "Allegro" 4=128
}
oboesmovoneMusic = \relative c' {
r8 <a' c>8 <a c>8 <a c>8 <a c>4 r4 |
}
hornsmovoneMusic = \relative c' {
\key c \major r8 <c c'>8 <c c'>8 <c c'>8 <c c'>4 r4 |
}
VlnonemovoneMusic = \relative c' {
<a' f'>4 c4~ c8 d16 e f g a f |
}
VlntwomovoneMusic = \relative c' {
a'16 bflat c bflat a bflat c bflat a4 r4 |
}
VlamovoneMusic = \relative c' {
\clef alto c16 bf a bf c bf a bf c4 r4 |
}
SopranomovoneMusic = \relative c' {
R1 |
}
BCmovoneMusic = \relative c {
\clef bass f8 f f f f f f f |
}
\book {
\paper {
ragged-last-bottom = ##t
}
\bookpart {
\bookOutputName "KV165-Allegro"
\header {
subtitle = "I. Allegro"
}
\score {
\new StaffGroup {
<<
\new Staff = oboesmovone \with {instrumentName = "2 Oboi"
midiInstrument = "oboe"}
{
\movonesettings \oboesmovoneMusic
}
\new Staff = hornsmovone \with {instrumentName = "2 Corni in F"
midiInstrument = "french horn"}
{
\transposition f \time 4/4 \tempo "Allegro" \hornsmovoneMusic
}
\new GrandStaff
<<
\new Staff = Vlnonemovone \with {instrumentName = "Violino I"
midiInstrument = "violin"}
{
\movonesettings \VlnonemovoneMusic
}
\new Staff = Vlntwomovone \with {instrumentName = "Violino II"
midiInstrument = "violin"}
{
\movonesettings \VlntwomovoneMusic
}
>>
\new Staff = Vlamovone \with {instrumentName = "Viola"
midiInstrument = "viola"}
{
\movonesettings \VlamovoneMusic
}
\new Staff = Sopranomovone \with {instrumentName = "Soprano"
midiInstrument = "voice oohs"}
{
\movonesettings \SopranomovoneMusic
}
\new Staff = BCmovone \with { instrumentName = "Basso ed Organo"
midiInstrument = "contrabass"}
{
\movonesettings \BCmovoneMusic
}
>>
}
\midi {
}
\layout{
}
}
}
}
movtwosettings = {
\key a \major
\time 3/4
\tempo "Andante" 4=72
}
oboesmovtwoMusic = \relative c' {
\partial 8 r8
|R2. |
}
hornsmovtwoMusic = \relative c' {
\partial 8 r8 |
R2. |
}
VlnonemovtwoMusic = \relative c'' {
\partial 8 a8 |
e'4. d16( cs) b8 cs |
}
VlntwomovtwoMusic = \relative c'' {
\partial 8 a8 |
cs4. b16( a) gs8 a |
}
VlamovtwoMusic = \relative c' {
\clef alto
\partial 8 a8 |
e'4. d16( cs) b8 cs |
}
SopranomovtwoMusic = \relative c'' {
\partial 8 r8
|R2. |
}
BCmovtwoMusic = \relative c {
\clef bass
\partial 8 r8
r4 a'4 a, |
}
\book{
\bookOutputName "KV165-Andante"
\bookpart{
\header {
subtitle = "II. Andante"
}
\score {
\new StaffGroup {
<<
\new Staff = oboesmovtwo \with {instrumentName = "2 Oboi"
midiInstrument = "oboe"}
{
\movtwosettings \oboesmovtwoMusic
}
\new Staff = hornsmovtwo \with {
instrumentName = \markup { \column {"2 Corni" "in F"}}
midiInstrument = "french horn"}
{
\transposition f \time 4/4 \key e \major \tempo "Allegro" \hornsmovtwoMusic
}
\new GrandStaff <<
\new Staff = Vlnonemovtwo \with {instrumentName = "Violino I"
midiInstrument = "violin"}
{
\movtwosettings \VlnonemovtwoMusic
}
\new Staff = Vlntwomovtwo \with {instrumentName = "Violino II"
midiInstrument = "violin"}
{
\movtwosettings \VlntwomovtwoMusic
}
>>
\new Staff = Vlamovtwo \with {instrumentName = "Viola"
midiInstrument = "viola"}
{
\movtwosettings \VlamovtwoMusic
}
\new Staff = Sopranomovtwo \with {instrumentName = "Soprano"
midiInstrument = "voice oohs"}
{
\movtwosettings \SopranomovtwoMusic
}
\new Staff = BCmovtwo \with {
instrumentName = \markup {\column {"Basso ed" "Organo"}}
midiInstrument = "contrabass"}
{
\movtwosettings \BCmovtwoMusic
}
>>
}
\midi {
}
\layout{
}
}
}
}
movthreesettings = {
\key f \major
\time 2/4
\tempo "Vivace" 4=132
}
oboesmovthreeMusic = \relative c'' {
<c'a>4.(\f <d bf>8) |
<d bf>8( <c a>8) <bf-. g> <a-. f> |
<a f>4 <a f>4 |
<a fs>4( <bf g >8) r8 |
}
hornsmovthreeMusic = \relative c' {
<c' c,>4\f r4 |
R2 |
<c e,>4 <c e,> |
g2 |
}
VlnonemovthreeMusic = \relative c'' {
c4.(\f d8) |
d8( c) bf-. a-. |
a4 a |
a4( bf8) r8 |
}
VlntwomovthreeMusic = \relative c'' {
a4.(\f bf8 ) |
bf8( a) g-. f-. |
f4 f4 |
fs4( g8) r8 |
}
VlamovthreeMusic = \relative c' {
\clef alto
f4\f r4 |
R2 |
c4 c4 |
c2 |
}
SopranomovthreeMusic = \relative c'' {
R2 |
R2 |
R2 |
R2 |
}
BCmovthreeMusic = \relative c {
\clef bass
f4\f r4 |
R2 |
f4 f4 |
e2 |
}
\book {
\bookOutputName "KV165-Alleluia"
\bookpart {
\header {
subtitle = "III. Vivace - Alleluia"
}
\score {
\new StaffGroup <<
\new Staff = oboesmovthree \with {instrumentName = "2 Oboi"
midiInstrument = "oboe"}
{
\movthreesettings \oboesmovthreeMusic
}
\new Staff = hornsmovthree \with {
instrumentName = \markup { \column {"2 Corni" "in F"}}
midiInstrument = "french horn"}
{
\transposition f \time 2/4 \key c \major \tempo "Vivace" 4=132
\hornsmovthreeMusic
}
\new GrandStaff <<
\new Staff = Vlonemovthree \with {instrumentName = "Violino I"
midiInstrument = "violin"}
{
\movthreesettings \VlnonemovthreeMusic
}
\new Staff = Vlntwomovtwo \with {instrumentName = "Violino II"
midiInstrument = "violin"}
{
\movthreesettings \VlntwomovthreeMusic
}
>>
\new Staff = Vlamovtwo \with {instrumentName = "Viola"
midiInstrument = "viola"}
{
\movthreesettings \VlamovthreeMusic
}
\new Staff = Sopranomovthree \with {instrumentName = "Soprano"
midiInstrument = "voice oohs"}
{
\movthreesettings \SopranomovthreeMusic
}
\new Staff = BCmovthree \with { instrumentName = "Basso ed Organo"
instrumentName = \markup {\column {"Basso ed" "Organo"}}
midiInstrument = "contrabass"}
{
\movthreesettings \BCmovthreeMusic
}
>>
\midi {
}
\layout{
}
}
}
}
--------------090700060902070803050202
Content-Type: text/x-lilypond;
name="Exsultate-Name-Midi.ly"
Content-Disposition: inline;
filename="Exsultate-Name-Midi.ly"
Content-Transfer-Encoding: 7bit
%{
% This file should produce three backend files using book-filename:
% 1. KV165-Allegro.pdf, .midi for the first \book
% 2. KV165-Andante.pdf, .midi for the second \book
% 3. KV165-Alleluia.pdf, .midi for the third \book
% 4. An Additional KV165-Alleluia-1.midi
%}
\include "english.ly"
\version "2.13.4"
\header {
title = "Exsultate, Jubilate"
subtitle = "Motet"
subsubtitle = "K. 165"
instrument = "Soprano Solo and Orchestra"
composer = "W. A. Mozart"
opus = "KV 165"
}
\paper {
}
\midi {
}
\layout{
}
movonesettings = {
\key f \major
\time 4/4
\tempo "Allegro" 4=128
}
oboesmovoneMusic = \relative c' {
r8 <a' c>8 <a c>8 <a c>8 <a c>4 r4 |
}
hornsmovoneMusic = \relative c' {
\key c \major r8 <c c'>8 <c c'>8 <c c'>8 <c c'>4 r4 |
}
VlnonemovoneMusic = \relative c' {
<a' f'>4 c4~ c8 d16 e f g a f |
}
VlntwomovoneMusic = \relative c' {
a'16 bflat c bflat a bflat c bflat a4 r4 |
}
VlamovoneMusic = \relative c' {
\clef alto c16 bf a bf c bf a bf c4 r4 |
}
SopranomovoneMusic = \relative c' {
R1 |
}
BCmovoneMusic = \relative c {
\clef bass f8 f f f f f f f |
}
\book {
\paper {
ragged-last-bottom = ##t
}
\bookpart {
\bookOutputName "KV165-Allegro"
\header {
subtitle = "I. Allegro"
}
\score {
\new StaffGroup {
<<
\new Staff = oboesmovone \with {instrumentName = "2 Oboi"
midiInstrument = "oboe"}
{
\movonesettings \oboesmovoneMusic
}
\new Staff = hornsmovone \with {instrumentName = "2 Corni in F"
midiInstrument = "french horn"}
{
\transposition f \time 4/4 \tempo "Allegro" \hornsmovoneMusic
}
\new GrandStaff
<<
\new Staff = Vlnonemovone \with {instrumentName = "Violino I"
midiInstrument = "violin"}
{
\movonesettings \VlnonemovoneMusic
}
\new Staff = Vlntwomovone \with {instrumentName = "Violino II"
midiInstrument = "violin"}
{
\movonesettings \VlntwomovoneMusic
}
>>
\new Staff = Vlamovone \with {instrumentName = "Viola"
midiInstrument = "viola"}
{
\movonesettings \VlamovoneMusic
}
\new Staff = Sopranomovone \with {instrumentName = "Soprano"
midiInstrument = "voice oohs"}
{
\movonesettings \SopranomovoneMusic
}
\new Staff = BCmovone \with { instrumentName = "Basso ed Organo"
midiInstrument = "contrabass"}
{
\movonesettings \BCmovoneMusic
}
>>
}
\midi {
}
\layout{
}
}
}
}
movtwosettings = {
\key a \major
\time 3/4
\tempo "Andante" 4=72
}
oboesmovtwoMusic = \relative c' {
\partial 8 r8
|R2. |
}
hornsmovtwoMusic = \relative c' {
\partial 8 r8 |
R2. |
}
VlnonemovtwoMusic = \relative c'' {
\partial 8 a8 |
e'4. d16( cs) b8 cs |
}
VlntwomovtwoMusic = \relative c'' {
\partial 8 a8 |
cs4. b16( a) gs8 a |
}
VlamovtwoMusic = \relative c' {
\clef alto
\partial 8 a8 |
e'4. d16( cs) b8 cs |
}
SopranomovtwoMusic = \relative c'' {
\partial 8 r8
|R2. |
}
BCmovtwoMusic = \relative c {
\clef bass
\partial 8 r8
r4 a'4 a, |
}
\book{
\bookOutputName "KV165-Andante"
\bookpart{
\header {
subtitle = "II. Andante"
}
\score {
\new StaffGroup {
<<
\new Staff = oboesmovtwo \with {instrumentName = "2 Oboi"
midiInstrument = "oboe"}
{
\movtwosettings \oboesmovtwoMusic
}
\new Staff = hornsmovtwo \with {
instrumentName = \markup { \column {"2 Corni" "in F"}}
midiInstrument = "french horn"}
{
\transposition f \time 4/4 \key e \major \tempo "Allegro" \hornsmovtwoMusic
}
\new GrandStaff <<
\new Staff = Vlnonemovtwo \with {instrumentName = "Violino I"
midiInstrument = "violin"}
{
\movtwosettings \VlnonemovtwoMusic
}
\new Staff = Vlntwomovtwo \with {instrumentName = "Violino II"
midiInstrument = "violin"}
{
\movtwosettings \VlntwomovtwoMusic
}
>>
\new Staff = Vlamovtwo \with {instrumentName = "Viola"
midiInstrument = "viola"}
{
\movtwosettings \VlamovtwoMusic
}
\new Staff = Sopranomovtwo \with {instrumentName = "Soprano"
midiInstrument = "voice oohs"}
{
\movtwosettings \SopranomovtwoMusic
}
\new Staff = BCmovtwo \with {
instrumentName = \markup {\column {"Basso ed" "Organo"}}
midiInstrument = "contrabass"}
{
\movtwosettings \BCmovtwoMusic
}
>>
}
\midi {
}
\layout{
}
}
}
}
movthreesettings = {
\key f \major
\time 2/4
\tempo "Vivace" 4=132
}
oboesmovthreeMusic = \relative c'' {
<c'a>4.(\f <d bf>8) |
<d bf>8( <c a>8) <bf-. g> <a-. f> |
<a f>4 <a f>4 |
<a fs>4( <bf g >8) r8 |
}
hornsmovthreeMusic = \relative c' {
<c' c,>4\f r4 |
R2 |
<c e,>4 <c e,> |
g2 |
}
VlnonemovthreeMusic = \relative c'' {
c4.(\f d8) |
d8( c) bf-. a-. |
a4 a |
a4( bf8) r8 |
}
VlntwomovthreeMusic = \relative c'' {
a4.(\f bf8 ) |
bf8( a) g-. f-. |
f4 f4 |
fs4( g8) r8 |
}
VlamovthreeMusic = \relative c' {
\clef alto
f4\f r4 |
R2 |
c4 c4 |
c2 |
}
SopranomovthreeMusic = \relative c'' {
R2 |
R2 |
R2 |
R2 |
}
BCmovthreeMusic = \relative c {
\clef bass
f4\f r4 |
R2 |
f4 f4 |
e2 |
}
\book {
\bookOutputName "KV165-Alleluia"
\bookpart {
\header {
subtitle = "III. Vivace - Alleluia"
}
\score {
\new StaffGroup <<
\new Staff = oboesmovthree \with {instrumentName = "2 Oboi"
midiInstrument = "oboe"}
{
\movthreesettings \oboesmovthreeMusic
}
\new Staff = hornsmovthree \with {
instrumentName = \markup { \column {"2 Corni" "in F"}}
midiInstrument = "french horn"}
{
\transposition f \time 2/4 \key c \major \tempo "Vivace" 4=132
\hornsmovthreeMusic
}
\new GrandStaff <<
\new Staff = Vlonemovthree \with {instrumentName = "Violino I"
midiInstrument = "violin"}
{
\movthreesettings \VlnonemovthreeMusic
}
\new Staff = Vlntwomovtwo \with {instrumentName = "Violino II"
midiInstrument = "violin"}
{
\movthreesettings \VlntwomovthreeMusic
}
>>
\new Staff = Vlamovtwo \with {instrumentName = "Viola"
midiInstrument = "viola"}
{
\movthreesettings \VlamovthreeMusic
}
\new Staff = Sopranomovthree \with {instrumentName = "Soprano"
midiInstrument = "voice oohs"}
{
\movthreesettings \SopranomovthreeMusic
}
\new Staff = BCmovthree \with { instrumentName = "Basso ed Organo"
instrumentName = \markup {\column {"Basso ed" "Organo"}}
midiInstrument = "contrabass"}
{
\movthreesettings \BCmovthreeMusic
}
>>
\midi {
}
\layout{
}
}
\score { %second \score block
\new Staff = TestStaff
{
\relative c' {c1 \bar "|."}
}
\midi {
}
\layout{
}
}
}
}
--------------090700060902070803050202
Content-Type: text/x-lilypond;
name="Exsultate-Osuffix.ly"
Content-Disposition: inline;
filename="Exsultate-Osuffix.ly"
Content-Transfer-Encoding: 7bit
%{
% This file should produce three backend files using output-suffix:
% 1. Exsultate-Osuffix-Allegro.pdf, .midi for the first \book
% 2. Exsultate-Osuffix-Allegro-1.pdf, .midi for the second \book
% 3. Exsultate-Osuffix-Alleluia.pdf, .midi for the third \book
%}
\include "english.ly"
\version "2.13.4"
\header {
title = "Exsultate, Jubilate"
subtitle = "Motet"
subsubtitle = "K. 165"
instrument = "Soprano Solo and Orchestra"
composer = "W. A. Mozart"
opus = "KV 165"
}
movonesettings = {
\key f \major
\time 4/4
\tempo "Allegro" 4=128
}
oboesmovoneMusic = \relative c' {
r8 <a' c>8 <a c>8 <a c>8 <a c>4 r4 |
}
hornsmovoneMusic = \relative c' {
\key c \major r8 <c c'>8 <c c'>8 <c c'>8 <c c'>4 r4 |
}
VlnonemovoneMusic = \relative c' {
<a' f'>4 c4~ c8 d16 e f g a f |
}
VlntwomovoneMusic = \relative c' {
a'16 bflat c bflat a bflat c bflat a4 r4 |
}
VlamovoneMusic = \relative c' {
\clef alto c16 bf a bf c bf a bf c4 r4 |
}
SopranomovoneMusic = \relative c' {
R1 |
}
BCmovoneMusic = \relative c {
\clef bass f8 f f f f f f f |
}
"output-suffix" = "Allegro"
\book {
\paper {
}
\bookpart {
\header {
subtitle = "I. Allegro"
}
\score {
\new StaffGroup {
<<
\new Staff = oboesmovone \with {instrumentName = "2 Oboi"
midiInstrument = "oboe"}
{
\movonesettings \oboesmovoneMusic
}
\new Staff = hornsmovone \with {
instrumentName = \markup { \column {"2 Corni" "in F"}}
midiInstrument = "french horn"}
{
\transposition f \time 4/4 \tempo "Allegro" \hornsmovoneMusic
}
\new GrandStaff
<<
\new Staff = Vlnonemovone \with {instrumentName = "Violino I"
midiInstrument = "violin"}
{
\movonesettings \VlnonemovoneMusic
}
\new Staff = Vlntwomovone \with {instrumentName = "Violino II"
midiInstrument = "violin"}
{
\movonesettings \VlntwomovoneMusic
}
>>
\new Staff = Vlamovone \with {instrumentName = "Viola"
midiInstrument = "viola"}
{
\movonesettings \VlamovoneMusic
}
\new Staff = Sopranomovone \with {instrumentName = "Soprano"
midiInstrument = "voice oohs"}
{
\movonesettings \SopranomovoneMusic
}
\new Staff = BCmovone \with { instrumentName = "Basso ed Organo"
midiInstrument = "contrabass"}
{
\movonesettings \BCmovoneMusic
}
>>
}
\midi {
}
\layout{
}
}
}
}
movtwosettings = {
\key a \major
\time 3/4
\tempo "Andante" 4=72
}
oboesmovtwoMusic = \relative c' {
\partial 8 r8
|R2. |
}
hornsmovtwoMusic = \relative c' {
\partial 8 r8 |
R2. |
}
VlnonemovtwoMusic = \relative c'' {
\partial 8 a8 |
e'4. d16( cs) b8 cs |
}
VlntwomovtwoMusic = \relative c'' {
\partial 8 a8 |
cs4. b16( a) gs8 a |
}
VlamovtwoMusic = \relative c' {
\clef alto
\partial 8 a8 |
e'4. d16( cs) b8 cs |
}
SopranomovtwoMusic = \relative c'' {
\partial 8 r8
|R2. |
}
BCmovtwoMusic = \relative c {
\clef bass
\partial 8 r8
r4 a'4 a, |
}
\book{
\paper {
}
\bookpart{
\header {
subtitle = "II. Andante"
}
\score {
\new StaffGroup {
<<
\new Staff = oboesmovtwo \with {instrumentName = "2 Oboi"
midiInstrument = "oboe"}
{
\movtwosettings \oboesmovtwoMusic
}
\new Staff = hornsmovtwo \with {
instrumentName = \markup { \column {"2 Corni" "in F"}}
midiInstrument = "french horn"}
{
\transposition f \time 4/4 \key e \major \tempo "Allegro" \hornsmovtwoMusic
}
\new GrandStaff <<
\new Staff = Vlnonemovtwo \with {instrumentName = "Violino I"
midiInstrument = "violin"}
{
\movtwosettings \VlnonemovtwoMusic
}
\new Staff = Vlntwomovtwo \with {instrumentName = "Violino II"
midiInstrument = "violin"}
{
\movtwosettings \VlntwomovtwoMusic
}
>>
\new Staff = Vlamovtwo \with {instrumentName = "Viola"
midiInstrument = "viola"}
{
\movtwosettings \VlamovtwoMusic
}
\new Staff = Sopranomovtwo \with {instrumentName = "Soprano"
midiInstrument = "voice oohs"}
{
\movtwosettings \SopranomovtwoMusic
}
\new Staff = BCmovtwo \with { instrumentName = "Basso ed Organo"
midiInstrument = "contrabass"}
{
\movtwosettings \BCmovtwoMusic
}
>>
}
\midi {
}
\layout{
}
}
}
}
movthreesettings = {
\key f \major
\time 2/4
\tempo "Vivace" 4=132
}
oboesmovthreeMusic = \relative c'' {
<c'(a>4. <d) bf>8 |
<d( bf>8 <c) a>8 <bf-. g-.> <a-. f-.> |
<a f>4 <a f>4 |
<a( fs>4 <bf) g >8 r8 |
}
hornsmovthreeMusic = \relative c' {
<c' c>4 r4 |
R2 |
<c e>4 <c e> |
g2 |
}
VlnonemovthreeMusic = \relative c'' {
c4.(\f d8 |
d8( c) bf-. a-. |
a4 a |
a4( bf8) r8 |
}
VlntwomovthreeMusic = \relative c'' {
a4.(\f bf8 ) |
bf8( a) g-. f-. |
f4 f4 |
fs4( g8) r8 |
}
VlamovthreeMusic = \relative c' {
\clef alto
f4\f r4 |
R2 |
c4 c4 |
c2 |
}
SopranomovthreeMusic = \relative c'' {
R2 |
R2 |
R2 |
R2 |
}
BCmovthreeMusic = \relative c {
\clef bass
f4\f r4 |
R2 |
f4 f4 |
e2 |
}
"output-suffix"= "Alleluia"
\book {
\paper {
}
\bookpart {
\header {
subtitle = "III. Vivace - Alleluia"
}
\score {
\new StaffGroup <<
\new Staff = oboesmovthree \with {instrumentName = "2 Oboi"
midiInstrument = "oboe"}
{
\movthreesettings \oboesmovthreeMusic
}
\new Staff = hornsmovthree \with {
instrumentName = \markup { \column {"2 Corni" "in F"}}
midiInstrument = "french horn"}
{
\transposition f \time 2/4 \key c \major \tempo "Vivace" 4=132
\hornsmovthreeMusic
}
\new GrandStaff <<
\new Staff = Vlonemovthree \with {instrumentName = "Violino I"
midiInstrument = "violin"}
{
\movthreesettings \VlnonemovthreeMusic
}
\new Staff = Vlntwomovtwo \with {instrumentName = "Violino II"
midiInstrument = "violin"}
{
\movthreesettings \VlntwomovthreeMusic
}
>>
\new Staff = Vlamovtwo \with {instrumentName = "Viola"
midiInstrument = "viola"}
{
\movthreesettings \VlamovthreeMusic
}
\new Staff = Sopranomovthree \with {instrumentName = "Soprano"
midiInstrument = "voice oohs"}
{
\movthreesettings \SopranomovthreeMusic
}
\new Staff = BCmovthree \with {
instrumentName = \markup{ \column {"Basso ed" "Organo"}}
midiInstrument = "contrabass"}
{
\movthreesettings \BCmovthreeMusic
}
>>
\midi {
}
\layout{
}
}
}
}
--------------090700060902070803050202--
---
----
Join the Frogs!