Controlling midi dynamics

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Controlling midi dynamics

David Sumbler
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\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


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Controlling midi dynamics

Jean ABOU SAMRA
Hi David,

Your problem is not with the instrument, it's with the dynamics themselves.
The algorithm that affects a volume to a note does a scale between midiMinimumVolume and midiMaximumVolume that includes all dynamics. Mathematically, you can think:
volume = midiMinimumVolume + (midiMaximumVolume - midiMinimumVolume)*dynamic

Let me try a diagram:

0                       |        pppp   ppp   pp  p  mp  mf f ff fff   ffff  fffff sf  |                         1
no sound                midiMinimumVolume                                              midiMaximumVolume         maximum volume possible


Here you set midiMinimumVolume to 0 or almost and midiMaximumVolume to 1, so if there is not enough difference for you, you need to influence the scale between the two in addition to minimum and maximum volume.

suggests to set the dynamicAbsoluteVolumeFunction property. You will find its default in scm/midi.scm:

;; define factor of total volume per dynamic marking
(define-session-public absolute-volume-alist '())
(set! absolute-volume-alist
      (append
       '(
         ("sf" . 1.00)
         ("fffff" . 0.95)
         ("ffff" . 0.92)
         ("fff" . 0.85)
         ("ff" . 0.80)
         ("f" . 0.75)
         ("mf" . 0.68)
         ("mp" . 0.61)
         ("p" . 0.55)
         ("pp" . 0.49)
         ("ppp" . 0.42)
         ("pppp" . 0.34)
         ("ppppp" . 0.25)
         )
       absolute-volume-alist))

(define-public (default-dynamic-absolute-volume s)
  (assoc-get s absolute-volume-alist))

so now you can modify it, for example:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\version "2.19.83"

#(define (my-dynamic-absolute-volume-function dynamic-name)
 (assoc-get dynamic-name
  '(
     ("sf" . 1.00)
     ("fffff" . 0.95)
     ("ffff" . 0.92)
     ("fff" . 0.85)
     ("ff" . 0.95) ;; was 0.80
     ("f" . 0.75)
     ("mf" . 0.68)
     ("mp" . 0.61)
     ("p" . 0.55)
     ("pp" . 0.10) ;; was 0.49
     ("ppp" . 0.42)
     ("pppp" . 0.34)
     ("ppppp" . 0.25)
   )))

\score {
 \new Staff \with { midiInstrument = "trumpet" } {
   \set Score.midiMinimumVolume = 0.0
   \set Score.midiMaximumVolume = 1.0
   \set Score.dynamicAbsoluteVolumeFunction = #my-dynamic-absolute-volume-function
   a'8\pp b' cis'' d'' e''-.\ff d''-. cis''-. b'-. a'
 }
 \midi { }
\layout { }
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

You understand that default 'piano' is not so piano because we have to go to ppppp.

By adjusting the values in that associative list, you can play with dynamics and get the exact contrast you would like.

Hope that helps.
Kind regards,
Jean Abou Samra.

Le 15 juil. 2019 à 16:16, David Sumbler <[hidden email]> a écrit :

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\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


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Controlling midi dynamics

David Sumbler
Hi Jean

That's great - I certainly now can get a greater range of dynamic than before. Thank you very much.

But I find that altering values in 'my-instrument-equalizer-alist' has no effect at all. How can I adjust the relative volumes of 2 different instruments - say, 'violin' and 'cello'. (I find that in the fluidr3_gm sound font, the cello is far quieter than the other stringed instruments.)

David


On Mon, 2019-07-15 at 17:41 +0200, Jean ABOU SAMRA wrote:
Hi David,

Your problem is not with the instrument, it's with the dynamics themselves.
The algorithm that affects a volume to a note does a scale between midiMinimumVolume and midiMaximumVolume that includes all dynamics. Mathematically, you can think:
volume = midiMinimumVolume + (midiMaximumVolume - midiMinimumVolume)*dynamic

Let me try a diagram:

0                       |        pppp   ppp   pp  p  mp  mf f ff fff   ffff  fffff sf  |                         1
no sound                midiMinimumVolume                                              midiMaximumVolume         maximum volume possible


Here you set midiMinimumVolume to 0 or almost and midiMaximumVolume to 1, so if there is not enough difference for you, you need to influence the scale between the two in addition to minimum and maximum volume.

suggests to set the dynamicAbsoluteVolumeFunction property. You will find its default in scm/midi.scm:

;; define factor of total volume per dynamic marking
(define-session-public absolute-volume-alist '())
(set! absolute-volume-alist
      (append
       '(
         ("sf" . 1.00)
         ("fffff" . 0.95)
         ("ffff" . 0.92)
         ("fff" . 0.85)
         ("ff" . 0.80)
         ("f" . 0.75)
         ("mf" . 0.68)
         ("mp" . 0.61)
         ("p" . 0.55)
         ("pp" . 0.49)
         ("ppp" . 0.42)
         ("pppp" . 0.34)
         ("ppppp" . 0.25)
         )
       absolute-volume-alist))

(define-public (default-dynamic-absolute-volume s)
  (assoc-get s absolute-volume-alist))

so now you can modify it, for example:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\version "2.19.83"

#(define (my-dynamic-absolute-volume-function dynamic-name)
 (assoc-get dynamic-name
  '(
     ("sf" . 1.00)
     ("fffff" . 0.95)
     ("ffff" . 0.92)
     ("fff" . 0.85)
     ("ff" . 0.95) ;; was 0.80
     ("f" . 0.75)
     ("mf" . 0.68)
     ("mp" . 0.61)
     ("p" . 0.55)
     ("pp" . 0.10) ;; was 0.49
     ("ppp" . 0.42)
     ("pppp" . 0.34)
     ("ppppp" . 0.25)
   )))

