|
From: | Jean Abou Samra |
Subject: | Re: subito PP |
Date: | Sun, 17 Jul 2022 18:29:21 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 |
Le 17/07/2022 à 10:11, Benjamin Tordoff a écrit :
Hi all, I'm typesetting a score that uses "subito p" and "subito pp" in a couple of places. I've found snippets explaining how to get this to look right (subito in normal italics, the "p" or "pp" in dynamic font), and another snippet showing how to create a custom dynamic that correctly sets the midi volume, but not one that does both. What is the best way to add a text prefix to a dynamic whilst also retaining the dynamic's effect on MIDI output? \version "2.23.10" subPP = \markup{ \italic{sub.} \dynamic pp } \score { { c'2-\ff c'2-\subPP % Volume should be pp but is still ff } \layout {} \midi {} }
How about something like this: \version "2.22.2" subPPMarkup = \markup { \normal-text \italic { sub. } pp } subPP = #(make-dynamic-script subPPMarkup) \midi { \context { \Score dynamicAbsoluteVolumeFunction = #(lambda (dyn) (if (equal? dyn subPPMarkup) 0.3 (default-dynamic-absolute-volume dyn))) } } \score { { c'8\pppp\< d'8 e'8 f'8 g'8 a'8 b'8 c''8 | c''8\fffff b'8 a'8 g'8 f'8\subPP e'8 d'8 c'8 } \layout { } \midi { } } See also the snippet"Creating custom dynamics in MIDI output" at https://lilypond.org/doc/v2.22/Documentation/notation/controlling-midi-dynamics.html Best, Jean
[Prev in Thread] | Current Thread | [Next in Thread] |