On 12-05-08 08:29 PM, Colin Campbell wrote:
<snippage>
Here is a template I modified, and I apologise to the author of
the rehearsalMidi function, as I cannot remember where I found it.
Discussion of the template is *so* much easier when it is actually
present in the reply!
\version "2.15.34"
\language "english"
\header {
title = "Generic Gospel Song"
instrument = "Male Quartet"
composer = "Traditional"
arranger = "The Loan"
copyright =\markup { \char ##x00A9 2012 The
Composer }
tagline = "Engraved with Lilypond"
}
\paper {
#(set-paper-size "letter")
}
global = {
\key af \major
\time 2/2
\tempo 2=96
}
tenor = \relative c' {
\global
% Music follows here.
c
}
lead = \relative c' {
\global
% Music follows here.
c
}
bari = \relative c {
\global
% Music follows here.
c
}
bass = \relative c {
\global
% Music follows here.
c
}
verse = \lyricmode {
% Lyrics follow here.
}
rehearsalMidi = #
(define-music-function
(parser location name midiInstrument lyrics)
(string? string? ly:music?)
#{
\unfoldRepeats <<
\new Staff = "tenor" \new Voice = "tenor" {
s1*0\f \tenor }
\new Staff = "lead" \new Voice = "lead" {
s1*0\f \lead }
\new Staff = "bari" \new Voice = "bari" {
s1*0\f \bari }
\new Staff = "bass" \new Voice = "bass" {
s1*0\f \bass }
\context Staff = $name {
\set Score.midiMinimumVolume = #0.5
\set Score.midiMaximumVolume = #0.5
\set Score.tempoWholesPerMinute =
#(ly:make-moment 96 2)
\set Staff.midiMinimumVolume = #0.8
\set Staff.midiMaximumVolume = #1.0
\set Staff.midiInstrument = $midiInstrument
}
\new Lyrics \with {
alignBelowContext = $name
} \lyricsto $name $lyrics
>>
#})
\score {
\new ChoirStaff <<
\new Staff \with {
midiInstrument = "choir aahs"
instrumentName = \markup \center-column {
"Tenor" "Lead" }
shortInstrumentName = \markup \center-column
{ "Tenor" "Lead" }
} <<
\clef "treble_8"
\new Voice = "tenor" { \voiceOne \tenor }
\new Voice = "lead" { \voiceTwo \lead }
>>
\new Lyrics \with {
\override VerticalAxisGroup #'staff-affinity
= #CENTER
} \lyricsto "tenor" \verse
\new Staff \with {
midiInstrument = "choir aahs"
instrumentName = \markup \center-column {
"Bari" "Bass" }
shortInstrumentName = \markup \center-column
{ "Bari" "Bass" }
} <<
\clef bass
\new Voice = "bari" { \voiceOne \bari }
\new Voice = "bass" { \voiceTwo \bass }
>>
>>
\layout { }
\midi { }
}
% Rehearsal MIDI files:
\book {
\bookOutputSuffix "tenor"
\score {
\rehearsalMidi "tenor" "tenor sax" \verse
\midi { }
}
}
\book {
\bookOutputSuffix "lead"
\score {
\rehearsalMidi "lead" "tenor sax" \verse
\midi { }
}
}
\book {
\bookOutputSuffix "bari"
\score {
\rehearsalMidi "bari" "tenor sax" \verse
\midi { }
}
}
\book {
\bookOutputSuffix "bass"
\score {
\rehearsalMidi "bass" "tenor sax" \verse
\midi { }
}
}
--
I've learned that you shouldn't go through life with a catcher's mitt on both hands.
You need to be able to throw something back.
-Maya Angelou, poet (1928- )