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.
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 'CONTEXTNAMExtraVerticalExtent 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.
114 Do not reset the key at the start of a measure. Accidentals will be
115 printed only once and are in effect until overridden, possibly many
124 (engraver-description
126 "Make volta brackets"
129 (translator-property-description 'repeatCommands list?
130 "This property is read to find any command of the form (volta . X), where X is a string or #f")
131 (translator-property-description 'voltaSpannerDuration moment?
132 "maximum duration of the volta bracket.
134 Set to a duration to control the size of the brackets printed by
135 @code{\alternative}. It specifies the number of whole notes duration
136 to use for the brackets. This can be used to shrink the length of
137 brackets in the situation where one alternative is very large. It may
138 have odd effects if the specified duration is longer than the music
139 given in an @code{\alternative}.
146 (engraver-description
148 "Determine and set reference point for pitches"
149 '(Clef OctavateEight)
151 (translator-property-description 'clefPosition number? "Where should the center of the symbol go?")
152 (translator-property-description 'clefGlyph string? "Name of the symbol within the music font")
153 (translator-property-description 'centralCPosition number? "Place of the central C. Usually determined by looking at clefPosition and clefGlyph.")
154 (translator-property-description 'clefOctavation integer? "Add
155 this much extra octavation. Values of 7 and -7 are common.")
156 (translator-property-description 'explicitClefVisibility procedure? "visibility-lambda function for clef changes.")
157 (translator-property-description 'clefPitches list? "an 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 'soloADue boolean? "set Solo/A due texts?")
170 (translator-property-description 'soloText string? "text for begin of solo")
171 (translator-property-description 'soloIIText string? "text for begin of solo for voice ``two''")
172 (translator-property-description 'aDueText string? "text for begin of a due")
173 (translator-property-description 'split-interval number-pair? "always split into two voices for contained intervals")
174 (translator-property-description 'unison boolean? "set if unisono is detected ")
175 (translator-property-description 'solo boolean? "set if solo is detected")
176 (translator-property-description 'unisilence boolean? "set if unisilence is detected")
177 (translator-property-description 'unirhythm boolean? "set if unirhythm is detected")
181 'Align_note_column_engraver
182 (engraver-description
183 "Align_note_column_engraver"
184 "Generate object to put grace notes from left to right."
188 (translator-property-description 'graceAlignPosition dir? "put the grace note before or after the main note?")
189 (translator-property-description 'graceAccidentalSpace number? "amount space to alot for an accidental")
194 (engraver-description
196 "Generate an Arpeggio from a Arpeggio_req"
203 (engraver-description
205 "Generate beams based on measure characteristics and observed Stems.
206 Uses beatLength, measureLength and measurePosition to decide when to start and stop a beam.
211 (translator-property-description 'noAutoBeaming boolean? " If set to true then beams are not generated automatically.
213 (translator-property-description 'autoBeamSettings list? "
214 Specifies when automatically generated beams should begin and end. The elements have the format:
218 function shortest-duration-in-beam time-signature
222 function = begin or end
223 shortest-duration-in-beam = numerator denominator; eg: 1 16
224 time-signature = numerator denominator, eg: 4 4
226 unspecified or wildcard entries for duration or time-signature
229 The user can override beam begin or end time by pushing a wildcard entries
230 '(begin * * * *) or '(end * * * *) resp., eg:
232 \property Voice.autoBeamSettings \push #'(end * * * *) = #(make-moment 1 4)
234 The head of the list:
236 ((end * * 3 2) . ,(make-moment 1 2))
237 ((end 1 16 3 2) . ,(make-moment 1 4))
238 ((end 1 32 3 2) . ,(make-moment 1 8))
246 (engraver-description
251 (translator-property-description 'whichBar string? "This property is read to determine what type of barline to create.
254 \\property Staff.whichBar = \"|:\"
256 will create a start-repeat bar in this staff only
258 (translator-property-description 'staffsFound list? "list of all staff-symbols found.")
264 (engraver-description
265 "Bar_number_engraver"
266 "A bar number is created whenever measurePosition is zero. It is
267 put on top of all staffs, and appears only at left side of the staff."
270 (translator-property-description 'currentBarNumber integer? "this is read to determine
271 the number to put on the bar ")
277 (engraver-description
279 "Handles Beam_requests by engraving Beams. If omitted, then notes will be
280 printed with flags instead of beams."
283 (translator-property-description 'beamMelismaBusy boolean? "Signal if a beam is set when automaticMelismata is set")
287 'Break_align_engraver
288 (engraver-description
289 "Break_align_engraver"
290 "Align graphic elements with corresponding break-align-symbols into groups, and order the groups according to breakAlignOrder"
291 '(BreakAlignment BreakAlignGroup LeftEdge)
293 (translator-property-description 'breakAlignOrder list?
294 "Defines the order in which
295 prefatory matter (clefs, key signatures) appears, eg. this puts the
296 key signatures after the bar lines:
299 \\property Score.breakAlignOrder = #'(
313 'Breathing_sign_engraver
314 (engraver-description
315 "Breathing_sign_engraver"
324 (engraver-description
325 "Chord_name_engraver"
326 "Catch Note_req's, Tonic_reqs, Inversion_reqs, Bass_req
327 and generate the appropriate chordname."
330 (translator-property-description 'chordInversion boolean? " Determines whether LilyPond should look for chord inversions when
331 translating from notes to chord names. Set to 1 to find
332 inversions. The default is 0 which does not look for
334 (translator-property-description 'drarnChords boolean? "")
339 'Chord_tremolo_engraver
340 (engraver-description
341 "Chord_tremolo_engraver"
342 "Generates beams for the \repeat X tremolo ... construct"
351 (engraver-description
361 (engraver-description
371 (engraver-description
372 "Dot_column_engraver"
373 " Engraves dots on dotted notes shifted to the right of the note.
374 If omitted, then dots appear on top of the notes.
384 (engraver-description
388 DynamicText Crescendo
397 'Grace_position_engraver
398 (engraver-description
399 "Grace_position_engraver"
400 "Attach a grace note alignment to a note-column "
406 'Grace_engraver_group
407 (engraver-description
408 "Grace_engraver_group"
409 "An engraver that creates a `shielded' context-tree with separate notion of time"
416 'Instrument_name_engraver
417 (engraver-description
418 "Instrument_name_engraver"
419 " Prints the name of the instrument (specified by
420 @code{Staff.instrument} and @code{Staff.instr}) at the left of the
424 (translator-property-description 'instrument string? " If @code{Instrument_name_engraver}
425 @cindex Instrument_name_engraver
427 added to the Staff translator, then the @code{instrument} property
428 is used to label the first line of the staff and the @code{instr}
429 property is used to label subsequent lines. If the
430 @code{midiInstrument} property is not set, then @code{instrument}
431 is used to determine the instrument for MIDI output.")
432 (translator-property-description 'instr string? "see @code{instrument}")
436 'Engraver_group_engraver
437 (engraver-description
438 "Engraver_group_engraver"
439 "A group of engravers taken together"
446 (engraver-description
453 (translator-property-description 'keySignature list? "")
454 (translator-property-description 'keyOctaviation boolean? "")
455 (translator-property-description 'explicitKeySignatureVisibility procedure? "")
456 (translator-property-description 'createKeyOnClefChange boolean? "")
457 (translator-property-description 'keyAccidentalOrder list? "")
458 (translator-property-description 'keySignature list? "")
461 (cons 'Lyric_engraver
462 (engraver-description
470 (cons 'Lyric_phrasing_engraver
471 (engraver-description
472 "Lyric_phrasing_engraver"
476 (translator-property-description 'automaticPhrasing boolean? "")
477 (translator-property-description 'weAreGraceContext boolean? "")
478 (translator-property-description 'melismaEngraverBusy boolean? "")
479 (translator-property-description 'associatedVoice string? "")
480 (translator-property-description 'phrasingPunctuation string? "")
485 (engraver-description
491 (translator-property-description 'rehearsalMark number-or-string? "")
492 (translator-property-description 'staffsFound list? "")
498 (engraver-description
504 (translator-property-description 'melismaBusy boolean? "")
505 (translator-property-description 'slurMelismaBusy boolean? "")
506 (translator-property-description 'tieMelismaBusy boolean? "")
507 (translator-property-description 'beamMelismaBusy boolean? "")
512 'Multi_measure_rest_engraver
513 (engraver-description
514 "Multi_measure_rest_engraver"
515 "Engraves multi-measure rests that are produced with @code{R}. Reads
516 measurePosition and currentBarNumber to determine what number to print over the MultiMeasureRest
525 (engraver-description
526 "Note_heads_engraver"
527 "Generate one or more noteheads from Music of type Note_req."
535 (engraver-description
544 'Output_property_engraver
545 (engraver-description
546 "Output_property_engraver"
547 "Interpret Music of Output_property type, and apply a function
548 to any Graphic objects that satisfies the predicate."
555 'Piano_pedal_engraver
556 (engraver-description
557 "Piano_pedal_engraver"
558 "engrave Piano pedals symbols."
559 '(SostenutoPedal SustainPedal UnaChordaPedal)
562 (translator-property-description 'startSustain string? "")
563 (translator-property-description 'stopSustain string? "")
564 (translator-property-description 'stopStartSustain string? "")
565 (translator-property-description 'startUnaChorda string? "")
566 (translator-property-description 'stopUnaChorda string? "")
570 'Pitch_squash_engraver
571 (engraver-description
572 "Pitch_squash_engraver"
573 "Treat all pitches as middle C. Note that the notes move, but
574 the locations of accidentals stay the same.
575 Set the position field of all note heads to zero. This useful for
576 making a single line staff that demonstrates the rhythm of a melody."
579 (translator-property-description 'squashedPosition integer? " Vertical position of
585 (engraver-description
587 "This is a engraver that converts \property settings into
588 back-end element-property settings. Example: Voice.stemLength will set
589 #'length in all Stem objects.
591 Due to CPU and memory requirements, the use of this engraver is deprecated."
594 (translator-property-description 'Generic_property_list list? "description of the conversion.
596 Defines names and types for generic properties. These are properties
597 than can be plugged into the backend directly. See the init file
598 @file{generic-property.scm} for details. For internal use only,
605 'Repeat_acknowledge_engraver
606 (engraver-description
607 "Repeat_acknowledge_engraver"
609 "Acknowledge repeated music, and convert the contents of
610 repeatCommands ainto an appropriate setting for whichBar"
613 (translator-property-description 'repeatCommands list? "")
614 (translator-property-description 'whichBar string? "")
620 'Rest_collision_engraver
621 (engraver-description
622 "Rest_collision_engraver"
623 "Handles collisions of rests."
631 (engraver-description
640 'Rhythmic_column_engraver
641 (engraver-description
642 "Rhythmic_column_engraver"
643 "Generates NoteColumn, an objects that groups stems, noteheads and rests."
650 'Script_column_engraver
651 (engraver-description
652 "Script_column_engraver"
661 (engraver-description
663 " Handles note ornaments generated by @code{\script}.
667 (translator-property-description 'scriptDefinitions list? "
668 Description of scripts to use. (fixme)
671 (translator-property-description 'scriptHorizontal boolean? " Put scripts left or right of note heads. Support for this is
672 limited. Accidentals will collide with scripts.
679 (engraver-description
681 "Top level engraver. Takes care of generating columns and the complete system (ie. LineOfScore)"
682 '(LineOfScore PaperColumn NonMusicalPaperColumn)
684 (translator-property-description 'currentMusicalColumn ly-element? "")
685 (translator-property-description 'currentCommandColumn ly-element? "")
688 (cons 'Skip_req_swallow_translator
689 (engraver-description
690 "Skip_req_swallow_translator"
699 (engraver-description
701 "Build slurs from Slur_reqs"
705 (translator-property-description 'slurBeginAttachment symbol? "translates to the car of Slur.element-property 'attachment.")
706 (translator-property-description 'slurEndAttachment symbol? "translates to the cdr of Slur.element-property 'attachment.")
707 (translator-property-description 'slurMelismaBusy boolean? "Signal a slur if automaticMelismata is set")
713 (engraver-description
715 "make a SpacingSpanner and do bookkeeping of shortest starting and playing notes "
722 'Span_arpeggio_engraver
723 (engraver-description
724 "Span_arpeggio_engraver"
728 (translator-property-description 'connectArpeggios boolean? " If
729 set, connect all arpeggios that are found. In this way, you can make
730 arpeggios that cross staffs.
737 (engraver-description
739 "This engraver makes cross-staff barlines: It catches all normal
740 bar lines, and draws a single span-bar across them."
748 'Staff_symbol_engraver
749 (engraver-description
750 "Staff_symbol_engraver"
751 "create the constellation of five (default) staff lines."
758 'Stanza_number_engraver
759 (engraver-description
760 "Stanza_number_engraver"
765 (translator-property-description 'stz string? "")
766 (translator-property-description 'stanza string? "Stanza `number' to print at start of a verse")
772 'System_start_delimiter_engraver
773 (engraver-description
774 "System_start_delimiter_engraver"
775 "creates a SystemStartDelimiter spanner"
776 '(SystemStartDelimiter)
783 (engraver-description
785 "Create text-scripts"
788 (translator-property-description 'scriptHorizontal boolean? " Put scripts left or right of note heads. Support for this is
789 limited. Accidentals will collide with scripts.
792 (translator-property-description 'textNonEmpty boolean? " If set
793 to true then text placed above or below the staff is not assumed to
794 have zero width. @code{fatText} and @code{emptyText} are predefined
801 'Text_spanner_engraver
802 (engraver-description
803 "Text_spanner_engraver"
804 "Create text spanner from a Span_req "
811 'Thread_devnull_engraver
812 (engraver-description
813 "Thread_devnull_engraver"
814 "Kill elements whenever we are Voice called `two' and
815 either unison, unisilence or soloADue is set"
822 (engraver-description
824 "Generate ties between noteheads of equal pitch."
829 (translator-property-description 'sparseTies boolean? "only create one tie per chord.")
830 (translator-property-description 'tieMelismaBusy boolean? "Signal ties when automaticMelismata is set")
835 'Time_signature_engraver
836 (engraver-description
837 "Time_signature_engraver"
838 "Create a TimeSignature whenever @code{timeSignatureFraction} changes"
846 (engraver-description
848 " Responsible for synchronizing timing information from staffs.
849 Normally in @code{Score}. In order to create polyrhythmic music,
850 this engraver should be removed from @code{Score} and placed in
854 (translator-property-description 'timeSignatureFraction number-pair? "
855 pair of numbers, signifying the time signature. For example #'(4 . 4) is a 4/4 time signature.")
857 (translator-property-description 'barNonAuto boolean? " If set to true then bar lines will not be printed
858 automatically; they must be explicitly created with @code{\bar}
859 keywords. Unlike with the @code{\cadenza} keyword, measures are
860 still counted. Bar generation will resume according to that
861 count if this property is set to zero.
863 (translator-property-description 'whichBar string? "if not set
864 explicitly (by \property or \bar), this is set according to values of
865 defaultBarType, barAlways, barNonAuto and measurePosition.
868 (translator-property-description 'barAlways boolean? " If set to true a bar line is drawn after each note.
870 (translator-property-description 'defaultBarType string? "Sets the default type of bar line. See Section XREF-barlines [FIXME]
871 for a list of available bar types.
873 (translator-property-description 'skipBars boolean? " Set to true to skip the empty bars that are produced by
874 multimeasure notes and rests. These bars will not appear on the
875 printed output. If not set (the default) multimeasure
876 notes and rests expand into their full length, printing the appropriate
877 number of empty bars so that synchronization with other voices is
880 @c my @vebatim patch would help...
882 @@mudela[fragment,verbatim,center]
883 r1 r1*3 R1*3\property Score.skipBars=1 r1*3 R1*3
889 (translator-property-description 'timing boolean? " Keep administration of measure length, position, bar number, etc?
890 Switch off for cadenzas.")
891 (translator-property-description 'oneBeat moment? " How long does one beat in the current time signature last?")
892 (translator-property-description 'measureLength moment? " How long does one measure in the current time signature last?")
893 (translator-property-description 'measurePosition moment? "
894 How much of the current measure (measured in whole notes) have we had?
896 (translator-property-description 'currentBarNumber integer? "Contains the current barnumber. This property is incremented at
904 (engraver-description
906 "Catch Time_scaled_music and generate appropriate bracket "
910 (translator-property-description 'tupletSpannerDuration moment? "
911 Normally a tuplet bracket is as wide as the
912 @code{\times} expression that gave rise to it. By setting this
913 property, you can make brackets last shorter. Example
916 @@mudela[verbatim,fragment]
917 \context Voice \times 2/3 @{
918 \property Voice.tupletSpannerDuration = #(make-moment 1 4)
924 (translator-property-description 'tupletInvisible boolean? "
925 If set to true, tuplet bracket creation is switched off
926 entirely. This has the same effect as setting both
927 @code{tupletNumberVisibility} and @code{tupletBracketVisibility} to
928 @code{#f}, but as this does not even create elements, this setting
929 uses less memory and time.")
934 'Vertical_align_engraver
935 (engraver-description
936 "Vertical_align_engraver"
937 "Catch Vertical axis groups and stack them."
944 'Voice_devnull_engraver
945 (engraver-description
946 "Voice_devnull_engraver"
947 "Kill off certain items and spanners if we're Voice `two' and unison or unisilence is set."
956 (define context-description-alist
959 The context for handling grace notes. It is instantiated
960 automatically when you use @code{\grace}. Basically, it is an
961 `embedded' miniature of the Score context. Since this context
962 needs special interaction with the rest of LilyPond, you should
963 not explicitly instantiate it.
966 Corresponds to a voice with lyrics. Handles the printing of a
967 single line of lyrics.
970 Handles note heads, and is contained in the Voice context. You
971 have to instantiate this explicitly if you want to adjust the
972 style of individual note heads.
975 Corresponds to a voice on a staff. This context handles the
976 conversion of dynamic signs, stems, beams, super- and subscripts,
977 slurs, ties, and rests.
979 You have to instantiate this explicitly if you want to have
980 multiple voices on the same staff.")
983 A voice with chord names. Handles printing of a line of chord
987 Typesets chord names. Can contain @code{ChordNamesVoice}
991 Typesets lyrics. It can contain @code{LyricVoice} contexts.
994 Handles clefs, bar lines, keys, accidentals. It can contain
995 @code{Voice} contexts.
998 A context like @code{Staff} but for printing rhythms. Pitches are
999 ignored; the notes are printed on one line. It can contain
1000 @code{Voice} contexts.
1003 Contains @code{Staff} or @code{RhythmicStaff} contexts. It adds a
1004 brace on the left side, grouping the staffs together. The bar
1005 lines of the contained staffs are connected vertically. It can
1006 contain @code{Staff} contexts.")
1009 Just like @code{GrandStaff} but with @code{minVerticalAlign} set
1010 equal to @code{maxVerticalAlign} so that interstaff beaming and
1011 slurring can be used.")
1014 Contains @code{Staff} or @code{RhythmicStaff} contexts. Adds a
1015 bracket on the left side, grouping the staffs together. The bar
1016 lines of the contained staffs are connected vertically. It can
1017 contain @code{Staff}, @code{RhythmicStaff}, @code{GrandStaff}, or
1018 @code{Lyrics} contexts.
1021 Identical to @code{StaffGroup} except that the contained staffs
1022 are not connected vertically.
1025 This is the top level notation context. No other context can
1026 contain a @code{Score} context. This context handles the
1027 administration of time signatures. It also makes sure that items
1028 such as clefs, time signatures, and key-signatures are aligned
1029 across staffs. It can contain @code{Lyrics}, @code{Staff},
1030 @code{RhythmicStaff}, @code{GrandStaff}, @code{StaffGroup}, and
1031 @code{ChoirStaff} contexts.
1033 You cannot explicitly instantiate a Score context (since it is
1034 not contained in any other context). It is instantiated
1035 automatically when an output definition (a @code{\score} or
1036 @code{\paper} block) is processed.