\score {
 \new Staff \with { midiInstrument = "trumpet" } {
   \set Score.midiMinimumVolume = 0.0
   \set Score.midiMaximumVolume = 1.0
   \set Score.dynamicAbsoluteVolumeFunction = #my-dynamic-absolute-volume-function
   a'8\pp b' cis'' d'' e''-.\ff d''-. cis''-. b'-. a'
 }
 \midi { }
\layout { }
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

You understand that default 'piano' is not so piano because we have to go to ppppp.

By adjusting the values in that associative list, you can play with dynamics and get the exact contrast you would like.

Hope that helps.
Kind regards,
Jean Abou Samra.

Le 15 juil. 2019 à 16:16, David Sumbler <[hidden email]> a écrit :

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\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


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user



_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Controlling midi dynamics

Jean ABOU SAMRA
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\version "2.19.83"



midiMinimumVolume + (midiMaximumVolume - midiMinimumVolume) * fraction

These are the volume coefficients ('fraction' above) applied to each dynamic.
%}
#(define (my-dynamic-absolute-volume-function dynamic-name)
  (assoc-get dynamic-name
    '(
      ; Adjust these values to get what you would like.
      ; You can add other dynamics.
      ; If an dynamic name is not found, the default dynamic values are used.
      ("ff" . 0.95)
      ("pp" . 0.3)
    )
    (default-dynamic-absolute-volume dynamic-name)))

%{ These are the default equalizations applied to each MIDI instrument.
An equalization consists in (min . max) where min is the value to apply for midiMinimumVolume and max for midiMaximumVolume.
Keep refering to the formula above!
%}
#(define (my-instrument-equalizer instrument-name)
  (assoc-get instrument-name
    '(
      ; Adjust these values to get what you would like.
      ; You can add other instrument names.
      ; If an instrument name is not found, the default equalizer is used.
      ("violin" . (0.1 . 0.4))
      ("cello" . (0.5 1.0))
    )
    (default-instrument-equalizer instrument-name)))


\midi {
  \context {
    \Score
    instrumentEqualizer = #my-instrument-equalizer
    dynamicAbsoluteVolumeFunction = #my-dynamic-absolute-volume-function
  }
}


