2

I want to mark notes with fingerings where the finger number has a bow below or above.

First, I am creating the bows:

upper-bow = 
#'(
  (M 0 0)
  (C 0.6 0.2 1.4 0.2 2 0)
)

lower-bow =
#'(
  (M 2 0)
  (C 1.4 -0.2 0.6 -0.2 0 0)
)

bam-fingering = \markup {
  \path #.2 \upper-bow
}

sefid-fingering = \markup {
  \path #.2 \lower-bow
}

And then I use it in a fingering using \finger:

\sectionLabel "test"
\time 2/4
\relative c'' {
    d4\finger \markup{2 \bam-fingering}
    d4\finger \markup{2 \sefid-fingering}
}

This is the result:

enter image description here

I need the bows to be exactly above or below the number, not besides it. I tried different things like \combine but that didn't help.

2
  • 1
    Out of interest: What are the curves supposed to mean? Jul 7, 2023 at 14:32
  • 1
    It's from a common notation to mark fingerings/strings for playing the Setar: the first string has no mark; the second string - also called sefid for white - has a lower bow; and the bam string has an upper bow.
    – marktani
    Jul 7, 2023 at 17:00

1 Answer 1

3

If you want to combine a list of markups into a single markup you’d want to use \overlay like this:

\relative c'' {
    d4\finger \markup\overlay{ 2 \bam-fingering }
    d4\finger \markup\overlay{ 2 \sefid-fingering }
}

Now, if you want this to align you might want to do something like

\relative c'' {
    d4\finger \markup\overlay{\center-align 2 \center-align \bam-fingering}
    d4\finger \markup\overlay{\center-align 2 \center-align \sefid-fingering}
}

Alternatively you might define your commands as markup functions that draw these paths around their argument, similar to say

\relative c'' {
    d4\finger \markup{\overtie 2}
    d4\finger \markup{\undertie 2}
}

Final solution:

#(define-markup-command (bam-tie layout props text) (markup?)
  "Draw a bam-tie over a fingering."
  (interpret-markup layout props
    #{\markup\overlay{\center-align #text \translate #'(.0 . 1.4) \center-align \bam-fingering}#}))

#(define-markup-command (sefid-tie layout props text) (markup?)
  "Draw a sefid-tie under a fingering."
  (interpret-markup layout props
    #{\markup\overlay{\center-align #text \translate #'(.0 . -.4) \center-align \sefid-fingering}#}))
1
  • I defined a markup command as you said, using \overlay. I also used \translate to do a final adjustment of the positioning :) Exactly what I needed, thanks!
    – marktani
    Jul 7, 2023 at 13:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.