I’ve found the nice snippet in the learning manual for creating a
Dynamics context.  However, as I am making MIDI and PDF output, I would
prefer to have the dynamics intrinsic to each voice, and merely suppress
their redundant engraving.

As you can see in the attached, I’ve successfully suppressed the
redundant vocal dynamics by removing the New_dynamic_engraver from the
voice.

However, I have been unable to suppress dynamics from the left hand in
the piano accompaniment.  I’ve tried removing both Dynamic_engraver and
New_dynamic_engraver from the Staff and from the only Voice in the
Staff, and neither has worked.  (These four items are commented out in
the attached example.)

If I have to use the Dynamics context demonstrated in the learning
manual, I will, but it will significantly complicate the separate
construction of the MIDI and layout, instead of just unfolding repeats.
 Any advice would be most welcome.

Thanks in advance,
Chris
-- 
Chris Maden, text nerd  <URL: http://crism.maden.org/ >
“Be wary of great leaders.  Hope that there are many, many small
 leaders.” — Pete Seeger
\version "2.12.3"

\include "english.ly"

\header {
  title= "Four-Part Vocal and Piano Test"
}

tenOne = \relative c' {
  a'4\mp f'4. e8 |
}

tenTwo = \relative c' {
  a'4\mp d4. d8 |
}

bassOne = \relative c {
  a'4\mp a4. g8 |
}

bassTwo = \relative c {
  a'4\mp d,4. d8 |
}

vocals = \new ChoirStaff = "voice" <<
  \set ChoirStaff.midiInstrument = #"choir aahs"
  \new Staff = "tenor" {
    \set Staff.instrumentName = "Tenor Ⅰ&Ⅱ"
    \set Staff.shortInstrumentName = "T."
    \clef treble
    \key c \major
    \time 3/4
    <<
      \new Voice = "tenorOne" {
        \voiceOne
        \dynamicUp
        \tenOne \bar "|."
      }
      \new Voice = "tenorTwo" \with {
        \remove "New_dynamic_engraver"
      }
      {
        \voiceTwo
        \tenTwo \bar "|."
      }
    >>
  }
  \new Staff = "bass" {
    \set Staff.instrumentName = "Bass Ⅰ&Ⅱ"
    \set Staff.shortInstrumentName = "B."
    \clef bass
    \key c \major
    \time 3/4
    <<
      \new Voice = "bassOne" {
        \voiceOne
        \dynamicUp
        \bassOne \bar "|."
      }
      \new Voice = "bassTwo" \with {
        \remove "New_dynamic_engraver"
      }
      {
        \voiceTwo
        \bassTwo \bar "|."
      }
    >>
  }
>>

pianoAcc = \new PianoStaff = "piano" <<
  \set PianoStaff.instrumentName = #"Piano"
  \set PianoStaff.shortInstrumentName = #"Pia."
  \set PianoStaff.midiInstrument = #"acoustic grand"
  \new Staff = "right hand" \with {
    printPartCombineTexts = ##f
  }
  {
    \clef treble
    \key c \major
    \time 3/4
    <<
      \partcombine
      {
        \tenOne \bar "|."
      }
      {
        \tenTwo \bar "|."
      }
     >>
  }
  \new Staff = "left hand" \with {
    printPartCombineTexts = ##f
    % \remove "Dynamic_engraver"
    % \remove "New_dynamic_engraver"
  }
  {
    \clef bass
    \key c \major
    \time 3/4
    <<
      \new Voice = "leftHand" \with {
        % \remove "Dynamic_engraver"
        % \remove "New_dynamic_engraver"
      }
      {
        \partcombine
        {
          \bassOne \bar "|."
        }
        {
          \bassTwo \bar "|."
        }
      }
     >>
  }
>>

\score {
  <<
    \vocals
    \pianoAcc
  >>
  \layout {}
}
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to