violin = \new Voice \relative { c'4\pp d e f g\ff a b c }
cello = \new Voice \relative { a,4\pp b c d e\ff f gis a }

\score {
  <<
    \new Staff \with { midiInstrument = "violin" } { \violin }
    \new Staff \with { midiInstrument = "cello" } { \cello }
  >>
  \midi { }
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


You can use an instrument equalizer and custom dynamic absolute volume values at the same time.

Of course, instrument equalization can be achieved using
 \set Staff.midiMinimumVolume = min  \set Staff.maximumVolume = max …
but the power of an instrument equalizer is that you can put it in a separate file and
\include it, as you say that you generally want to hear the cello louder and the violin less loud.

By the way, I find that the example given on
in selected snippets at "Replacing default MIDI instrument equalization"
is overly complicated. Why define the alist empty to append to it later?
And why not just use assoc-get? It could be easily improved.

Best regards,
Jean Abou Samra

Le 15 juil. 2019 à 18:26, David Sumbler <[hidden email]> a écrit :

Hi Jean

That's great - I certainly now can get a greater range of dynamic than before. Thank you very much.

But I find that altering values in 'my-instrument-equalizer-alist' has no effect at all. How can I adjust the relative volumes of 2 different instruments - say, 'violin' and 'cello'. (I find that in the fluidr3_gm sound font, the cello is far quieter than the other stringed instruments.)

David


On Mon, 2019-07-15 at 17:41 +0200, Jean ABOU SAMRA wrote:
Hi David,

Your problem is not with the instrument, it's with the dynamics themselves.
The algorithm that affects a volume to a note does a scale between midiMinimumVolume and midiMaximumVolume that includes all dynamics. Mathematically, you can think:
volume = midiMinimumVolume + (midiMaximumVolume - midiMinimumVolume)*dynamic

Let me try a diagram:

0                       |        pppp   ppp   pp  p  mp  mf f ff fff   ffff  fffff sf  |                         1
no sound                midiMinimumVolume                                              midiMaximumVolume         maximum volume possible


Here you set midiMinimumVolume to 0 or almost and midiMaximumVolume to 1, so if there is not enough difference for you, you need to influence the scale between the two in addition to minimum and maximum volume.

suggests to set the dynamicAbsoluteVolumeFunction property. You will find its default in scm/midi.scm:

;; define factor of total volume per dynamic marking
(define-session-public absolute-volume-alist '())
(set! absolute-volume-alist
      (append
       '(
         ("sf" . 1.00)
         ("fffff" . 0.95)
         ("ffff" . 0.92)
         ("fff" . 0.85)
         ("ff" . 0.80)
         ("f" . 0.75)
         ("mf" . 0.68)
         ("mp" . 0.61)
         ("p" . 0.55)
         ("pp" . 0.49)
         ("ppp" . 0.42)
         ("pppp" . 0.34)
         ("ppppp" . 0.25)
         )
       absolute-volume-alist))

(define-public (default-dynamic-absolute-volume s)
  (assoc-get s absolute-volume-alist))

so now you can modify it, for example:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\version "2.19.83"

#(define (my-dynamic-absolute-volume-function dynamic-name)
 (assoc-get dynamic-name
  '(
     ("sf" . 1.00)
     ("fffff" . 0.95)
     ("ffff" . 0.92)
     ("fff" . 0.85)
     ("ff" . 0.95) ;; was 0.80
     ("f" . 0.75)
     ("mf" . 0.68)
     ("mp" . 0.61)
     ("p" . 0.55)
     ("pp" . 0.10) ;; was 0.49
     ("ppp" . 0.42)
     ("pppp" . 0.34)
     ("ppppp" . 0.25)
   )))

