Re: Tie settings question
On Wed 26 Oct 2016 at 23:14:20 (+0200), Michael Gerdau wrote: > > please excuse this sidenote: It seems that your mailing client doesn’t > > handle metadata correctly, so each reply of yours is technically > > regarded as starting a new thread. It would be good if you could find a > > way (or can someone help) to fix this. Not only may others have thread > > view enabled in Thunderbird like I, but more importantly the archives > > get messed up. > > FWIW for KMail this is simply not true. Well, it would be interesting to see some of the metadata that you get and we don't. I simply haven't seen any "In-Reply-To" or "References" lines in Karol's postings. > I see the whole thread as > a single thread as it should be. Can't speak for Thunderbird but > for KMail there is nothing wrong. So you're probably threading your emails using the Subject line. Unfortunately this flawed technique groups unrelated messages together merely because they have similar subjects, sometimes with ones as short as "Re:". Cheers, David. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tie settings question
> please excuse this sidenote: It seems that your mailing client doesn’t > handle metadata correctly, so each reply of yours is technically > regarded as starting a new thread. It would be good if you could find a > way (or can someone help) to fix this. Not only may others have thread > view enabled in Thunderbird like I, but more importantly the archives > get messed up. FWIW for KMail this is simply not true. I see the whole thread as a single thread as it should be. Can't speak for Thunderbird but for KMail there is nothing wrong. Kind regards, Michael -- Michael Gerdau email: m...@qata.de GPG-keys available on request or at public keyserver signature.asc Description: This is a digitally signed message part. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tie settings question
On Wed, Oct 26, 2016 at 9:59 AM, Karol Majewskiwrote: > OK, I resign. But stil I don't get something in the code you posted yesterday: > > % > > raiseTie = > #(lambda (grob) > (let* ((ties (ly:grob-array->list (ly:grob-object grob 'ties))) > (notehead (ly:spanner-bound (car ties) LEFT)) > (stem (ly:grob-object notehead 'stem)) > (stem-dir (ly:grob-property stem 'direction)) > (flag (ly:grob-object stem 'flag)) > (dot (ly:grob-object notehead 'dot))) > (if (and (= stem-dir 1)(ly:grob? dot)) > (for-each > (lambda (tie) >(let ((tie-dir (ly:grob-property tie 'direction))) > (if (= tie-dir 1) > (begin > (ly:grob-set-nested-property! tie '(details > skyline-padding) 5) > (ly:grob-set-property! tie 'Y-offset -0.25) > ties > > \layout { > \context { >\Score >\override TieColumn.before-line-breaking = #raiseTie > } > } > > { > \time 3/8 \voiceOne > g'4~ g'8~ > g'4~ g'8~ > g'4.~ > g'4~ g'8 > } > > % > > Now, remove 'voiceOne' and a tie disappears. It seems that something is wrong > with (let ((tie-dir (ly:grob-property tie 'direction. Is it possible to > fix this? When requesting the tie's direction by ly:grob-property, Lilypond will simply read the value there -- if it has been set -- or it will calculate it by invoking the callback that Tie.direction is set to -- ly:tie::calc-direction. The difference in behavior that you are noticing arises because the explicit voice commands set Tie direction. ly:grob-property then reads the value stored under 'direction. No side-effects. When 'direction hasn't been set (remove the \voiceOne), the callback is invoked. Side-effects. I have no solution for this, unless you want to try to duplicate the logic that LilyPond uses to determine tie direction yourself. But how will this help if you have no reliable way of detecting a dot's position? . David ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tie settings question
Hello Karol, please excuse this sidenote: It seems that your mailing client doesn’t handle metadata correctly, so each reply of yours is technically regarded as starting a new thread. It would be good if you could find a way (or can someone help) to fix this. Not only may others have thread view enabled in Thunderbird like I, but more importantly the archives get messed up. Best, Simon On 26.10.2016 16:59, Karol Majewski wrote: OK, I resign. But stil I don't get something in the code you posted yesterday: % raiseTie = #(lambda (grob) (let* ((ties (ly:grob-array->list (ly:grob-object grob 'ties))) (notehead (ly:spanner-bound (car ties) LEFT)) (stem (ly:grob-object notehead 'stem)) (stem-dir (ly:grob-property stem 'direction)) (flag (ly:grob-object stem 'flag)) (dot (ly:grob-object notehead 'dot))) (if (and (= stem-dir 1)(ly:grob? dot)) (for-each (lambda (tie) (let ((tie-dir (ly:grob-property tie 'direction))) (if (= tie-dir 1) (begin (ly:grob-set-nested-property! tie '(details skyline-padding) 5) (ly:grob-set-property! tie 'Y-offset -0.25) ties \layout { \context { \Score \override TieColumn.before-line-breaking = #raiseTie } } { \time 3/8 \voiceOne g'4~ g'8~ g'4~ g'8~ g'4.~ g'4~ g'8 } % Now, remove 'voiceOne' and a tie disappears. It seems that something is wrong with (let ((tie-dir (ly:grob-property tie 'direction. Is it possible to fix this? Best Karol ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tie settings question
OK, I resign. But stil I don't get something in the code you posted yesterday: % raiseTie = #(lambda (grob) (let* ((ties (ly:grob-array->list (ly:grob-object grob 'ties))) (notehead (ly:spanner-bound (car ties) LEFT)) (stem (ly:grob-object notehead 'stem)) (stem-dir (ly:grob-property stem 'direction)) (flag (ly:grob-object stem 'flag)) (dot (ly:grob-object notehead 'dot))) (if (and (= stem-dir 1)(ly:grob? dot)) (for-each (lambda (tie) (let ((tie-dir (ly:grob-property tie 'direction))) (if (= tie-dir 1) (begin (ly:grob-set-nested-property! tie '(details skyline-padding) 5) (ly:grob-set-property! tie 'Y-offset -0.25) ties \layout { \context { \Score \override TieColumn.before-line-breaking = #raiseTie } } { \time 3/8 \voiceOne g'4~ g'8~ g'4~ g'8~ g'4.~ g'4~ g'8 } % Now, remove 'voiceOne' and a tie disappears. It seems that something is wrong with (let ((tie-dir (ly:grob-property tie 'direction. Is it possible to fix this? Best Karol ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tie settings question
On Wed, Oct 26, 2016 at 6:20 AM, Karol Majewskiwrote: > OK, David, so let's move one square backward and try to use staff-position. > The following code does compile but doesn't do what I want. Perhaps what I'm > trying to achieve is just not possible. I don't think it is. Carl's email explains why the staff-position approach will probably not work. > > %% > > tweakTie = > #(lambda > (grob) > (let* > ((ties > (ly:grob-array->list > (ly:grob-object grob 'ties))) > (notehead > (ly:spanner-bound > (car ties) LEFT)) > (notehead-pos > (ly:grob-property notehead 'staff-position)) > (stem > (ly:grob-object notehead 'stem)) > (flag > (ly:grob-object stem 'flag)) > (dot > (ly:grob-object notehead 'dot)) > (dot-pos > (if > (ly:grob? dot) > (ly:grob-property dot 'staff-position) #f))) > (if > (> > (length ties) 1) > (begin > (if > (ly:grob? flag) > (ly:grob-set-property! flag 'Y-extent > (cons 4 0))) The indentation style (which I normalize somewhat each time I return code) makes the code harder to follow. In particular, it's not obvious what we're iterating over in this and the other for-each statements. > (for-each > (lambda > (tie) > (ly:grob-set-nested-property! tie '(details skyline-padding) 5)) > ties))) > (if > (ly:grob? dot) > (if This comparison doesn't do what you expect, because--when a number--Dots.staff-position seems to be 0 for the most part. Refer to Carl's post. > (> dot-pos notehead-pos) > (for-each > (lambda > (tie) > (let Consulting Tie.direction so early (before-line-breaking) has disastrous results for the tie. It is reduced to a tiny flyspeck. You could try after-line-breaking, but possibly your modifications won't take effect so late. > ((tie-dir > (ly:grob-property tie 'direction))) > (if > (= tie-dir 1) > (begin > (ly:grob-set-nested-property! tie '(details > skyline-padding) 5) > (ly:grob-set-property! tie 'Y-offset -0.25) ties))) > (if > (ly:grob? dot) > (if > (< dot-pos notehead-pos) > (for-each > (lambda > (tie) > (let > ((tie-dir > (ly:grob-property tie 'direction))) > (if > (= tie-dir -1) > (begin > (ly:grob-set-nested-property! tie '(details > skyline-padding) 5) > (ly:grob-set-property! tie 'Y-offset 0.25) ties) > Sorry, I doubt that I can be of any more assistance. This will probably require work in C++. Something to return the individual Dot positions rather than (I presume) the position of the dot-complex. Better would be another--yet another--Tie property, though. (And you'd do that in C++, too.) Best, David ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tie settings question
OK, David, so let's move one square backward and try to use staff-position. The following code does compile but doesn't do what I want. Perhaps what I'm trying to achieve is just not possible. %% tweakTie = #(lambda (grob) (let* ((ties (ly:grob-array->list (ly:grob-object grob 'ties))) (notehead (ly:spanner-bound (car ties) LEFT)) (notehead-pos (ly:grob-property notehead 'staff-position)) (stem (ly:grob-object notehead 'stem)) (flag (ly:grob-object stem 'flag)) (dot (ly:grob-object notehead 'dot)) (dot-pos (if (ly:grob? dot) (ly:grob-property dot 'staff-position) #f))) (if (> (length ties) 1) (begin (if (ly:grob? flag) (ly:grob-set-property! flag 'Y-extent (cons 4 0))) (for-each (lambda (tie) (ly:grob-set-nested-property! tie '(details skyline-padding) 5)) ties))) (if (ly:grob? dot) (if (> dot-pos notehead-pos) (for-each (lambda (tie) (let ((tie-dir (ly:grob-property tie 'direction))) (if (= tie-dir 1) (begin (ly:grob-set-nested-property! tie '(details skyline-padding) 5) (ly:grob-set-property! tie 'Y-offset -0.25) ties))) (if (ly:grob? dot) (if (< dot-pos notehead-pos) (for-each (lambda (tie) (let ((tie-dir (ly:grob-property tie 'direction))) (if (= tie-dir -1) (begin (ly:grob-set-nested-property! tie '(details skyline-padding) 5) (ly:grob-set-property! tie 'Y-offset 0.25) ties) \layout { \context { \Score \override TieColumn.before-line-breaking = #tweakTie \override Tie.details.height-limit = #1.25 \override Tie.details.ratio = #0.25 \override Tie.details.between-length-limit = #1 \override Tie.details.wrong-direction-offset-penalty = #10 \override Tie.details.min-length = #2 \override Tie.details.min-length-penalty-factor = #30 \override Tie.details.center-staff-line-clearance = #0.05 \override Tie.details.tip-staff-line-clearance = #0.05 \override Tie.details.staff-line-collision-penalty = #0 \override Tie.details.dot-collision-clearance = #0 \override Tie.details.dot-collision-penalty = #0 \override Tie.details.note-head-gap = #0.15 \override Tie.details.stem-gap = #0.15 \override Tie.details.tie-column-monotonicity-penalty = #100 \override Tie.details.tie-tie-collision-penalty = #25 \override Tie.details.tie-tie-collision-distance = #0.5 \override Tie.details.horizontal-distance-penalty-factor = #0 \override Tie.details.same-dir-as-stem-penalty = #20 \override Tie.details.vertical-distance-penalty-factor = #10 \override Tie.details.intra-space-threshold = #0 \override Tie.details.outer-tie-length-symmetry-penalty-factor = #0 \override Tie.details.outer-tie-vertical-distance-symmetry-penalty-factor = #0 \override Tie.details.outer-tie-vertical-gap = #0 \override Tie.details.single-tie-region-size = #4 \override Tie.details.skyline-padding = #0.05 % or #5 \override Tie.details.multi-tie-region-size = #1 \override Tie.line-thickness = #0.25 \override Tie.thickness = #2 } } { \time 3/8 f''4~ f''8~ f''4.~ f''4~ f''8 } ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tie settings question
On 10/25/16 1:48 PM, "Karol Majewski"wrote: > >So there should be fourth condition but I have no idea how to put it in >scheme. I need somethong like: > >(if (> dot-position notehead-position)) // if dot is placed higher than >notehead >(if (< dot-position notehead-position)) // if dot is placed lower than >notehead > >But how to define dot-position and notehead-position? I think this is impossible with the current architecture, because we don't place dots, we place dot columns. There is a Dot_column C++ structure that has the staff position of the dot and the staff position of the notehead in it, so there may be some way to get to this structure from Scheme, but it is only created after positioning is done, so I doubt it's available from Scheme. Carl Sorensen ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tie settings question
On Tue, Oct 25, 2016 at 5:47 PM, David Nalesnikwrote: > > I think you discarded the right method of determining direction. > Or, rather, you may have to use staff-position. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tie settings question
Hi Karol, On Tue, Oct 25, 2016 at 5:15 PM, Karol Majewskiwrote: > Here's full code. It's important to applay my tie settings. OK, thank you. That helps enormously. Above, I mentioned moving the check for dot direction, and refactoring the two if-statements for more compact and maintainable code. This is what I meant: tweakTie = #(lambda (grob) (let* ((ties (ly:grob-array->list (ly:grob-object grob 'ties))) (notehead (ly:spanner-bound (car ties) LEFT)) (stem (ly:grob-object notehead 'stem)) (flag (ly:grob-object stem 'flag)) (dots (ly:grob-object notehead 'dot))) (if (> (length ties) 1) (begin (if (ly:grob? flag) (ly:grob-set-property! flag 'Y-extent (cons 4 0))) ; you set this below, at least partly... (for-each (lambda (tie) (ly:grob-set-nested-property! tie '(details skyline-padding) 5)) ties))) (if (ly:grob? dots) (let ((dot-dir (ly:grob-property dots 'direction))) (for-each (lambda (tie) (let ((tie-dir (ly:grob-property tie 'direction))) (ly:grob-set-nested-property! tie '(details skyline-padding) 5) (ly:grob-set-property! tie 'Y-offset (* -0.25 dot-dir ties) % There seems to be some redundancy above. skyline-padding is set twice for at least some of the ties. Refactoring further... tweakTie = #(lambda (grob) (let* ((ties (ly:grob-array->list (ly:grob-object grob 'ties))) (notehead (ly:spanner-bound (car ties) LEFT)) (stem (ly:grob-object notehead 'stem)) (flag (ly:grob-object stem 'flag)) (dots (ly:grob-object notehead 'dot)) (dot-dir (if (ly:grob? dots) (ly:grob-property dots 'direction) #f))) (for-each (lambda (tie) ;; display line discussed below... (display dot-dir) (newline) (ly:grob-set-nested-property! tie '(details skyline-padding) 5) (if (ly:dir? dot-dir) (ly:grob-set-property! tie 'Y-offset (* -0.25 dot-dir ties) (if (and (> (length ties) 1) (ly:grob? flag)) (ly:grob-set-property! flag 'Y-extent (cons 4 0) \layout { \context { \Score \override Tie.details.height-limit = #1.25 \override Tie.details.ratio = #0.25 \override Tie.details.between-length-limit = #1 \override Tie.details.wrong-direction-offset-penalty = #10 \override Tie.details.min-length = #2 \override Tie.details.min-length-penalty-factor = #30 \override Tie.details.center-staff-line-clearance = #0.05 \override Tie.details.tip-staff-line-clearance = #0.05 \override Tie.details.staff-line-collision-penalty = #0 \override Tie.details.dot-collision-clearance = #0 \override Tie.details.dot-collision-penalty = #0 \override Tie.details.note-head-gap = #0.15 \override Tie.details.stem-gap = #0.15 \override Tie.details.tie-column-monotonicity-penalty = #100 \override Tie.details.tie-tie-collision-penalty = #25 \override Tie.details.tie-tie-collision-distance = #0.5 \override Tie.details.horizontal-distance-penalty-factor = #0 \override Tie.details.same-dir-as-stem-penalty = #20 \override Tie.details.vertical-distance-penalty-factor = #10 \override Tie.details.intra-space-threshold = #0 \override Tie.details.outer-tie-length-symmetry-penalty-factor = #0 \override Tie.details.outer-tie-vertical-distance-symmetry-penalty-factor = #0 \override Tie.details.outer-tie-vertical-gap = #0 \override Tie.details.single-tie-region-size = #4 \override Tie.details.skyline-padding = #0.05 % or #5 \override Tie.details.multi-tie-region-size = #1 \override Tie.line-thickness = #0.25 \override Tie.thickness = #2 \override TieColumn.before-line-breaking = #tweakTie } } { \time 3/8 f''4~ f''8~ f''4.~ f''4~ f''8 } > In the following example the third tie should be lowered by 0.25. It isn't, because apparently Dots don't have a direction set. I added a display line so you can see that the third tie has its direction set to '(). I think you discarded the right method of determining direction. In any case, hopefully my refactoring is of some use. David ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tie settings question
Here's full code. It's important to applay my tie settings. In the following example the third tie should be lowered by 0.25. tweakTie = #(lambda (grob) (let* ((ties (ly:grob-array->list (ly:grob-object grob 'ties))) (notehead (ly:spanner-bound (car ties) LEFT)) (stem (ly:grob-object notehead 'stem)) (flag (ly:grob-object stem 'flag)) (dots (ly:grob-object notehead 'dot)) (dots-dir (ly:grob-property dots 'direction))) (if (> (length ties) 1) (begin (if (ly:grob? flag) (ly:grob-set-property! flag 'Y-extent (cons 4 0))) (for-each (lambda (tie) (ly:grob-set-nested-property! tie '(details skyline-padding) 5)) ties))) (if (and (= dots-dir 1) (ly:grob? dots)) (for-each (lambda (tie) (let ((tie-dir (ly:grob-property tie 'direction))) (if (= tie-dir 1) (begin (ly:grob-set-nested-property! tie '(details skyline-padding) 5) (ly:grob-set-property! tie 'Y-offset -0.25) ties)) (if (and (= dots-dir -1) (ly:grob? dots)) (for-each (lambda (tie) (let ((tie-dir (ly:grob-property tie 'direction))) (if (= tie-dir -1) (begin (ly:grob-set-nested-property! tie '(details skyline-padding) 5) (ly:grob-set-property! tie 'Y-offset 0.25) ties \layout { \context { \Score \override TieColumn.before-line-breaking = #tweakTie } } \layout { \context { \Score \override Tie.details.height-limit = #1.25 \override Tie.details.ratio = #0.25 \override Tie.details.between-length-limit = #1 \override Tie.details.wrong-direction-offset-penalty = #10 \override Tie.details.min-length = #2 \override Tie.details.min-length-penalty-factor = #30 \override Tie.details.center-staff-line-clearance = #0.05 \override Tie.details.tip-staff-line-clearance = #0.05 \override Tie.details.staff-line-collision-penalty = #0 \override Tie.details.dot-collision-clearance = #0 \override Tie.details.dot-collision-penalty = #0 \override Tie.details.note-head-gap = #0.15 \override Tie.details.stem-gap = #0.15 \override Tie.details.tie-column-monotonicity-penalty = #100 \override Tie.details.tie-tie-collision-penalty = #25 \override Tie.details.tie-tie-collision-distance = #0.5 \override Tie.details.horizontal-distance-penalty-factor = #0 \override Tie.details.same-dir-as-stem-penalty = #20 \override Tie.details.vertical-distance-penalty-factor = #10 \override Tie.details.intra-space-threshold = #0 \override Tie.details.outer-tie-length-symmetry-penalty-factor = #0 \override Tie.details.outer-tie-vertical-distance-symmetry-penalty-factor = #0 \override Tie.details.outer-tie-vertical-gap = #0 \override Tie.details.single-tie-region-size = #4 \override Tie.details.skyline-padding = #0.05 % or #5 \override Tie.details.multi-tie-region-size = #1 \override Tie.line-thickness = #0.25 \override Tie.thickness = #2 } } { \time 3/8 f''4~ f''8~ f''4.~ f''4~ f''8 } ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tie settings question
On Tue, Oct 25, 2016 at 4:53 PM, Karol Majewskiwrote: > I think I don't have to compare dot.staff-position and > notehead.staff-position. I can simply check if Dots.direction is 1 or -1. > > Still I'm doing something wrong here: Could you please provide your test example when you give code? I'm assembling an example each time you provide code from bits and pieces you've already given. Chances are, I will miss something that way. > > tweakTie = > #(lambda > (grob) > (let* > ((ties > (ly:grob-array->list > (ly:grob-object grob 'ties))) > (notehead > (ly:spanner-bound > (car ties) LEFT)) > (stem > (ly:grob-object notehead 'stem)) > (flag > (ly:grob-object stem 'flag)) > (dots > (ly:grob-object notehead 'dot)) If there are no dots, the following will cause an error. You check below if the dot is a grob, but you should do it before you query the direction. In other words, request the dot direction after the check for the Dot grob below. > (dots-dir > (ly:grob-property dots 'direction))) > (if > (> > (length ties) 1) > (begin > (if > (ly:grob? flag) > (ly:grob-set-property! flag 'Y-extent > (cons 4 0))) > (for-each > (lambda > (tie) > (ly:grob-set-nested-property! tie '(details skyline-padding) 5)) > ties))) Note that the following two if clauses can be consolidated for more economical and maintainable code. Direction can be used as a multiplier, since it will be either -1 or 1: simply multiply -0.25 by direction. The only "if" to check for is that there is a dot. > (if > (and > (= dots-dir 1) > (ly:grob? dots)) > (for-each > (lambda > (tie) > (let > ((tie-dir > (ly:grob-property tie 'direction))) > (if > (= tie-dir 1) > (begin > (ly:grob-set-nested-property! tie '(details skyline-padding) > 5) > (ly:grob-set-property! tie 'Y-offset -0.25) ties)) > (if > (and > (= dots-dir -1) > (ly:grob? dots)) > (for-each > (lambda > (tie) > (let > ((tie-dir > (ly:grob-property tie 'direction))) > (if > (= tie-dir -1) > (begin > (ly:grob-set-nested-property! tie '(details skyline-padding) > 5) > (ly:grob-set-property! tie 'Y-offset 0.25) ties > > \layout { > \context { > \Score > \override TieColumn.before-line-breaking = #tweakTie > } > } > > ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tie settings question
I think I don't have to compare dot.staff-position and notehead.staff-position. I can simply check if Dots.direction is 1 or -1. Still I'm doing something wrong here: tweakTie = #(lambda (grob) (let* ((ties (ly:grob-array->list (ly:grob-object grob 'ties))) (notehead (ly:spanner-bound (car ties) LEFT)) (stem (ly:grob-object notehead 'stem)) (flag (ly:grob-object stem 'flag)) (dots (ly:grob-object notehead 'dot)) (dots-dir (ly:grob-property dots 'direction))) (if (> (length ties) 1) (begin (if (ly:grob? flag) (ly:grob-set-property! flag 'Y-extent (cons 4 0))) (for-each (lambda (tie) (ly:grob-set-nested-property! tie '(details skyline-padding) 5)) ties))) (if (and (= dots-dir 1) (ly:grob? dots)) (for-each (lambda (tie) (let ((tie-dir (ly:grob-property tie 'direction))) (if (= tie-dir 1) (begin (ly:grob-set-nested-property! tie '(details skyline-padding) 5) (ly:grob-set-property! tie 'Y-offset -0.25) ties)) (if (and (= dots-dir -1) (ly:grob? dots)) (for-each (lambda (tie) (let ((tie-dir (ly:grob-property tie 'direction))) (if (= tie-dir -1) (begin (ly:grob-set-nested-property! tie '(details skyline-padding) 5) (ly:grob-set-property! tie 'Y-offset 0.25) ties \layout { \context { \Score \override TieColumn.before-line-breaking = #tweakTie } } ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tie settings question
OK, I've added this. Stem-dir is no longer needed. It doesn't work. I think something is wrong with notehead definition: tweakTie = #(lambda (grob) (let* ((ties (ly:grob-array->list (ly:grob-object grob 'ties))) (notehead (ly:spanner-bound (car ties) LEFT)) (notehead-pos (ly:grob-property notehead 'staff-position)) (stem (ly:grob-object notehead 'stem)) (flag (ly:grob-object stem 'flag)) (dot (ly:grob-object notehead 'dot)) (dot-pos (ly:grob-property dot 'staff-position))) (if (> (length ties) 1) (begin (if (ly:grob? flag) (ly:grob-set-property! flag 'Y-extent (cons 4 0))) (for-each (lambda (tie) (ly:grob-set-nested-property! tie '(details skyline-padding) 5)) ties))) (if (and (> dot-pos notehead-pos) (ly:grob? dot)) (for-each (lambda (tie) (let ((tie-dir (ly:grob-property tie 'direction))) (if (= tie-dir 1) (begin (ly:grob-set-nested-property! tie '(details skyline-padding) 5) (ly:grob-set-property! tie 'Y-offset -0.25) ties)) (if (and (< dot-pos notehead-pos) (ly:grob? dot)) (for-each (lambda (tie) (let ((tie-dir (ly:grob-property tie 'direction))) (if (= tie-dir -1) (begin (ly:grob-set-nested-property! tie '(details skyline-padding) 5) (ly:grob-set-property! tie 'Y-offset 0.25) ties ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tie settings question
On Tue, Oct 25, 2016 at 2:48 PM, Karol Majewskiwrote: > Now I realised that, according to my concept, tie should be lowered not only > when > > (stem-direction == UP && tie-direction == UP && note-has-a-dot == true) > > but also when notehead is placed on staff-line and not on staff-space. In > other words - when a dot is placed not on the same staff-position as notehead > (we know that when notehead is placed on staff-line then dot is shifted > up/down). > > So there should be fourth condition but I have no idea how to put it in > scheme. I need somethong like: > > (if (> dot-position notehead-position)) // if dot is placed higher than > notehead > (if (< dot-position notehead-position)) // if dot is placed lower than > notehead > > But how to define dot-position and notehead-position? Both NoteHead and Dots support the staff-symbol-referencer: http://lilypond.org/doc/v2.18/Documentation/internals/staff_002dsymbol_002dreferencer_002dinterface David ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tie settings question
Now I realised that, according to my concept, tie should be lowered not only when (stem-direction == UP && tie-direction == UP && note-has-a-dot == true) but also when notehead is placed on staff-line and not on staff-space. In other words - when a dot is placed not on the same staff-position as notehead (we know that when notehead is placed on staff-line then dot is shifted up/down). So there should be fourth condition but I have no idea how to put it in scheme. I need somethong like: (if (> dot-position notehead-position)) // if dot is placed higher than notehead (if (< dot-position notehead-position)) // if dot is placed lower than notehead But how to define dot-position and notehead-position? ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Odp: Re: Tie settings question
OK, David, I've combined everything. Hopefully everything is fine now. Here it is: tweakTie = #(lambda (grob) (let* ((ties (ly:grob-array->list (ly:grob-object grob 'ties))) (notehead (ly:spanner-bound (car ties) LEFT)) (stem (ly:grob-object notehead 'stem)) (stem-dir (ly:grob-property stem 'direction)) (flag (ly:grob-object stem 'flag)) (dot (ly:grob-object notehead 'dot))) (if (> (length ties) 1) (begin (if (ly:grob? flag) (ly:grob-set-property! flag 'Y-extent (cons 4 0))) (for-each (lambda (tie) (ly:grob-set-nested-property! tie '(details skyline-padding) 5)) ties))) (if (and (= stem-dir 1) (ly:grob? dot)) (for-each (lambda (tie) (let ((tie-dir (ly:grob-property tie 'direction))) (if (= tie-dir 1) (begin (ly:grob-set-nested-property! tie '(details skyline-padding) 5) (ly:grob-set-property! tie 'Y-offset -0.25) ties)) (if (and (= stem-dir -1) (ly:grob? dot)) (for-each (lambda (tie) (let ((tie-dir (ly:grob-property tie 'direction))) (if (= tie-dir -1) (begin (ly:grob-set-nested-property! tie '(details skyline-padding) 5) (ly:grob-set-property! tie 'Y-offset 0.25) ties Thanks for all your help. Karol ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tie settings question
On Tue, Oct 25, 2016 at 10:37 AM, David Nalesnikwrote: > Hi Karol, > > On Tue, Oct 25, 2016 at 9:35 AM, Karol Majewski wrote: >> OK, I'm trying to write something like this in scheme: >> >> if (stem-direction == UP && tie-direction == UP && note-has-a-dot == true) >> { >> \once \override Tie.details.skyline-padding = #5 >> \once \override Tie.Y-offset = #-0.25 >> } >> >> Please, David or Harm, correct my mistakes. So far I've got this: >> >> raiseTie = >> #(lambda >> (grob) >> (let* >> ((ties >> (ly:grob-array->list >> (ly:grob-object grob 'ties))) > > "tie" is not a defined variable. When you bind "tie-dir" to a > procedure, it will be evaluated, so "tie" has to be defined. > >> (tie-dir >> (ly:grob-property tie 'direction)) >> (notehead >> (ly:spanner-bound >> (car ties) LEFT)) >> (stem >> (ly:grob-object notehead 'stem)) >> (stem-dir >> (ly:grob-property stem 'direction)) >> (flag >> (ly:grob-object stem 'flag)) > > grob = TieColumn. TieColumn grobs store no reference to augmentation > dots. 'dot is a part of the rhythmic-head-interface > (http://lilypond.org/doc/v2.19/Documentation/internals/rhythmic_002dhead_002dinterface) > which is supported by NoteHead. > >> (dot (ly:grob-object grob 'dot))) >> (if > > Again, "tie" is not defined. > >> (and (= stem-dir 1) (= tie-dir 1) (ly:grob? dot)) >> (begin > (Sorry, ignore that last admonition...) ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tie settings question
Hi Karol, On Tue, Oct 25, 2016 at 9:35 AM, Karol Majewskiwrote: > OK, I'm trying to write something like this in scheme: > > if (stem-direction == UP && tie-direction == UP && note-has-a-dot == true) > { > \once \override Tie.details.skyline-padding = #5 > \once \override Tie.Y-offset = #-0.25 > } > > Please, David or Harm, correct my mistakes. So far I've got this: > > raiseTie = > #(lambda > (grob) > (let* > ((ties > (ly:grob-array->list > (ly:grob-object grob 'ties))) "tie" is not a defined variable. When you bind "tie-dir" to a procedure, it will be evaluated, so "tie" has to be defined. > (tie-dir > (ly:grob-property tie 'direction)) > (notehead > (ly:spanner-bound > (car ties) LEFT)) > (stem > (ly:grob-object notehead 'stem)) > (stem-dir > (ly:grob-property stem 'direction)) > (flag > (ly:grob-object stem 'flag)) grob = TieColumn. TieColumn grobs store no reference to augmentation dots. 'dot is a part of the rhythmic-head-interface (http://lilypond.org/doc/v2.19/Documentation/internals/rhythmic_002dhead_002dinterface) which is supported by NoteHead. > (dot (ly:grob-object grob 'dot))) > (if Again, "tie" is not defined. > (and (= stem-dir 1) (= tie-dir 1) (ly:grob? dot)) > (begin "tie" is bound locally here. It is only usable within the lambda expression. > (for-each > (lambda > (tie) > (ly:grob-set-nested-property! tie '(details skyline-padding) 5)) > ties) > (for-each > (lambda > (tie) > (ly:grob-set-property! tie 'Y-offset -0.25)) ties) > > \layout { > \context { > \Score > \override TieColumn.before-line-breaking = #raiseTie > } > } > > Try this: raiseTie = #(lambda (grob) (let* ((ties (ly:grob-array->list (ly:grob-object grob 'ties))) (notehead (ly:spanner-bound (car ties) LEFT)) (stem (ly:grob-object notehead 'stem)) (stem-dir (ly:grob-property stem 'direction)) (flag (ly:grob-object stem 'flag)) (dot (ly:grob-object notehead 'dot))) (if (and (= stem-dir 1)(ly:grob? dot)) (for-each (lambda (tie) (let ((tie-dir (ly:grob-property tie 'direction))) (if (= tie-dir 1) (begin (ly:grob-set-nested-property! tie '(details skyline-padding) 5) (ly:grob-set-property! tie 'Y-offset -0.25) ties \layout { \context { \Score \override TieColumn.before-line-breaking = #raiseTie } } { \time 3/8 \voiceOne g'4~ g'8~ g'4~ g'8~ g'4.~ g'4~ g'8 } I hope this helps. You'll probably need to retool it to incorporate the features you began the thread with, but this should give you an idea of the principles involved. David ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tie settings question
OK, I'm trying to write something like this in scheme: if (stem-direction == UP && tie-direction == UP && note-has-a-dot == true) { \once \override Tie.details.skyline-padding = #5 \once \override Tie.Y-offset = #-0.25 } Please, David or Harm, correct my mistakes. So far I've got this: raiseTie = #(lambda (grob) (let* ((ties (ly:grob-array->list (ly:grob-object grob 'ties))) (tie-dir (ly:grob-property tie 'direction)) (notehead (ly:spanner-bound (car ties) LEFT)) (stem (ly:grob-object notehead 'stem)) (stem-dir (ly:grob-property stem 'direction)) (flag (ly:grob-object stem 'flag)) (dot (ly:grob-object grob 'dot))) (if (and (= stem-dir 1) (= tie-dir 1) (ly:grob? dot)) (begin (for-each (lambda (tie) (ly:grob-set-nested-property! tie '(details skyline-padding) 5)) ties) (for-each (lambda (tie) (ly:grob-set-property! tie 'Y-offset -0.25)) ties) \layout { \context { \Score \override TieColumn.before-line-breaking = #raiseTie } } ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
RE: Tie settings question
Greetings All, For other learners reading this thread in the future, I just thought I would mention that since the details property of Tie is an association list (alist), you can specify the values in Scheme in a way that I personally find more readable and less noisy. Here's the syntax, just using the Tie default values: \override Tie.details = #'((ratio . 0.333) (center-staff-line-clearance . 0.6) (tip-staff-line-clearance . 0.45) (note-head-gap . 0.2) (stem-gap . 0.35) (height-limit . 1.0) (horizontal-distance-penalty-factor . 10) (same-dir-as-stem-penalty . 8) (min-length-penalty-factor . 26) (tie-tie-collision-distance . 0.45) (tie-tie-collision-penalty . 25.0) (intra-space-threshold . 1.25) (outer-tie-vertical-distance-symmetry-penalty-factor . 10) (outer-tie-length-symmetry-penalty-factor . 10) (vertical-distance-penalty-factor . 7) (outer-tie-vertical-gap . 0.25) (multi-tie-region-size . 3) (single-tie-region-size . 4) (between-length-limit . 1.0)) Refer to NR Section 5.2.6 Modifying alists. Andrew -Original Message- From: lilypond-user On Behalf Of Karol Majewski Sent: Tuesday, 25 October 2016 7:07 AM Subject: Re: Tie settings question I work really hard to make LilyPond ties look the way I want. My current settings are the following: \override Tie.details.height-limit = #1.25 \override Tie.details.ratio = #0.25 \override Tie.details.between-length-limit = #1 \override Tie.details.wrong-direction-offset-penalty = #10 \override Tie.details.min-length = #2 \override Tie.details.min-length-penalty-factor = #30 \override Tie.details.center-staff-line-clearance = #0.05 \override Tie.details.tip-staff-line-clearance = #0.05 \override Tie.details.staff-line-collision-penalty = #0 \override Tie.details.dot-collision-clearance = #0 \override Tie.details.dot-collision-penalty = #0 \override Tie.details.note-head-gap = #0.15 \override Tie.details.stem-gap = #0.15 \override Tie.details.tie-column-monotonicity-penalty = #100 \override Tie.details.tie-tie-collision-penalty = #25 \override Tie.details.tie-tie-collision-distance = #0.5 \override Tie.details.horizontal-distance-penalty-factor = #0 \override Tie.details.same-dir-as-stem-penalty = #20 \override Tie.details.vertical-distance-penalty-factor = #10 \override Tie.details.intra-space-threshold = #0 \override Tie.details.outer-tie-length-symmetry-penalty-factor = #0 \override Tie.details.outer-tie-vertical-distance-symmetry-penalty-factor = #0 \override Tie.details.outer-tie-vertical-gap = #0 \override Tie.details.single-tie-region-size = #4 \override Tie.details.skyline-padding = #0.05 \override Tie.details.multi-tie-region-size = #1 \override Tie.line-thickness = #0.25 \override Tie.thickness = #2 ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tie settings question
This is fine now. Thx, David. I work really hard to make LilyPond ties look the way I want. My current settings are the following: \override Tie.details.height-limit = #1.25 \override Tie.details.ratio = #0.25 \override Tie.details.between-length-limit = #1 \override Tie.details.wrong-direction-offset-penalty = #10 \override Tie.details.min-length = #2 \override Tie.details.min-length-penalty-factor = #30 \override Tie.details.center-staff-line-clearance = #0.05 \override Tie.details.tip-staff-line-clearance = #0.05 \override Tie.details.staff-line-collision-penalty = #0 \override Tie.details.dot-collision-clearance = #0 \override Tie.details.dot-collision-penalty = #0 \override Tie.details.note-head-gap = #0.15 \override Tie.details.stem-gap = #0.15 \override Tie.details.tie-column-monotonicity-penalty = #100 \override Tie.details.tie-tie-collision-penalty = #25 \override Tie.details.tie-tie-collision-distance = #0.5 \override Tie.details.horizontal-distance-penalty-factor = #0 \override Tie.details.same-dir-as-stem-penalty = #20 \override Tie.details.vertical-distance-penalty-factor = #10 \override Tie.details.intra-space-threshold = #0 \override Tie.details.outer-tie-length-symmetry-penalty-factor = #0 \override Tie.details.outer-tie-vertical-distance-symmetry-penalty-factor = #0 \override Tie.details.outer-tie-vertical-gap = #0 \override Tie.details.single-tie-region-size = #4 \override Tie.details.skyline-padding = #0.05 \override Tie.details.multi-tie-region-size = #1 \override Tie.line-thickness = #0.25 \override Tie.thickness = #2 I'm quite satisfied with those settings, but lately I discovered one situaton in which one of the ties looks not the way I want: { \time 3/8 \voiceOne g'4~ g'8~ g'4~ g'8~ g'4.~ g'4~ g'8 } ... and to my discontent the fifth tie is raised by 0.25 because of the dot. I don't want this dot to have any impact on the vertical position of the following tie. Overriding Tie.details.dot-collision-clearance doesn't help. How can I fix this? Of course using \shape is not an option, as I'm looking for general solution (global override). I begin to think that this is hardcoded ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tie settings question
On Sat, Oct 22, 2016 at 7:11 PM, David Nalesnikwrote: > On Sat, Oct 22, 2016 at 6:55 PM, Karol Majewski wrote: >> Hi David, when a chord doesn't have a flag, then your code doesn't work. >> Just replace >> >> 8~ >> >> with >> >> 4~ >> >> and it won't compile. Perhaps there should be a condition in your code: "if >> a note has a a flag then set Flag.Y-extent to (4 . 0)". Or maybe there is a >> better way to fix this? > > > Sure, expand the condition, like so: > > (if (and (> (length ties) 1) (ly:grob? flag)) > It just dawned on me that you'd like the routine to still do something if there is no flag, so try this: evenTies = #(lambda (grob) (let* ((ties (ly:grob-array->list (ly:grob-object grob 'ties))) (notehead (ly:spanner-bound (car ties) LEFT)) (stem (ly:grob-object notehead 'stem)) (flag (ly:grob-object stem 'flag))) (if (> (length ties) 1) (begin (if (ly:grob? flag) (ly:grob-set-property! flag 'Y-extent (cons 4 0))) (for-each (lambda (tie) (ly:grob-set-nested-property! tie '(details skyline-padding) 5)) ties) -DN ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tie settings question
On Sat, Oct 22, 2016 at 6:55 PM, Karol Majewskiwrote: > Hi David, when a chord doesn't have a flag, then your code doesn't work. Just > replace > > 8~ > > with > > 4~ > > and it won't compile. Perhaps there should be a condition in your code: "if a > note has a a flag then set Flag.Y-extent to (4 . 0)". Or maybe there is a > better way to fix this? Sure, expand the condition, like so: (if (and (> (length ties) 1) (ly:grob? flag)) DN ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tie settings question
Hi David, when a chord doesn't have a flag, then your code doesn't work. Just replace 8~ with 4~ and it won't compile. Perhaps there should be a condition in your code: "if a note has a a flag then set Flag.Y-extent to (4 . 0)". Or maybe there is a better way to fix this? > %%% > > evenTies = > #(lambda > (grob) > (let* ((ties (ly:grob-array->list (ly:grob-object grob 'ties))) > (notehead (ly:spanner-bound (car ties) LEFT)) > (stem (ly:grob-object notehead 'stem)) > (flag (ly:grob-object stem 'flag))) > (if (> (length ties) 1) > (begin > (ly:grob-set-property! flag 'Y-extent (cons 4 0)) > (for-each > (lambda (tie) > (ly:grob-set-nested-property! tie '(details skyline-padding) 5)) > ties) > > \layout { > \context { > \Score > \override TieColumn.before-line-breaking = #evenTies > } > } > > > \score { > > \relative c' { > 8~ > 4 > c8~ c4. > } > } > > ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Odp: Re: Tie settings question
Aha, I get it. Thanks for the lesson. It seems I have to study scheme tutorial deeply... ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tie settings question
On Sat, Oct 22, 2016 at 8:16 AM, David Nalesnikwrote: > > (2) As the log will tell you, "flag" is not defined. I assume you > arrived at this because of Harm's usage of "tie" > below. He's creating a local variable to refer to Tie grobs which > he's already obtained, not relying on some existing correspondence > between "tie" and a Tie grob.. (As such, he could have replaced 'tie' > with another identifier, like "my-variable") > > You need "flag" to point to an actual Flag, which requires following > pointers from your starting object -- a TieColumn -- to Tie. I mean Flag, of course... ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tie settings question
Hi Karol, On Sat, Oct 22, 2016 at 7:33 AM, Karol Majewskiwrote: > Now I try to change Flag.Y-extent value in chords to: \override Flag.Y-extent > = #'(4 . 0) > > Got this, but it doesn't work. What am I doing wrong? > > evenTies = > #(lambda > (grob) > (let > ((ties > (ly:grob-array->list > (ly:grob-object grob 'ties > (if > (> > (length ties) 1) (1) Use begin to group multiple expressions in the if clause (2) As the log will tell you, "flag" is not defined. I assume you arrived at this because of Harm's usage of "tie" below. He's creating a local variable to refer to Tie grobs which he's already obtained, not relying on some existing correspondence between "tie" and a Tie grob.. (As such, he could have replaced 'tie' with another identifier, like "my-variable") You need "flag" to point to an actual Flag, which requires following pointers from your starting object -- a TieColumn -- to Tie. In the code below, you can see how I might do it. (3) 'Y-extent takes a number pair. > ((ly:grob-set-property! flag 'Y-extent 4 0) > (for-each > (lambda > (tie) > (ly:grob-set-nested-property! tie '(details skyline-padding) 5)) > ties) %%% evenTies = #(lambda (grob) (let* ((ties (ly:grob-array->list (ly:grob-object grob 'ties))) (notehead (ly:spanner-bound (car ties) LEFT)) (stem (ly:grob-object notehead 'stem)) (flag (ly:grob-object stem 'flag))) (if (> (length ties) 1) (begin (ly:grob-set-property! flag 'Y-extent (cons 4 0)) (for-each (lambda (tie) (ly:grob-set-nested-property! tie '(details skyline-padding) 5)) ties) \layout { \context { \Score \override TieColumn.before-line-breaking = #evenTies } } \score { \relative c' { 8~ 4 c8~ c4. } } Hope this helps, David ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tie settings question
Now I try to change Flag.Y-extent value in chords to: \override Flag.Y-extent = #'(4 . 0) Got this, but it doesn't work. What am I doing wrong? evenTies = #(lambda (grob) (let ((ties (ly:grob-array->list (ly:grob-object grob 'ties (if (> (length ties) 1) ((ly:grob-set-property! flag 'Y-extent 4 0) (for-each (lambda (tie) (ly:grob-set-nested-property! tie '(details skyline-padding) 5)) ties) \layout { \context { \Score \override TieColumn.before-line-breaking = #evenTies } } \score { \relative c' { 8~ 4 c8~ c4. } } ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tie settings question
2016-10-21 22:48 GMT+02:00 Thomas Morley: > 2016-10-21 22:39 GMT+02:00 Karol Majewski : >> OK, this does change skyline-padding in chords, but unfotunately it also >> changes skyline-padding between single notes (see example: c'8~ c'4). I'd >> like tied chords to have different skyline-padding value than tied single >> notes. >> >> hint = >> \override TieColumn.before-line-breaking = >>#(lambda (grob) >> (for-each >>(lambda (clr tie) >> (ly:grob-set-nested-property! tie '(details skyline-padding) 5) >> (ly:grob-set-property! tie 'color clr)) >>(circular-list red green) >> (ly:grob-array->list (ly:grob-object grob 'ties >> >> \relative c' { >>\hint >>4~ >> >>c'8~ c'4. >> } > > > > Well, I wasn't aware we create a TieColumn-grob even for stand-alone Ties. > Then you probably should restrict it to occarabces of more than one Omg, should read: Then you probably should restrict it to occurrences of more than one > Tie at a time. Leading to: > > hint = > \override TieColumn.before-line-breaking = >#(lambda (grob) > (let ((ties (ly:grob-array->list (ly:grob-object grob 'ties > (if (> (length ties) 1) > (for-each > (lambda (clr tie) > (ly:grob-set-nested-property! tie '(details skyline-padding) 5) > (ly:grob-set-property! tie 'color clr)) > (circular-list red green) > ties > > \relative c' { >\hint >4~ > > 8~ 4. > } > > Cheers, > Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tie settings question
Yes, now it does what I want. Thx a lot. This is the final code - without color indicators: hint = \override TieColumn.before-line-breaking = #(lambda (grob) (let ((ties (ly:grob-array->list (ly:grob-object grob 'ties (if (> (length ties) 1) (for-each (lambda (tie) (ly:grob-set-nested-property! tie '(details skyline-padding) 5)) ties \relative c' { \hint 4~ c8~ c4. } ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tie settings question
2016-10-21 22:39 GMT+02:00 Karol Majewski: > OK, this does change skyline-padding in chords, but unfotunately it also > changes skyline-padding between single notes (see example: c'8~ c'4). I'd > like tied chords to have different skyline-padding value than tied single > notes. > > hint = > \override TieColumn.before-line-breaking = >#(lambda (grob) > (for-each >(lambda (clr tie) > (ly:grob-set-nested-property! tie '(details skyline-padding) 5) > (ly:grob-set-property! tie 'color clr)) >(circular-list red green) > (ly:grob-array->list (ly:grob-object grob 'ties > > \relative c' { >\hint >4~ > >c'8~ c'4. > } Well, I wasn't aware we create a TieColumn-grob even for stand-alone Ties. Then you probably should restrict it to occarabces of more than one Tie at a time. Leading to: hint = \override TieColumn.before-line-breaking = #(lambda (grob) (let ((ties (ly:grob-array->list (ly:grob-object grob 'ties (if (> (length ties) 1) (for-each (lambda (clr tie) (ly:grob-set-nested-property! tie '(details skyline-padding) 5) (ly:grob-set-property! tie 'color clr)) (circular-list red green) ties \relative c' { \hint 4~ 8~ 4. } Cheers, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tie settings question
OK, this does change skyline-padding in chords, but unfotunately it also changes skyline-padding between single notes (see example: c'8~ c'4). I'd like tied chords to have different skyline-padding value than tied single notes. hint = \override TieColumn.before-line-breaking = #(lambda (grob) (for-each (lambda (clr tie) (ly:grob-set-nested-property! tie '(details skyline-padding) 5) (ly:grob-set-property! tie 'color clr)) (circular-list red green) (ly:grob-array->list (ly:grob-object grob 'ties \relative c' { \hint 4~ c'8~ c'4. } ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tie settings question
2016-10-20 23:44 GMT+02:00 Karol Majewski: > Hi, I'd like my ties to have different settings when being a part of > TieColumn. For example: > > By default Tie.details.skyline-padding is set to 0.05, which is a good value. > Now, for ties that are part of TieColumn (when connecting chords) I'd like to > use different value of skyline-padding, let's say 5. > > Of course I could use \once \override Tie.deatils.skyline-padding = #5 before > each Tie Column, but I have a feeling that there should be a simpler way. > Maybe there is a scheme trick to automate this. If there is, give me a hint, > please. > > Best > Karol Colors are always nice as an indicator ... hint = \override TieColumn.before-line-breaking = #(lambda (grob) (for-each (lambda (clr tie) (ly:grob-set-nested-property! tie '(details skyline-padding) 5) (ly:grob-set-property! tie 'color clr)) (circular-list red green) (ly:grob-array->list (ly:grob-object grob 'ties \relative c' { \hint 4~ } Cheers, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Tie settings question
Hi, I'd like my ties to have different settings when being a part of TieColumn. For example: By default Tie.details.skyline-padding is set to 0.05, which is a good value. Now, for ties that are part of TieColumn (when connecting chords) I'd like to use different value of skyline-padding, let's say 5. Of course I could use \once \override Tie.deatils.skyline-padding = #5 before each Tie Column, but I have a feeling that there should be a simpler way. Maybe there is a scheme trick to automate this. If there is, give me a hint, please. Best Karol ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user