lilypond-devel
[Top][All Lists]

## Re: Substitute for s1*0

 From: David Kastrup Subject: Re: Substitute for s1*0 Date: Mon, 07 May 2012 11:00:39 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

James <address@hidden> writes:

> On 7 May 2012 06:50, Keith OHara <address@hidden> wrote:
>> Trevor Daniels <t.daniels <at> treda.co.uk> writes:

>> <> is less transparent, because a thoughtful user would
>> expect it to have the same duration of the previous note
>> or chord, or to be a syntax error.
>>
>> On the other hand,
>> 1) the chord construct is more familiar than skips
>
> Evidence? 'skip' is exactly what it says on the tin.

But we are not talking about \skip (which actually would have the
advantage of _not_ tampering with the current duration in the parser,
and the disadvantage that it does not take post-events and thus is
totally pointless for this task) but s.  s says nothing on the tin, you
need to look it up in the manual on its own.

> '<>' what is that?

Uh, < followed by > it would appear.  A starting chord delimiter
followed by an ending chord delimiter.

>
> \<
>
> \>
>
> -> -< (and combinatinos of ^-> --> _-< etc.)
>
> I absolutely take Graham's point that having a not uncommon sytax
> expression like '<< a4.(\->\<[^<>\markup {hello} \\ ...'  is ugly

Reality check.  <> is not new.  And it is not what makes the above look
bad.  Unless I am mistaken, it is invalid code anyway.

> although I was thinking more of the syntax of Brainf**k (or sed) than
> Haskel. While s1*0 is not that pretty, it is at least easy to see and,
> at least for me anyway, clear of its meaning in an already crowded
> mess of non-alphanumeric characters.
>
> Put chorded notes in the mix
>
> << <a b c>\<^<>"Hello" \\ <a b c> >> (or something like that)
>
> yuk.

Uh, <> (or < >) is precisely that: a chord.  Which is the reason that it
works.  Are you arguing that we should abolish chord syntax?

>> and mulitplied durations are not familiar at all
>
> That's not an argument, that's just bad documentation.

No.  Multiplied durations are used much less than chords.

> Why would we suddenly become familiar with <> over s1*0?

Because we already _are_.  We are not talking about a proposed change in
functionality.  We are talking about a proposed change in documentation.
I gave an example where s1*0 causes _totally_ unexpected results.
<URL:http://lists.gnu.org/archive/html/lilypond-devel/2012-05/msg00102.html>

Nicolas gave an example where s1*0 causes _totally_ unexpected results.
<URL:http://lists.gnu.org/archive/html/lilypond-devel/2012-05/msg00138.html>

Can you explain in each of these cases what goes wrong?  Can you tell
how the output in each of those cases matches your expectations?  Can
you explain how to fix in particular Nicolas' example?  Can you come up
with a case of using <> leading to similarly surprising results?

> Apart from the fact I disagree that they are not unfamiliar from and
> that I recall I ended up in a debate trying to get a relatively small
> change in to \partial documentation where it was implied that everyone
> knows about multipliers of duration and that \partial 8*3 was much
> clearer an example than \partial 4.

Does "it was implied" mean that we did not change the example?  Has

commit 86c9165e160f731023859aa57292b30f7436ef6f
Date:   Fri Jan 6 19:51:29 2012 +0000

Doc: NR Section on Upbeats made clearer

Tracker issue 2189

Created simpler and clearer @lilypond examples.

Used a less complex, more obvious value for \set Timing.measure position
examples and added a specific example after the @knownissue to show
\partial and \set Timing.. being used together (at the beginning and
after the beginning) to help reinforce the point.

Minor cindex changes and linebreak edits as per the CG

been reverted?  Can you point to any resistance in the comments of
really holding a grudge because of the one-time comment from Janek
<URL:http://codereview.appspot.com/5520056/diff/1/Documentation/notation/rhythms.itely#newcode1363>
which is _completely_ different from what you insinuate here (Janek
never stated that 8*3 was clearer, but merely that he liked the example
because it demonstrated multipliers as well)?

> Also isn't this a really a GLISS topic?

Reality check.  <> has already worked for eternities.  It would be GLISS
to _disallow_ it.  I can see no reason for that.

Both s1*0 as well as <> are constructs that have existed for a long
time.  <> has fewer side effects and requires less knowledge to
understand.  So I propose preferring its use in examples.  Feel free to
propose disallowing chord syntax because you find it makes LilyPond look

Should we also disallow using { } and << >> instead of \sequential and
\simultaneous (which have been available since LilyPond 1.1 but do not
see much use)?

--
David Kastrup