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)
\displayMusic { \insMark "A" c'4 }
%\displayMusic \insMark { "A" c'4 } %tryed that too
%\relative c' { \insMark "A" c'4 } %that too
after insMark =* was a strange invisible character with code 160, Hex 00a0, Octal 240 and becouse of that it wouldn't want to pass..
"no-break space" from unicode.
> (to make it worse, this character code is displayed as space by most
> text editors....).
On Mon, May 6, 2013 at 11:40 AM, David Kastrup
<address@hidden> wrote:
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
--
Nesmotren govori kao da mačem probada, a jezik je mudrih iscjeljenje. Izreke 12:18