On 27/01/2024 22:03, Kieren MacMillan wrote:
Hi all,
So… At the bottom of this email, I’ve included a somewhat-M W E of something
I’m wrestling with around all this stuff. You’ll see I have a ScoreMarks.ily
file (one of many \includes, but needed here because the structure of the vc
and pc are slightly different!), a notes.ily file (with all the note-code), and
output files.
There are *so* many variables on the input side in this industry (musical
theatre): show version (cuts, etc.), voicing (different characters can be
played by people singing in different clefs), chorus voicing (SATB? just SA?),
etc. I’m trying to come up with a structure/workflow/plan that gives me maximum
control and flexibility with minimum complexity (all terms relative,
obviously!).
Questions:
1. Should I have one output file per score, or use \book? I assume if it’s
multiple files, and I want to keep them synchronized, I would want to use make
(or similar) to trigger a compilation of all of them at once?
2. Am I <<>>-ing the \global at the best spot(s)?
3. Compare the voicing of m3 in the SATB and SA voicings: mm1-2 are different,
but m3 is the same. How can I do this kind of thing with the least amount of
code duplication? I don’t believe quoted music can be transposed directly
(i.e., you need to create a second, pre-transposed, quotation); I can’t see how
to inject a transposition (e.g., using the Edition-Engraver) into a specific
part of a score/variable; I really don’t want to have to break every variable
into multiple subvariables to handle every difference between voicings (nor do
I want to have complete duplicates, one per voicing!); etc.
Given Lilypond’s current powers and limitations, what’s my best path forward?
At this point, even a high-level discussion would be really appreciated: As you
can probably imagine, the number of permutations and combinations are ganging
up on me, and I can’t grapple with them all myself.
Thanks,
Kieren.
The attached files illustrate a couple of suggestions that might help.
* Set up new contexts (TrebleStaff, TenorStaff) that automatically
insert the right clef, and transpose the notes up an octave in the
TrebleStaff.
* Use a tag group that is adjusted to build the various styles of
score, while keeping the definition of the scores fixed.
--
Timothy Lanfear, Bristol, UK.
\version "2.25.10"
\language "english"
global = {
\tempo "Fast"
\key c \major
s1
\tag #'full { s1 }
\bar "||"
\key d \major
s1
\bar "|."
}
Michael_notes = {
c'4 4 4 4
\tag #'full { g4 4 a4 4 }
d4 4 4 4
}
chorus_notes = {
\tag #'satb {
<g c' e'>4 4 4 4
\tag #'full { <g b d'>4 4 <a cs' e'>4 4 }
<a d' fs'>4 4 4 4
}
\tag #'sa {
<c' e' g'>4 4 4 4
\tag #'full { <b d' g'>4 4 <cs' e' a'>4 4 }
<a d' fs'>4 4 4 4
}
}
theChords = \chordmode {
c1
\tag #'full { g2 a }
d1
}
acc_notes_upper = {
c''4 4 4 4
\tag #'full { g'4 4 a'4 4 }
d'4 4 4 4
}
acc_notes_lower = {
\clef bass
c4 4 4 4
\tag #'full { g,4 4 a,4 4 }
d,4 4 4 4
}
vox =
<<
\new \MichaelStaff \new Voice << \global \Michael_notes >>
\new Staff \new Voice << \global \chorus_notes >>
%% there would potentially be a lot of other vocal/choral parts in this blob
>>
vc =
<<
\new ScoreMarks \global
\new ChordNames \theChords
\vox
>>
pc =
<<
\new ScoreMarks \global
\vox
\new PianoStaff <<
\new Staff << \global \acc_notes_upper >>
\new ChordNames \theChords
\new Staff << \global \acc_notes_lower >>
>>
>>
\version "2.25.10"
\language "english"
\paper { tagline = ##f ragged-bottom = ##t indent = 0 }
Octave_transpose_engraver =
#(lambda(context)
(make-engraver
(listeners
; transpose note-event
((note-event engraver event)
(ly:music-transpose (ly:event-property event 'music-cause) (ly:make-pitch 1 0 0))))))
\layout {
\context {
\Staff
\name TrebleStaff
\alias Staff
\accepts Voice
\clef "treble"
\with { \consists \Octave_transpose_engraver }
}
\context {
\Staff
\name TenorStaff
\alias Staff
\accepts Voice
\clef "treble_8"
}
\inherit-acceptability TenorStaff Staff
\inherit-acceptability TrebleStaff Staff
}
%%% ScoreMarks.ily
\layout {
\context {
\type "Engraver_group"
\name ScoreMarks
keepAliveInterfaces = #'( metronome-mark-interface )
rehearsalMarkFormatter = #format-mark-box-alphabet
\consists "Axis_group_engraver"
\override VerticalAxisGroup.staff-affinity = #DOWN
\override VerticalAxisGroup.nonstaff-relatedstaff-spacing =
#'((basic-distance . 3) (minimum-distance . 3) (padding . 1.5))
\consists "Metronome_mark_engraver"
\override MetronomeMark.Y-offset = #0
\override MetronomeMark.outside-staff-priority = #50
\override MetronomeMark.break-align-symbols =
#'(left-edge staff-bar clef time-signature key-signature)
\override MetronomeMark.non-break-align-symbols =
#'(paper-column-interface)
\consists "Mark_engraver"
\override RehearsalMark.Y-offset = #0
\override RehearsalMark.outside-staff-priority = #100
\override RehearsalMark.break-align-symbols =
#'(left-edge staff-bar clef time-signature key-signature)
\override RehearsalMark.self-alignment-X = #CENTER
\override RehearsalMark.extra-spacing-width = #'(-0.5 . 0.5)
\consists "Text_spanner_engraver"
\override TextSpanner.font-size = #2
\consists "Time_signature_engraver"
\override TimeSignature.stencil = #point-stencil
}
\context {
\Staff
\consists "Staff_collecting_engraver"
}
\context {
\Score
\remove "Metronome_mark_engraver"
\remove "Mark_engraver"
\accepts ScoreMarks
}
}
%%% full.ly (i.e., full version, Michael at pitch)
MichaelStaff = TenorStaff
\include "music.ly"
KMtags = #'(satb full)
\markup "Vocal/Choral Score, Full Version, Michael tenor-clef, SATB chorus"
\score { \keepWithTag \KMtags \vc }
\markup "Piano/Conductor Score, Full Version, Michael tenor-clef, SATB chorus"
\score { \keepWithTag \KMtags \pc }
\pageBreak
KMtags = #'(satb short)
\markup "Vocal/Choral Score, Short Version, Michael tenor-clef, SATB chorus"
\score { \keepWithTag \KMtags \vc }
\markup "Piano/Conductor Score, Short Version, Michael tenor-clef, SATB chorus"
\score { \keepWithTag \KMtags \pc }
\pageBreak
MichaelStaff = TrebleStaff
\include "music.ly"
KMtags = #'(sa full)
\markup "Vocal/Choral Score, Full Version, Michael treble-clef, SA chorus"
\score { \keepWithTag \KMtags \vc }
\markup "Piano/Conductor Score, Full Version, Michael treble-clef, SA chorus"
\score { \keepWithTag \KMtags \pc }