lilypond-user
[Top][All Lists]
Advanced

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

Re: Guitar notation - scheme function for slurs with markup


From: Stefan E. Mueller
Subject: Re: Guitar notation - scheme function for slurs with markup
Date: Mon, 30 May 2022 08:17:58 +0200 (CEST)

Hi Lukas,

yes, that is what I need, I can take it from there - many thanks for the
quick response and solution, and the explanations!

        Stefan

--
Stefan E. Mueller

stefan.e.mueller@gmx.de

On Sun, 29 May 2022, Lukas-Fabian Moser wrote:

Hi Stefan,

Am 29.05.22 um 22:42 schrieb Stefan E. Mueller:
I am not sure yet what the difference between a scheme-function and a
music-function is (the second example seems to work whichever definition
is chosen).
A music function must return music, a scheme function can return more general
expressions (for instance, a new function or a list of symbols).
The "-" dash in my case added an (unwanted) accentuation to
the first note, I get the slur with the markup without the accent only if
I remove it (not sure what it is supposed to do - manual says it is a
required
named direction indicator, but in my version 2.22.1 it doesn't work like
that).

Ah, I thought you wanted the accent. :-)

Both the - and ^ symbols have various meanings; it's important to read them
in order.

Add articulation with neutral direction/up-facing/down-facing: -!, ^!, _!
(here I use ! = staccatissimo as an articulation, but ( = slur, ^ = marcato
and - = tenuto are other examples)

If you just want a slur that should have its direction forced upwards, just
write ^(

I thought the function-constructs were merely doing variable
substitutions, but it seems there is more to this. Because now I have the
problem how to describe several hammer-ons in a row with a function, like
this:

\new Staff {
e''8^(^\markup {\halign #-1.5 ho} f''8)^\markup {\halign #-1.5 ho} g''\8)
}

Ideally, I'd like to be able to write this like

e''8 \ho f''8 \ho g''8

(with the corresponding closing brackets also provided by the function,
but it may be that this is not possible).

I assume you want another slur to start on the f''? Then maybe something like
this:

\version "2.22"

ho =
#(define-music-function (spacing music) ((number? -1.5) ly:music?)
   #{
     <>^(^\markup {\halign #spacing ho}
     #music
     <>)
   #})

\new Staff {
  e''8 \ho f''8 \ho g''8 a''
}

Lukas





reply via email to

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