lilypond-devel
[Top][All Lists]
Advanced

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

Re: Modify chord-name-engraver to call capo-handler (issue4800051)


From: Wols Lists
Subject: Re: Modify chord-name-engraver to call capo-handler (issue4800051)
Date: Sun, 31 Jul 2011 00:15:29 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110713 Lightning/1.0b3pre Thunderbird/3.1.10

On 30/07/11 23:52, Wols Lists wrote:
> On 30/07/11 22:49, address@hidden wrote:
>> Doesn't pass a make check.
>>
>> I get an error on
>>
>> regression/fret-diagrams-string-thickness.ly
>>
>> log file shows:
>>
>> Renaming input to:
>> `/home/jlowe/lilypond-git/input/regression/fret-diagrams-string-thickness.ly'
>>
>> Interpreting music... ERROR: In procedure ly:pitch-transpose:
>> ERROR: Wrong type argument in position 2 (expecting Pitch): ()
>>
>> http://codereview.appspot.com/4800051/
>>
> I've just modified my sample code to print straight chords at the start,
> and it now fails. So it looks like the problem is in the trap that says
> "no transpose, just fall straight through to the formatter like it did
> before".
> 
> Bad error to miss ... if anybody can help me with the necessary scheme...
> 
Following up to my own post ... the relevant snippet of code is

+        (capo-pitch (ly:context-property context 'capoPitch '())))
+    (if (not capo-pitch)
+        (chord-function pitches bass inversion context)  ;; call the
chordNameFunction as of old
+        (let* ((new-pitches   ;; else transpose the pitches and do the
chord twice

What does ly:context-property return if capoPitch hasn't been set? If
I've got it right, I've told it to return '() as the default, and then
I'm testing for #f. Oops. How do I fix that? Either get context-property
to return #f (I've tried just swapping '() for #f, and it doesn't seem
to work) or change the if to test for '()?

Cheers,
Wol



reply via email to

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