|
From: | Stjepan Horvat |
Subject: | Re: scheme function help |
Date: | Mon, 6 May 2013 12:44:14 +0200 |
When i do thisinsMark =#(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 }(make-music'SequentialMusic'elements(list (make-music'NoteEvent'elements(list (make-music (quote MarkEvent) (quote label) "A"))'duration(ly:make-duration 2 0 1)'pitch(ly:make-pitch 0 0 0))))The mark goes inside note-event element and it is not shown.
and it should be like that(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))))and David yours makes(make-music'SequentialMusic'elements(list (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))))))On Mon, May 6, 2013 at 12:32 PM, Stjepan Horvat <address@hidden> wrote:
I'm using GNU LilyPond 2.16.2 and Guile 1.8.8I found out the errorinsMark =#(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 tooafter 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:Why wouldn't you do
> 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
#{ \mark #mark #mus #})
insMark =
#(define-music-function (parser location mark mus)
(markup? ly:music?)
instead? Note that depending on the version, #mark and/or #mus might
need to be $mark or $mus instead.
--
David Kastrup
_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user
--
Nesmotren govori kao da mačem probada, a jezik je mudrih iscjeljenje. Izreke 12:18
--
Nesmotren govori kao da mačem probada, a jezik je mudrih iscjeljenje. Izreke 12:18
[Prev in Thread] | Current Thread | [Next in Thread] |