Hi,
Let me first point out that you have to remember object type matters.
ly:music-property expects music object, not pitch object or anything else, so you have to
give a music object to it, like this:
(display-scheme-music
(car (ly:music-property #{ \mark "A" c'4 #}
'elements)))
which gives
(make-music (quote MarkEvent) (quote label) "A")
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
example:
\displayMusic \insMark "A" { c'4 }
=>
(make-music
'SequentialMusic
'elements
(list (make-music (quote MarkEvent) (quote label) "A")
(make-music
'NoteEvent
'duration
(ly:make-duration 2 0 1)
'pitch
(ly:make-pitch 0 0 0))))
BTW, have you read the extending manuagl?