lilypond-user
[Top][All Lists]
Advanced

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

Controlling midi dynamics


From: David Sumbler
Subject: Controlling midi dynamics
Date: Mon, 15 Jul 2019 15:16:45 +0100

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\version "2.19.82"

#(define my-instrument-equalizer-alist '())

#(set! my-instrument-equalizer-alist
  (append
   '(
     ("trumpet" . (0.01 . 0.99)))
   my-instrument-equalizer-alist))
  
#(define (my-instrument-equalizer s)
  (let ((entry (assoc s my-instrument-equalizer-alist)))
    (if entry
      (cdr entry))))

\score {
  \new Staff \with { midiInstrument = "trumpet" } {
%    \set Score.midiMaximumVolume = #1
%    \set Score.midiMinimumVolume = #0
    \set Score.instrumentEqualizer = #my-instrument-equalizer
    a'8\pp b' cis'' d'' e''-.\ff d''-. cis''-. b'-. a'
  }
  \midi { }
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Can somebody explain how I can control the absolute minimum and maximum
values of individual instruments in midi?

In the above snippet, I expect to find the first bar almost inaudible
and the second bar extremely loud.  However, I find that the difference
between the pp section and the ff is quite limited.  If I reduce the
supposed maximum volume of the trumpet to, say, 0.5, then the pp will
indeed be very quiet, but when I restore the second parameter to 0.99
as here, then the pp passage is much louder than previously.

If I uncomment the Score.midiMaximumVolume line and the following one,
it makes little difference.  The Internals Reference states that valid
values for these 2 parameters are numbers between 0 and 1.  However, if
I set midiMaximumVolume to 2, I find that the pp and the ff sections
have the same volume as each other.  Further increases in
midiMaximumVolume do not seem to make any difference.

In every case, the total dynamic range is considerably less than I
would like.  How can I extend the dynamic range beyond the limited
range I can currently get?

David




reply via email to

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