Hi!
I have not succeeded in finding a way not to make to collide the fingers: does 
a 
way exist?
You can see above all to the measure 9 and 31.
Thanks!
-- 
Per ragionare con gli stupidi bisogna scendere al loro livello:
ecco perché sono così taciturno!!!

oiram/bin/selom
\version "2.13.18"
#(define (script x) 
        (make-music 
          'TextScriptEvent
          'direction #'DOWN
          'text (markup #:vcenter #:circle #:finger x))
) 

#(define (add-script m x)
        (if (equal? (ly:music-property m 'name) 'EventChord)
            (set! (ly:music-property m 'elements)
                  (cons (script x)
                        (ly:music-property m 'elements)))       
            (let ((es (ly:music-property m 'elements))
                  (e (ly:music-property m 'element)))
                 (map (lambda (y) (add-script y x)) es)
                 (if (ly:music? e)
                     (add-script e x))))
        m)

Strd = #(define-music-function (parser location script music )
  ( string? ly:music? )
  (add-script music script))

strd = #(define-music-function (parser location str music) (string? ly:music?)
  (let ((spanned-music
          (let ((first-element #f) (last-element #f) (first-found? #f))
               (music-map (lambda (m)
                         (if (equal? (ly:music-property m 'name) 'EventChord)
                             (begin (if (not first-found?)
                                        (begin  (set! first-found? #t) (set! first-element m)))
                                    (set! last-element m)))
                         m)
                 music)
               (if first-found?
                 (begin
                   (set! (ly:music-property first-element 'elements)
                         (cons (make-music 'TextSpanEvent 'span-direction -1)
                               (ly:music-property first-element 'elements)))
                   (set! (ly:music-property last-element 'elements)
                         (cons (make-music 'TextSpanEvent 'span-direction 1)
                               (ly:music-property last-element 'elements)))))
               music)))
       (make-music 'SequentialMusic
         'origin location
         'elements (list #{
             \once \override TextSpanner #'font-size = #-3
             \once \override TextSpanner #'direction = #-1
             \once \override TextSpanner #'style = #'solid
             \once \override TextSpanner #'dash-period = #4 
             \once \override TextSpanner #'bound-details = #'((left ( Y . 0)) (right (Y . 0) (spanner . 20)(attach-dir . 1)))
             \once \override TextSpanner #'bound-details #'left #'text = \markup { \vcenter  \circle  \finger $str }
             \once \override TextSpanner #'bound-details #'right #'text = \markup {  \draw-line  #'( 0 . .7) }#}
           spanned-music))))
#(define (script x) 
        (make-music 
          'TextScriptEvent
          'direction #'UP
          'text (markup #:vcenter #:circle #:finger x))
) 

#(define (add-script m x)
        (if (equal? (ly:music-property m 'name) 'EventChord)
            (set! (ly:music-property m 'elements)
                  (cons (script x)
                        (ly:music-property m 'elements)))       
            (let ((es (ly:music-property m 'elements))
                  (e (ly:music-property m 'element)))
                 (map (lambda (y) (add-script y x)) es)
                 (if (ly:music? e)
                     (add-script e x))))
        m)

Str = #(define-music-function (parser location script music )
  ( string? ly:music? )
  (add-script music script))

str = #(define-music-function (parser location str music) (string? ly:music?)
  (let ((spanned-music
          (let ((first-element #f) (last-element #f) (first-found? #f))
               (music-map (lambda (m)
                         (if (equal? (ly:music-property m 'name) 'EventChord)
                             (begin (if (not first-found?)
                                        (begin  (set! first-found? #t) (set! first-element m)))
                                    (set! last-element m)))
                         m)
                 music)
               (if first-found?
                 (begin
                   (set! (ly:music-property first-element 'elements)
                         (cons (make-music 'TextSpanEvent 'span-direction -1)
                               (ly:music-property first-element 'elements)))
                   (set! (ly:music-property last-element 'elements)
                         (cons (make-music 'TextSpanEvent 'span-direction 1)
                               (ly:music-property last-element 'elements)))))
               music)))
       (make-music 'SequentialMusic
         'origin location
         'elements (list #{
             \once \override TextSpanner #'font-size = #-3
             \once \override TextSpanner #'direction = #0
             \once \override TextSpanner #'style = #'solid
             \once \override TextSpanner #'dash-period = #0.4 
             \once \override TextSpanner #'bound-details = #'((left (Y . 0)) (right (Y . 0) (padding . 0.25) (attach-dir . 2)))
             \once \override TextSpanner #'bound-details #'left #'text = \markup { \vcenter  \circle  \finger $str }
             \once \override TextSpanner #'bound-details #'right #'text = \markup {  \draw-line  #'( 0 . -.7) }#}
           spanned-music))))
cofon ={\cadenzaOff \bar "|"\cadenzaOn}
cofn ={\cadenzaOff \bar "|"\cadenzaOn}
snu = { \set stringNumberOrientations = #'(up) }
snd = { \set stringNumberOrientations = #'(down) }
snl = { \set stringNumberOrientations = #'(left) }
snr = { \set stringNumberOrientations = #'(right)}
fou = { \set fingeringOrientations = #'(up) }
fod = { \set fingeringOrientations = #'(down) }
fol = { \set fingeringOrientations = #'(left) }
for = { \set fingeringOrientations = #'(right) }
sfou = { \set strokeFingerOrientations = #'(up) }
sfod = { \set strokeFingerOrientations = #'(down) }
sfol = { \set strokeFingerOrientations = #'(left) }
sfor = { \set strokeFingerOrientations = #'(right) }
gt = \override Glissando #'breakable = ##T
gl = \glissando
gT = \override Glissando #'thickness = #2
ignore = \override NoteColumn #'ignore-collision = ##t
nignore = \override NoteColumn #'ignore-collision = ##f
manualBeam =
#(define-music-function (parser location beg-end)
  (pair?)
  #{
    \once \override Beam #'positions = #$beg-end
#})
#(set-global-staff-size 18)

#(define (calc-custom-stroke-text grob)
        (let ((text (ly:event-property (event-cause grob) 'text)))
             (if (string? text)
                 (markup #:center-column (#:lower 2.5 "^" text))
                 (stroke-finger::calc-text grob))))

#(define (make-stroke-finger location finger)
        (apply make-music
          (append
            (list
              'StrokeFingerEvent
              'origin location)
            (if  (string? finger)
                 (list 'text finger)
                 (list 'digit finger)))))

da = #(define-music-function (parser location) ()
  (make-stroke-finger location "a"))
dm = #(define-music-function (parser location) ()
  (make-stroke-finger location "m"))
di = #(define-music-function (parser location) ()
  (make-stroke-finger location "i"))
dp = #(define-music-function (parser location) ()
  (make-stroke-finger location "p"))
dan = #(define-music-function (parser location) ()
  (make-stroke-finger location 4))
dmn = #(define-music-function (parser location) ()
  (make-stroke-finger location 3))
din = #(define-music-function (parser location) ()
  (make-stroke-finger location 2))
dpn = #(define-music-function (parser location) ()
  (make-stroke-finger location 1))
\paper {
  print-page-number = ##t
myStaffSize = #18
#(define fonts
(make-pango-font-tree "URW Palladio L"
"URW Palladio L"
"URW Palladio L"
(/ myStaffSize 18)))
% between-system-space = 30\cm
% between-system-padding = #3
ragged-bottom=##f
ragged-last-bottom=##f
bottom-margin = 1.2\cm
left-margin = 1.75\cm
right-margin = 1.25\cm
% max-systems-per-page = 4
}

tempoMark = {
  \once \override Score.RehearsalMark #'self-alignment-X = #LEFT
  \once \override Score.RehearsalMark #'break-align-symbols = #'(time-signature key-signature)
  \once \override Staff.TimeSignature #'break-align-anchor-alignment = #LEFT
  \mark \markup \override #'(font-name .  "URW Palladio L bold"){"Non troppo lento"}
}

global = {
  \tempoMark
  \key d \major
  \time 4/4
}

sopranoVoice = \relative c'' {
  \global
  \dynamicUp
  % Qui segue la musica.
 r1|
 r|\noBreak
 r4 a \(cis b\)|\noBreak
 b4.^> \(e,8\) e4 fis|\noBreak
 g2 r4 g|\noBreak
 g4. g8 fis4 e|\break\noPageBreak
 gis2\> a4\! r|
 r a \acciaccatura a8 cis4 b|
 b4. -> e,8 e4 fis|
 g2 r4 g\mark \markup \override #'(font-name .  "URW Palladio L italic"){\fontsize #-2 "         rit."} |\noPageBreak
 g4.fis8 e4. d8|\noBreak
 cis2 b4 r|
 r b'-\< d4. c8-\!|
 c2-> (\melisma fis,4)\melismaEnd r|
 r fis a4. g8|\noPageBreak
 g2-\> (\melisma dis4\!)\melismaEnd r|
 r\mark \markup \override #'(font-name .  "URW Palladio L italic"){\fontsize #-2 "dolce"} e e e|
 e2. e4|
 e2-\< f4\! r|
 r f-\< f f|\noPageBreak
 f2.\! f4|
 f2 fis4 r|
 r\mark \markup \override #'(font-name .  "URW Palladio L italic"){\fontsize #-2 "dolce"} fis a g|
 fis-\< a c4. b8\!|\noBreak
 b1\(\melisma|
 e,4\)\melismaEnd r r e|\noPageBreak
 g\mark \markup \override #'(font-name .  "URW Palladio L italic"){\fontsize #-2 "smorz."} g fis e|
 gis2-\> \(a4\!\) r|
 r2 r4 d,\mark \markup \override #'(font-name .  "URW Palladio L italic"){\fontsize #-2 "pi첫 lento"}|
 g g fis e|
 d1-\>|
 d4 r\! r2|\bar "|."
}

verse = \lyricmode { 
  % Qui seguono le parole.
  Es muss ein Wun -- der -- ba -- res sein ums Lie -- ben zwe -- ier
  See -- len, sich schlies -- sen ganz ein -- an -- der ein, sich nie ein Wort ver -- heh -- len!
  Und Freud' und Leid __ und Gl첫ck und Noth __ so mi ein -- an -- der
  tra -- gen, so mit ein -- an -- der tra -- gen, vom ers -- ten Kuss bis in den Tod __
  sich nur von Lie -- be sa -- gen, sich nur von Lie -- be sa -- gen.
}

upper = \relative c' {
  \global
  \set strokeFingerOrientations = #'(up)
  \override StrokeFinger #'avoid-slur = #'inside
  \override StrokeFinger #'add-stem-support = ##t
  \override StrokeFinger #'font-size = #0
  \override StrokeFinger #'text = #calc-custom-stroke-text
  \override StringNumber #'staff-padding = #'()
  \override Glissando #'thickness = #1.5
  \override Glissando #'bound-details #'right #'padding = #2.5
  \override Score.MetronomeMark #'extra-offset = #'(-8 . 0)
  \override Score.MetronomeMark #'font-size = #0
  \override RestCollision #'ignore-collision = ##t
  \override Staff.OttavaBracket #'dash-period = #0.2
  #(set-octavation 0)
    % Qui segue la musica.
  r4^\pp \fol\sfor\snr<a-2-\din d-3-\dmn fis-4-\dan>2 \for<a d fis>4
  r4 <a d fis>2 <a d fis>4|
  r4 <a d fis>2 <gis-2 d'-4 f-3>4|
  r4 <g-3 b-1 e-4>2 <a-4\4 c-2 ees-1\2>4|
  r4 <g-3 b-1 e-4>2 <g b e>4|
  r4 <a-3 cis-2 g'-4\2>2 <a cis g'>4|
  r4 \set Staff.ottavation = \markup { \upright {\tiny "III" } } <f ais d>2\ottava #0
  \set Staff.ottavation = \markup { \upright {\tiny "II" } }<fis-3 a-1 d-2>4\ottava #0 |
  r4 <a-2 d-3 fis-4>2 <gis-2 d'-4 f-3>4|
  r4 <g-3 b-1 e-4>2 <a-4\4 c-2 dis-1\2>4|
  r4 <g-3 b-1 e-4>2 <g-3 b-2 e-4>4|
  r4 <ais-3 cis-2 e-0>2 r4|
  \set Staff.ottavation = \markup { \upright {\tiny "VII" } }r4 <b-3\4 d fis-1>2 <b d fis>4|
  r4 <b-3 d fis>\ottava #0 \set Staff.ottavation = \markup { \upright {\tiny "V" } } r <g c e>|
  r4 <a-3 c fis-4>2 <a c fis>4|
  r4 <a c fis> r <g c e>|
  r4 <a-2 c e>2 <a c>4\ottava #0 |
  r4 <g b e>2 <g b e>4|
  r4 \override StringNumber #'extra-offset = #'(-1.5 . 0) \fol<b-4\3 d-2 e>2 <b d e>4|
  r4 \for<d-3 f-1>2 <d f>4|
  r4 <a-2 dis-4 f-1>2 <a dis f>4|
  r4 <cis-3 f-2>2 <cis f>4|
  r4^\markup \override #'(font-name .  "URW Palladio L italic"){\fontsize #0 "cresc."} \for<cis-3 fis!-4>2 <cis fis>4|
  \override StringNumber #'extra-offset = #'(0 . 0) \fol<cis-1 fis-2\2>2 \snd <b-3\4 d-1>|
  <a-2 cis-1 fis-3>2 \for<gis-1 d'-3 f-2>|
  \fol<e-2 g-0 d'-4 e>1~|
  <e g d' e>4 b4\rest b2\rest|
  <b'-3\4 d-1 g-2>2^\pp <a-3 cis-2 fis-4>4^\markup \override #'(font-name .  "URW Palladio L italic"){\fontsize #0 "rit."} <g-1 cis-2 e-1>|
  \for<f-1 ais-1 d-1>2 <fis-3 a-1 d-2>4 b\rest|
  b\rest \fol\strd "3" \textSpannerDown <a-2>\startTextSpan( <cis-2> <b-2>)\stopTextSpan|
  < g-3 b-2 d-1 e>2^\pp <g-1 cis-2 fis-3>|
  \for<f-3 gis-1 d'-4>1|
  <fis!-3 a-1 d-2>4 b4\rest b2\rest|
}

lower = \relative c' {
  \global
  \set strokeFingerOrientations = #'(up)
  \override StrokeFinger #'avoid-slur = #'inside
  \override StrokeFinger #'add-stem-support = ##t
  \override StrokeFinger #'font-size = #0
  \override StrokeFinger #'text = #calc-custom-stroke-text
  \override StringNumber #'staff-padding = #'()
  \override Glissando #'thickness = #1.5
  \override Glissando #'bound-details #'right #'padding = #2.5
  \override Score.MetronomeMark #'extra-offset = #'(-8 . 0)
  \override Score.MetronomeMark #'font-size = #0
  \override RestCollision #'ignore-collision = ##t
    % Qui segue la musica.
  \snd\fol\sfor<d,-1\5-\dpn>4 r r2|
  d4 r r2|
  d4 r r2|
  <d-2>4 r r2|
  <d-2>4 r r2|
  <d-1>4 r r2|
  <d-4>4 r r2|
  d4 r r2|
  <d-2>4 r r2|
  <d-2>4 r \for<cis!-1> r|
  \fol<fis,-1>4 r r2|
  <b-1>4 r r2|
  b4 r a r|
  \for<dis-2> r r2|
  dis4 r \fol<e-2> r|
  <fis-4> r r2|
  <g,-3>4 r r2|
  \for<gis-3>4 r r2|
  \fol<a-0>4 r r2|
  a4 r r2|
  \for<ais-1>4 r r2|
  ais4 r r2|
  a1~|
  a|
  \fol<a-0>1~|
  a4 s2.|
  a2\rest a|
  <d-3> r|
  s1|
  a2 a|
  \for<b-2>1|
  <d-4>4 s2.|
}

sopranoVoicePart = \new Staff \with {
  instrumentName = \markup {\override #'(font-name .  "URW Palladio L italic"){"Soprano"}}
  midiInstrument = "choir aahs"
} { \sopranoVoice }
\addlyrics {%{\override LyricText #'font-name = # '"URW Palladio L italic"%} \override LyricText #'font-shape = #'italic
 \verse }

classicalGuitarPart = \new Staff \with {
  midiInstrument = "acoustic guitar (nylon)"
  instrumentName = \markup {\override #'(font-name .  "URW Palladio L italic"){"Chitarra"}}
} { \clef "treble_8" << \upper \\ \lower >> }

\bookpart {\header {
  title = \markup \column {\override #'(font-name .  "URW Palladio L bold"){\fontsize #2  "Romans" " "}}
  subtitle = \markup {\override #'(font-name .  "URW Palladio L "){ ""}}
  subsubtitle = \markup {\override #'(font-name .  "URW Palladio L italic"){""}}
  composer = \markup {\override #'(font-name .  "URW Palladio L italic"){ "Frans Liszt"}}
  arranger = \markup {\override #'(font-name .  "URW Palladio L italic"){ ""}}
  poet = \markup {\override #'(font-name .  "URW Palladio L italic"){""}}
  meter = \markup {\override #'(font-name .  "URW Palladio L italic"){""}}
  piece = \markup {\override #'(font-name .  "URW Palladio L italic"){""}}
  opus = \markup {\override #'(font-name .  "URW Palladio L italic"){""}}
  % Elimina la tagline predefinita di LilyPond
  tagline = ##f
}
  \score {\new StaffGroup
    <<
      \sopranoVoicePart
      \classicalGuitarPart
    >>
    \layout {}
    \midi {
      \context {
        \Score
        tempoWholesPerMinute = #(ly:make-moment 100 4)
      }
    }
  }
}


%{
convert-ly (GNU LilyPond) 2.13.18
Processing `'... 
Applying conversion: 2.13.0, 2.13.1, 

Not smart enough to convert \bar "." now produces a thick barline.
Please refer to the manual for details, and update manually.2.13.4, 2.13.10, 2.13.16, 2.13.18


%}
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to