• 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ü

acciaccatura mit Balken und slash

Begonnen von chf, Dienstag, 3. September 2013, 16:28

Vorheriges Thema - Nächstes Thema

chf

Liebe Freunde,

es gab schon mal eine diesbezügliche Anfrage (2010) unter lily 2.14.2 - hier folgt die Origina-lLösung von damals.

slashOn = {
        \override Stem #'stencil = #(lambda (grob)
                (let* ((x-parent (ly:grob-parent grob X))
                        (is-rest? (ly:grob? (ly:grob-object x-parent 'rest))))
                (if is-rest? empty-stencil
                        (ly:stencil-combine-at-edge
                                (ly:stem::print grob)
                                Y
                                (- (ly:grob-property grob 'direction))
                                (grob-interpret-markup grob
                                        (markup
                                        #:translate '(-0.75 . 0)
                                        #:draw-line '(3.5 . -2)))
                                -4 0))))
}

slashOff = {
        \revert Stem #'stencil
}

\relative {
        c'8 c c c
        \override Stem #'stroke-style = #"grace"
        \slashOn
        c8^"Hier ist der Slash!"
        \slashOff
        c c c
}

Die hat bei mir wunderbar funktioniert.
Jetzt arbeite ich mit 2.16.1 bzw. 2.17.20, und ich bekomme immer eine Fehlermeldung

In procedure ly:stencil-combine-at-edge in expression (ly:stencil-combine-at-edge (ly:stem::print grob) Y ...):
test.ly:7:25: Wrong number of arguments to ly:stencil-combine-at-edge


Könnt ihr helfen?

Gruß chf


harm6

Hallo Christa,

ohne es ausprobiert zu haben bin ich mir sicher, daß es reicht die rot markierte Zahl zu löschen:

ZitatslashOn = {
        \override Stem #'stencil = #(lambda (grob)
                (let* ((x-parent (ly:grob-parent grob X))
                        (is-rest? (ly:grob? (ly:grob-object x-parent 'rest))))
                (if is-rest? empty-stencil
                        (ly:stencil-combine-at-edge
                                (ly:stem::print grob)
                                Y
                                (- (ly:grob-property grob 'direction))
                                (grob-interpret-markup grob
                                        (markup
                                        #:translate '(-0.75 . 0)
                                        #:draw-line '(3.5 . -2)))
                                -4 0))))
}

Gruß,
  Harm

chf

Hallo Harm,

danke - so ist es!

Gruß Christa