lilypond-user
[Top][All Lists]
Advanced

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

Re: scheme function help


From: David Kastrup
Subject: Re: scheme function help
Date: Mon, 06 May 2013 11:40:11 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Madoka Machitani <address@hidden> writes:

> Now, is it correct to assume you are trying to achieve something like
> this?  \insMark "a" musical-sequence
>
> If so, the function would be:
>
> insMark =
> #(define-music-function (parser location mark mus)
>    (markup? ly:music?)
>    (set! (ly:music-property mus 'elements)
>          (cons (make-music 'MarkEvent 'label mark)
>                (ly:music-property mus 'elements)))
>    mus)
>
> This is a crude example and won't work with single note events like c'4

Why wouldn't you do

insMark =
#(define-music-function (parser location mark mus)
   (markup? ly:music?)
   #{ \mark #mark #mus #})

instead?  Note that depending on the version, #mark and/or #mus might
need to be $mark or $mus instead.

-- 
David Kastrup




reply via email to

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