Re: Merging dynamics with music

2023-09-16 Thread mskala
On Sat, 16 Sep 2023, Knute Snortum wrote: > Try moving the Dynamic performer to the Staff level.  Cutting and pasting this code produces two pages of error messages because it's full of "non-breaking space" characters which LilyPond can't process, but I was able to get the desired results by

Re: Merging dynamics with music

2023-09-16 Thread David Kastrup
msk...@ansuz.sooke.bc.ca writes: > Thank you. That works for the given example. However, with more > complicated music that already contains multiple voices (as is typical of > the piano music where a between-staff Dynamics context would be used in > the first place), it doesn't work. For

Re: Merging dynamics with music

2023-09-16 Thread Knute Snortum
On Sat, Sep 16, 2023 at 6:01 AM wrote: > On Sat, 16 Sep 2023, David Kastrup wrote: > > > Try > > > > \new Staff << \MyMusic \MyDynamics >> > > > > since otherwise the variables will end up in separate Staff contexts. > > With the following code, the notes in the MIDI file still are both at >

Re: Merging dynamics with music

2023-09-16 Thread David Kastrup
msk...@ansuz.sooke.bc.ca writes: > On Sat, 16 Sep 2023, David Kastrup wrote: > >> Try >> >> \new Staff << \MyMusic \MyDynamics >> >> >> since otherwise the variables will end up in separate Staff contexts. > > With the following code, the notes in the MIDI file still are both at > default

Re: Merging dynamics with music

2023-09-16 Thread mskala
On Sat, 16 Sep 2023, David Kastrup wrote: > > With the following code, the notes in the MIDI file still are both at > > default velocity. Explicitly instantiating the Staff does make a > > difference in the visual output. > > > > MyMusic = { c'1 c'1 } > > MyDynamics = { s1\ppp s1\fff } > > > >

Re: Merging dynamics with music

2023-09-16 Thread mskala
On Sat, 16 Sep 2023, David Kastrup wrote: > Try > > \new Staff << \MyMusic \MyDynamics >> > > since otherwise the variables will end up in separate Staff contexts. With the following code, the notes in the MIDI file still are both at default velocity. Explicitly instantiating the Staff does

Re: Merging dynamics with music

2023-09-16 Thread David Kastrup
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

Merging dynamics with music

2023-09-15 Thread mskala
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