[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
updated files for (doc help) applyMusic -> music functions: add-staccato
From: |
Michael Meixner |
Subject: |
updated files for (doc help) applyMusic -> music functions: add-staccato.ly |
Date: |
Wed, 7 Jun 2006 14:54:00 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Hello!
Here are my attempts in updating for snippets for the Tricks & Tips section.
They compile correctly on my LP ver. 2.9.7
"add-staccato.ly"
% ****************************************************************
% Start cut-&-pastable-section
% ****************************************************************
\paper {
#(define dump-extents #t)
indent = 0\mm
line-width = 160\mm
}
\layout {
}
% ****************************************************************
% ly snippet:
% ****************************************************************
\sourcefilename "add-staccato.ly"
\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."
}
#(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"))
addStacc =
#(define-music-function (parser location music)
(ly:music?)
(music-map add-staccato music))
\score {
\relative c'' {
a b \addStacc { c c }
}
\layout{ ragged-right = ##t }
}
% ****************************************************************
% end ly snippet
% ****************************************************************
- updated files for (doc help) applyMusic -> music functions: add-staccato.ly,
Michael Meixner <=