[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Modify chord-name-engraver to call capo-handler (issue4800051)
From: |
Carl Sorensen |
Subject: |
Re: Modify chord-name-engraver to call capo-handler (issue4800051) |
Date: |
Sat, 30 Jul 2011 17:22:35 -0600 |
On 7/30/11 5:15 PM, "Wols Lists" <address@hidden> wrote:
> 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 '()?
It returns '() (because you've told it to do so).
Change the if to test for
if (null? capoPitch)
HTH,
Carl
- Re: Modify chord-name-engraver to call capo-handler (issue4800051), (continued)
- Re: Modify chord-name-engraver to call capo-handler (issue4800051), lemniskata . bernoullego, 2011/07/25
- Re: Modify chord-name-engraver to call capo-handler (issue4800051), Carl . D . Sorensen, 2011/07/25
- Re: Modify chord-name-engraver to call capo-handler (issue4800051), Carl . D . Sorensen, 2011/07/25
- Re: Modify chord-name-engraver to call capo-handler (issue4800051), lemniskata . bernoullego, 2011/07/30
- Re: Modify chord-name-engraver to call capo-handler (issue4800051), Carl . D . Sorensen, 2011/07/30
- Re: Modify chord-name-engraver to call capo-handler (issue4800051), pkx166h, 2011/07/30
Re: Modify chord-name-engraver to call capo-handler (issue4800051), dak, 2011/07/30
Re: Modify chord-name-engraver to call capo-handler (issue4800051), lemniskata . bernoullego, 2011/07/31