lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inheritance of MIDI settings into embedded contexts?


From: Aaron Hill
Subject: Re: Inheritance of MIDI settings into embedded contexts?
Date: Sat, 22 Aug 2020 12:11:52 -0700
User-agent: Roundcube Webmail/1.4.2

On 2020-08-22 8:52 am, Dr. Thomas Tensi wrote:
I am using lilypond as the frontend for audio production and now I have
a problem where I do not understand lilypond's internal logic for
transferring MIDI settings into embedded contexts.

[ . . . ]

This means that the embedded voices are in the MIDI default volume while
the surrounding notes are in fortissimo (as specified and expected).

My naive assumption is that any setting (also the dynamics for MIDI) is
inherited by embedded contexts. But this does not seem to be the case.

The Dynamic_performer is part of the Voice context; and the construct << ... \\ ... >> implicitly creates new Voice contexts. As such, dynamics of notes from different Voices would be expected to be distinct, regardless of whether they might occupy the same Staff.


Personally I find this very impractical, because this leads to loudness
jumps in the MIDI output when I have some multiple-voice context
embedded in some macro with the dynamics specified on an outer section
level. It is simply not modular.

Any ideas on how to cope with that?

\consisting the Dynamic_performer to the Staff (and \removing it from the Voice) should apply the current logic to the wider scope:

%%%%
\version "2.19.82"

\score {
    <<
    \new Staff = piano \with { midiInstrument = "acoustic grand" } {
        { \key c \major \time 4/4
          \relative c' { c4\ff << {e f} \\ {c d}>> g } }
    }
    >>
    \layout {}
    \midi {
      \context {
        \Staff
        \consists "Dynamic_performer"
      }
      \context {
        \Voice
        \remove "Dynamic_performer"
      }
    }
}
%%%%

Whether there are any side effects, I do not know.


-- Aaron Hill



reply via email to

[Prev in Thread] Current Thread [Next in Thread]