Not Nice Review of the LilyPond

classic Classic list List threaded Threaded
26 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Not Nice Review of the LilyPond

Reggie
Has anyone else seen this do you know who the author is? Some complaints
about gibberish and documentation and God knows what else. Is this a joke
one or seriously critical of the program? Or in cheek.
http://www.alethis.net/reference/lily/lily.html



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Not Nice Review of the LilyPond

Andrew Bernard
Hi Reggie,

It's not a review, it's a guide. There's one paragraph mentioning the documentation is difficult and it's well known that like UNIX manuals the NR is reference not tutorial. Besides he says this:

"In spite of these difficulties, LilyPond is astoundingly powerful, and produces very beautiful output "

It's well know that lilypond is hard for beginners and has a steep learning curve. This is fair comment. The same applies to most powerful software applications. I don't see this short paragraph in the negative light that you appear to, and besides, he goes on to give a quick guide to lilypond, which is useful for people.

Andrew


On Sun, 2 Dec 2018 at 13:44, Reggie <[hidden email]> wrote:
Has anyone else seen this do you know who the author is? Some complaints
about gibberish and documentation and God knows what else. Is this a joke
one or seriously critical of the program? Or in cheek.
http://www.alethis.net/reference/lily/lily.html



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Not Nice Review of the LilyPond

David Kastrup
In reply to this post by Reggie
Reggie <[hidden email]> writes:

> Has anyone else seen this do you know who the author is? Some complaints
> about gibberish and documentation and God knows what else. Is this a joke
> one or seriously critical of the program? Or in cheek.
> http://www.alethis.net/reference/lily/lily.html

Seems to me like an honest impression (though judging the notation
reference for not being an introduction) and it's not like the author
did not actually invest a lot of work both getting to work with LilyPond
and creating instructions for others to do so.

I probably don't consider this outrageous at all because I am cursing
and yelling at LilyPond on a daily basis and would be able to aim my
insults more precisely than that.

--
David Kastrup

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Not Nice Review of the LilyPond

J Martin Rushton
In reply to this post by Reggie
I'm not sure the single critical paragraph is that unfair.  I've turned
the tables on the reviewer and added my own comments as an amateur who
came to Lily only a few years ago.

I did try to send a copy of this email to the company as a courtesy, but
all company information on their website is "Under Construction" and all
personnel pages seem to be family pictures or missing.  Make of that
what you will!

A review of the review.
-----------------------

"The documentation is voluminous, but difficult to penetrate."
- Accurate, but slightly unfair.  The 'Learning Manual' is straight
forward even if pedestrian at times.  'Usage' is good.  'Music Glossary'
is excellent both with Lily and stand alone.  The 'Notation Reference'
is a comprehensive reference guide and is emphatically not newbie friendly.

"I found it difficult to find out about such simple features as the
overall structure of a LilyPond source file."
- I found the same.

"Many commands and features are described without any context
whatsoever, and it becomes a matter of trial and error to determine
exactly how they should be integrated into a source file."
- A consequence of comprehensiveness.  The feature is described and a
snippet shown, but fitting it into the complete structure can be
confusing at first.

"And some features that one would expect to be quite simple, seem to be
achievable only by complex and obscure "commands" or "variables".
- I'm not sure I quite follow his argument here.

"One is frequently tempted to attach multiple features to a single note
(e.g. sharp/flat, duration, pitch, slur start or end, phrase start or
end, dynamic mark, crescendo/decrescendo start or end and text are a few
examples!), and it typically requires trial and error to determine which
of the particular orders is the only one that LilyPond accepts."
- Fair comment.  As a programmer I'm used to critical ordering so just
accept it.  Someone unused to working with source code might get into
difficulties.

"LilyPond source files appear to be written in a custom programming
language whose grammar is never discussed."
- I'm afraid this one is bang on target.  However compare the situation
to other systems and at least you can programme rather than just
accepting a proprietary black box.

On 02/12/18 02:43, Reggie wrote:

> Has anyone else seen this do you know who the author is? Some complaints
> about gibberish and documentation and God knows what else. Is this a joke
> one or seriously critical of the program? Or in cheek.
> http://www.alethis.net/reference/lily/lily.html
>
>
>
> --
> Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html
>
> _______________________________________________
> lilypond-user mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
--
J Martin Rushton MBCS


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user