\score {
 \new Staff \with { midiInstrument = "trumpet" } {
   \set Score.midiMinimumVolume = 0.0
   \set Score.midiMaximumVolume = 1.0
   \set Score.dynamicAbsoluteVolumeFunction = #my-dynamic-absolute-volume-function
   a'8\pp b' cis'' d'' e''-.\ff d''-. cis''-. b'-. a'
 }
 \midi { }
\layout { }
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

You understand that default 'piano' is not so piano because we have to go to ppppp.

By adjusting the values in that associative list, you can play with dynamics and get the exact contrast you would like.

Hope that helps.
Kind regards,
Jean Abou Samra.

Le 15 juil. 2019 à 16:16, David Sumbler <[hidden email]> a écrit :

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\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


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

How to skip to chorus from stanza and return to next stanz?

John Helly
Aloha.

I have a guitar and vocal song with 6 stanzas and a chorus and outro
with lyrics.  I would like to jump to the chorus after the 2nd and 4th
stanzas and return to the 3rd and 5th, respectively, coming out of the
chorus.  Since I'm not formally trained in notation, I don' t know how
this should be approached (or if it's possible).  Here is the structure
of the song.  Any advice is most welcome.  I've tried inserting markup
text but haven't been successful although this would be my ad hoc approach.

\new Staff {
  \key a \minor
 { \GuitarStrum \break  \GuitarStrum \break  \GuitarStrum \break  }
  \new Voice = "verse"    { \Song.Voice.Verse   \bar "||"  }
  \new Voice = "chorus" { \Song.Voice.Chorus \bar "||" }
  \new Voice = "outro"    { \Song.Voice.Outro   \bar ":|." }
}
\new Lyrics \lyricsto "verse" { \Song.Lyrics.VerseI \break  }
\new Lyrics
  <<
  \lyricsto "verse"   { \Song.Lyrics.VerseII }
  \lyricsto "chorus" { \Song.Lyrics.Chorus  }
  \lyricsto "outro"    { \Song.Lyrics.Outro }
  >>
\new Lyrics  \lyricsto "verse" { \Song.Lyrics.VerseIII }
\new Lyrics
  <<
  \lyricsto "verse" { \Song.Lyrics.VerseIV }
%  \lyricsto "chorus" { \Song.Lyrics.Chorus }
  >>
\new Lyrics  \lyricsto "verse"  { \Song.Lyrics.VerseV \break  }
\new Lyrics  \lyricsto "verse"  { \Song.Lyrics.VerseVI \break }
>>
\layout { }
\midi { }
}

Mahalo
J.

--
================================================
University of Hawaii, Maui College / Mobile 760.840.8660


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: How to skip to chorus from stanza and return to next stanz?

Aaron Hill
On 2019-07-16 7:52 pm, John Helly wrote:

> Aloha.
>
> I have a guitar and vocal song with 6 stanzas and a chorus and outro
> with lyrics.  I would like to jump to the chorus after the 2nd and 4th
> stanzas and return to the 3rd and 5th, respectively, coming out of the
> chorus.  Since I'm not formally trained in notation, I don' t know how
> this should be approached (or if it's possible).  Here is the structure
> of the song.  Any advice is most welcome.  I've tried inserting markup
> text but haven't been successful although this would be my ad hoc
> approach.

Ad hoc is not a bad thing, to be honest, providing your notation is
clear enough for performers to follow consistently.

There are a few approaches I have seen for this pattern.

1) Join paired stanzas together as a sort of meta stanza.  If you have
room on the page, simply have stanza one flow right into stanza two.  
This does mean duplicating notes and chords, but it only needs a simple
repeat and produces a very clean roadmap.  The added advantage here is
that you can cut the number of lyrics lines in half.  (Six is pushing it
my experience, and you will likely need to space the lyric lines or add
in dividing lines to make it easier for the eye to know where to jump at
the end of each line.)

2) Keep all lyrics stacked and use a repeat with two voltas.  The first
volta will be a repeat back to the top of the stanzas for iterations
"1.3.5.".  The second volta (for "2.4.6.") will lead into the chorus.  
At the end of the chorus, use a D.C. or D.S. as appropriate, with or
without an "al Coda" again as needed.

3) Notate the music as if the chorus follows each stanza and either add
a text markup or rely on folks hand-writing in text that informs them of
the roadmap.  This option is very handy if the roadmap could change
between performances.  For instance, you might end up only singing
stanzas 1, 2, 4, and 6, with the chorus after 2 and 6.  Sometimes, it is
nice to have printed notation that is more general and flexible than to
be cluttered with potentially extra specificity.


-- Aaron Hill

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: How to skip to chorus from stanza and return to next stanz?

John Helly
Mahalo.  I'll have a go at your suggestions.
J.

On 7/16/19 20:32, Aaron Hill wrote:

> On 2019-07-16 7:52 pm, John Helly wrote:
>> Aloha.
>>
>> I have a guitar and vocal song with 6 stanzas and a chorus and outro
>> with lyrics.  I would like to jump to the chorus after the 2nd and 4th
>> stanzas and return to the 3rd and 5th, respectively, coming out of the
>> chorus.  Since I'm not formally trained in notation, I don' t know how
>> this should be approached (or if it's possible).  Here is the structure
>> of the song.  Any advice is most welcome.  I've tried inserting markup
>> text but haven't been successful although this would be my ad hoc
>> approach.
>
> Ad hoc is not a bad thing, to be honest, providing your notation is
> clear enough for performers to follow consistently.
>
> There are a few approaches I have seen for this pattern.
>
> 1) Join paired stanzas together as a sort of meta stanza.  If you have
> room on the page, simply have stanza one flow right into stanza two. 
> This does mean duplicating notes and chords, but it only needs a
> simple repeat and produces a very clean roadmap.  The added advantage
> here is that you can cut the number of lyrics lines in half.  (Six is
> pushing it my experience, and you will likely need to space the lyric
> lines or add in dividing lines to make it easier for the eye to know
> where to jump at the end of each line.)
>
> 2) Keep all lyrics stacked and use a repeat with two voltas.  The
> first volta will be a repeat back to the top of the stanzas for
> iterations "1.3.5.".  The second volta (for "2.4.6.") will lead into
> the chorus.  At the end of the chorus, use a D.C. or D.S. as
> appropriate, with or without an "al Coda" again as needed.
>
> 3) Notate the music as if the chorus follows each stanza and either
> add a text markup or rely on folks hand-writing in text that informs
> them of the roadmap.  This option is very handy if the roadmap could
> change between performances.  For instance, you might end up only
> singing stanzas 1, 2, 4, and 6, with the chorus after 2 and 6. 
> Sometimes, it is nice to have printed notation that is more general
> and flexible than to be cluttered with potentially extra specificity.
>
>
> -- Aaron Hill
>
> _______________________________________________
> lilypond-user mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/lilypond-user

--
================================================
University of Hawaii, Maui College / Mobile 760.840.8660


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Controlling midi dynamics

David Sumbler
In reply to this post by Jean ABOU SAMRA
Thank you for all your help on this. I now have an include file that does more or less what I want, and of course I can tweak in further in the future.

David


On Tue, 2019-07-16 at 15:11 +0200, Jean ABOU SAMRA wrote:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\version "2.19.83"



midiMinimumVolume + (midiMaximumVolume - midiMinimumVolume) * fraction

These are the volume coefficients ('fraction' above) applied to each dynamic.
%}
#(define (my-dynamic-absolute-volume-function dynamic-name)
  (assoc-get dynamic-name
    '(
      ; Adjust these values to get what you would like.
      ; You can add other dynamics.
      ; If an dynamic name is not found, the default dynamic values are used.
      ("ff" . 0.95)
      ("pp" . 0.3)
    )
    (default-dynamic-absolute-volume dynamic-name)))

%{ These are the default equalizations applied to each MIDI instrument.
An equalization consists in (min . max) where min is the value to apply for midiMinimumVolume and max for midiMaximumVolume.
Keep refering to the formula above!
%}
#(define (my-instrument-equalizer instrument-name)
  (assoc-get instrument-name
    '(
      ; Adjust these values to get what you would like.
      ; You can add other instrument names.
      ; If an instrument name is not found, the default equalizer is used.
      ("violin" . (0.1 . 0.4))
      ("cello" . (0.5 1.0))
    )
    (default-instrument-equalizer instrument-name)))


\midi {
  \context {
    \Score
    instrumentEqualizer = #my-instrument-equalizer
    dynamicAbsoluteVolumeFunction = #my-dynamic-absolute-volume-function
  }
}


