lilypond-user
[Top][All Lists]
Advanced

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

Re: assigning a MIDI loudness to a defined dynamic string


From: Knute Snortum
Subject: Re: assigning a MIDI loudness to a defined dynamic string
Date: Wed, 30 Jul 2014 08:53:38 -0700

Thanks David.  That was the document I was working with but I missed setting the dynamicAbsoluteVolumeFunction and I didn't know how to compare the dynamic passed in to the markup.

Slightly OT: I obviously don't know Scheme or Guile.  I am a programmer, though.  What would be the best way for me to get good at reading and writing LilyPond functions?


Knute Snortum
(via Gmail)


On Wed, Jul 30, 2014 at 7:25 AM, David Kastrup <address@hidden> wrote:
Knute Snortum <address@hidden> writes:

> I am getting my old friend the "ambiguous (de)crescendo" error.  I can see
> why this would happen in the snippet below.  I have defined a dynamic of
> "più f" and LilyPond doesn't know how to crescendo from a "f" to it.
>
> My usual way of dealing with this is to assign a MIDI volume to my new
> dynamic.  In this case forte = .75 so I am trying to assign .77 to the "più
> f" but I don't know how to do it.  Any suggestions?
>
> %%% BEGIN
> \version "2.18.2"
>
> piuFMarkup = \markup { \normal-text { \italic "più" } \dynamic "f" }
> piuF = #(make-dynamic-script #{ \piuFMarkup #} )
>
> % Neither of the following prevent the MIDI error
>
> %{
> #(define (myDynamics dynamic)
>     (if (equal? dynamic \piuFMarkup )
>       0.77
>       (default-dynamic-absolute-volume dynamic)))
> %}
>
> #(define (myDynamics dynamic)
>     (if (equal? dynamic "piùf" )
>       0.77
>       (default-dynamic-absolute-volume dynamic)))
>
> % \f = MIDI loudnes .75, so crescendo to .77
>
> \score {
>   \relative c' {
>     c4 \f d \< e f | g1 \piuF
>   }
>   \layout {}
>   \midi {}
> }
> %%% END

The manual has a working example in
<URL:http://www.lilypond.org/doc/v2.18/Documentation/notation/controlling-midi-dynamics#dynamic-marks>.
You need to set dynamicAbsoluteVolumeFunction for this to work.  Just
defining some function myDynamics and hoping that LilyPond will
magically know what to do with it is not enough.

The following works:



--
David Kastrup



reply via email to

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