Discussion:
controlling the tie "gap" [and a possible bug?]
Kieren MacMillan
2018-11-16 21:55:36 UTC
Permalink
Hi all,

On my setup (Mac OS X, Lilypond 2.19.80), the code

\version "2.18.2"
\fixed c'' { e4*4/5( d c)( d e) }

gives



1. Is the crossing of the ties a bug?

2. Regardless, is there a way I can make all ties to begin a little bit further to the right and end a little further to the left of the centre of each notehead, so there is a gap between consecutive ties?

Thanks,
Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info <http://www.kierenmacmillan.info/>
‣ email: ***@kierenmacmillan.info <mailto:***@kierenmacmillan.info>
David Kastrup
2018-11-16 22:03:37 UTC
Permalink
Post by Kieren MacMillan
Hi all,
On my setup (Mac OS X, Lilypond 2.19.80), the code
\version "2.18.2"
\fixed c'' { e4*4/5( d c)( d e) }
gives
*
No, it doesn't. The image shows the same kind of symptom as the code
does but is clearly from different code.
Post by Kieren MacMillan
1. Is the crossing of the ties a bug?
Those are not ties but slurs. It's ugly enough that I'd say so.
Post by Kieren MacMillan
2. Regardless, is there a way I can make all ties to begin a little
bit further to the right and end a little further to the left of the
centre of each notehead, so there is a gap between consecutive ties?
Probably tweaking Slur.details will do it but people more versed in
doing such things are likely to pitch in.
--
David Kastrup
Kieren MacMillan
2018-11-16 22:11:17 UTC
Permalink
Hi David,
Post by David Kastrup
No, it doesn't. The image shows the same kind of symptom
as the code does but is clearly from different code.
Hmmm
 I just compiled it again, and it gave the same thing. Here’s a screenshot from Frescobaldi with the code on the left and compiled image on the right:



What am I saying that’s incorrect?
Post by David Kastrup
Post by Kieren MacMillan
1. Is the crossing of the ties a bug?
Those are not ties but slurs.
Oops! Yes, sorry — I meant slurs.
Post by David Kastrup
Post by Kieren MacMillan
2. Regardless, is there a way I can make all ties to begin a little
bit further to the right and end a little further to the left of the
centre of each notehead, so there is a gap between consecutive ties?
Probably tweaking Slur.details will do it
It’s definitely been a long day (week? month??), and I’m currently ill (strep throat)
 I’ve been tweaking Tie.details to [obviously] no avail. Will report back soon.

In the meantime, sorry for the noise.

Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info <http://www.kierenmacmillan.info/>
‣ email: ***@kierenmacmillan.info <mailto:***@kierenmacmillan.info>
David Kastrup
2018-11-16 22:51:59 UTC
Permalink
Post by Kieren MacMillan
Hi David,
No, it doesn't. The image shows the same kind of symptom
as the code does but is clearly from different code.
Hmmm… I just compiled it again, and it gave the same thing. Here’s a
screenshot from Frescobaldi with the code on the left and compiled
As I did say: the image shows the same kind of sympton as the code does
but is clearly from different code, having a bar line between fourth and
fifth note.
Post by Kieren MacMillan
What am I saying that’s incorrect?
The image did not correspond to the code.
Post by Kieren MacMillan
1. Is the crossing of the ties a bug?
Those are not ties but slurs.
I did state that this looks ugly enough to count as a bug. It does beg
the question why one would use consecutive slurs rather than one large
one, though.
Post by Kieren MacMillan
Probably tweaking Slur.details will do it
It’s definitely been a long day (week? month??), and I’m currently ill
(strep throat)…
Hopefully whatever prescription accompanied the diagnosis will work
well. Of course, they do tend to take a toll of their own.
Post by Kieren MacMillan
I’ve been tweaking Tie.details to [obviously] no avail.
Well, this does show the value of pedantry in naming things. Computers
can be quite obstinate in doing what you tell them rather than what you
mean.
--
David Kastrup
Kieren MacMillan
2018-11-16 22:57:00 UTC
Permalink
Hi David,
Post by David Kastrup
As I did say: the image shows the same kind of sympton as the code does
but is clearly from different code, having a bar line between fourth and
fifth note.
Ah. Must have had the old code (with barline) in my clipboard when I pasted it. Sorry/thanks.
Post by David Kastrup
It does beg the question why one would use consecutive slurs
rather than one large one, though.
I’m working on a Schenker graph for a music theory journal.
Post by David Kastrup
Hopefully whatever prescription accompanied the diagnosis will work well.
Yes, the penicillin has already moved swallowing from "feels like razor blades" to "only markedly uncomfortable".
Post by David Kastrup
Of course, they do tend to take a toll of their own.
Indeed: last year, I had a bout of pneumonia, and the first round of antibiotics prescribed had to be replaced by another because of the gastrointestinal distress it caused me…
Post by David Kastrup
Computers can be quite obstinate in doing what you tell them
rather than what you mean.
Darned computers!
Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: ***@kierenmacmillan.info
David Sumbler
2018-11-16 23:07:04 UTC
Permalink
-----Original Message-----
From: Kieren MacMillan <***@sympatico.ca>
To: David Kastrup <***@gnu.org>
CC: Lilypond-User Mailing List <lilypond-***@gnu.org>
Subject: Re: controlling the tie "gap" [and a possible bug?]
Date: Fri, 16 Nov 2018 17:11:17 -0500

