lilypond-user
[Top][All Lists]
Advanced

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

Re: Problem compiling: music-functions-init.ly


From: Urs Liska
Subject: Re: Problem compiling: music-functions-init.ly
Date: Wed, 14 Nov 2018 10:32:13 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1


Am 14.11.18 um 10:06 schrieb David Kastrup:
Davide Liessi <address@hidden> writes:

Il giorno mer 14 nov 2018 alle ore 08:25 Keizen Li Qian
<address@hidden> ha scritto:
Parsing.../usr/share/lilypond/2.18.2/ly/music-functions-init.ly:564:11:
In procedure ly:music-transpose in expression (ly:music-transpose
(make-music # # ...) tonic):
/usr/share/lilypond/2.18.2/ly/music-functions-init.ly:564:11: Wrong
type (expecting pair): major
You probably wrote
\key c major
instead of
\key c \major
Well spotted.  The embarrassing thing is that we even get there: this
is something that should rather be caught earlier.  We have

key =
#(define-music-function (tonic pitch-alist)
    ((ly:pitch? '()) (list? '()))
[...]

and the word major qualifies as list? by getting converted to '(major)
which is a symbol list like needed for some override/tweak
specifications.

So it very much looks like we should use a more specific predicate than
list? for the scale type in order to not have that user error pass down
in this manner.

Suggestions?


major and minor are lists with seven number pairs where the cars are 0..6 and the cdrs are 0 or -1/2.

I'm not sure how the definition of custom scales works and how much freedom the user has to that, but I'd assume that requiring number-pairs (probably an unspecified number of pairs) with the cars forming a row of natural numbers should be the right thing.

As you mention in the other post there should be a specific predicate (why not `pitch-alist?`).

Urs




reply via email to

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