On 7/30/11 5:15 PM, "Wols Lists" <[email protected]> wrote:

> On 30/07/11 23:52, Wols Lists wrote:
>> On 30/07/11 22:49, [email protected] 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 '()?

It returns '() (because you've told it to do so).

Change the if to test for

if (null? capoPitch)

HTH,

Carl


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

Reply via email to