Hi David,
No, it doesn't. The image shows the same kind of symptomas the
code does but is clearly from different code.
Hmmm
 I just compiled it again, and it gave the same thing. Here’s a
screenshot from Frescobaldi with the code on the left and compiled
image on the right:



What am I saying that’s incorrect?
Post by Kieren MacMillan
1. Is the crossing of the ties a bug?
Those are not ties but slurs.
Oops! Yes, sorry — I meant slurs.
Post by Kieren MacMillan
2. Regardless, is there a way I can make all ties to begin a little
bit further to the right and end a little further to the left of the
centre of each notehead, so there is a gap between consecutive ties?
Probably tweaking Slur.details will do it
It’s definitely been a long day (week? month??), and I’m currently ill
(strep throat)
 I’ve been tweaking Tie.details to [obviously] no avail.
Will report back soon.

In the meantime, sorry for the noise.

Kieren.


This probably isn't helpful, but here are my thoughts on the subject.

I can't see that it this can really be regarded as a bug. Ending one
slur and beginning another on the same note is not normal usage - in
fact, I don't really know what it is supposed to mean. How does this
meaning differ from having a single slur over all 5 notes? Will the
meaning be clear to whoever has to play the music?

In the normal case one wants slur to go at least to the vertical centre
of the notehead, probably a little further, and this is what Lilypond
does. For a specialized case such as the example shown, the slurs can
of course be tweaked.

David
Kieren MacMillan
2018-11-16 23:13:21 UTC
Permalink
Hi David,
I can't see that it this can really be regarded as a bug. Ending one slur and beginning another on the same note is not normal usage - in fact, I don't really know what it is supposed to mean. How does this meaning differ from having a single slur over all 5 notes? Will the meaning be clear to whoever has to play the music?
Well, in this case, I’m engraving a Schenker graph… so I doubt anyone will be playing it. ;)
But regardless of the meaning of it… it’s a collision, and Lilypond should handle the case accordingly, no?
In the normal case one wants slur to go at least to the vertical centre of the notehead, probably a little further, and this is what Lilypond does.
Yes. But Lilypond corrects for the presence of (and potential collision with) articulations, etc. — why not for the presence of (and potential collision with) another slur?
For a specialized case such as the example shown, the slurs can of course be tweaked.
I’m hoping there’s a global setting, rather than a [time-consuming] slur-by-slur manual approach: in Schenker graphs, this construct is very common, and it would be a shame if one couldn’t set a "horizontal padding" between adjacent slurs.

