lilypond-user
[Top][All Lists]
Advanced

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

Re: unicode fractions for barre indications


From: Federico Bruni
Subject: Re: unicode fractions for barre indications
Date: Mon, 24 Dec 2012 00:08:39 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.11) Gecko/20121123 Icedove/10.0.11

Il 23/12/2012 22:27, Federico Bruni ha scritto:
Il 23/12/2012 21:06, Nick Payne ha scritto:

I believe only 1/6 and 5/6 exist as Unicode characters. In mathematical
notation one would use 1/3, 2/3, and 1/2, so 2/6, 4/6, and 3/6 are not
provided.

I notate a barre with a partial indicator like so:

Thanks for the reminder... I remember you had already posted it, lazy me!
It's quite nice, even if you always have to specify the number of
strings even for the default barré (6 strings).

Can it be adapted to this function?
http://lists.gnu.org/archive/html/lilypond-user/2012-12/msg00825.html

I see that $strg must be replaced by $fretnum, but I don't know how to
handle ly:music? and $music.


Thinking twice... I prefer using \startTextSpan and \stopTextSpan.
Using \barreX {} is handy but when the barré spans for many notes which have some other construct (like \repeat) the input is not that clear.

But I still want to use minimumFret for tablature. So I would use:

barre = #(define-music-function (parser location fretnum partial)
    (number? number?)
#{
  \set minimumFret = $fretnum
  \set restrainOpenStrings = ##t
  \once \override TextSpanner.bound-details.left.text =
    \markup\small\bold\concat { #(format #f "address@hidden" fretnum)
    \raise #0.8 \sub #(number->string partial) }
  \once \override TextSpanner.style = #'line
  \once \override TextSpanner.font-shape = #'upright
\once\override TextSpanner.bound-details.right.text = \markup { \draw-line #'(0 . -1) }
  \once\override TextSpanner.bound-details.left.stencil-align-dir-y = #0.35
  \once\override TextSpanner.bound-details.left.padding = #-0.25
  \once\override TextSpanner.bound-details.right.padding = #-1
  \once\override TextSpanner.bound-details.right-broken.padding = #0.5
  \once\override TextSpanner.bound-details.left-broken.padding = #2
  \once\override TextSpanner.bound-details.left-broken.text = ##f
  \once\override TextSpanner.bound-details.right-broken.text = ##f
  \unset minimumFret
  \unset restrainOpenStrings
#})



reply via email to

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