1 ;;;; define-context-properties.scm -- part of backend documentation
3 ;;;; source file of the GNU LilyPond music typesetter
5 ;;;; (c) 1998--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
6 ;;;; Jan Nieuwenhuizen <janneke@gnu.org>
9 (define-public all-translation-properties '())
11 (define (translator-property-description symbol type? description)
15 (string? description)))
16 (throw 'init-format-error))
19 (if (not (equal? #f (object-property symbol 'translation-doc)))
20 (ly:error (_ "symbol ~S redefined" symbol)))
22 (set-object-property! symbol 'translation-type? type?)
23 (set-object-property! symbol 'translation-doc description)
24 (set! all-translation-properties (cons symbol all-translation-properties))
27 (define-public all-user-translation-properties
30 (apply translator-property-description x))
35 (aDueText ,string? "Text to print at a unisono passage.")
36 (alignBelowContext ,string? "Where to insert newly created context in vertiical alignment.")
37 (alignAboveContext ,string? "Where to insert newly created context in vertiical alignment.")
38 (alignBassFigureAccidentals ,boolean?
39 "If true, then the accidentals are aligned in bass figure context.")
41 (allowBeamBreak ,boolean? "If true allow line breaks for beams over bar lines.")
42 (associatedVoice ,string? "Name of the
43 @code{Voice} that has the melody for this @code{Lyrics} line.")
44 (autoBeamSettings ,list? "Specifies
45 when automatically generated beams should begin and end.
46 See @usermanref{Setting automatic beam behavior} for more information.
48 (autoAccidentals ,list? "List of
49 different ways to typeset an accidental.
51 For determining when to print an accidental, several different rules
52 are tried. The rule that gives the highest number of accidentals is
53 used. Each rule consists of
58 In which context is the rule applied. For example, if
59 @var{context} is @internalsref{Score} then all staves share
60 accidentals, and if @var{context} is @internalsref{Staff} then all
61 voices in the same staff share accidentals, but staves do not.
64 Whether the accidental changes all octaves or only the current
65 octave. Valid choices are
69 This is the default algorithm. Accidentals are typeset if the note changes
70 the accidental of that note in that octave. Accidentals lasts to the end of the measure
71 and then as many measures as specified in the value. I.e. 1 means to the end
72 of next measure, -1 means to the end of previous measure (that is: no duration at all), etc. #t means forever.
74 Accidentals are typeset if the note is different from
75 the previous note on the same pitch in any octave. The value has same meaning as in
81 Over how many bar lines the accidental lasts.
82 If @var{laziness} is @code{-1} then the accidental is forgotten
83 immediately, and if @var{laziness} is @code{#t} then the accidental
87 (autoBeamCheck ,procedure? "Procedure taking three
88 arguments, CONTEXT, DIR start/stop (-1 or 1) and TEST shortest
89 note in the beam. A non-#f return value starts or stops the auto beam.")
90 (autoBeaming ,boolean? "If set to true then beams are generated
93 (autoCautionaries ,list? "List similar to
94 @code{autoAccidentals}, but it controls cautionary accidentals rather than
95 normal ones. Both lists are tried, and the one giving the most accidentals
96 wins. In case of draw, a normal accidental is typeset.
98 (automaticBars ,boolean? " If set to true then bar lines will not be
99 printed automatically; they must be explicitly created with
100 @code{\\bar} command. Unlike the @code{\\cadenza} keyword, measures
101 are still counted. Bar generation will resume according to that count
102 if this property is unset.
105 (barAlways ,boolean? "If set to true a bar line is drawn after each
108 (barCheckSynchronize ,boolean? "If true then reset @code{measurePosition}
109 when finding a barcheck.")
111 (barNumberVisibility ,procedure? "Procedure that takes an int and
112 returns whether the corresponding bar number should be printed")
113 (bassStaffProperties ,list? "Alist of property settings to apply
114 for the down staff of PianoStaff. Used by @code{\\autochange}")
115 (trebleStaffProperties ,list? "Alist of property settings to apply
116 for the up staff of PianoStaff. Used by @code{\\autochange}")
118 (figuredBassFormatter ,procedure? "Routine generating a markup
120 (bassFigureFormatFunction ,procedure? "Procedure that is called
121 to produce the formatting for a @code{BassFigure} grob. It takes a
122 list of @code{BassFigureEvent}s, a context, and the grob to format.")
124 (beatLength ,ly:moment? "The length of one beat in this time signature.")
126 "List of beatgroups, e.g., in 5/8 time @code{'(2
131 (middleCPosition ,number? "Place of the middle C, measured in half
132 staff-spaces. Usually determined by looking at @code{clefPosition} and
135 (chordNameFunction ,procedure?
136 "The function that converts lists of pitches to chord names.")
137 (chordNoteNamer ,procedure?
138 "Function that converts from a pitch object to a text markup. Used for single pitches.")
139 (chordRootNamer ,procedure?
140 "Function that converts from a pitch object to a text markup. Used for chords.")
141 (chordNameExceptions ,list?
142 "An alist of chord exceptions.
143 Contains (@var{chord} . @var{markup}) entries.")
144 (chordNameExceptionsFull ,list?
145 "An alist of chord exceptions.
146 Contains (@var{chord} . @var{markup}) entries.")
147 (chordNameExceptionsPartial
149 "An alist of partial chord exceptions. Contains (@var{chord} . (@var{prefix-markup} @var{suffix-markup})) entries.")
151 (chordNameSeparator ,markup?
152 "The markup object used to separate
153 parts of a chord name.")
154 (chordPrefixSpacer ,number?
155 "The space added between the root symbol and the prefix
157 (chordChanges ,boolean? "Only show changes in chords scheme?")
158 (clefGlyph ,string? "Name of the symbol within the music font.")
159 (clefOctavation ,integer? "Add
160 this much extra octavation. Values of 7 and -7 are common.")
162 (clefPosition ,number? "Where should the center of the clef
163 symbol go, measured in half staff spaces from the center of the staff.")
165 (connectArpeggios ,boolean? " If set, connect arpeggios across
167 (countPercentRepeats ,boolean? "If set, produce counters for
169 (createKeyOnClefChange ,boolean? "Print a key signature whenever the clef is changed.")
170 (createSpacing ,boolean? "Create @code{StaffSpacing} objects?
171 Should be set for staves.")
172 (crescendoText ,markup? "Text to print at start of non-hairpin crescendo, i.e.: @samp{cresc.}")
173 (crescendoSpanner ,symbol? "Type of spanner to be used for crescendi.
174 One of: @samp{hairpin}, @samp{line}, @samp{dashed-line},
175 @samp{dotted-line}. If unset, hairpin type is used.")
176 (decrescendoText ,markup? "Text to print at start of non-hairpin decrescendo, i.e.: @samp{dim.}")
178 (drumPitchTable ,hash-table? "A table mapping percussion
179 instruments (symbols) to pitches.")
181 (drumStyleTable ,hash-table? "A hash table containing mapping
182 drums to layout settings. Predefined values: @samp{drums-style},
183 @samp{timbales-style}, @samp{congas-style}, @samp{bongos-style} and
184 @samp{percussion-style}.
186 The layout style is a hash table, containing the drum-pitches (e.g. the
187 symbol @samp{hihat}) as key, and a list (@var{notehead-style}
188 @var{script} @var{vertical-position}) as values.
190 (currentBarNumber ,integer? "Contains the current barnumber. This property is incremented at every bar line. ")
191 (defaultBarType ,string? "Sets the default type of bar line.
192 See @code{whichBar} for information on available bar types.
194 This variable is read by @internalsref{Timing_translator} at
195 @internalsref{Score} level.
198 (decrescendoSpanner ,symbol? "See @code{crescendoSpanner}.")
199 (doubleSlurs ,boolean?
200 "When set, two slurs are created for every slurred
201 note, one above and one below the chord.")
202 (explicitClefVisibility ,vector? "@samp{break-visibility} function for clef changes.")
204 (explicitKeySignatureVisibility ,vector?
205 "@samp{break-visibility} function for explicit key
206 changes. @samp{\\override} of the @code{break-visibility} property will set the
207 visibility for normal (i.e. at the start of the line) key signatures.")
209 (extraNatural ,boolean? "Whether to typeset an
210 extra natural sign before accidentals changing from a non-natural to
211 another non-natural.")
213 (figuredBassCenterContinuations ,boolean? "Whether to vertically center pairs of extender lines. This does not work with three or more lines")
214 (figuredBassPlusDirection ,ly:dir? "Where to put plus signs relative to the the main figure.")
216 (figuredBassAlterationDirection ,ly:dir? "Where to put
217 alterations relative to the main figure.")
218 (followVoice ,boolean? "If set, note heads are tracked across staff
219 switches by a thin line")
222 "The relative size of all grobs in a context. ")
224 (forbidBreak ,boolean? "If set to ##t, prevent a line break at this point.")
226 (fingeringOrientations ,list?
227 "List of symbols, containing
228 @samp{left}, @samp{right}, @samp{up} and/or @samp{down}. This list
229 determines where fingerings are put relative to the chord being
232 (firstClef ,boolean? "If true, create a new clef when starting a
234 (forceClef ,boolean? "Show clef symbol, even if it has not
235 changed. Only active for the first clef after the property is set, not
236 for the full staff.")
237 (gridInterval ,ly:moment?
238 "Interval for which to generate @ref{GridPoint}s")
240 (hairpinToBarline ,boolean? "If set, end a hairpin at the barline before the ending note.")
242 (harmonicAccidentals ,boolean? "If set, harmonic notes in chords
244 (highStringOne ,boolean? "Whether the 1st string is the string with
245 highest pitch on the instrument. This used by the automatic string
246 selector for tab notation.")
248 (ignoreFiguredBassRest ,boolean? "Don't swallow rest events.")
249 (ignoreBarChecks ,boolean? "Ignore bar checks")
250 (ignoreMelismata ,boolean? "Ignore melismata for this @internalsref{Lyrics} line.")
252 (implicitBassFigures ,list? "List of bass figures that are not
253 printed as numbers, but only as extender lines.")
256 (instrumentCueName ,markup? "Name to print if another instrument is to be taken.")
257 (instrumentName ,markup? "The name to print left of a staff. The
258 @code{instrument} property labels the staff in the first system, and
259 the @code{instr} property labels following lines.")
260 (instrumentEqualizer ,procedure? "
261 Function taking a string (instrument name), and returning a (@var{min} . @var{max}) pair of numbers for the loudness range of the instrument.
263 (instrumentTransposition ,ly:pitch? "Defines the transposition of
264 the instrument. Its value is the pitch that sounds like middle C. This
265 is used to transpose the MIDI output, and @code{\\quote}s.")
267 (internalBarNumber ,integer? "Contains the current barnumber. This property is used for internal timekeeping, among others by the @code{Accidental_engraver}.")
269 (keepAliveInterfaces ,list? "List of symbols, signifying grob interfaces that
270 are worth keeping an staff with @code{remove-empty} set around for.")
271 (keyAlterationOrder ,list? " Alist that defines in what order
272 alterations should be printed. The format is (@var{step}
273 . @var{alter}), where @var{step} is from 0 .. 6 and @var{alter} from
274 -2 (sharp) and 2 (flat).
277 (keySignature ,list? "The current key signature. This is an alist
278 containing (@var{name} . @var{alter}) or ((@var{octave} . @var{name}) . @var{alter}).
279 where @var{name} is from 0.. 6 and
280 @var{alter} from -4 (double flat) to 4 (double sharp).
282 (majorSevenSymbol ,markup? "How should
283 the major 7th be formatted in a chord name?")
284 (markFormatter ,procedure? "Procedure
285 taking as arguments context and rehearsal mark. It should return the
286 formatted mark as a markup object.")
288 (measureLength ,ly:moment? "Length of one
289 measure in the current time signature.")
291 (measurePosition ,ly:moment? "How much of the current measure
292 have we had. This can be set manually to create incomplete
295 (melismaBusyProperties ,list? "List of properties (symbols) to
296 determine whether a melisma is playing. Setting this property will
297 influence how lyrics are aligned to notes. For example, if set to
298 @code{#'(melismaBusy beamMelismaBusy)}, only manual melismata and
299 manual beams are considered. Possible values include
300 @code{melismaBusy}, @code{slurMelismaBusy}, @code{tieMelismaBusy}, and
301 @code{beamMelismaBusy}")
304 (metronomeMarkFormatter ,procedure? "How to produce a metronome
305 markup. Called with 2 arguments, event and context.")
306 (midiInstrument ,string? "Name of the MIDI instrument to use ")
307 (midiMinimumVolume ,number? "Sets the minimum loudness for MIDI. Ranges from 0 to 1.")
308 (midiMaximumVolume ,number? "Analogous to @code{midiMinimumVolume}.")
309 (minimumFret ,number? "The tablature auto string-selecting mechanism
310 selects the highest string with a fret at least @code{minimumFret}")
311 (maximumFretStretch ,number? "Don't allocate frets further than this from specified frets.")
312 (minimumPageTurnLength ,ly:moment? "Minimum length of a rest for a page turn to be allowed")
313 (minimumRepeatLengthForPageTurn ,ly:moment? "Minimum length of a repeated section for a page
314 turn to be allowed within that section")
315 (output ,ly:music-output? "The output produced by a score-level translator during music interpretation")
316 (ottavation ,string? "If set, the text for an ottava spanner. Changing
317 this creates a new text spanner. ")
318 (noteToFretFunction ,procedure? "How to produce a fret diagram. Parameters: list of note events and list of tabstring events.")
319 (pedalSustainStrings ,list? "List of string to print for
320 sustain-pedal. Format is (@var{up} @var{updown} @var{down}), where
321 each of the three is the string to print when this is done with the
323 (pedalUnaCordaStrings ,list? "See @code{pedalSustainStrings}.")
324 (pedalSostenutoStrings ,list? "See @code{pedalSustainStrings}.")
325 (pedalSustainStyle ,symbol? "A symbol that indicates how to print
326 sustain pedals: @code{text}, @code{bracket} or @code{mixed} (both).")
327 (pedalUnaCordaStyle ,symbol? "see @code{pedalSustainStyle}.")
328 (pedalSostenutoStyle ,symbol? "see @code{pedalSustainStyle}.")
329 (printKeyCancellation ,boolean? "Print restoration alterations before a key signature change. ")
330 (printPartCombineTexts ,boolean? "set Solo/A due texts in the part combiner?")
331 (printOctaveNames ,boolean? "Print octave marks for the NoteNames context.")
333 (proportionalNotationDuration ,ly:moment? "Global override for
334 shortest-playing duration. This is used for switching on proportional
336 (recordEventSequence ,procedure? "When Recording_group_engraver
337 is in this context, then upon termination of the context, this
338 function is called with current context and a list of music objects.
339 The list of contains entries with start times, music objects and
340 whether they are processed in this context.")
342 (rehearsalMark ,integer? "The last rehearsal mark printed.")
343 (repeatCommands ,list? "This property is read to find any command of the form @code{(volta . @var{x})}, where @var{x} is a string or @code{#f}")
344 (restNumberThreshold ,number?
345 "If a multimeasure rest has more measures
346 than this, a number is printed. ")
347 (shapeNoteStyles ,vector? "Vector of symbols, listing style for each note
348 head relative to the tonic (qv.) of the scale.")
349 (shortInstrumentName ,markup? "See @code{instrument}")
350 (shortVocalName ,markup? "Name of a vocal line, short version.")
351 (skipBars ,boolean? "If set to true, then
352 skip the empty bars that are produced by multimeasure notes and rests.
353 These bars will not appear on the printed output. If not set (the
354 default) multimeasure notes and rests expand into their full length,
355 printing the appropriate number of empty bars so that synchronization
356 with other voices is preserved.
362 \\set Score.skipBars= ##t
367 (skipTypesetting ,boolean?
368 "When true, all no typesetting is done, speeding
369 up the interpretation phase. This speeds up debugging large scores.")
370 (soloIIText ,string? "text for begin of solo for voice ``two'' when part-combining.")
371 (soloText ,string? "text for begin of solo when part-combining.")
372 (squashedPosition ,integer? " Vertical position of
373 squashing for @internalsref{Pitch_squash_engraver}.")
375 (stringNumberOrientations ,list? "See @code{fingeringOrientations}")
376 (strokeFingerOrientations ,list? "See @code{fingeringOrientations}")
377 (stringOneTopmost ,boolean? "Whether the 1st string is printed on the
378 top line of the tablature.")
380 (stanza ,markup? "Stanza `number' to print before the start of a
381 verse. Use in Lyrics context.")
383 (stemLeftBeamCount ,integer? " Specify the number of beams to draw on
384 the left side of the next note. Overrides automatic beaming. The
385 value is only used once, and then it is erased.")
387 (stemRightBeamCount ,integer? "See @code{stemLeftBeamCount}.")
389 (stringTunings ,list? "The tablature strings tuning. It is a list
390 of the pitch (in semitones) of each string (starting with the lower
393 (subdivideBeams ,boolean? "If set, multiple beams will be subdivided
394 at beat positions by only drawing one beam over the beat.")
395 (suggestAccidentals ,boolean? "If set, accidentals are typeset as cautionary suggestions over the note.")
397 (systemStartDelimiterHierarchy ,pair? "A nested list, indicating the nesting of a start delimiters.")
399 (systemStartDelimiter ,symbol? "Which grob to make for the start of
400 the system/staff? Set to @code{SystemStartBrace},
401 @code{SystemStartBracket} or @code{SystemStartBar}.")
403 (tablatureFormat ,procedure? "Function formatting a tab note head; it
404 takes a string number, a list of string tunings and Pitch object. It
405 returns the text as a string.")
407 (tieWaitForNote ,boolean? "If true, tied notes do not have to follow each other directly.
408 This can be used for writing out arpeggios")
409 (timeSignatureFraction ,number-pair?
410 "pair of numbers, signifying the time
411 signature. For example @code{#'(4 . 4)} is a 4/4 time signature.")
413 (timing ,boolean? " Keep administration of measure length, position, bar number, etc?
414 Switch off for cadenzas.")
416 "The tonic of the current scale")
418 (tremoloFlags ,integer? "Number of tremolo flags to add if no
419 number is specified.")
421 (tupletFullLength ,boolean? "If set, the tuplet is printed up to
422 the start of the next note.")
423 (tupletFullLengthNote ,boolean? "If set, end at the next note, otherwise end on the matter (time sigs, etc.) before the note.")
424 (tupletSpannerDuration ,ly:moment? "
425 Normally a tuplet bracket is as wide as the
426 @code{\\times} expression that gave rise to it. By setting this
427 property, you can make brackets last shorter. Example
431 \\set tupletSpannerDuration = #(ly:make-moment 1 4)
432 \\times 2/3 @{ c8 c c c c c @}
437 (useBassFigureExtenders ,boolean? "Whether to use extender lines
438 for repeated bass figures")
440 (verticallySpacedContexts ,list? "List of symbols, containing
441 context names whose vertical axis groups should be taken into account for
442 vertical spacing of systems.")
444 (vocalName ,markup? "Name of a vocal line.")
446 (voltaOnThisStaff ,boolean?
447 "Normally, volta brackets are put only on the
448 topmost staff. This variable overrides this behavior, when set to
449 @code{#t} or @code{#f}.")
451 (voltaSpannerDuration ,ly:moment? "This specifies the maximum duration
452 to use for the brackets printed for @code{\\alternative}. This can be
453 used to shrink the length of brackets in the situation where one
454 alternative is very large.")
458 "This property is read to determine what type of bar line to create.
462 \\set Staff.whichBar = \"|:\"
465 This will create a start-repeat bar in this staff only.
466 Valid values are described in @internalsref{bar-line-interface}.
468 (tempoWholesPerMinute ,ly:moment? "The tempo in whole notes per minute.")
469 (tempoUnitDuration ,ly:duration? "Unit for specifying tempo.")
470 (tempoUnitCount ,number? "Count for specifying tempo.")
474 (define-public all-internal-translation-properties
477 (set-object-property! (car x) 'internal-translation #t)
478 (apply translator-property-description x)
482 `((slurMelismaBusy ,boolean? "Signal if a slur is present.")
483 (originalCentralCPosition
485 "Used for temporary overriding middle C in octavation brackets. ")
486 (melismaBusy ,boolean? "Signifies
487 whether a melisma is active. This can be used to signal melismas on
488 top of those automatically detected. ")
489 (graceSettings ,list?
490 "Overrides for grace notes. This property should
491 be manipulated through the @code{add-grace-property} function.")
492 (currentCommandColumn ,ly:grob? "Grob that is X-parent to all
493 current breakable (clef, key signature, etc.) items.")
494 (currentMusicalColumn ,ly:grob? "Grob that is X-parent to all
495 non-breakable items (note heads, lyrics, etc.).")
496 (breakableSeparationItem ,ly:grob?
497 "The breakable items in this time step,
500 (localKeySignature ,list? "the key signature at this point in the
501 measure. The format is the same as for keySignature, but can also
502 contain ((@var{octave} . @var{name}) . (@var{alter} . @var{barnumber}))
503 pairs. It is reset at every bar line.")
506 (localKeySignatureChanges ,list? "Experimental. [DOCME]")
508 (finalizations ,list? "List of expressions to evaluate before proceeding to next time step. Internal variable.")
509 (busyGrobs ,list? "a queue of (@var{end-moment} . @var{GROB})
510 conses. This is for internal (C++) use only. This property contains
511 the grobs which are still busy (e.g. note heads, spanners, etc.)
513 (barCheckLastFail ,ly:moment? "Where in the measure did the last barcheck fail?")
514 (associatedVoiceContext ,ly:context? "The context object of the Voice that has the melody for this Lyrics.")
515 (beamMelismaBusy ,boolean? "Signal if a beam is present.")
516 (dynamicAbsoluteVolumeFunction ,procedure? "[DOCUMENT-ME]")
518 (lastKeySignature ,list? "Last key signature before a key
520 (rootSystem ,ly:grob? "The System object")
521 (scriptDefinitions ,list? "Description of scripts. This is used by
522 Script_engraver for typesetting note-super/subscripts. See
523 @file{scm/script.scm} for more information
525 (quotedEventTypes ,list? "List of symbols, representing the
526 event types that should be duplicated for @code{\\quote} commands.")
528 ; (quotes ,hash-table? "Hash table, mapping names to music-event vectors.")
529 (stavesFound ,grob-list? "list of all staff-symbols found.")
530 (instrumentSupport ,grob-list? "list of grobs to attach instrument name
532 (tieMelismaBusy ,boolean? "Signal whether a tie is present.")
535 (define-public all-translation-properties
536 (append all-user-translation-properties
537 all-internal-translation-properties))
539 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
541 (define-public default-melisma-properties '(melismaBusy slurMelismaBusy tieMelismaBusy beamMelismaBusy))