[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Mark_engraver in PianoStaff?
From: |
Alexander Kobel |
Subject: |
Re: Mark_engraver in PianoStaff? |
Date: |
Mon, 25 Aug 2008 16:38:45 +0200 |
User-agent: |
Thunderbird 2.0.0.16 (Macintosh/20080707) |
Kieren MacMillan wrote:
>> I want to typeset a piano reduction where the RehearsalMarks,
>> MetronomeMarks and some TextSpanners (like rit. etc.) are shown once in
>> the Score context, but are additionally doubled above the PianoStaff for
>> the piano player.
>
> I've often wanted to do this, and have never gotten around to coding the
> best solution…
>
> In order to also support those situations where (e.g.) the marks come
> above the string staff group, my guess is you want to create a custom
> context which has *only* the Mark_engraver, include it in the main score
> GrandStaff at the appropriate positions, and remove Mark_engraver from
> all other contexts (i.e., Score, Staff, etc.) in that score.
I tried to copy from the Piano-centered dynamics template and it's
Dynamics context, which seems to be similar. I ended up with the
attached output, which looks quite okay.
However, during compilation Lily complains /a lot/ about the direction
property of RehearsalMark, MetronomeMark and TextSpanner:
"Programmierfehler: [programming error:] direction unknown, but
aligned-side wanted"
and later
"Ein Objekt außerhalb der Notenzeile sollte eine Richtung haben,
Vorgabe ist »nach oben«"
[An object outside of the staff should have a direction, default is UP.]
What's up with this?
And how can I convince Lilypond of telling me errors in English? (This
is Mac OS X Leopard, from the bash. Tried LANG=C and LANG=en_US without
any success...)
Thanks
Alexander
\version "2.11.56"
#(ly:set-option 'point-and-click #f)
#(set-global-staff-size 15)
marks = {
s1*7 \mark \default
s1*8 \mark \default
s1*4 \tempo 4 = 80
s1*4 \mark \default
s1*4
\once \override TextSpanner #'bound-details #'left #'text = "sostenendo"
\once \override TextSpanner #'bound-details #'right #'attach-dir =
#RIGHT
s1\startTextSpan s1*2 s1\stopTextSpan \bar "|."
}
\score {
<<
\new Marks \marks
\new Staff = "soloStaff" \with {
fontSize = #-2
\override StaffSymbol #'staff-space = #(magstep -2)
} <<
\context Voice = "solo" { \repeat unfold 31 { c''1 } }
>>
\new ChoirStaff <<
\new Staff = "womenStaff" <<
\context Voice = "women" { \repeat unfold 31 {
g'1 } }
>>
\new Staff = "menStaff" { \clef bass \repeat unfold 31
{ c1 } }
>>
\new Marks \marks
\new PianoStaff <<
\new Staff = "upperStaff" <<
\context Voice = "upper" { \repeat unfold 31 {
<c'' g' e' c'>1 } }
>>
\new Staff = "lowerStaff" { \clef bass \repeat unfold
31 { <g c>1 } }
>>
>>
\layout {
\context {
\type "Engraver_group"
\name Marks
% So that \cresc works, for example.
\alias Voice
\consists "Output_property_engraver"
\consists "Mark_engraver"
\consists "Metronome_mark_engraver"
\consists "Text_spanner_engraver"
\override VerticalAxisGroup #'minimum-Y-extent =
#'(-0.5 . 2)
\override RehearsalMark #'direction = #CENTER
\override RehearsalMark #'staff-padding = #0
\override RehearsalMark #'Y-extent = #'(0 . 0)
\override MetronomeMark #'direction = #CENTER
\override MetronomeMark #'staff-padding = #0
\override MetronomeMark #'Y-extent = #'(0 . 0)
\override TextSpanner #'direction = #CENTER
\override TextSpanner #'staff-padding = #0
\override TextSpanner #'Y-extent = #'(0 . 0)
\consists "Skip_event_swallow_translator"
\consists "Axis_group_engraver"
}
\context {
\Score
% \consists Text_spanner_engraver
\remove Mark_engraver
\remove Metronome_mark_engraver
\accepts Marks
}
\context {
\Voice
\remove Text_spanner_engraver
}
\context {
\PianoStaff
% \consists Text_spanner_engraver
% \consists Mark_engraver
% \consists Metronome_mark_engraver
}
}
}
MarksInPianoStaff.ly.pdf
Description: Adobe PDF document