Antoniouk Sergio <[EMAIL PROTECTED]> writes:
> This is a little strange that lilypond have no ability to do it -
> music with lot of staccato notes is common case.
That is not strange if you consider LilyPond is a typesetter, not an
editor or macro processor.
> Proposed solution is not good enough because I don't want to set
> staccato mark for each note in piece, just for most of them like
> this
>
> c-. d-. e-. f g a-. h-. c-. d e-. f-. g-. a h-. ... and so on
Try:
[will add this to input/test]
#(define (make-script x)
(let ((m (ly-make-music "Articulation_req")))
;;(ly-set-mus-property m 'articulation-type 'staccato)
;; urg
(ly-set-mus-property m 'articulation-type x)
(ly-set-mus-property m 'script x)
m))
#(define (add-script m x)
(if (equal? (ly-music-name m) "Request_chord")
(ly-set-mus-property m 'elements
(cons (make-script x)
(ly-get-mus-property m 'elements)))
(let ((es (ly-get-mus-property m 'elements))
(e (ly-get-mus-property m 'element)) )
(map (lambda (y) (add-script y x)) es)
(if (music? e)
(add-script e x))))
m)
#(define (add-staccato m)
(add-script m "staccato"))
\score {
\notes\relative c'' {
a b \apply #add-staccato { c c }
a b \apply #add-staccato { c c }
}
}
--
Jan Nieuwenhuizen <[EMAIL PROTECTED]> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien | http://www.lilypond.org
_______________________________________________
Lilypond-user mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/lilypond-user