On Sun, Nov 17, 2019 at 5:36 PM Paolo Prete <p4olo_pr...@yahoo.it> wrote:
>
> Hello.
>
> I can't find a way to have a single sequence of dynamics that affects both 
> upper and lower piano staves in the MIDI output.
> I tried the following snippet but I can't hear any variation of the dynamics 
> in the midi file.
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%
>
> \score {
> <<
>    \new PianoStaff <<
>       \new Staff="up" { c'4 c' r r }
>       \new Dynamics { s4\fff s s\ppp s}
>       \new Staff="down" { r4 r c' c' }
>    >>
> >>
> \layout { }
> \midi { }
> }
>
> %%%%%%%%%%%%%%%%%%%%%
>
> In addition, I wonder if is there a way to obtain the same result without 
> having to add a "Dynamics" separate context...
>
> thanks

Well I thought this would work, but evidently not.

%%% Begin
\version "2.19.83"

notesUp = { c'4 c' r r }
notesDown = { r4 r c' c' }
dynamics = { s4\fff s s\ppp s}

\score {
  <<
    \new PianoStaff <<
      \new Staff="up" \notesUp
      \new Dynamics \dynamics
      \new Staff="down" \notesDown
    >>
  >>
  \layout { }
}

\score {
  <<
    \new Staff = "up" << \notesUp \dynamics >>
    \new Staff = "down" << \notesDown \dynamics >>
  >>
  \midi { }
}
%%% End

---
Knute Snortum
(via Gmail)

Reply via email to