]> git.donarmstrong.com Git - lilypond.git/blob - scm/define-music-properties.scm
Merge branch 'master' of ssh+git://gpercival@git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / scm / define-music-properties.scm
1 ;;;; music-property-description.scm -- part of generated backend documentation
2 ;;;;
3 ;;;;  source file of the GNU LilyPond music typesetter
4 ;;;;
5 ;;;; (c) 1998--2007  Han-Wen Nienhuys <hanwen@xs4all.nl>
6 ;;;;                 Jan Nieuwenhuizen <janneke@gnu.org>
7
8 (define (music-property-description symbol type? description)
9   (if (not (equal? #f (object-property symbol 'music-doc)))
10       (ly:error (_ "symbol ~S redefined") symbol))
11   (set-object-property! symbol 'music-type? type?)
12   (set-object-property! symbol 'music-doc description)
13   symbol)
14
15 (define-public all-music-properties
16   (map
17    (lambda (x) (apply music-property-description x))
18    `(
19      (X-offset ,number?
20                "Offset of resulting grob; only used for balloon texts.")
21      (Y-offset ,number?
22                "Offset of resulting grob; only used for balloon texts.")
23
24      (alteration ,number? "Alteration for figured bass.")
25      (absolute-octave ,integer?
26                       "The absolute octave for a octave check note.")
27      (articulations ,ly:music-list?
28                     "Articulation events specifically for this note.")
29      (articulation-type ,string? "Key for script definitions alist.
30
31 TODO: Consider making type into symbol.")
32      (augmented ,boolean? "This figure is for an augmented figured bass
33 (with @code{+} sign).")
34      (associated-context ,string? "Name of the Voice context associated with
35 this @code{\\newaddlyrics} section.")
36
37      (bass ,boolean? "Set if this note is a bass note in a chord.")
38      (bracket-start ,boolean? "Start a bracket here.
39
40 TODO: Use SpanEvents?")
41      (bracket-stop ,boolean? "Stop a bracket here.")
42      (break-penalty ,number? "Penalty for line break hint.")
43      (break-permission ,symbol?
44                        "Whether to allow, forbid or force a line break.")
45
46      (cautionary ,boolean? "If set, this alteration needs a
47 cautionary accidental.")
48      (change-to-id ,string? "Name of the context to change to.")
49      (change-to-type ,symbol? "Type of the context to change to.")
50      (compress-procedure ,procedure? "Compress this music expression.
51 Arg@tie{}1: the music, arg@tie{}2: factor.")
52      (context-id ,string? "Name of context.")
53      (context-type ,symbol?  "Type of context.")
54      (create-new ,boolean? "Create a fresh context.")
55
56      (delta-step ,number? "How much should a fall change pitch?")
57      (descend-only ,boolean? "If set, this @code{\\context} only descends
58 in the context tree.")
59      (denominator ,integer? "Denominator in a time signature.")
60      (digit ,integer? "Digit for fingering.")
61      (diminished ,boolean? "This bass figure should be slashed.")
62      (direction ,ly:dir? "Print this up or down?")
63      (drum-type ,symbol? "Which percussion instrument to play this note on.")
64      (duration ,ly:duration? "Duration of this note or lyric.")
65
66      (error-found ,boolean?
67                   "If true, a parsing error was found in this expression.")
68      (element ,ly:music? "The single child of a Music_wrapper music object,
69 or the body of a repeat.")
70      (elements ,ly:music-list? "A list of elements for sequential of
71 simultaneous music, or the alternatives of repeated music.")
72      (elements-callback ,procedure? "Return a list of children, for use by
73 a sequential iterator.  Takes a single music parameter.")
74      (expected-beam-count ,integer? "Expected number of non-tremolo beams
75 in a tremolo repeat.")
76
77      (figure ,integer? "A bass figure.")
78      (force-accidental ,boolean? "If set, a cautionary accidental should
79 always be printed on this note.")
80
81      (grob-property ,symbol? "The symbol of the grob property to set.")
82      (grob-property-path ,list? "A list of symbols, locating a nested grob
83 property, e.g., @code{(beamed-lengths details)}.")
84      (grob-value ,scheme? "The value of the grob property to set.")
85
86      (input-tag ,scheme? "Arbitrary marker to relate input and output.")
87      (inversion ,boolean? "If set, this chord note is inverted.")
88      (iterator-ctor ,procedure? "Function to construct a
89 @code{music-event-iterator} object for this music.")
90
91      (label ,markup? "Label of a mark.")
92      (last-pitch ,ly:pitch? "The last pitch after relativization.")
93      (length ,ly:moment? "The duration of this music.")
94      (length-callback ,procedure? "How to compute the duration of this music.
95 This property can only be defined as initializer in
96 @file{scm/@/define-music-types.scm}.")
97      (line-break-permission ,symbol? "When the music is at top-level,
98 whether to allow, forbid or force a line break.")
99
100      (metronome-count ,number? "How many beats in a minute?")
101
102      (name ,symbol? "Name of this music object.")
103      (no-continuation ,boolean? "If set, disallow continuation lines.")
104      (numerator ,integer? "Numerator of a time signature.")
105
106      (once ,boolean? "Apply this operation only during one time step?")
107      (octavation ,integer? "This pitch was octavated by how many octaves?
108 For chord inversions, this is negative.")
109      (origin ,ly:input-location? "Where was this piece of music defined?")
110
111      (page-break-permission ,symbol? "When the music is at top-level,
112 whether to allow, forbid or force a page break.")
113      (page-label ,symbol? "The label of a page marker.")
114      (page-marker ,boolean? "If true, and the music expression is found at
115 top-level, a page marker object is instanciated instead of a score.")
116      (page-turn-permission ,symbol? "When the music is at top-level,
117 whether to allow, forbid or force a page turn.")
118      (part-combine-status ,symbol? "Change to what kind of state?
119 Options are @code{solo1}, @code{solo2} and @code{unisono}.")
120      (parenthesize ,boolean? "Enclose resulting objects in parentheses?")
121      (pitch ,ly:pitch? "The pitch of this note.")
122      (pitch-alist ,list? "A list of pitches jointly forming the scale
123 of a key signature.")
124      (pop-first ,boolean? "Do a revert before we try to do a override
125 on some grob property.")
126      (prob-property ,symbol? "The symbol of the prob property to set.")
127      (procedure ,procedure? "The function to run with @code{\\applycontext}.
128 It must take a single argument, being the context.")
129      (property-operations ,list? "Do these operations for instantiating
130 the context.")
131
132      (quoted-events ,vector? "A vector of with @code{moment} and
133 @code{event-list} entries.")
134      (quoted-music-name ,string? "The name of the voice to quote.")
135      (quoted-voice-direction ,ly:dir? "Should the quoted voice be up-stem
136 or down-stem?")
137      (quoted-context-type ,symbol? "The name of the context to
138 direct quotes to, e.g., @code{Voice}.")
139      (quoted-context-id ,string? "The ID of the context to direct quotes to,
140 e.g., @code{cue}.")
141      (quoted-transposition ,ly:pitch? "The pitch used for the quote,
142 overriding @code{\\transposition}.")
143
144      (repeat-count ,integer? "Do a @code{\\repeat} how often?")
145
146      (span-direction ,ly:dir? "Does this start or stop a spanner?")
147      (span-type ,string? "What kind of spanner should be created?
148
149 TODO: Consider making type into symbol.")
150      (split-list ,list? "Splitting moments for part combiner.")
151      (start-callback ,procedure? "Function to compute the negative length
152 of starting grace notes.  This property can only be defined as initializer
153 in @file{scm/@/define-music-types.scm}.")
154      (string-number ,integer? "The number of the string in
155 a @code{StringNumberEvent.}")
156      (symbol ,symbol? "Grob name to perform an override or revert on.")
157
158      (tags ,list? "List of symbols that for denoting extra details, e.g.,
159 @code{\\tag #'part @dots{}} could tag a piece of music as only being active
160 in a part.")
161      (text-type ,symbol?
162                 "Particular type of text script (e.g., finger, dynamic).")
163      (text ,markup? "Markup expression to be printed.")
164      (tempo-unit ,ly:duration? "The unit for the metronome count.")
165      (to-relative-callback ,procedure? "How to transform a piece of music
166 to relative pitches.")
167      (tonic ,ly:pitch? "Base of the scale.")
168      (tremolo-type ,integer? "Speed of tremolo, e.g., 16 for @code{c4:16}.")
169      (trill-pitch ,ly:pitch? "Pitch of other note of the trill.")
170      (type ,symbol? "The type of this music object.
171 Determines iteration in some cases.")
172      (types ,list? "The types of this music object; determines by what
173 engraver this music expression is processed.")
174      (tweaks ,list? "An alist of properties to override in the backend
175 for the grob made of this event.")
176
177      (untransposable ,boolean? "If set, this music is not transposed.")
178
179      (value ,scheme? "Assignment value for a translation property.")
180      (void ,boolean? "If this property is @code{#t}, then the
181 music expression is to be discarded by the toplevel music handler.")
182
183      (what ,symbol? "What to change for auto-change.
184
185 FIXME: Naming.")
186     )))