Am 30.11.2015 um 09:27 schrieb Urs Liska:
> Hi David,
>
> now finally to this one ...
>
> Am 28.11.2015 um 10:52 schrieb David Kastrup:
>> Urs Liska <[email protected]> writes:
>>
>>> If someone might want to have a second look at the actual code it's
>>> (currently) in
>>> https://github.com/openlilylib/snippets/blob/just-intonation-stub/notation-snippets/just-intonation/definitions.ily,
>>> towards the end where it reads "(append (color-music col) ..."
>> Well, obviously you could just write
>>
>> #{ #@(color-music col) $pitch $duration -#(format "~@f" cent) #}
>>
>> instead of
>>
>>     (make-music
>>      'SequentialMusic
>>      'elements
>>      (append
>>       (color-music col)
>>       (list
>>        (make-music
>>         'NoteEvent
>>         'articulations
>>         (list (make-music
>>                'TextScriptEvent
>>                'text (format "~@f" cent)))
>>         'pitch pitch
>>         'duration ji-duration))))
>>
>> And it would likely result in somewhat better point-and-click behavior
>> out of the box (of course, one can fix the above make-music calls for
>> the same effect if it's a matter of professional pride).
> Indeed, that's much better and produces point-and-click *at all*. And
> especially it looks much more expandable once I might want to add more
> bells and whistles to the generated music.
>
> How would I find out about that solution? What I came up with was the
> result of taking \displayMusic's result as a model.
>
> Concretely: Can you tell me what the "#@" in front of (color-music does?

Maybe, not for having someone else do the work for me but as an
incentive to learn:

I assume I could also rewrite the following code in a similar fashion?

% Produce the code for coloring one grob in a (make-music) expression
#(define (color-element grob color)
   (make-music
    'ContextSpeccedMusic
    'context-type
    'Bottom
    'element
    (make-music
     'OverrideProperty
     'once
     #t
     'pop-first
     #t
     'grob-value
     color
     'grob-property-path
     (list (quote color))
     'symbol
     grob)))

What would that be in the newer, LilyPond-ish syntax?

TIA
Urs
>
> Thanks
> Urs
>
>
> _______________________________________________
> lilypond-user mailing list
> [email protected]
> https://lists.gnu.org/mailman/listinfo/lilypond-user


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

Reply via email to