Thanks!
Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: ***@kierenmacmillan.info
David Kastrup
2018-11-16 23:30:55 UTC
Permalink
Post by Kieren MacMillan
Hi David,
I can't see that it this can really be regarded as a bug. Ending one
slur and beginning another on the same note is not normal usage - in
fact, I don't really know what it is supposed to mean. How does this
meaning differ from having a single slur over all 5 notes? Will the
meaning be clear to whoever has to play the music?
Well, in this case, I’m engraving a Schenker graph… so I doubt anyone
will be playing it. ;)
LilyPond has its own functions for Schenker graphs.
Post by Kieren MacMillan
But regardless of the meaning of it… it’s a collision, and Lilypond
should handle the case accordingly, no?
LilyPond tends to focus on situations that are considered to be part of
"valid" musical scores. When working outside of that scope, it's not
all that unusual for stuff to be different from expectations.
Post by Kieren MacMillan
In the normal case one wants slur to go at least to the vertical
centre of the notehead, probably a little further, and this is what
Lilypond does.
Yes. But Lilypond corrects for the presence of (and potential
collision with) articulations, etc. — why not for the presence of (and
potential collision with) another slur?
Basically because it would be additional programming effort to cater for
this case that nobody considered relevant so far. It's not by explicit
design or some grand masterplan logic.
--
David Kastrup
Kieren MacMillan
2018-11-17 00:06:36 UTC
Permalink
Hi David,
Post by David Kastrup
Post by Kieren MacMillan
Well, in this case, I’m engraving a Schenker graph… so I doubt anyone will be playing it. ;)
LilyPond has its own functions for Schenker graphs.
To which functions in particular are you referring?

I’ve slowly been building a SchenkerLily framework over the last few years, and the only thing I’ve seen is <http://lsr.di.unimi.it/LSR/Snippet?id=501>, the inelegance of which was precisely what inspired me to start working on a SchenkerLily framework in the first place…
Post by David Kastrup
LilyPond tends to focus on situations that are considered to be part of
"valid" musical scores. When working outside of that scope, it's not
all that unusual for stuff to be different from expectations.
I understand that, of course.
Post by David Kastrup
Post by Kieren MacMillan
Yes. But Lilypond corrects for the presence of (and potential
collision with) articulations, etc. — why not for the presence of (and
potential collision with) another slur?
Basically because it would be additional programming effort to cater for
this case that nobody considered relevant so far. It's not by explicit
design or some grand masterplan logic.
Oh, I understand that. My point was more philosophical: I was trying to answer David S’s implication (or at least my inference from what he wrote) that there’s *no reason* why slurs might consider adjacent slurs for potential collisions.

Cheers,
Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: ***@kierenmacmillan.info
David Kastrup
2018-11-17 00:16:06 UTC
Permalink
Post by Kieren MacMillan
Hi David,
Post by David Kastrup
Post by Kieren MacMillan
Well, in this case, I’m engraving a Schenker graph… so I doubt
anyone will be playing it. ;)
LilyPond has its own functions for Schenker graphs.
To which functions in particular are you referring?
I’ve slowly been building a SchenkerLily framework over the last few
years, and the only thing I’ve seen is
<http://lsr.di.unimi.it/LSR/Snippet?id=501>, the inelegance of which
was precisely what inspired me to start working on a SchenkerLily
framework in the first place…
Seems like I have been overselling what is there. Pruning away
translations, searching for "Schenker" in the code base yields

Documentation/ly-examples/bach-schenker.ly: subtitle = "Analysis from Gene Biringer's Schenker Text, Ex. 5-27"
Documentation/web.texi:orchestral projects, customized output, and even Schenker graphs.
Documentation/web.texi:@uref{examples.html#Schenker-Graphs, Schenker graphs}.
Documentation/web/introduction.itexi:@subheading Schenker Graphs
Documentation/web/introduction.itexi:Schenkerian analysis, created by Kris Schaffer, for an article
Documentation/web/introduction.itexi:Stunning Schenker Graphs with GNU LilyPond}. It is an in-depth
Documentation/web/news-old.itexi:Stunning Schenker Graphs with GNU LilyPond}}. It is a

which is actually a single example file and sales blurbs but no actual
code or documentation.

