• Willkommen im Forum „Archiviertes Lilypond Forum (2017)“.
 

Dies ist das Archiv des alten Forums (bis März 2017). Das aktuelle Forum ist unter lilypondforum.de zu finden.
This is the archive of the old forum (until March 2017). You can find the current forum at lilypondforum.de.

Hauptmenü

TextSpanner-Befehl für Barré-Angabe abkürzen

Begonnen von Castor, Sonntag, 9. Februar 2014, 10:13

Vorheriges Thema - Nächstes Thema

trulli

Zitat von: harm6 am Freitag, 14. Februar 2014, 02:35
"syntactic sugar".
...sehr schöne Formulierung.  :D

Als Feintuning für harms Code schlage ich eine leichte Versetzung der Lagenangabe und einen Abschluss der verlängerten Linie am rechten Ende vor.

Ist aber - wie immer - Geschmackssache.

\version "2.18.0"


brx = #(define-music-function (parser location str) (string?)
       #{
         \tweak TextSpanner.bound-details.left.text \markup \upright \concat { \raise #-0.11 $str " " }
         \tweak TextSpanner.bound-details.right.text \markup \draw-line #'(0 . -0.5)
         \tweak TextSpanner.bound-details.right.padding -1.2
         \startTextSpan
       #})

\relative c'' {
  \stemUp
  e,4 f  g8-\brx "III"  b d c d e \stopTextSpan f2
}



Sag mal harm, kann ich eine \override TextSpanner #'style = #'solid auch als \tweak in die \brx-Funktion schreiben? Das habe ich nicht hinbekommen...

Grüße von Trulli

eluze

Zitat von: trulli am Samstag, 15. Februar 2014, 10:43
kann ich eine \override TextSpanner #'style = #'solid auch als \tweak in die \brx-Funktion schreiben? Das habe ich nicht hinbekommen...

warum nicht?
\tweak TextSpanner.style #'dashed-line
Eluze

trulli

#17
Zitat von: Eluze am Samstag, 15. Februar 2014, 11:39
\tweak TextSpanner.style #'dashed-line

Ha, ha, danke. Auch nach vielen Jahren Lily kann man sich immer noch wie ein Anfänger vorkommen....  ::)

Mir ging es darum die übliche Schreibweise für das Beibehalten einer Saite darzustellen.


\version "2.18.0"

sta = #(define-music-function (parser location str) (string?)
       #{
         \tweak TextSpanner.bound-details.left.text \markup \vcenter \concat { \circle \number \fontsize #-5  $str " " }
         \tweak TextSpanner.bound-details.right.text \markup \draw-line #'(0 . -0.5)
         \tweak TextSpanner.bound-details.right.padding -1.2
         \tweak TextSpanner.style #'solid
         \startTextSpan
       #})

stb = \stopTextSpan


\relative c'' {

  \stemUp
e4 f  b,8-\sta "2"  c d c d e \stb  g4 a g
}


Grüße von Trulli