violin = \new Voice \relative { c'4\pp d e f g\ff a b c }
cello = \new Voice \relative { a,4\pp b c d e\ff f gis a }

\score {
  <<
    \new Staff \with { midiInstrument = "violin" } { \violin }
    \new Staff \with { midiInstrument = "cello" } { \cello }
  >>
  \midi { }
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


You can use an instrument equalizer and custom dynamic absolute volume values at the same time.

Of course, instrument equalization can be achieved using
 \set Staff.midiMinimumVolume = min  \set Staff.maximumVolume = max …
but the power of an instrument equalizer is that you can put it in a separate file and
\include it, as you say that you generally want to hear the cello louder and the violin less loud.

By the way, I find that the example given on
in selected snippets at "Replacing default MIDI instrument equalization"
is overly complicated. Why define the alist empty to append to it later?
And why not just use assoc-get? It could be easily improved.

Best regards,
Jean Abou Samra

Le 15 juil. 2019 à 18:26, David Sumbler <[hidden email]> a écrit :

Hi Jean

That's great - I certainly now can get a greater range of dynamic than before. Thank you very much.

But I find that altering values in 'my-instrument-equalizer-alist' has no effect at all. How can I adjust the relative volumes of 2 different instruments - say, 'violin' and 'cello'. (I find that in the fluidr3_gm sound font, the cello is far quieter than the other stringed instruments.)

David


On Mon, 2019-07-15 at 17:41 +0200, Jean ABOU SAMRA wrote:
Hi David,

Your problem is not with the instrument, it's with the dynamics themselves.
The algorithm that affects a volume to a note does a scale between midiMinimumVolume and midiMaximumVolume that includes all dynamics. Mathematically, you can think:
volume = midiMinimumVolume + (midiMaximumVolume - midiMinimumVolume)*dynamic

Let me try a diagram:

0                       |        pppp   ppp   pp  p  mp  mf f ff fff   ffff  fffff sf  |                         1
no sound                midiMinimumVolume                                              midiMaximumVolume         maximum volume possible


Here you set midiMinimumVolume to 0 or almost and midiMaximumVolume to 1, so if there is not enough difference for you, you need to influence the scale between the two in addition to minimum and maximum volume.

suggests to set the dynamicAbsoluteVolumeFunction property. You will find its default in scm/midi.scm:

;; define factor of total volume per dynamic marking
(define-session-public absolute-volume-alist '())
(set! absolute-volume-alist
      (append
       '(
         ("sf" . 1.00)
         ("fffff" . 0.95)
         ("ffff" . 0.92)
         ("fff" . 0.85)
         ("ff" . 0.80)
         ("f" . 0.75)
         ("mf" . 0.68)
         ("mp" . 0.61)
         ("p" . 0.55)
         ("pp" . 0.49)
         ("ppp" . 0.42)
         ("pppp" . 0.34)
         ("ppppp" . 0.25)
         )
       absolute-volume-alist))

(define-public (default-dynamic-absolute-volume s)
  (assoc-get s absolute-volume-alist))

so now you can modify it, for example:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\version "2.19.83"

#(define (my-dynamic-absolute-volume-function dynamic-name)
 (assoc-get dynamic-name
  '(
     ("sf" . 1.00)
     ("fffff" . 0.95)
     ("ffff" . 0.92)
     ("fff" . 0.85)
     ("ff" . 0.95) ;; was 0.80
     ("f" . 0.75)
     ("mf" . 0.68)
     ("mp" . 0.61)
     ("p" . 0.55)
     ("pp" . 0.10) ;; was 0.49
     ("ppp" . 0.42)
     ("pppp" . 0.34)
     ("ppppp" . 0.25)
   )))

\score {
 \new Staff \with { midiInstrument = "trumpet" } {
   \set Score.midiMinimumVolume = 0.0
   \set Score.midiMaximumVolume = 1.0
   \set Score.dynamicAbsoluteVolumeFunction = #my-dynamic-absolute-volume-function
   a'8\pp b' cis'' d'' e''-.\ff d''-. cis''-. b'-. a'
 }
 \midi { }
\layout { }
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

You understand that default 'piano' is not so piano because we have to go to ppppp.

By adjusting the values in that associative list, you can play with dynamics and get the exact contrast you would like.

Hope that helps.
Kind regards,
Jean Abou Samra.

Le 15 juil. 2019 à 16:16, David Sumbler <[hidden email]> a écrit :

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\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


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user



_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user