1 (define (number-or-string? x) (or (number? x) (string? x)))
2 (define (engraver-description name description created-elts properties)
3 (list name description created-elts properties)
6 (define (translator-property-description symbol type? description)
7 (list symbol type? description)
10 (define engraver-description-alist
16 "Create stems and single-stem tremolos"
19 (translator-property-description 'tremoloFlags integer? "")
20 (translator-property-description 'stemLeftBeamCount integer? "
21 Specify the number of beams to draw on the left side of the next note.
22 Overrides automatic beaming. The value is only used once, and then it
25 (translator-property-description 'stemRightBeamCount integer? "idem, for the right side")
32 "Create lyric hyphens"
41 "Create lyric extenders"
48 'Separating_line_group_engraver
50 "Separating_line_group_engraver"
51 "Generates objects for computing spacing parameters."
52 '(SeparationItem SeparatingGroupSpanner)
60 "Group all objects created in this context in a VerticalAxisGroup spanner."
63 (translator-property-description
64 'CONTEXTNAMEVerticalExtent number-pair? "hard coded vertical extent.
65 The format is a pair of dimensions, for example, this sets the sizes
66 of a staff to 10 (5+5) staffspaces high. <p>
69 \property Staff.StaffVerticalExtent = #(-5.0 . 5.0)
73 (translator-property-description
74 'CONTEXTNAMEMinimumVerticalExtent number-pair?
75 "minimum vertical extent, same format as CONTEXTNAMEVerticalExtent [fixme, naming]")
76 (translator-property-description
77 'CONTEXTNAExtraVerticalExtent number-pair?
78 "extra vertical extent, same format
79 CONTEXTNAMEMinimumVerticalExtent [fixme, naming]") )))
85 "Like Axis_group_engraver, but make a hara kiri spanner, and add
86 interesting items (ie. note heads, lyric syllables and normal rests)"
87 '(HaraKiriVerticalGroup)
96 "Make accidentals. Catches note heads, ties and notices key-change
97 events. Due to interaction with ties (which don't come together
98 with note heads), this needs to be in a context higher than Tie_engraver.
102 (translator-property-description 'localKeySignature list? "the key signature at this point in the measure")
103 (translator-property-description 'forgetAccidentals boolean? "do
104 not set localKeySignature when a note alterated differently from
105 localKeySignature is found.
107 Causes accidentals to be printed at every note instead of
108 remembered for the duration of a measure.
110 (translator-property-description 'noResetKey boolean? "Do not
111 reset local key to the value of keySignature at the start of a measure,
112 as determined by measurePosition.<p>
113 Do not reset the key at the start of a measure. Accidentals will
114 be printed only once and are in effect until overridden, possibly
123 (engraver-description
125 "Make volta brackets"
128 (translator-property-description 'repeatCommands list?
129 "This property is read to find any command of the form (volta . X), where X is a string or #f")
130 (translator-property-description 'voltaSpannerDuration moment?
131 "maximum duration of the volta bracket.<p>
133 Set to a duration to control the size of the brackets printed by
134 @code{\alternative}. It specifies the number of whole notes duration
135 to use for the brackets. This can be used to shrink the length of
136 brackets in the situation where one alternative is very large. It may
137 have odd effects if the specified duration is longer than the music
138 given in an @code{\alternative}.
145 (engraver-description
147 "Determine and set reference point for pitches"
148 '(Clef OctavateEight)
150 (translator-property-description 'supportedClefTypes
151 list? "Clef settings supported. The value is an association list contain entries (NAME . (GLYPH . POSITION)), where NAME is the clef name (alto, baritone, etc.), GLYPH the glyph name, POSITION an integer where the center symbol should go.")
152 (translator-property-description 'clefPosition number? " where the center of the symbol should go")
153 (translator-property-description 'clefGlyph string? "name of the symbol within the music font")
154 (translator-property-description 'centralCPosition number? "place of the central C. ")
155 (translator-property-description 'defaultClef string? "generate this clef at the very start of this staff. If not set, don't generate a clef")
156 (translator-property-description 'explicitClefVisibility procedure? "visibility-lambda function for clefs entered as \clef.")
157 (translator-property-description 'clefPitches list? "alist mapping GLYPHNAME to the position of the central C for that symbol")
163 (engraver-description
165 "Part combine engraver for orchestral scores."
168 (translator-property-description 'combineParts boolean? "try to combine parts?")
169 (translator-property-description 'unison boolean? "set if unisono is detected ")
170 (translator-property-description 'solo boolean? "")
171 (translator-property-description 'soloADue boolean? "")
172 (translator-property-description 'soloText string? "")
173 (translator-property-description 'soloIIText string? "")
174 (translator-property-description 'aDueText string? "")
175 (translator-property-description 'combineParts boolean? "")
176 (translator-property-description 'unisilence boolean? "")
177 (translator-property-description 'unison boolean? "")
178 (translator-property-description 'unirhythm boolean? "")
179 (translator-property-description 'solo boolean? "")
180 (translator-property-description 'split-interval number-pair? "")
181 (translator-property-description 'soloADue boolean? "")
185 'Align_note_column_engraver
186 (engraver-description
187 "Align_note_column_engraver"
188 "Generate object to put grace notes from left to right."
192 (translator-property-description 'graceAlignPosition dir? "put the grace note before or after the main note?")
193 (translator-property-description 'graceAccidentalSpace number? "amount space to alot for an accidental")
198 (engraver-description
200 "Generate an Arpeggio from a Arpeggio_req"
207 (engraver-description
209 "Generate beams based on measure characteristics and observed Stems.
210 Uses beatLength, measureLength and measurePosition to decide when to start and stop a beam.
215 (translator-property-description 'noAutoBeaming boolean? " If set to true then beams are not generated automatically.
217 (translator-property-description 'beamAutoEnd moment? "
218 Specifies when automatically generated beams can end. See
219 section XREF-autobeam [FIXME].")
220 (translator-property-description 'beamAutoBegin moment? "
221 Specifies when automatically generated beams can start. See
222 section XREF-autobeam [FIXME].")
228 (engraver-description
233 (translator-property-description 'whichBar string? "This property is read to determine what type of barline to create.
236 \\property Staff.whichBar = \"|:\"
238 will create a start-repeat bar in this staff only
240 (translator-property-description 'staffsFound list? "list of all staff-symbols found.")
246 (engraver-description
247 "Bar_number_engraver"
248 "A bar number is created whenever measurePosition is zero. It is
249 put on top of all staffs, and appears only at left side of the staff."
252 (translator-property-description 'currentBarNumber integer? "this is read to determine
253 the number to put on the bar ")
259 (engraver-description
261 "Handles Beam_requests by engraving Beams. If omitted, then notes will be
262 printed with flags instead of beams."
265 (translator-property-description 'beamMelismaBusy boolean? "Signal if a beam is set when automaticMelismata is set")
269 'Break_align_engraver
270 (engraver-description
271 "Break_align_engraver"
272 "Align graphic elements with corresponding break-align-symbols into groups, and order the groups according to breakAlignOrder"
273 '(BreakAlignment BreakAlignGroup LeftEdge)
275 (translator-property-description 'breakAlignOrder list?
276 "Defines the order in which
277 prefatory matter (clefs, key signatures) appears, eg. this puts the
278 key signatures after the bar lines:
281 \\property Score.breakAlignOrder = #'(
295 'Breathing_sign_engraver
296 (engraver-description
297 "Breathing_sign_engraver"
306 (engraver-description
307 "Chord_name_engraver"
308 "Catch Note_req's, Tonic_reqs, Inversion_reqs, Bass_req
309 and generate the appropriate chordname."
312 (translator-property-description 'chordInversion boolean? " Determines whether LilyPond should look for chord inversions when
313 translating from notes to chord names. Set to 1 to find
314 inversions. The default is 0 which does not look for
316 (translator-property-description 'drarnChords boolean? "")
321 'Chord_tremolo_engraver
322 (engraver-description
323 "Chord_tremolo_engraver"
324 "Generates beams for the \repeat X tremolo ... construct"
333 (engraver-description
343 (engraver-description
353 (engraver-description
354 "Dot_column_engraver"
355 " Engraves dots on dotted notes shifted to the right of the note.
356 If omitted, then dots appear on top of the notes.
366 (engraver-description
370 DynamicText Crescendo
379 'Grace_position_engraver
380 (engraver-description
381 "Grace_position_engraver"
382 "Attach a grace note alignment to a note-column "
388 'Grace_engraver_group
389 (engraver-description
390 "Grace_engraver_group"
391 "An engraver that creates a `shielded' context-tree with separate notion of time"
398 'Instrument_name_engraver
399 (engraver-description
400 "Instrument_name_engraver"
401 " Prints the name of the instrument (specified by
402 @code{Staff.instrument} and @code{Staff.instr}) at the left of the
406 (translator-property-description 'instrument string? " If @code{Instrument_name_engraver}
407 @cindex Instrument_name_engraver
409 added to the Staff translator, then the @code{instrument} property
410 is used to label the first line of the staff and the @code{instr}
411 property is used to label subsequent lines. If the
412 @code{midiInstrument} property is not set, then @code{instrument}
413 is used to determine the instrument for MIDI output.")
414 (translator-property-description 'instr string? "see <code>instrument</code>")
418 'Engraver_group_engraver
419 (engraver-description
420 "Engraver_group_engraver"
421 "A group of engravers taken together"
428 (engraver-description
435 (translator-property-description 'keySignature list? "")
436 (translator-property-description 'keyOctaviation boolean? "")
437 (translator-property-description 'explicitKeySignatureVisibility procedure? "")
438 (translator-property-description 'createKeyOnClefChange boolean? "")
439 (translator-property-description 'keyAccidentalOrder list? "")
440 (translator-property-description 'keySignature list? "")
443 (cons 'Lyric_phrasing_engraver
444 (engraver-description
445 "Lyric_phrasing_engraver"
449 (translator-property-description 'automaticPhrasing boolean? "")
450 (translator-property-description 'weAreGraceContext boolean? "")
451 (translator-property-description 'melismaEngraverBusy boolean? "")
452 (translator-property-description 'associatedVoice string? "")
453 (translator-property-description 'phrasingPunctuation string? "")
458 (engraver-description
464 (translator-property-description 'rehearsalMark number-or-string? "")
465 (translator-property-description 'staffsFound list? "")
471 (engraver-description
477 (translator-property-description 'melismaBusy boolean? "")
478 (translator-property-description 'slurMelismaBusy boolean? "")
479 (translator-property-description 'tieMelismaBusy boolean? "")
480 (translator-property-description 'beamMelismaBusy boolean? "")
485 'Multi_measure_rest_engraver
486 (engraver-description
487 "Multi_measure_rest_engraver"
488 "Engraves multi-measure rests that are produced with @code{R}. Reads
489 measurePosition and currentBarNumber to determine what number to print over the MultiMeasureRest
498 (engraver-description
499 "Note_heads_engraver"
500 "Generate one or more noteheads from Music of type Note_req."
508 (engraver-description
517 'Output_property_engraver
518 (engraver-description
519 "Output_property_engraver"
520 "Interpret Music of Output_property type, and apply a function
521 to any Graphic objects that satisfies the predicate."
528 'Piano_pedal_engraver
529 (engraver-description
530 "Piano_pedal_engraver"
531 "engrave Piano pedals symbols."
532 '(SostenutoPedal SustainPedal UnaChordaPedal)
535 (translator-property-description 'startSustain string? "")
536 (translator-property-description 'stopSustain string? "")
537 (translator-property-description 'stopStartSustain string? "")
538 (translator-property-description 'startUnaChorda string? "")
539 (translator-property-description 'stopUnaChorda string? "")
543 'Pitch_squash_engraver
544 (engraver-description
545 "Pitch_squash_engraver"
546 "Treat all pitches as middle C. Note that the notes move, but
547 the locations of accidentals stay the same.
548 Set the position field of all note heads to zero. This useful for
549 making a single line staff that demonstrates the rhythm of a melody."
552 (translator-property-description 'squashedPosition integer? " Vertical position of
558 (engraver-description
560 "This is a engraver that converts \property settings into
561 back-end element-property settings. Example: Voice.stemLength will set
562 #'length in all Stem objects<p>
563 Due to CPU and memory requirements, the use of this engraver is deprecated."
566 (translator-property-description 'Generic_property_list list? "description of the conversion.
568 Defines names and types for generic properties. These are properties
569 than can be plugged into the backend directly. See the init file
570 @file{generic-property.scm} for details. For internal use only, deprecated.
576 'Repeat_acknowledge_engraver
577 (engraver-description
578 "Repeat_acknowledge_engraver"
580 "Acknowledge repeated music, and convert the contents of
581 repeatCommands ainto an appropriate setting for whichBar"
584 (translator-property-description 'repeatCommands list? "")
585 (translator-property-description 'whichBar string? "")
591 'Rest_collision_engraver
592 (engraver-description
593 "Rest_collision_engraver"
594 "Handles collisions of rests."
602 (engraver-description
611 'Rhythmic_column_engraver
612 (engraver-description
613 "Rhythmic_column_engraver"
614 "Generates NoteColumn, an objects that groups stems, noteheads and rests."
621 'Script_column_engraver
622 (engraver-description
623 "Script_column_engraver"
632 (engraver-description
634 " Handles note ornaments generated by @code{\script}.
638 (translator-property-description 'scriptDefinitions list? "
639 Description of scripts to use. (fixme)
642 (translator-property-description 'scriptHorizontal boolean? " Put scripts left or right of note heads. Support for this is
643 limited. Accidentals will collide with scripts.
650 (engraver-description
652 "Top level engraver. Takes care of generating columns and the complete system (ie. LineOfScore)"
653 '(LineOfScore PaperColumn NonMusicalPaperColumn)
655 (translator-property-description 'currentMusicalColumn ly-element? "")
656 (translator-property-description 'currentCommandColumn ly-element? "")
661 (engraver-description
663 "Build slurs from Slur_reqs"
667 (translator-property-description 'slurBeginAttachment symbol? "")
668 (translator-property-description 'slurEndAttachment symbol? "")
669 (translator-property-description 'slurMelismaBusy boolean? "Signal a slur if automaticMelismata is set")
675 (engraver-description
677 "make a SpacingSpanner and do bookkeeping of shortest starting and playing notes "
684 'Span_arpeggio_engraver
685 (engraver-description
686 "Span_arpeggio_engraver"
690 (translator-property-description 'connectArpeggios boolean? " If
691 set, connect all arpeggios that are found. In this way, you can make
692 arpeggios that cross staffs.
699 (engraver-description
701 "This engraver makes cross-staff barlines: It catches all normal
702 bar lines, and draws a single span-bar across them. <p>"
710 'Staff_symbol_engraver
711 (engraver-description
712 "Staff_symbol_engraver"
713 "create the constellation of five (default) staff lines."
720 'Stanza_number_engraver
721 (engraver-description
722 "Stanza_number_engraver"
727 (translator-property-description 'stz string? "")
728 (translator-property-description 'stanza string? "Stanza `number' to print at start of a verse")
734 'System_start_delimiter_engraver
735 (engraver-description
736 "System_start_delimiter_engraver"
737 "creates a SystemStartDelimiter spanner"
738 '(SystemStartDelimiter)
745 (engraver-description
747 "Create text-scripts"
750 (translator-property-description 'scriptHorizontal boolean? " Put scripts left or right of note heads. Support for this is
751 limited. Accidentals will collide with scripts.
754 (translator-property-description 'textNonEmpty boolean? " If set
755 to true then text placed above or below the staff is not assumed to
756 have zero width. @code{fatText} and @code{emptyText} are predefined
763 'Text_spanner_engraver
764 (engraver-description
765 "Text_spanner_engraver"
766 "Create text spanner from a Span_req "
773 'Thread_devnull_engraver
774 (engraver-description
775 "Thread_devnull_engraver"
776 "Kill elements whenever we are Voice called `two' and
777 either unison, unisilence or soloADue is set"
784 (engraver-description
786 "Generate ties between noteheads of equal pitch."
791 (translator-property-description 'sparseTies boolean? "only create one tie per chord.")
792 (translator-property-description 'tieMelismaBusy boolean? "Signal ties when automaticMelismata is set")
797 'Time_signature_engraver
798 (engraver-description
799 "Time_signature_engraver"
800 "Create a TimeSignature whenever <code>timeSignatureFraction</code> changes"
808 (engraver-description
810 " Responsible for synchronizing timing information from staffs.
811 Normally in @code{Score}. In order to create polyrhythmic music,
812 this engraver should be removed from @code{Score} and placed in
816 (translator-property-description 'timeSignatureFraction number-pair? "
817 pair of numbers, signifying the time signature. For example #'(4 . 4) is a 4/4 time signature.")
819 (translator-property-description 'barNonAuto boolean? " If set to true then bar lines will not be printed
820 automatically; they must be explicitly created with @code{\bar}
821 keywords. Unlike with the @code{\cadenza} keyword, measures are
822 still counted. Bar generation will resume according to that
823 count if this property is set to zero.
825 (translator-property-description 'whichBar string? "if not set
826 explicitly (by \property or \bar), this is set according to values of
827 defaultBarType, barAlways, barNonAuto and measurePosition.
830 (translator-property-description 'barAlways boolean? " If set to true a bar line is drawn after each note.
832 (translator-property-description 'defaultBarType string? "Sets the default type of bar line. See Section XREF-barlines [FIXME]
833 for a list of available bar types.
835 (translator-property-description 'skipBars boolean? " Set to true to skip the empty bars that are produced by
836 multimeasure notes and rests. These bars will not appear on the
837 printed output. If not set (the default) multimeasure
838 notes and rests expand into their full length, printing the appropriate
839 number of empty bars so that synchronization with other voices is
842 @mudela[fragment,verbatim,center]
843 r1 r1*3 R1*3\property Score.skipBars=1 r1*3 R1*3
848 (translator-property-description 'timing boolean? " Keep administration of measure length, position, bar number, etc?
849 Switch off for cadenzas.")
850 (translator-property-description 'oneBeat moment? " How long does one beat in the current time signature last?")
851 (translator-property-description 'measureLength moment? " How long does one measure in the current time signature last?")
852 (translator-property-description 'measurePosition moment? "
853 How much of the current measure (measured in whole notes) have we had?
855 (translator-property-description 'currentBarNumber integer? "Contains the current barnumber. This property is incremented at
863 (engraver-description
865 "Catch Time_scaled_music and generate appropriate bracket "
869 (translator-property-description 'tupletSpannerDuration moment? "
870 Normally a tuplet bracket is as wide as the
871 @code{\times} expression that gave rise to it. By setting this
872 property, you can make brackets last shorter. Example
874 @mudela[verbatim,fragment]
875 \context Voice \times 2/3 {
876 \property Voice.tupletSpannerDuration = #(make-moment 1 4)
882 (translator-property-description 'tupletInvisible boolean? "
883 If set to true, tuplet bracket creation is switched off
884 entirely. This has the same effect as setting both
885 @code{tupletNumberVisibility} and @code{tupletBracketVisibility} to
886 @code{#f}, but as this does not even create elements, this setting
887 uses less memory and time.")
892 'Vertical_align_engraver
893 (engraver-description
894 "Vertical_align_engraver"
895 "Catch Vertical axis groups and stack them."
902 'Voice_devnull_engraver
903 (engraver-description
904 "Voice_devnull_engraver"
905 "Kill off certain items and spanners if we're Voice `two' and unison or unisilence is set."
914 (define context-description-alist
917 The context for handling grace notes. It is instantiated
918 automatically when you use @code{\grace}. Basically, it is an
919 `embedded' miniature of the Score context. Since this context
920 needs special interaction with the rest of LilyPond, you should
921 not explicitly instantiate it.
924 Corresponds to a voice with lyrics. Handles the printing of a
925 single line of lyrics.
928 Handles note heads, and is contained in the Voice context. You
929 have to instantiate this explicitly if you want to adjust the
930 style of individual note heads.
933 Corresponds to a voice on a staff. This context handles the
934 conversion of dynamic signs, stems, beams, super- and subscripts,
935 slurs, ties, and rests.
937 You have to instantiate this explicitly if you want to have
938 multiple voices on the same staff.")
941 A voice with chord names. Handles printing of a line of chord
945 Typesets chord names. Can contain @code{ChordNamesVoice}
949 Typesets lyrics. It can contain @code{LyricVoice} contexts.
952 Handles clefs, bar lines, keys, accidentals. It can contain
953 @code{Voice} contexts.
956 A context like @code{Staff} but for printing rhythms. Pitches are
957 ignored; the notes are printed on one line. It can contain
958 @code{Voice} contexts.
961 Contains @code{Staff} or @code{RhythmicStaff} contexts. It adds a
962 brace on the left side, grouping the staffs together. The bar
963 lines of the contained staffs are connected vertically. It can
964 contain @code{Staff} contexts.")
967 Just like @code{GrandStaff} but with @code{minVerticalAlign} set
968 equal to @code{maxVerticalAlign} so that interstaff beaming and
969 slurring can be used.")
972 Contains @code{Staff} or @code{RhythmicStaff} contexts. Adds a
973 bracket on the left side, grouping the staffs together. The bar
974 lines of the contained staffs are connected vertically. It can
975 contain @code{Staff}, @code{RhythmicStaff}, @code{GrandStaff}, or
976 @code{Lyrics} contexts.
979 Identical to @code{StaffGroup} except that the contained staffs
980 are not connected vertically.
983 This is the top level notation context. No other context can
984 contain a @code{Score} context. This context handles the
985 administration of time signatures. It also makes sure that items
986 such as clefs, time signatures, and key-signatures are aligned
987 across staffs. It can contain @code{Lyrics}, @code{Staff},
988 @code{RhythmicStaff}, @code{GrandStaff}, @code{StaffGroup}, and
989 @code{ChoirStaff} contexts.
991 You cannot explicitly instantiate a Score context (since it is
992 not contained in any other context). It is instantiated
993 automatically when an output definition (a @code{\score} or
994 @code{\paper} block) is processed.