Is there any way to apply dynamics to a single part that splits into
multiple voices? Here's a short excerpt of a piano piece. The dynamics,
time signature, etc. are in a variable called common. In the generated
MIDI file, the dynamics work for the 1st measure, but as soon as the
top staff splits into separate voices in measure 2, they no longer
apply and both voices are at the default loud volume again.

Thanks,
Cameron

%%%
\version "2.24.4"

common = { \time 6/8 s2.*6\ppppp \bar "|." }

top = \fixed c' {
  g8 c' e' g c' e'
  << g'2. \\ { g8 c' e' g c' e' } >>
  g b e' g b e' |
  << { a'4. 8. g' } \\ { a8 c' e' a c' e' } >>
  << { f'4 e'8 d'4 f'8 } \\ { f8 a c' f a d' } >>
  <c' e'> g e c4.
}

bottom = \fixed c {
  \clef bass
  c2. 2. b, a, d4. g c2.
}

% sheet music
\score {
  \new PianoStaff <<
    \new Staff \top
    \new Dynamics \common
    \new Staff \bottom
  >>
  \layout { }
}

% MIDI file
\score {
  <<
    \new Staff \new Voice << \top \common >>
    \new Staff \new Voice << \bottom \common >>
  >>
  \midi {}
}
%%%

Reply via email to