msk...@ansuz.sooke.bc.ca writes:

> I'm trying to use a Dynamics context to put dynamics between the staves of
> a PianoStaff.  As such, I've got my notes and my dynamics in two separate
> variables.  For MIDI output, I'd like to merge the contents of the music
> variable and the dynamics variable and generate MIDI from the result.
> But I can't find a way to merge the two variables and have the dynamics
> really affect the MIDI velocity of the notes.
>
> Here's some code I've tried; I've also tried many much more complicated
> variations.  Note that although the Dynamics context is part of the
> motivation for this question, the question is about merging music
> variables and the problem shows up even without the existence of a
> Dynamics context.
>
> MyMusic = { c'1 c'1 }
> MyDynamics = { s1\ppp s1\fff }
>
> \score {
>   << \MyMusic \MyDynamics >>
>   \layout { }
>   \midi { }
> }
>
> After compiling that, I get a MIDI file in which the notes are just at the
> default velocity without any dynamics being applied.

Try

\new Staff << \MyMusic \MyDynamics >>

since otherwise the variables will end up in separate Staff contexts.

-- 
David Kastrup

Reply via email to