Re: adjusting vertical positions of start and end of tie
Hey Werner, I would try to avoid changing the clef in the middle of a tied note in the first place. I can't imagine any scenario where that's necessary, desired or correct. Best regards, Martín. El El vie, 7 ago 2020 a las 7:41, Werner LEMBERG escribió: > > > you could translate the control-points _iff_ left/right-bound's > > staff-positions are not equal. > > Thanks a lot for the code! It's something to have in mind if it > becomes *really* necessary. > > > Werner > > -- www.martinrinconbotero.com
Re: adjusting vertical positions of start and end of tie
> you could translate the control-points _iff_ left/right-bound's > staff-positions are not equal. Thanks a lot for the code! It's something to have in mind if it becomes *really* necessary. Werner
Re: adjusting vertical positions of start and end of tie
> I don't find that Tie supports 'positions. Strange. Seeing Gould's advice it's not so surprising. On the other hand, I'm actually in favor of adding it, for very special situations. > You could do this with \shape used as a tweak. Roughly: > > \relative c' { > \clef "alto" d'2 \shape #'((0 . 0) (0 . 0) (0 . 0) (0 . -2)) ~ > \clef "treble" d2 > } Very nice, thanks! Werner
Re: adjusting vertical positions of start and end of tie
> o "incorrect" has a tie winding its way from one vertical position > to another, in the process wrapping around the new clef sign. Thanks for the info! I just want to mention that in complex piano music even the 'incorrect' solution has to be used from time to time. Note that the problem to be solved here is also similar to a tied note that spans two staves, again something that can be found in complex piano music. Werner
Re: adjusting vertical positions of start and end of tie
> I see at least three options: > > - The tie should be sloped like a slur. If you really have to do that (for whatever reason), this is the solution to go IMHO. > - The tie should be split into a two halves (possibly > dotted/dashed), each half attached to the terminal notes but > individually still horizontal to keep it distinct from a slur. > - The tie should be rendered as a \laissezVibrer and \repeatTie > combination. I consider both cases as confusing. Werner
Re: adjusting vertical positions of start and end of tie
On 2020-08-06 6:54 pm, Brian Barker wrote: At 15:59 06/08/2020 -0700, Aaron Hill wrote: On 2020-08-06 3:34 pm, Werner LEMBERG wrote: Look at this example \relative c' { \clef "alto" d'2 \tweak positions #'(8 . 4) ~ \clef "treble" d2 } The `\tweak positions` doesn't work which is kind-of expected. However, for this very situation it would be nice if I could change the start and end position of the slur manually. Of course, it would be even better if LilyPond could handle this situation automatically :-) I have never encountered this scenario before, so I am quite curious. What is the correct behavior? (I need to pick up a copy of Gould's book, though that presumes she has addressed this.) She has - on page 9. I see at least three options: - The tie should be sloped like a slur. - The tie should be split into a two halves (possibly dotted/dashed), each half attached to the terminal notes but individually still horizontal to keep it distinct from a slur. - The tie should be rendered as a \laissezVibrer and \repeatTie combination. Gould writes "Avoid changing a clef during a tied note, as the tie will look cumbersome. If this cannot be avoided, the clef is best changed at a system break". She gives three examples: o "recommended" has the tie split across a system break at the same vertical position, with the clef change delayed until after the second part of the tied note. o "acceptable" has the clef change at the system break, with each part of the tie being horizontal and appropriately positioned to its note - in different positions vertically, that is. o "incorrect" has a tie winding its way from one vertical position to another, in the process wrapping around the new clef sign. See https://preview.tinyurl.com/tieClefChange (page 9). Sounds like "acceptable" is close to my third option: use \laissezVibrer and \repeatTie. -- Aaron Hill
Re: adjusting vertical positions of start and end of tie
At 15:59 06/08/2020 -0700, Aaron Hill wrote: On 2020-08-06 3:34 pm, Werner LEMBERG wrote: Look at this example \relative c' { \clef "alto" d'2 \tweak positions #'(8 . 4) ~ \clef "treble" d2 } The `\tweak positions` doesn't work which is kind-of expected. However, for this very situation it would be nice if I could change the start and end position of the slur manually. Of course, it would be even better if LilyPond could handle this situation automatically :-) I have never encountered this scenario before, so I am quite curious. What is the correct behavior? (I need to pick up a copy of Gould's book, though that presumes she has addressed this.) She has - on page 9. I see at least three options: - The tie should be sloped like a slur. - The tie should be split into a two halves (possibly dotted/dashed), each half attached to the terminal notes but individually still horizontal to keep it distinct from a slur. - The tie should be rendered as a \laissezVibrer and \repeatTie combination. Gould writes "Avoid changing a clef during a tied note, as the tie will look cumbersome. If this cannot be avoided, the clef is best changed at a system break". She gives three examples: o "recommended" has the tie split across a system break at the same vertical position, with the clef change delayed until after the second part of the tied note. o "acceptable" has the clef change at the system break, with each part of the tie being horizontal and appropriately positioned to its note - in different positions vertically, that is. o "incorrect" has a tie winding its way from one vertical position to another, in the process wrapping around the new clef sign. See https://preview.tinyurl.com/tieClefChange (page 9). Brian Barker
Re: adjusting vertical positions of start and end of tie
Am Fr., 7. Aug. 2020 um 00:34 Uhr schrieb Werner LEMBERG : > > > > Look at this example > > > > > > \relative c' { > > \clef "alto" d'2 \tweak positions #'(8 . 4) ~ > > \clef "treble" d2 > > } > > > > The `\tweak positions` doesn't work – which is kind-of expected. > > However, for this very situation it would be nice if I could change > > the start and end position of the slur manually. > > Of course, it would be even better if LilyPond could handle this > situation automatically :-) > > > Werner Hi Werner, you could translate the control-points _iff_ left/right-bound's staff-positions are not equal. Below a proof-of-concept. Though it transforms linear, this is the wrong math here, thus the Tie looks not very well, too late to dive into Bezier-things...: Anyway, here's the code: \relative c' { \override Tie.after-line-breaking = #(lambda (grob) (let* ((left-bound (ly:spanner-bound grob LEFT)) (left-x-pos (ly:grob-property left-bound 'staff-position)) (right-bound (ly:spanner-bound grob RIGHT)) (right-x-pos (ly:grob-property right-bound 'staff-position)) (cps (ly:grob-property grob 'control-points)) (first-cp (car cps)) (last-cp (last cps)) (x1 (car first-cp)) (x2 (car last-cp)) (y1 (cdr first-cp)) (y2 right-x-pos) (gradient (/ (- y2 y1) (- x2 x1))) (y-off (/ (- (* x1 y2) (* x2 y1)) (- x1 x2))) (func (lambda (x) (- y1 (+ (* gradient x) y-off) (if (not (eqv? left-x-pos right-x-pos)) (ly:grob-set-property! grob 'control-points (map (lambda (cp) (cons (car cp) (- (cdr cp) (func (car cp) cps) \clef "alto" d'2~ \clef "treble" d2 d~ d } Maybe a starting point for an automagic solution. Cheers, Harm
Re: adjusting vertical positions of start and end of tie
Hi Werner, On Thu, Aug 6, 2020 at 5:33 PM Werner LEMBERG wrote: > > > Look at this example > > > \relative c' { > \clef "alto" d'2 \tweak positions #'(8 . 4) ~ > \clef "treble" d2 > } > > The `\tweak positions` doesn't work – which is kind-of expected. > However, for this very situation it would be nice if I could change > the start and end position of the slur manually. > > Is there a way to do it, except faking the tie with a slur? > I don't find that Tie supports 'positions. Strange. You could do this with \shape used as a tweak. Roughly: \relative c' { \clef "alto" d'2 \shape #'((0 . 0) (0 . 0) (0 . 0) (0 . -2)) ~ \clef "treble" d2 } Best, David
Re: adjusting vertical positions of start and end of tie
On 2020-08-06 3:34 pm, Werner LEMBERG wrote: Look at this example \relative c' { \clef "alto" d'2 \tweak positions #'(8 . 4) ~ \clef "treble" d2 } The `\tweak positions` doesn't work – which is kind-of expected. However, for this very situation it would be nice if I could change the start and end position of the slur manually. Of course, it would be even better if LilyPond could handle this situation automatically :-) I have never encountered this scenario before, so I am quite curious. What is the correct behavior? (I need to pick up a copy of Gould's book, though that presumes she has addressed this.) I see at least three options: - The tie should be sloped like a slur. - The tie should be split into a two halves (possibly dotted/dashed), each half attached to the terminal notes but individually still horizontal to keep it distinct from a slur. - The tie should be rendered as a \laissezVibrer and \repeatTie combination. -- Aaron Hill
Re: adjusting vertical positions of start and end of tie
> Look at this example > > > \relative c' { > \clef "alto" d'2 \tweak positions #'(8 . 4) ~ > \clef "treble" d2 > } > > The `\tweak positions` doesn't work – which is kind-of expected. > However, for this very situation it would be nice if I could change > the start and end position of the slur manually. Of course, it would be even better if LilyPond could handle this situation automatically :-) Werner
adjusting vertical positions of start and end of tie
Look at this example \relative c' { \clef "alto" d'2 \tweak positions #'(8 . 4) ~ \clef "treble" d2 } The `\tweak positions` doesn't work – which is kind-of expected. However, for this very situation it would be nice if I could change the start and end position of the slur manually. Is there a way to do it, except faking the tie with a slur? Werner