Sorry for the confusion.
--
David Kastrup
Kieren MacMillan
2018-11-17 00:24:45 UTC
Permalink
Hi David,
Post by David Kastrup
Seems like I have been overselling what is there.
[…] Sorry for the confusion.
No worries.
It’s a bit of a relief, actually: I would have been disappointed to find I’ve been reinventing wheels!

Thanks,
Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: ***@kierenmacmillan.info
Aaron Hill
2018-11-17 00:54:49 UTC
Permalink
[ . . . ]
Kieren,

Would something like the following be of any help?

%%%%
\version "2.19.82"

#(define (contract-control-points coords amount)
(let* ((x-coords (map (lambda (coord) (car coord)) coords))
(orig-left (apply min x-coords))
(orig-right (apply max x-coords))
(new-left (+ (* orig-left (- 1 (car amount)))
(* orig-right (car amount))))
(new-right (+ (* orig-left (cdr amount))
(* orig-right (- 1 (cdr amount))))))
(map (lambda (coord)
(let ((t (/ (- (car coord) orig-left) (- orig-right orig-left))))
(cons (+ new-left (* t (- new-right new-left))) (cdr coord))))
coords)))

contractSlur = #(define-music-function (amount evt) (pair? ly:music?)
#{ \tweak control-points #(lambda (grob)
(contract-control-points
(ly:slur::calc-control-points grob)
amount)) $evt #})
globalContractSlur = #(define-music-function (amount) (pair?)
#{ \override Slur.control-points = #(lambda (grob)
(contract-control-points
(ly:slur::calc-control-points grob)
amount))
\override PhrasingSlur.control-points = #(lambda (grob)
(contract-control-points
(ly:slur::calc-control-points grob)
amount)) #})

csr = -\contractSlur #'(0 . 0.05) \etc
csl = -\contractSlur #'(0.05 . 0) \etc

\relative f' {
\override Score.RehearsalMark.self-alignment-X = #-1
\mark \markup \small "Default behavior"
f8 ( e g ) ( e f2 ) |
f8 \( e g \) \( e f2 \) |

\mark \markup \small "Overridden behavior"
\globalContractSlur #'(0.1 . 0.1)
f8 ( e g ) ( e f2 ) |
f8 \( e g \) \( e f2 \) |

\mark \markup \small "Tweaked behavior"
f8 -\csr ( e g ) -\csl ( e f2 ) |
f8 -\csr \( e g \) -\csl \( e f2 \) |
}
%%%%

-- Aaron Hill
Kieren MacMillan
2018-11-17 01:36:42 UTC
Permalink
Hi Aaron,
Post by Aaron Hill
Would something like the following be of any help?
Oh! Almost certainly. Looking forward to testing it out.

Thanks!
Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: ***@kierenmacmillan.info
Lukas-Fabian Moser
2018-11-17 07:35:02 UTC
Permalink
Post by David Kastrup
Post by Kieren MacMillan
I can't see that it this can really be regarded as a bug. Ending one
slur and beginning another on the same note is not normal usage - in
fact, I don't really know what it is supposed to mean. How does this
meaning differ from having a single slur over all 5 notes? Will the
meaning be clear to whoever has to play the music?
Well, in this case, I’m engraving a Schenker graph… so I doubt anyone
will be playing it. ;)
[...]
Post by David Kastrup
LilyPond tends to focus on situations that are considered to be part of
"valid" musical scores. When working outside of that scope, it's not
all that unusual for stuff to be different from expectations.
I don't think it is safe to assume that a construction like c)( is not
to be expected in valid musical scores. Schenker graphs aside, at least
for phrasing slurs (which show the same behaviour that Kieren described)
it's quite common e.g. in Wagner scores to have them end and start again
on the same note.

Best
Lukas
Flaming Hakama by Elaine
2018-11-16 23:29:40 UTC
Permalink
---------- Forwarded message ----------
Date: Fri, 16 Nov 2018 16:55:36 -0500
Subject: controlling the tie "gap" [and a possible bug?]
Hi all,
On my setup (Mac OS X, Lilypond 2.19.80), the code
\version "2.18.2"
\fixed c'' { e4*4/5( d c)( d e) }
gives
1. Is the crossing of the ties a bug?
2. Regardless, is there a way I can make all ties to begin a little bit
further to the right and end a little further to the left of the centre of
each notehead, so there is a gap between consecutive ties?
Thanks,
Kieren.
\version "2.19.80"

