%% Generated by lilypond-book.py %% Options: [linewidth=160\mm,alt=[image of music],printfilename,indent=0\mm,texidoc] #(set! toplevel-score-handler ly:parser-print-score) #(set! toplevel-music-handler (lambda (p m) (ly:parser-print-score p (ly:music-scorify m p)))) #(ly:set-option (quote no-point-and-click)) #(define version-seen? #t) % **************************************************************** % Start cut-&-pastable-section % **************************************************************** \paper { #(define dump-extents #t) linewidth = 160\mm indent = 0\mm } \layout { } % **************************************************************** % ly snippet: % **************************************************************** \renameinput "add-staccato.ly" \version "2.6.0" \header { texidoc= "@cindex Add Stacato Using @code{make-music}, you can add various stuff to notes. In this example staccato dots are added to the notes. For this simple case, it is not necessary to use scm constructs (see @code{separate-staccato.ly}). " } #(define (make-script x) (make-music 'ArticulationEvent 'articulation-type x)) #(define (add-script m x) (if (equal? (ly:music-property m 'name) 'EventChord) (set! (ly:music-property m 'elements) (cons (make-script x) (ly:music-property m 'elements)))) m) #(define (add-staccato m) (add-script m "staccato")) \score { \relative c'' { a b \applymusic #(lambda (x) (music-map add-staccato x)) { c c } } \layout{ raggedright = ##t } } % **************************************************************** % end ly snippet % ****************************************************************