lilypond-user
[Top][All Lists]
Advanced

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

Re: MIDI dynamics parsing error


From: Heikki Tauriainen
Subject: Re: MIDI dynamics parsing error
Date: Mon, 19 May 2014 22:34:18 +0300

On Sun, 2014-05-18 at 10:40 -0700, Paul Morris wrote:
> Conor Cook wrote
> > It is my impression that a decrescendo starts where you are and gets
> > quieter.  Does Lilypond not have a default (e.g. mf) MIDI dynamic like
> > Sibelius?
> 
> Good point.  Wouldn't it make sense to just use a default volume for MIDI,
> if it has not been specified in the score with a dynamics mark, rather than
> issuing this warning?
> 
> -Paul

When this warning is shown, LilyPond will actually use the middle of the
available note velocity range as the starting velocity ("volume").

(This is an exception to most other MIDI settings, such as the MIDI
instrument, where no defaults are enforced if they are not set
explicitly.  However, for note velocities LilyPond likely needs to
always use *some* value for MIDI output, which is probably why a default
is used in this case.)

However, one purpose of the warning is to direct the user's attention to
input locations where the MIDI output is possibly not what the user
might expect: for example, since every Voice has by default a separate
dynamic performer for MIDI, the default volume can easily take effect
"accidentally" in temporary polyphonic passages such as follows:

\version "2.18.2"

\score {
  \new Staff {
    \new Voice {
      % ... a long monophonic passage
      c'1\ppppp
      <<
        \new Voice {
          c''2\> % starts at the default velocity, not \ppppp
          g'2\!
        }
        \new Voice {
          c'1    % this note also gets the default velocity
        }
      >>
      % ... continue with a single Voice
    }
  }
  \layout { }
  \midi { }
}

In this case the warning could be helpful in signaling the user that
LilyPond may need some additional help in guessing the "correct" initial
note velocities for the Voices in the temporary polyphonic passage.

As to the original problem of including the \mf only in MIDI to suppress
the warning, one could of course also use tags as a workaround, however
at the cost of duplicating part of the music and the entire \score block
(personally I nevertheless usually use this approach since, after the
initial \score setup, it allows customizing MIDI output independently
from the layout whenever needed):


\version "2.18.2"
\language "english"

upper = \relative c'''' {
  | gf16-. \f ef-. df-. cf-. bf ( \sf df cf af )
    gf-. \sf ef-. df-. cf-. bf ( \sf df cf af )
  |
  <<
    { \tag #'layout { bf4\< } \tag #'midi { bf4\mf\< } a16 ( \sf gf' f
ef ) bf4 %{ \mf %} \< a16 ( \sf gf' f ef ) }
    \\
    { <af, f>16 q q q a4 <af f>16 q q q a4 }
  >>
}

\score {
  \new Staff = "up" {
    \clef treble
    \keepWithTag #'layout \upper
  }
  \layout {
  }
}

\score {
  \new Staff = "up" {
    \keepWithTag #'midi \upper
  }
  \midi {
    \tempo 4 = 120
  }
}


Now that I looked at the original example, it looks like this example
also triggers the creation of separate dynamic performers for the upper
and lower parts of the << { ... } \\ { ... } >> passage.  Therefore the
crescendos in the upper part will probably have no effect on the notes
in the lower part, all of which will then sound with the "default"
volume (since no initial volume has been specified).  If this is not
what is intended (possibly not if looking at the typeset output), the
explicit initial volume and the crescendos should be repeated also in
the lower part to have them applied to these notes in MIDI...

-- 
Heikki Tauriainen





reply via email to

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