Some explanations:
On 20.12.2017 22:42, Simon Albrecht wrote:
On 20.12.2017 01:21, Vivyan wrote:
code to instruct a swell for the duration of c2
There’s several possibilities:
First, LilyPond has the built-in command \espressivo (which is
technically not a dynamic script, but an articulation):
%%%%%%
{ c2\espressivo }
%%%%%%
Second, your ‘example’ hints at this strategy:
%%%%%%
\context Voice <<
{ c2 }
{ s4\< s\> <>\! }
>>
%%%%%%
\context Voice is used to reference an existing voice context. In this
case, it prevents the <<>> construct from automatically creating two
voices, since what you want in this case is two simultaneous music
expressions within one voice.
The empty chord <> takes up no time and thus can be used to terminate
the hairpin here.
Third, you could use this:
%%%%%%
after =
#(define-music-function (t e m) (ly:duration? ly:music? ly:music?)
#{
\context Bottom <<
#m
{ \skip $t <> -\tweak extra-spacing-width #empty-interval $e }
>>
#})
{ \after 8. \> \after 4. \! c2\< }
%%%%%%%
If you want to use this, it is recommendable to put this music function
definition in a library file and \include that file in your actual .ly
document.
This is basically a nicer user interface for the second solution above,
with easier legible source code:
“After a dotted eighth note duration, insert a \>, and after a dotted
quarter note duration, insert a \<, on the note c2\<.”
HTH, Simon
It’s up to you which you prefer.
Best,
Simon
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user