]> git.donarmstrong.com Git - lilypond.git/blob - ly/chord-repetition-init.ly
Web-ja: update introduction
[lilypond.git] / ly / chord-repetition-init.ly
1 %%% -*- Mode: Scheme -*-
2 \version "2.19.22"
3 %{
4   Chord repetition behavior is not customizable in the parser.  That
5   is due to it usually being done by the toplevel music handler
6   affecting every bit of music at the same time, not closely related
7   to music input.  Customized behavior is instead accomplished by
8   calling \chordRepeats explicitly on some music list with a list of
9   event types you wish to keep by default (if any events of that kind
10   are found already on the repeat chord, however, they still get
11   removed from the original).
12
13   The default behavior is straightforward: don't keep anything but the
14   rhythmic events themselves.
15 %}
16
17 chordRepeats =
18 #(define-music-function (event-types music)
19    ((list? '()) ly:music?)
20    "Walk through @var{music} putting the notes of the previous chord
21 into repeat chords, as well as an optional list of @var{event-types}
22 such as @code{#'(string-number-event)}."
23    (expand-repeat-chords! (cons 'rhythmic-event event-types) music))
24
25 tabChordRepeats =
26 #(define-music-function (event-types music)
27    ((list? '()) ly:music?)
28    "Walk through @var{music} putting the notes, fingerings and string
29 numbers of the previous chord into repeat chords, as well as an
30 optional list of @var{event-types} such as @code{#'(articulation-event)}."
31    #{ \chordRepeats
32       #(append '(string-number-event fingering-event) event-types)
33       #music
34    #})
35
36 tabChordRepetition =
37 #(define-void-function () ()
38    (_i "Include the string and fingering information in a chord repetition.
39 This function is deprecated; try using @code{\\tabChordRepeats} instead.")
40    (ly:parser-define! '$chord-repeat-events
41                       '(string-number-event fingering-event)))