On Tue, Apr 7, 2020 at 9:41 PM Kieren MacMillan <
address@hidden> wrote:
Hi Paolo,
> I don't think so. Please have a look at this http://lilybin.com/8ufzza/1 :
Here’s an edited version, using your method:
%%%%
\version "2.19.83"
notesA = { c''4 4 4 4 }
notesB = { a4 4 4 4 }
dynsAndPedPattern = { s4\sustainOn s s s\sustainOff }
% GOOD
{
\partcombine
{ \notesA } { \dynsAndPedPattern }
\partcombine
{ \notesB } { \dynsAndPedPattern }
\partcombine
{ \notesA } { \dynsAndPedPattern }
}
%%%%
To my eye — as engraver and pianist — it looks terrible.
But maybe you like it?
Hi Kieren,
your version does *not* correspond to my above example.
Please look again at it. I inserted stuff between pedals, so to make them enough distant.
In order to align pedals at right and left, you could use a combination of after and before-linebreaking.
Look at this example (again: messy code that could be improved, and I gently ask Harm and/or Aaron to have a check if they can):
%%%%
#(define pedalOffs 0)
alignPedsAfterRef = \override Staff.SustainPedalLineSpanner.before-line-breaking = #(lambda (grob)
(ly:grob-set-property! grob 'Y-offset pedalOffs))
stopKeepingPedalAligned = \revert Staff.SustainPedalLineSpanner.before-line-breaking
alignPedsBeforeRef = \override Staff.SustainPedalLineSpanner.after-line-breaking = #(lambda (grob)
(ly:grob-set-property! grob 'Y-offset pedalOffs))
setAlignRefPed = { \override Staff.SustainPedalLineSpanner.after-line-breaking = #(lambda (grob)
(set! pedalOffs (ly:grob-property grob 'Y-offset)))
\override Staff.SustainPedalLineSpanner.before-line-breaking = #(lambda (grob)
(set! pedalOffs (ly:grob-property grob 'Y-offset))) }
notesA = { c''4 4 4 4 \noBreak }
notesB = { c'4 4 4 4 \noBreak }
notesC = { f4 4 4 4 \noBreak }
dynsAndPedPattern = { s4\sustainOn s s s\sustainOff }
{
%%%% ALIGN PEDALS ON THE NEXT MEASURE
\alignPedsBeforeRef
\partcombine
{ \notesA } { \dynsAndPedPattern }
\setAlignRefPed
\partcombine
{ \notesB } { \dynsAndPedPattern }
%%%% ENOUGH DISTANCE HERE, STOP ALIGNING, SO TO AVOID HOLES
r1 r r r
%%%% ALIGN PEDALS ON THE NEXT MEASURE
\alignPedsBeforeRef
\partcombine
{ \notesA } { \dynsAndPedPattern }
\partcombine
{ \notesA } { \dynsAndPedPattern }
\setAlignRefPed
\partcombine
{ \notesC } { \dynsAndPedPattern }
%%%% ENOUGH DISTANCE HERE, STOP ALIGNING, SO TO AVOID HOLES
r1 r r r
\setAlignRefPed
\partcombine
{ \notesB } { \dynsAndPedPattern }
%%%% ALIGN PEDALS ON THE PREVIOUS MEASURE
\alignPedsAfterRef
\partcombine
{ \notesA } { \dynsAndPedPattern }
}
%%%%
HTH
P