% I have to admit, I don't understand what this means musically.
% Seems like either this should be 2 slurs, not elided, or a single slur
over all 5 notes.
\score {
\new Staff <<
\fixed c'' { e4*4/5( d c ) ( d e ) }
\layout { }
}


% Working with the confusing example as-is,
% I'm not sure how to do this globally, but the normal \shape command can
be made to work.
slurTweak = { \shape #'((0.3 . 0) (0 . 0) (0 . 0) (-0.3 . 0)) Slur }

\score {
\new Staff <<
\fixed c'' {
% The trick seems to be to add the second tweak before the
first slur ends
\slurTweak e4*4/5( d \slurTweak c ) ( d e )
}
\layout {
}
}


HTH,

Elaine Alt
415 . 341 .4954 "*Confusion is
highly underrated*"
***@flaminghakama.com
Producer ~ Composer ~ Instrumentalist
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Kieren MacMillan
2018-11-17 00:19:32 UTC
Permalink
Hi,
% I'm not sure how to do this globally, but the normal \shape command can be made to work.
slurTweak = { \shape #'((0.3 . 0) (0 . 0) (0 . 0) (-0.3 . 0)) Slur }
Yes, this (with 0.2 instead of 0.3) is perfect for my use-case.

Eventually, I would love to have the ability to set the attachment globally, rather than having to add this tweak before every Slur. (Curiously, I found another thread <http://lists.gnu.org/archive/html/lilypond-user/2016-02/msg00451.html> I started a few years ago — while working on a non-Schenkerian stylesheet — which would really just be another application of this same feature.)

I’m sure this could be done as a callback… but I’m slamming out this engraving job, so I’ll have to look into that later. For now, this function, added before every slur, is a sufficient workaround.

Thanks!
Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: ***@kierenmacmillan.info
David Kastrup
2018-11-17 00:27:48 UTC
Permalink
Post by Kieren MacMillan
Hi,
On Nov 16, 2018, at 6:29 PM, Flaming Hakama by Elaine
% I'm not sure how to do this globally, but the normal \shape
command can be made to work.
slurTweak = { \shape #'((0.3 . 0) (0 . 0) (0 . 0) (-0.3 . 0)) Slur }
Yes, this (with 0.2 instead of 0.3) is perfect for my use-case.
Eventually, I would love to have the ability to set the attachment
globally, rather than having to add this tweak before every
Slur.
I am irritated that \shape applies \once automatically. If you use it
in a context modification \with { ... }, however, \once will get
ignored and the shape will apply to the whole context.
--
David Kastrup
Kieren MacMillan
2018-11-17 00:34:05 UTC
Permalink
Hi David,
Post by David Kastrup
I am irritated that \shape applies \once automatically.
I seem to recall there are a couple of other functions which do so as well (though I don’t currently recall what they are).

Would it be a good idea to standardize the codebase such that functions never apply \once automatically, or are there good reasons not to have such a coding convention?
Post by David Kastrup
If you use it in a context modification \with { ... }, however,
\once will get ignored and the shape will apply to the whole context.
Ah! That’s useful.

Thanks,
Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: ***@kierenmacmillan.info
Andrew Bernard
2018-11-17 11:05:10 UTC
Permalink
As it happens, I'm doing a 200 page string quartet at the moment and every
page and every part is full of slurs like this, that end and start on a
single note. In this case it is to indicate the pulsing of the phrase and
repeated notes in particular - and in case this is obscure, it is mentioned
in the performance notes in the preface.

It's a valid use case, and very handy. What constitutes a 'valid' musical
score is a very fraught question. In the case of lilypond, it's Common Era
music mostly. But I do New Complexity School music and that's equally
valid, even if not to universal taste. I am the first to confess that I do
not expect Lilypond to deal with my complex issues out of the box, but it
can be coaxed into doing a very fine job with enough Scheme functions.

I'd prefer the slurs to be a bit further apart also in this case.

Andrew

Loading...