signature.asc (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Not Nice Review of the LilyPond

David Kastrup
J Martin Rushton <[hidden email]> writes:

> I'm not sure the single critical paragraph is that unfair.  I've turned
> the tables on the reviewer and added my own comments as an amateur who
> came to Lily only a few years ago.

[...]

> "LilyPond source files appear to be written in a custom programming
> language whose grammar is never discussed."
> - I'm afraid this one is bang on target.  However compare the situation
> to other systems and at least you can programme rather than just
> accepting a proprietary black box.

Well, this author went the mile and actually learnt how to work with
LilyPond before giving it a critical eye (and apparently sticking with
it).  I think we lose the majority of potential users even before
getting anywhere as far.  It's easy to laugh about those when they write
up their impression, but of course the problem _is_ real.

Frescobaldi is an impressive way to lower the threshold of getting
acquainted with LilyPond's way of working.  And Denemo is nice for not
getting all that much acquainted with LilyPond's way of working.

--
David Kastrup

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Not Nice Review of the LilyPond

J Martin Rushton
On 02/12/18 11:31, David Kastrup wrote:

> J Martin Rushton <[hidden email]> writes:
>
>> I'm not sure the single critical paragraph is that unfair.  I've turned
>> the tables on the reviewer and added my own comments as an amateur who
>> came to Lily only a few years ago.
>
> [...]
>
>> "LilyPond source files appear to be written in a custom programming
>> language whose grammar is never discussed."
>> - I'm afraid this one is bang on target.  However compare the situation
>> to other systems and at least you can programme rather than just
>> accepting a proprietary black box.
>
> Well, this author went the mile and actually learnt how to work with
> LilyPond before giving it a critical eye (and apparently sticking with
> it).  I think we lose the majority of potential users even before
> getting anywhere as far.  It's easy to laugh about those when they write
> up their impression, but of course the problem _is_ real.
>
> Frescobaldi is an impressive way to lower the threshold of getting
> acquainted with LilyPond's way of working.  And Denemo is nice for not
> getting all that much acquainted with LilyPond's way of working.
>
Hi David.  I'm not quite sure whether you're telling me off for
criticising the original author, or praising me for as "this author"!
In either case may I concur with your comments about Frescobaldi - It is
a nice compromise between GUI/IDE/text and does make life a lot easier
for occasional users.  I was going to include Frescobaldi in my email to
Alethis but as I mentioned they don't seem to want to be contacted which
is odd for a "professional software consulting services".

Regards,

Martin


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user

signature.asc (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Not Nice Review of the LilyPond

David Kastrup
J Martin Rushton <[hidden email]> writes:

> On 02/12/18 11:31, David Kastrup wrote:
>> J Martin Rushton <[hidden email]> writes:
>>
>>> I'm not sure the single critical paragraph is that unfair.  I've turned
>>> the tables on the reviewer and added my own comments as an amateur who
>>> came to Lily only a few years ago.
>>
>> [...]
>>
>>> "LilyPond source files appear to be written in a custom programming
>>> language whose grammar is never discussed."
>>> - I'm afraid this one is bang on target.  However compare the situation
>>> to other systems and at least you can programme rather than just
>>> accepting a proprietary black box.
>>
>> Well, this author went the mile and actually learnt how to work with
>> LilyPond before giving it a critical eye (and apparently sticking with
>> it).  I think we lose the majority of potential users even before
>> getting anywhere as far.  It's easy to laugh about those when they write
>> up their impression, but of course the problem _is_ real.
>>
>> Frescobaldi is an impressive way to lower the threshold of getting
>> acquainted with LilyPond's way of working.  And Denemo is nice for not
>> getting all that much acquainted with LilyPond's way of working.
>>
>
> Hi David.  I'm not quite sure whether you're telling me off for
> criticising the original author, or praising me for as "this author"!

Neither.  Sometimes I write stuff without specifically targeting a
victim.

--
David Kastrup

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Not Nice Review of the LilyPond

Sandro Santilli-2
In reply to this post by J Martin Rushton
On Sun, Dec 02, 2018 at 11:01:36AM +0000, J Martin Rushton wrote:

> "LilyPond source files appear to be written in a custom programming
> language whose grammar is never discussed."
> - I'm afraid this one is bang on target.

Hey, I have the exact same feeling. Very obscure way to put chords
in parenthesis (I asked yesterday). On the bright side, asking on
this list gets you an answer pretty quickly :)

--strk;

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Not Nice Review of the LilyPond

Michael Gerdau
In reply to this post by Reggie
>http://www.alethis.net/reference/lily/lily.html

Not being a native speaker the finer bashing of LP may have escaped me.

The article obviously is old referring to 2.12 documentation and 2.10.something in the version statement of some examples.

Not sure why I should be upset though.

Kind regards,
Michael
_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Not Nice Review of the LilyPond

Thomas Morley-2
In reply to this post by Sandro Santilli-2
Am So., 2. Dez. 2018 um 14:01 Uhr schrieb Sandro Santilli <[hidden email]>:
>
> On Sun, Dec 02, 2018 at 11:01:36AM +0000, J Martin Rushton wrote:
>
> > "LilyPond source files appear to be written in a custom programming
> > language whose grammar is never discussed."
> > - I'm afraid this one is bang on target.
>
> Hey, I have the exact same feeling. Very obscure way to put chords
> in parenthesis (I asked yesterday).

I beg to differ.
It's the consequence of entering ChordNames as music and the
possibility to have them in midi, let them display as notes in Staff
etc
To keep those features you may try:

parenthesize =
#(define-music-function (dir arg) ((symbol? #f) ly:music?)

#{
  $(if dir
       #{
       \once \override ParenthesesItem.stencils =
         #(lambda (grob)
            (let ((lp (ly:font-get-glyph
                        (ly:grob-default-font grob)
                        "accidentals.leftparen"))
                  (rp (ly:font-get-glyph
                        (ly:grob-default-font grob)
                        "accidentals.rightparen")))
              (cond ((eq? dir 'left)
                     (list lp empty-stencil))
                    ((eq? dir 'right)
                     (list empty-stencil rp))
                    (else
                      (ly:warning "unknown direction: \"~a\", ignoring" dir)
                      (list lp rp)))))
       #})
%% the defaulr parenthesize
  $(if (memq 'event-chord (ly:music-property arg 'types))
       ;; arg is an EventChord -> set the parenthesize property
       ;; on all child notes and rests
       (for-each
        (lambda (ev)
          (if (or (memq 'note-event (ly:music-property ev 'types))
                  (memq 'rest-event (ly:music-property ev 'types)))
              (set! (ly:music-property ev 'parenthesize) #t)))
        (ly:music-property arg 'elements))
       ;; No chord, simply set property for this expression:
       (set! (ly:music-property arg 'parenthesize) #t))
  $arg
#})


\new ChordNames
  \chordmode {
    \override ChordName.stencil =
    #(lambda (grob)
      (box-stencil
        (ly:text-interface::print grob)
        0 0))

      %% default
    \parenthesize c1
    %% left paren
    \parenthesize #'left c:7
    %% right paren
    \parenthesize #'right d:5+
    %% issues a warning and both parentheses are done
    \parenthesize #'whatever ees
  }

@ David:
Would this be a useful extension/replacement of our current default
\parenthesize?

Otoh,
it's often requested to enter ChordNames as markup without any nice features.
For this pupose I made
http://lsr.di.unimi.it/LSR/Item?u=1&id=1057
Currently unapproved (as you see it has a pretty verbose description lol)...
It's usable, though.
You could enter:

  \new ChordMarkup
    \lyricmode {
      "C:13" C:alt "C:7.alt" "Gm:7.(b5)/F"
      (C D) [Cm Dm]
    }

Getting the attached output

Cheers,
  Harm

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user

atest-83-chord-markup.png (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Not Nice Review of the LilyPond

David Kastrup
Thomas Morley <[hidden email]> writes:

> Am So., 2. Dez. 2018 um 14:01 Uhr schrieb Sandro Santilli <[hidden email]>:
>>
>> On Sun, Dec 02, 2018 at 11:01:36AM +0000, J Martin Rushton wrote:
>>
>> > "LilyPond source files appear to be written in a custom programming
>> > language whose grammar is never discussed."
>> > - I'm afraid this one is bang on target.
>>
>> Hey, I have the exact same feeling. Very obscure way to put chords
>> in parenthesis (I asked yesterday).
>
> I beg to differ.
> It's the consequence of ...

"obscure" and "there is a technical reason for it" are not opposites.  A
number of decisions of LilyPond's input syntax lead themselves better to
extensibility and sometimes logical coherency which makes it easier to
deduce what to do for things, and what things you read may mean.
LilyPond tries aiming for a best compromise in the direction of
"natural", "obvious", "defensible", "logical" but they are not all the
same.  Sometimes one can improve the compromises taken, sometimes this
is hard.  At least LilyPond is a better starting point than MusiXTeX.

--
David Kastrup

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Not Nice Review of the LilyPond

Sandro Santilli-2
In reply to this post by Thomas Morley-2
On Sun, Dec 02, 2018 at 03:26:44PM +0100, Thomas Morley wrote:
> Am So., 2. Dez. 2018 um 14:01 Uhr schrieb Sandro Santilli <[hidden email]>:
> >
> > Very obscure way to put chords
> > in parenthesis (I asked yesterday).
>
> I beg to differ.

Really ? And right after this statement you post a 36 lines
snippet of code full of parens ? :P

I know Lilypond is powerful, that's why I still use it, but
it's hard not to notice how obscure its code is (what is it,
scheme?)

--strk;

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Not Nice Review of the LilyPond

mskala
In reply to this post by David Kastrup
On Sun, 2 Dec 2018, David Kastrup wrote:
> is hard.  At least LilyPond is a better starting point than MusiXTeX.

But MusiXTeX can do "if" statements.

--
Matthew Skala
[hidden email]                 People before tribes.
http://ansuz.sooke.bc.ca/

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Not Nice Review of the LilyPond

Thomas Morley-2
In reply to this post by Sandro Santilli-2
Am So., 2. Dez. 2018 um 16:34 Uhr schrieb Sandro Santilli <[hidden email]>:

>
> On Sun, Dec 02, 2018 at 03:26:44PM +0100, Thomas Morley wrote:
> > Am So., 2. Dez. 2018 um 14:01 Uhr schrieb Sandro Santilli <[hidden email]>:
> > >
> > > Very obscure way to put chords
> > > in parenthesis (I asked yesterday).
> >
> > I beg to differ.
>
> Really ? And right after this statement you post a 36 lines
> snippet of code full of parens ? :P
>
> I know Lilypond is powerful, that's why I still use it, but
> it's hard not to notice how obscure its code is (what is it,
> scheme?)
>
> --strk;

The proposed _ly-syntax_ is
\parenthesize <whatever>
\parenthesize #'left <whatever>
\parenthesize #'right <whatever>
No parens.

Obviously this is not default LilyPond, thus I proposed a _function_
which offers it.
This function is written in guile, the scheme-dialect used by LilyPond
as it's extension-language. Btw, it's the official GNU extension
language.
For _usage_ such snippets are usually stored away somewhere and
included in you actual file.

Ofcourse noone will hinder you to dive into the code of the function
or the source-code in general, but you don't need to if you simply
want to use it.



Cheers,
  Harm

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Not Nice Review of the LilyPond

David Kastrup
In reply to this post by Sandro Santilli-2
Sandro Santilli <[hidden email]> writes:

> On Sun, Dec 02, 2018 at 03:26:44PM +0100, Thomas Morley wrote:
>> Am So., 2. Dez. 2018 um 14:01 Uhr schrieb Sandro Santilli <[hidden email]>:
>> >
>> > Very obscure way to put chords
>> > in parenthesis (I asked yesterday).
>>
>> I beg to differ.
>
> Really ? And right after this statement you post a 36 lines
> snippet of code full of parens ? :P
>
> I know Lilypond is powerful, that's why I still use it, but
> it's hard not to notice how obscure its code is (what is it,
> scheme?)

C++.  Its own language is hand-crafted syntax, and the extension
language is GUILE, a Scheme dialect.  Apart from being Scheme, the
extension language shadows the structure of both the LilyPond language
and its internals pretty closely, to the degree where closures can span
across language barriers.  That makes for a much more thorough and
manageable synthesis than, say, LuaTeX with its Lua "extension"
language.

If you think LilyPond's integration of extension language and document
language is "obscure", try LuaTeX.  Lua by itself is a procedural
language and thus tends to be more readable to humans than Scheme which
has a more "intuitive" syntax to computers, but integrating Lua with
other languages to the degree Scheme allows for is not there.

It's also hard not to notice what kind of off-the-cuff code can be done
by people acquainted with LilyPond when you ask nicely, and this kind of
code just integrates painlessly into documents.

Make no mistake: the TeX world has its own wizards and masterpieces, but
impressive as they are, they are not "off-the-cuff" and many demonstrate
how to coax TeX in incredibly clever way to do simple things.

--
David Kastrup

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Not Nice Review of the LilyPond

David Kastrup
In reply to this post by mskala
[hidden email] writes:

> On Sun, 2 Dec 2018, David Kastrup wrote:
>> is hard.  At least LilyPond is a better starting point than MusiXTeX.
>
> But MusiXTeX can do "if" statements.

I have a hard time imagining how this is going to hold in a more
convincing manner than you could do it with LilyPond.

--
David Kastrup

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Not Nice Review of the LilyPond

David Sumbler

-----Original Message-----
From: David Kastrup <[hidden email]>
To: [hidden email]
CC: lilypond-user <[hidden email]>
Subject: Re: Not Nice Review of the LilyPond
Date: Sun, 02 Dec 2018 17:00:33 +0100

[hidden email] writes:

> On Sun, 2 Dec 2018, David Kastrup wrote:
> > is hard.  At least LilyPond is a better starting point than
> > MusiXTeX.
>
> But MusiXTeX can do "if" statements.

I have a hard time imagining how this is going to hold in a more
convincing manner than you could do it with LilyPond.

***********

I felt that an "if" would be useful, so I eventually came up with:

#(define (iffable? x)
  (or (string-or-music? x) (markup? x) (ly:score? x) (ly:book? x)))

iff = #(define-scheme-function
        ( flag var )
        ( boolean? iffable? )
        (if
         flag
         (if
          (string? var)
          (ly:parser-include-string var)
          var)))
         
I am sure that better programmers could do something far more elegant,
but this works for me.

Using this, I can control compilation using variables, with lines such
as:

\iff \Three "\include \"No3_score.ily\""

Instead of a string as in the example, markups, music etc. can also be
included as a result of a successful "iff" test.

I also made a \choice routine, which effectively gives an "else" result
if the test fails, but I have never actually felt any need to use it.

David



_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Not Nice Review of the LilyPond

Sandro Santilli-2
In reply to this post by Thomas Morley-2
On Sun, Dec 02, 2018 at 04:53:58PM +0100, Thomas Morley wrote:
>
> The proposed _ly-syntax_ is
> \parenthesize <whatever>
> \parenthesize #'left <whatever>
> \parenthesize #'right <whatever>
> No parens.

To be honest I still find that syntax hard to understand.
Replace the 3 <whatever> with A B and C, how would the
above code render those chords ?

I'm guessing it would be:

    A ( B C )

But if that's the case, what is the initial \parenthesize for ?

Note I used code found in
http://lists.gnu.org/archive/html/lilypond-user/2016-10/msg00574.html
which has similar hard-to-understand syntax, I used as such:

        | g2:6 \leftParen bes2:dim5 |
        a4:m7 \rightParen d2:7

Guess how it is rendered ?
For obscure reason, the right paren goes _after_
the d2:7 (which is what I want, but looks weird
in the source code).

Please note: I love the lilypond and even more the _community_ around
it, so don't take my observations as destructive as they really don't
want to be :)

--strk;



_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Not Nice Review of the LilyPond

Omer Katzir
In reply to this post by Sandro Santilli-2
Well, I gotta say. I feel the same as the writer. LP is powerful and extremely accurate. But some things are hard to find in the documents and I think that was the point of the writer. 

Sent from my iPhone

On 2 Dec 2018, at 17:34, Sandro Santilli <[hidden email]> wrote:

On Sun, Dec 02, 2018 at 03:26:44PM +0100, Thomas Morley wrote:
Am So., 2. Dez. 2018 um 14:01 Uhr schrieb Sandro Santilli <[hidden email]>:

Very obscure way to put chords
in parenthesis (I asked yesterday).

I beg to differ.

Really ? And right after this statement you post a 36 lines
snippet of code full of parens ? :P

I know Lilypond is powerful, that's why I still use it, but
it's hard not to notice how obscure its code is (what is it,
scheme?)

--strk;

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Not Nice Review of the LilyPond

mskala
In reply to this post by David Sumbler
On Sun, 2 Dec 2018, David Sumbler wrote:
> > But MusiXTeX can do "if" statements.

> I felt that an "if" would be useful, so I eventually came up with:

That is useful for conditional includes, but it can't be embedded in the
data structure that LilyPond calls "music" and stores in variables.  As
soon as something is turned into "music" it has to be data, not code;
conditionals must either be evaluated before the input is turned into
"music," or by separate code (usually, in Scheme rather than in LilyPond
as such) that conditionally modifies the static "music."  That latter
approach, with tags in the "music" that can be filtered out, is what's
usually recommended as a substitute for real conditionals in LilyPond, but
it's quite limiting compared to what programming languages can do with
"if."

For those familiar with programming languages it's not so mysterious why
this situation comes about.  LilyPond takes care to call its variables
variables in the documentation.  You reference them; you don't execute
them.  They contain data, not code.  Obviously, data will be the same
every time you look at it, unless you externally change it.  But I wish
that without escaping to Scheme I could have something more like a macro
than like a variable, evaluating its conditionals (and doing other
programming-language stuff) every time it is used.

--
Matthew Skala
[hidden email]                 People before tribes.
http://ansuz.sooke.bc.ca/

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
12