lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "Creating MIDI Files" doc is wrong


From: David Kastrup
Subject: Re: "Creating MIDI Files" doc is wrong
Date: Sun, 15 Oct 2017 12:32:29 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

James Harkins <address@hidden> writes:

>> 1. If I write it as specified in the manual, I get a syntax error. 
>>  
>> 2. If I write it as above, I get no syntax error, and no MIDI file. 
>
> Never mind, I see my mistake now. I had extrapolated from \new Staff
> and \new Voice to \new Score. LilyPond accepts \new Score
> (!). Possible improvement might be to reject that wrong syntax with an
> informative error.

It isn't wrong syntax.  And there is no way to "extrapolate" since
\new Staff or \new Voice don't introduce different syntax from
\new Score and there is no \staff or \voice either.

> That mistake is entirely my own fault, of course -- the result of
> coming back to LilyPond after a few years without writing for acoustic
> instruments and trying to be clever. But it does remind me of one of
> my general gripes with LP: the number of subtle syntactic
> variations. I *always* have to look up:
>
> - Do I just write a number here, or prepend '#' -- 1.0 or #1.0?

Prepending works reliably almost anywhere, not prepending works in most
places except markup as well.

> - Single or double # for other entities? (#t vs ##t)

#t and #f are Scheme expressions (not particularly pretty ones in my
book), and if you want to use them from LilyPond, you need to prepend #
or $.  Like with _everything_ you use from Scheme inside of LilyPond.

#f in LilyPond means the music variable corresponding to the \f loudness
specification.  Valid but often not what you want.

> - Is it a (list of things), or a '(list of things), or a #'(list of things)?

(list of things) works basically nowhere.  '(list of things) works in
Scheme.  #'(list of things) works in LilyPond.  It can often be written
as list,of,things in version 2.19, though.

-- 
David Kastrup



reply via email to

[Prev in Thread] Current Thread [Next in Thread]