lilypond-devel
[Top][All Lists]
Advanced

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

Re: display-scheme-music not working inside markup-command-definition?


From: Thomas Morley
Subject: Re: display-scheme-music not working inside markup-command-definition?
Date: Fri, 17 Apr 2015 01:36:09 +0200

2015-04-16 4:06 GMT+02:00 David Kastrup <address@hidden>:
> Thomas Morley <address@hidden> writes:
>
>> Hi,
>>
>> exploring chordnaming further, I thought it might be nice, if a
>> formating procedures for ChordNames could be used in a markup-command
>> outputting equal designed chord-names.
>>
>> Though, looks like I have a problem:
>>
>> #(display-scheme-music #{ \chordmode { c:m } #})
>> works ofcourse.
>>
>> But for
>>
>> #(define-markup-command (foo parser location)()
>>   (display-scheme-music #{ \chordmode { c:m } #})
>>   (interpret-markup parser location "xy"))
>>
>> \markup \foo
>>
>> I get this:
>>
>> Preprocessing graphical
>> objects.../home/harm/lilypond-git/build/out/share/lilypond/current/scm/parser-ly-from-scheme.scm:70:21:
>> In procedure ly:parser-clone in expression (ly:parser-clone parser
>> closures ...):
>> /home/harm/lilypond-git/build/out/share/lilypond/current/scm/parser-ly-from-scheme.scm:70:21:
>> Wrong type argument in position 1 (expecting Lily_parser): #<
>> Output_def>
>>
>> I've not a real clue what's wrong and how to fix/proceed.
>>
>> Any hint?
>
> #{ #} expects a usable "parser" and "location" variable to be in scope.
>
> However, inside of a definition
>
>> #(define-markup-command (foo parser location)()
>
> "parser" would be a layout definition, and "location" would be a
> property list of alists.  I strongly suggest not tampering with the
> usual "layout props" variable names here.  Even though _those_ are not
> magic, the names "parser" and "location" are when encountering #{...#}.
>
> The parser (and thus the notename language) will be the one active in
> the file containing the define-markup-command as long as you don't mess
> with them.  location will likely be #f, making point-and-click point to
> the #{...#} construct itself.
>
> --
> David Kastrup

Aarggh.
I confused the default-arguments for a music-function (parser layout)
with those for a markup-command.
I really should not post anything (or work on code) being overtired.

Sorry for the noise.
  Harm



reply via email to

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