[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Unwanted InstrumentName when using Dynamics in ChoirStaff
From: |
Rafael Ramirez Morales |
Subject: |
Unwanted InstrumentName when using Dynamics in ChoirStaff |
Date: |
Mon, 15 Feb 2016 23:34:53 +0100 |
While trying to use a single Dynamics definition as per PianoStaff in the
ChoirStaff a strange behaviour manifests:
The Dynamics "voice" gets labelled if an InstrumentName has been defined
for the PianoStaff in the a context within the general layout.
Here follow the MWE (a bit longer than strictly necessary, but illustrates
the problem better):
%% BEGIN MWE
\version "2.19.37" % also tried with the stable \version "2.18.2"
soprano = { s1 c''4 c''2 c''4 c''' c''8 c'' c''2 }
alto = \soprano
tenor = \soprano
bass = \soprano
piano = \soprano
dynamics = { s1 s4^\f s2\pp s4 s s8 s2 }
\layout {
\context { \PianoStaff
instrumentName = "Extra" }
}
\score {
<<
\new ChoirStaff <<
\new Dynamics = "dynamics" \dynamics
\new Staff \with { instrumentName = "S." }{ \soprano }
\new Dynamics = "dynamics" \dynamics
\new Staff \with { instrumentName = "A." }{ \alto }
\new Dynamics = "dynamics" \dynamics
\new Staff \with { instrumentName = "T." }{\tenor }
\new Dynamics = "dynamics" \dynamics
\new Staff \with { instrumentName = "B." }{ \bass }
>>
\new PianoStaff <<
\new Dynamics = "dynamics" \dynamics
\new Staff \with { instrumentName = "Piano" }{ \piano }
>>
>>
}
%% END MWE
Adding the following hack in the \layout section *partially* solves the
problem.
%% BEGIN HACK
%% This hack adds dynamics to the pedal group so it not be
%% acknowledged by the Instrument_name_engraver
%% cf.:
http://lists.gnu.org/archive/html/lilypond-user/2010-07/msg00414.html
\override VerticalAxisGroup #'meta =
#(let* ((descr (assoc-get 'VerticalAxisGroup all-grob-descriptions))
(meta (assoc-get 'meta descr))
(ifaces (assoc-get 'interfaces meta)))
;; Adding piano-pedal-interface to this VerticalAxisGroup
;; prevents it being acknowledged by Instrument_name_engraver
(acons 'interfaces (cons 'piano-pedal-interface ifaces)
meta))
%% END HACK
Adding this block removes the spurious text on the ChoirStaff (as desired),
but leaves a double definition for the InstrumentName of the PianoStaff
(see overlapping names in the PianoStaff).
The hack is a functional workaround, but this does not seem to be a
desirable behaviour.
- Unwanted InstrumentName when using Dynamics in ChoirStaff,
Rafael Ramirez Morales <=