Hello everyone!
In the attached file there is a Tie whose direction can only be modified
with ly:grob-set-property!. Overrides to Tie.direction and use of \tieDown
seem to fail, and I have no idea why!
The example uses the Edition Engraver, although I don't know if the problem
lies in the EE or in another place.
I'm completely lost. Any ideas?
Thanks in advance for your help!
Stéfano
\version "2.19.80"
\language "english"
\include "oll-core/package.ily"
\loadPackage edition-engraver
\addEdition test
\consistToContexts #edition-engraver Voice
toRH = { \change Staff = "PianoRH" }
toLH = { \change Staff = "PianoLH" }
music =
\new PianoStaff <<
\new Staff = "PianoRH" <<
\new Voice \relative c' {
\time 3/8 \key b \minor
\voiceOne es8 fs \oneVoice r16 \voiceOne es~
<gs es>4 fs8 \bar "||"
}
\new Voice \relative c' {
\toLH \voiceOne r16 <b gs> r <ds a> r <cs gs>
\toRH \voiceTwo r d cs b as cs
}
>>
\new Staff = "PianoLH" <<
\new Voice \relative c {
\clef F \key b \minor
\voiceTwo d8 bs cs
\oneVoice r16 \voiceOne b d8 cs
}
>>
>>
\editionMod test 1 5/16 tiedown.Voice.A {
\once \tieDown
\once \override Tie.color = #red }
\score {
\music
\header {
piece = "\\tieDown doesn't work"
}
\layout {
\context {
\Score
\editionID tiedown
}
}
}
\editionMod test 1 5/16 tiedirection.Voice.A {
\once \override Tie.direction = #DOWN
\once \override Tie.color = #red }
\score {
\music
\header {
piece = "Overriding Tie.direction doesn't work"
}
\layout {
\context {
\Score
\editionID tiedirection
}
}
}
forceRebelTie =
#(define-music-function (dir) (ly:dir?)
#{
\override Tie.before-line-breaking =
#(lambda (grob)
(ly:grob-set-property! grob 'direction dir)) #} )
\editionMod test 1 5/16 blb.Voice.A {
\once \forceRebelTie #DOWN
\once \override Tie.color = #red }
\score {
\music
\header {
piece = "Overriding Tie.before-line-breaking and setting the property does work"
}
\layout {
\context {
\Score
\editionID blb
}
}
}
\editionMod test 1 2/4 testscore.Voice.A \once \tieDown
\editionMod test 2 2/4 testscore.Voice.A \once \override Tie.direction = #DOWN
\editionMod test 3 2/4 testscore.Voice.A \once \forceRebelTie #DOWN
\score {
\new PianoStaff {
\new Staff {
\new Voice \relative c'' {
\time 3/4
r2 <g e c>4~ | 2 4~ | 2 4~ | 2 r4
}
}
}
\header {
piece = "The methods above all work here"
}
\layout {
\context {
\Score
\editionID testscore
}
}
}
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user