Thomas Morley <[email protected]> writes:

> 2013/11/22 David Kastrup <[email protected]>:
>
>> #(defmacro-public make-relative (variables reference music)
>>   "The list of pitch or music variables in @var{variables} is used as
[...]
>> in contrast, does not make sense.
>> "
>>
>>   ;; pitch and music generator might be stored instead in music
>>   ;; properties, and it might make sense to create a music type of its
>>   ;; own for this kind of construct rather than using
>>   ;; RelativeOctaveMusic
>>   (define ((make-relative::to-relative-callback variables music-call 
>> ref-call)
>>            music pitch)
>>     (let* ((ref-vars (map (lambda (v)
>>                             (if (ly:pitch? v)
>>                                 (make-music 'NoteEvent 'pitch v)
>>                                 v))
>>                           variables))
>
> I didn't try it, though, two closing parens missing, c/p-error?

Not yet.  The let* is not finished yet.  The error comes later (git uses
"less" for display, and less by default cuts off lines at the edge of
the terminal).  Indeed, two closing parens after the following line
missing, well-spotted:

>>            (after-pitch (ly:make-music-relative! (apply ref-call ref-vars) 
>> pitch
>>            (actual-vars (map (lambda (v r)
>>                                (if (ly:pitch? v)
>>                                    (ly:music-property r 'pitch)
>>                                    v))
>>                              variables ref-vars))
>>            (rel-music (apply music-call actual-vars)))
>>       (set! (ly:music-property music 'element) rel-music)
>>       after-pitch))
>>   `(make-music 'RelativeOctaveMusic
>>                'to-relative-callback
>>                (,make-relative::to-relative-callback
>>                 (list ,@variables)
>>                 (lambda ,variables ,music)
>>                 (lambda ,variables ,reference))
>>                'element ,music))
>
> Cheers,
>   Harm
>
>

-- 
David Kastrup

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

Reply via email to