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 'supportedClefTypes
152 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.")
153 (translator-property-description 'clefPosition number? " where the center of the symbol should go")
154 (translator-property-description 'clefGlyph string? "name of the symbol within the music font")
155 (translator-property-description 'centralCPosition number? "place of the central C. ")
156 (translator-property-description 'defaultClef string? "generate this clef at the very start of this staff. If not set, don't generate a clef")
157 (translator-property-description 'explicitClefVisibility procedure? "visibility-lambda function for clefs entered as \clef.")
158 (translator-property-description 'clefPitches list? "alist mapping GLYPHNAME to the position of the central C for that symbol")
164 (engraver-description
166 "Part combine engraver for orchestral scores."
169 (translator-property-description 'combineParts boolean? "try to combine parts?")
170 (translator-property-description 'soloADue boolean? "set Solo/A due texts?")
171 (translator-property-description 'soloText string? "text for begin of solo")
172 (translator-property-description 'soloIIText string? "text for begin of solo for voice ``two''")
173 (translator-property-description 'aDueText string? "text for begin of a due")
174 (translator-property-description 'split-interval number-pair? "always split into two voices for contained intervals")
175 (translator-property-description 'unison boolean? "set if unisono is detected ")
176 (translator-property-description 'solo boolean? "set if solo is detected")
177 (translator-property-description 'unisilence boolean? "set if unisilence is detected")
178 (translator-property-description 'unirhythm boolean? "set if unirhythm is detected")
182 'Align_note_column_engraver
183 (engraver-description
184 "Align_note_column_engraver"
185 "Generate object to put grace notes from left to right."
189 (translator-property-description 'graceAlignPosition dir? "put the grace note before or after the main note?")
190 (translator-property-description 'graceAccidentalSpace number? "amount space to alot for an accidental")
195 (engraver-description
197 "Generate an Arpeggio from a Arpeggio_req"
204 (engraver-description
206 "Generate beams based on measure characteristics and observed Stems.
207 Uses beatLength, measureLength and measurePosition to decide when to start and stop a beam.
212 (translator-property-description 'noAutoBeaming boolean? " If set to true then beams are not generated automatically.
214 (translator-property-description 'autoBeamSettings list? "
215 Specifies when automatically generated beams should begin and end. The elements have the format:
219 function shortest-duration-in-beam time-signature
223 function = begin or end
224 shortest-duration-in-beam = numerator denominator; eg: 1 16
225 time-signature = numerator denominator, eg: 4 4
227 unspecified or wildcard entries for duration or time-signature
230 The user can override beam begin or end time by pushing a wildcard entries
231 '(begin * * * *) or '(end * * * *) resp., eg:
233 \property Voice.autoBeamSettings \push #'(end * * * *) = #(make-moment 1 4)
235 The head of the list:
237 ((end * * 3 2) . ,(make-moment 1 2))
238 ((end 1 16 3 2) . ,(make-moment 1 4))
239 ((end 1 32 3 2) . ,(make-moment 1 8))
247 (engraver-description
252 (translator-property-description 'whichBar string? "This property is read to determine what type of barline to create.
255 \\property Staff.whichBar = \"|:\"
257 will create a start-repeat bar in this staff only
259 (translator-property-description 'staffsFound list? "list of all staff-symbols found.")
265 (engraver-description
266 "Bar_number_engraver"
267 "A bar number is created whenever measurePosition is zero. It is
268 put on top of all staffs, and appears only at left side of the staff."
271 (translator-property-description 'currentBarNumber integer? "this is read to determine
272 the number to put on the bar ")
278 (engraver-description
280 "Handles Beam_requests by engraving Beams. If omitted, then notes will be
281 printed with flags instead of beams."
284 (translator-property-description 'beamMelismaBusy boolean? "Signal if a beam is set when automaticMelismata is set")
288 'Break_align_engraver
289 (engraver-description
290 "Break_align_engraver"
291 "Align graphic elements with corresponding break-align-symbols into groups, and order the groups according to breakAlignOrder"
292 '(BreakAlignment BreakAlignGroup LeftEdge)
294 (translator-property-description 'breakAlignOrder list?
295 "Defines the order in which
296 prefatory matter (clefs, key signatures) appears, eg. this puts the
297 key signatures after the bar lines:
300 \\property Score.breakAlignOrder = #'(
314 'Breathing_sign_engraver
315 (engraver-description
316 "Breathing_sign_engraver"
325 (engraver-description
326 "Chord_name_engraver"
327 "Catch Note_req's, Tonic_reqs, Inversion_reqs, Bass_req
328 and generate the appropriate chordname."
331 (translator-property-description 'chordInversion boolean? " Determines whether LilyPond should look for chord inversions when
332 translating from notes to chord names. Set to 1 to find
333 inversions. The default is 0 which does not look for
335 (translator-property-description 'drarnChords boolean? "")
340 'Chord_tremolo_engraver
341 (engraver-description
342 "Chord_tremolo_engraver"
343 "Generates beams for the \repeat X tremolo ... construct"
352 (engraver-description
362 (engraver-description
372 (engraver-description
373 "Dot_column_engraver"
374 " Engraves dots on dotted notes shifted to the right of the note.
375 If omitted, then dots appear on top of the notes.
385 (engraver-description
389 DynamicText Crescendo
398 'Grace_position_engraver
399 (engraver-description
400 "Grace_position_engraver"
401 "Attach a grace note alignment to a note-column "
407 'Grace_engraver_group
408 (engraver-description
409 "Grace_engraver_group"
410 "An engraver that creates a `shielded' context-tree with separate notion of time"
417 'Instrument_name_engraver
418 (engraver-description
419 "Instrument_name_engraver"
420 " Prints the name of the instrument (specified by
421 @code{Staff.instrument} and @code{Staff.instr}) at the left of the
425 (translator-property-description 'instrument string? " If @code{Instrument_name_engraver}
426 @cindex Instrument_name_engraver
428 added to the Staff translator, then the @code{instrument} property
429 is used to label the first line of the staff and the @code{instr}
430 property is used to label subsequent lines. If the
431 @code{midiInstrument} property is not set, then @code{instrument}
432 is used to determine the instrument for MIDI output.")
433 (translator-property-description 'instr string? "see @code{instrument}")
437 'Engraver_group_engraver
438 (engraver-description
439 "Engraver_group_engraver"
440 "A group of engravers taken together"
447 (engraver-description
454 (translator-property-description 'keySignature list? "")
455 (translator-property-description 'keyOctaviation boolean? "")
456 (translator-property-description 'explicitKeySignatureVisibility procedure? "")
457 (translator-property-description 'createKeyOnClefChange boolean? "")
458 (translator-property-description 'keyAccidentalOrder list? "")
459 (translator-property-description 'keySignature list? "")
462 (cons 'Lyric_engraver
463 (engraver-description
471 (cons 'Lyric_phrasing_engraver
472 (engraver-description
473 "Lyric_phrasing_engraver"
477 (translator-property-description 'automaticPhrasing boolean? "")
478 (translator-property-description 'weAreGraceContext boolean? "")
479 (translator-property-description 'melismaEngraverBusy boolean? "")
480 (translator-property-description 'associatedVoice string? "")
481 (translator-property-description 'phrasingPunctuation string? "")
486 (engraver-description
492 (translator-property-description 'rehearsalMark number-or-string? "")
493 (translator-property-description 'staffsFound list? "")
499 (engraver-description
505 (translator-property-description 'melismaBusy boolean? "")
506 (translator-property-description 'slurMelismaBusy boolean? "")
507 (translator-property-description 'tieMelismaBusy boolean? "")
508 (translator-property-description 'beamMelismaBusy boolean? "")
513 'Multi_measure_rest_engraver
514 (engraver-description
515 "Multi_measure_rest_engraver"
516 "Engraves multi-measure rests that are produced with @code{R}. Reads
517 measurePosition and currentBarNumber to determine what number to print over the MultiMeasureRest
526 (engraver-description
527 "Note_heads_engraver"
528 "Generate one or more noteheads from Music of type Note_req."
536 (engraver-description
545 'Output_property_engraver
546 (engraver-description
547 "Output_property_engraver"
548 "Interpret Music of Output_property type, and apply a function
549 to any Graphic objects that satisfies the predicate."
556 'Piano_pedal_engraver
557 (engraver-description
558 "Piano_pedal_engraver"
559 "engrave Piano pedals symbols."
560 '(SostenutoPedal SustainPedal UnaChordaPedal)
563 (translator-property-description 'startSustain string? "")
564 (translator-property-description 'stopSustain string? "")
565 (translator-property-description 'stopStartSustain string? "")
566 (translator-property-description 'startUnaChorda string? "")
567 (translator-property-description 'stopUnaChorda string? "")
571 'Pitch_squash_engraver
572 (engraver-description
573 "Pitch_squash_engraver"
574 "Treat all pitches as middle C. Note that the notes move, but
575 the locations of accidentals stay the same.
576 Set the position field of all note heads to zero. This useful for
577 making a single line staff that demonstrates the rhythm of a melody."
580 (translator-property-description 'squashedPosition integer? " Vertical position of
586 (engraver-description
588 "This is a engraver that converts \property settings into
589 back-end element-property settings. Example: Voice.stemLength will set
590 #'length in all Stem objects.
592 Due to CPU and memory requirements, the use of this engraver is deprecated."
595 (translator-property-description 'Generic_property_list list? "description of the conversion.
597 Defines names and types for generic properties. These are properties
598 than can be plugged into the backend directly. See the init file
599 @file{generic-property.scm} for details. For internal use only,
606 'Repeat_acknowledge_engraver
607 (engraver-description
608 "Repeat_acknowledge_engraver"
610 "Acknowledge repeated music, and convert the contents of
611 repeatCommands ainto an appropriate setting for whichBar"
614 (translator-property-description 'repeatCommands list? "")
615 (translator-property-description 'whichBar string? "")
621 'Rest_collision_engraver
622 (engraver-description
623 "Rest_collision_engraver"
624 "Handles collisions of rests."
632 (engraver-description
641 'Rhythmic_column_engraver
642 (engraver-description
643 "Rhythmic_column_engraver"
644 "Generates NoteColumn, an objects that groups stems, noteheads and rests."
651 'Script_column_engraver
652 (engraver-description
653 "Script_column_engraver"
662 (engraver-description
664 " Handles note ornaments generated by @code{\script}.
668 (translator-property-description 'scriptDefinitions list? "
669 Description of scripts to use. (fixme)
672 (translator-property-description 'scriptHorizontal boolean? " Put scripts left or right of note heads. Support for this is
673 limited. Accidentals will collide with scripts.
680 (engraver-description
682 "Top level engraver. Takes care of generating columns and the complete system (ie. LineOfScore)"
683 '(LineOfScore PaperColumn NonMusicalPaperColumn)
685 (translator-property-description 'currentMusicalColumn ly-element? "")
686 (translator-property-description 'currentCommandColumn ly-element? "")
689 (cons 'Skip_req_swallow_translator
690 (engraver-description
691 "Skip_req_swallow_translator"
700 (engraver-description
702 "Build slurs from Slur_reqs"
706 (translator-property-description 'slurBeginAttachment symbol? "translates to the car of Slur.element-property 'attachment.")
707 (translator-property-description 'slurEndAttachment symbol? "translates to the cdr of Slur.element-property 'attachment.")
708 (translator-property-description 'slurMelismaBusy boolean? "Signal a slur if automaticMelismata is set")
714 (engraver-description
716 "make a SpacingSpanner and do bookkeeping of shortest starting and playing notes "
723 'Span_arpeggio_engraver
724 (engraver-description
725 "Span_arpeggio_engraver"
729 (translator-property-description 'connectArpeggios boolean? " If
730 set, connect all arpeggios that are found. In this way, you can make
731 arpeggios that cross staffs.
738 (engraver-description
740 "This engraver makes cross-staff barlines: It catches all normal
741 bar lines, and draws a single span-bar across them."
749 'Staff_symbol_engraver
750 (engraver-description
751 "Staff_symbol_engraver"
752 "create the constellation of five (default) staff lines."
759 'Stanza_number_engraver
760 (engraver-description
761 "Stanza_number_engraver"
766 (translator-property-description 'stz string? "")
767 (translator-property-description 'stanza string? "Stanza `number' to print at start of a verse")
773 'System_start_delimiter_engraver
774 (engraver-description
775 "System_start_delimiter_engraver"
776 "creates a SystemStartDelimiter spanner"
777 '(SystemStartDelimiter)
784 (engraver-description
786 "Create text-scripts"
789 (translator-property-description 'scriptHorizontal boolean? " Put scripts left or right of note heads. Support for this is
790 limited. Accidentals will collide with scripts.
793 (translator-property-description 'textNonEmpty boolean? " If set
794 to true then text placed above or below the staff is not assumed to
795 have zero width. @code{fatText} and @code{emptyText} are predefined
802 'Text_spanner_engraver
803 (engraver-description
804 "Text_spanner_engraver"
805 "Create text spanner from a Span_req "
812 'Thread_devnull_engraver
813 (engraver-description
814 "Thread_devnull_engraver"
815 "Kill elements whenever we are Voice called `two' and
816 either unison, unisilence or soloADue is set"
823 (engraver-description
825 "Generate ties between noteheads of equal pitch."
830 (translator-property-description 'sparseTies boolean? "only create one tie per chord.")
831 (translator-property-description 'tieMelismaBusy boolean? "Signal ties when automaticMelismata is set")
836 'Time_signature_engraver
837 (engraver-description
838 "Time_signature_engraver"
839 "Create a TimeSignature whenever @code{timeSignatureFraction} changes"
847 (engraver-description
849 " Responsible for synchronizing timing information from staffs.
850 Normally in @code{Score}. In order to create polyrhythmic music,
851 this engraver should be removed from @code{Score} and placed in
855 (translator-property-description 'timeSignatureFraction number-pair? "
856 pair of numbers, signifying the time signature. For example #'(4 . 4) is a 4/4 time signature.")
858 (translator-property-description 'barNonAuto boolean? " If set to true then bar lines will not be printed
859 automatically; they must be explicitly created with @code{\bar}
860 keywords. Unlike with the @code{\cadenza} keyword, measures are
861 still counted. Bar generation will resume according to that
862 count if this property is set to zero.
864 (translator-property-description 'whichBar string? "if not set
865 explicitly (by \property or \bar), this is set according to values of
866 defaultBarType, barAlways, barNonAuto and measurePosition.
869 (translator-property-description 'barAlways boolean? " If set to true a bar line is drawn after each note.
871 (translator-property-description 'defaultBarType string? "Sets the default type of bar line. See Section XREF-barlines [FIXME]
872 for a list of available bar types.
874 (translator-property-description 'skipBars boolean? " Set to true to skip the empty bars that are produced by
875 multimeasure notes and rests. These bars will not appear on the
876 printed output. If not set (the default) multimeasure
877 notes and rests expand into their full length, printing the appropriate
878 number of empty bars so that synchronization with other voices is
881 @c my @vebatim patch would help...
883 @@mudela[fragment,verbatim,center]
884 r1 r1*3 R1*3\property Score.skipBars=1 r1*3 R1*3
890 (translator-property-description 'timing boolean? " Keep administration of measure length, position, bar number, etc?
891 Switch off for cadenzas.")
892 (translator-property-description 'oneBeat moment? " How long does one beat in the current time signature last?")
893 (translator-property-description 'measureLength moment? " How long does one measure in the current time signature last?")
894 (translator-property-description 'measurePosition moment? "
895 How much of the current measure (measured in whole notes) have we had?
897 (translator-property-description 'currentBarNumber integer? "Contains the current barnumber. This property is incremented at
905 (engraver-description
907 "Catch Time_scaled_music and generate appropriate bracket "
911 (translator-property-description 'tupletSpannerDuration moment? "
912 Normally a tuplet bracket is as wide as the
913 @code{\times} expression that gave rise to it. By setting this
914 property, you can make brackets last shorter. Example
917 @@mudela[verbatim,fragment]
918 \context Voice \times 2/3 @{
919 \property Voice.tupletSpannerDuration = #(make-moment 1 4)
925 (translator-property-description 'tupletInvisible boolean? "
926 If set to true, tuplet bracket creation is switched off
927 entirely. This has the same effect as setting both
928 @code{tupletNumberVisibility} and @code{tupletBracketVisibility} to
929 @code{#f}, but as this does not even create elements, this setting
930 uses less memory and time.")
935 'Vertical_align_engraver
936 (engraver-description
937 "Vertical_align_engraver"
938 "Catch Vertical axis groups and stack them."
945 'Voice_devnull_engraver
946 (engraver-description
947 "Voice_devnull_engraver"
948 "Kill off certain items and spanners if we're Voice `two' and unison or unisilence is set."
957 (define context-description-alist
960 The context for handling grace notes. It is instantiated
961 automatically when you use @code{\grace}. Basically, it is an
962 `embedded' miniature of the Score context. Since this context
963 needs special interaction with the rest of LilyPond, you should
964 not explicitly instantiate it.
967 Corresponds to a voice with lyrics. Handles the printing of a
968 single line of lyrics.
971 Handles note heads, and is contained in the Voice context. You
972 have to instantiate this explicitly if you want to adjust the
973 style of individual note heads.
976 Corresponds to a voice on a staff. This context handles the
977 conversion of dynamic signs, stems, beams, super- and subscripts,
978 slurs, ties, and rests.
980 You have to instantiate this explicitly if you want to have
981 multiple voices on the same staff.")
984 A voice with chord names. Handles printing of a line of chord
988 Typesets chord names. Can contain @code{ChordNamesVoice}
992 Typesets lyrics. It can contain @code{LyricVoice} contexts.
995 Handles clefs, bar lines, keys, accidentals. It can contain
996 @code{Voice} contexts.
999 A context like @code{Staff} but for printing rhythms. Pitches are
1000 ignored; the notes are printed on one line. It can contain
1001 @code{Voice} contexts.
1004 Contains @code{Staff} or @code{RhythmicStaff} contexts. It adds a
1005 brace on the left side, grouping the staffs together. The bar
1006 lines of the contained staffs are connected vertically. It can
1007 contain @code{Staff} contexts.")
1010 Just like @code{GrandStaff} but with @code{minVerticalAlign} set
1011 equal to @code{maxVerticalAlign} so that interstaff beaming and
1012 slurring can be used.")
1015 Contains @code{Staff} or @code{RhythmicStaff} contexts. Adds a
1016 bracket on the left side, grouping the staffs together. The bar
1017 lines of the contained staffs are connected vertically. It can
1018 contain @code{Staff}, @code{RhythmicStaff}, @code{GrandStaff}, or
1019 @code{Lyrics} contexts.
1022 Identical to @code{StaffGroup} except that the contained staffs
1023 are not connected vertically.
1026 This is the top level notation context. No other context can
1027 contain a @code{Score} context. This context handles the
1028 administration of time signatures. It also makes sure that items
1029 such as clefs, time signatures, and key-signatures are aligned
1030 across staffs. It can contain @code{Lyrics}, @code{Staff},
1031 @code{RhythmicStaff}, @code{GrandStaff}, @code{StaffGroup}, and
1032 @code{ChoirStaff} contexts.
1034 You cannot explicitly instantiate a Score context (since it is
1035 not contained in any other context). It is instantiated
1036 automatically when an output definition (a @code{\score} or
1037 @code{\paper} block) is processed.