[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem compiling: music-functions-init.ly
From: |
David Kastrup |
Subject: |
Re: Problem compiling: music-functions-init.ly |
Date: |
Wed, 14 Nov 2018 10:27:35 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
David Kastrup <address@hidden> writes:
> 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?
Well, I can bump that rather easily (using existing predicates) to
gag.ly:2:10: error: wrong type for argument 2. Expecting list of number pairs,
found "major"
\key c
major
This is probably at best slightly less obscure to the beginner but at
least flags the right place and element in the input. To give a nicer
message, one would need a specific predicate for scales.
--
David Kastrup
- Problem compiling: music-functions-init.ly, Keizen Li Qian, 2018/11/14
- Re: Problem compiling: music-functions-init.ly, Urs Liska, 2018/11/14
- Re: Problem compiling: music-functions-init.ly, Davide Liessi, 2018/11/14
- Re: Problem compiling: music-functions-init.ly, David Kastrup, 2018/11/14
- Re: Problem compiling: music-functions-init.ly,
David Kastrup <=
- Re: Problem compiling: music-functions-init.ly, Thomas Morley, 2018/11/14
- Re: Problem compiling: music-functions-init.ly, Urs Liska, 2018/11/14
- Re: Problem compiling: music-functions-init.ly, David Kastrup, 2018/11/14
- Re: Problem compiling: music-functions-init.ly, Thomas Morley, 2018/11/14
- Re: Problem compiling: music-functions-init.ly, Keizen Li Qian, 2018/11/14
- Re: Problem compiling: music-functions-init.ly, David Kastrup, 2018/11/14
- Re: Problem compiling: music-functions-init.ly, Keizen Li Qian, 2018/11/14
- Re: Problem compiling: music-functions-init.ly, David Kastrup, 2018/11/14
- Re: Problem compiling: music-functions-init.ly, Aaron Hill, 2018/11/14
- Re: Problem compiling: music-functions-init.ly, Urs Liska, 2018/11/14