]> git.donarmstrong.com Git - lilypond.git/blob - scm/translator-description.scm
release: 1.3.121
[lilypond.git] / scm / translator-description.scm
1
2 (define (engraver-description name description created-elts properties)
3   (list name description created-elts properties)
4   )
5
6
7 (define engraver-description-alist
8   (list
9    (cons
10     'Stem_engraver
11     (engraver-description
12      "Stem_engraver"
13      "Create stems and single-stem tremolos.  It also works together with
14 the beam engraver for overriding beaming."
15      '(Stem StemTremolo)
16      '(tremoloFlags
17       stemLeftBeamCount
18       stemRightBeamCount    
19       )))
20    
21    (cons
22     'Hyphen_engraver
23     (engraver-description
24      "Hyphen_engraver"
25      "Create lyric hyphens"
26      '(LyricHyphen)
27      '(
28       )))
29
30    (cons
31     'Extender_engraver
32     (engraver-description
33      "Extender_engraver"
34      "Create lyric extenders"
35      '(LyricExtender)
36      '(
37       )))
38
39    
40    (cons
41     'Separating_line_group_engraver
42     (engraver-description
43      "Separating_line_group_engraver"
44      "Generates objects for computing spacing parameters."
45      '(SeparationItem SeparatingGroupSpanner)
46      '(
47       )))
48
49    (cons
50     'Axis_group_engraver
51     (engraver-description
52      "Axis_group_engraver"
53      "Group all objects created in this context in a VerticalAxisGroup spanner."
54      '(VerticalAxisGroup)
55      '(CONTEXTNAMEVerticalExtent CONTEXTNAMEMinimumVerticalExtent CONTEXTNAMExtraVerticalExtent)
56      ))
57
58    (cons
59     'Hara_kiri_engraver
60     (engraver-description
61      "Hara_kiri_engraver"
62      "Like Axis_group_engraver, but make a hara kiri spanner, and add
63 interesting items (ie. note heads, lyric syllables and normal rests)"
64      '(HaraKiriVerticalGroup)
65      '()
66      ))
67
68    
69    (cons
70     'Local_key_engraver
71     (engraver-description
72      "Local_key_engraver"
73      "Make accidentals.  Catches note heads, ties and notices key-change
74    events.  Due to interaction with ties (which don't come together
75    with note heads), this needs to be in a context higher than Tie_engraver.
76    (FIXME)."
77      '(Accidentals)
78      '(
79       localKeySignature
80       forgetAccidentals
81       noResetKey
82       
83       )))
84
85    
86    (cons
87     'Volta_engraver
88     (engraver-description
89      "Volta_engraver"
90      "Make volta brackets"
91      '(VoltaBracket)
92      '(repeatCommands voltaSpannerDuration)
93      ))
94
95    (cons
96     'Clef_engraver
97     (engraver-description
98      "Clef_engraver"
99      "Determine and set reference point for pitches"
100      '(Clef OctavateEight)
101      '(
102       clefPosition
103       clefGlyph
104       centralCPosition
105       clefOctavation
106       explicitClefVisibility
107       clefPitches
108
109       )))
110    
111    (cons
112     'A2_engraver
113     (engraver-description
114      "A2_engraver"
115      "Part combine engraver for orchestral scores."
116      '(TextScript)
117      '(
118       combineParts
119       soloADue
120       soloText
121       soloIIText
122       aDueText
123       split-interval
124       unison
125       solo
126       unisilence
127       unirhythm
128       )))
129
130    (cons
131     'Align_note_column_engraver
132     (engraver-description
133      "Align_note_column_engraver"
134      "Generate object to put grace notes from left to right."
135      '(GraceAlignment)
136      '(
137       
138       graceAlignPosition
139       graceAccidentalSpace
140       )))
141    
142    (cons
143     'Arpeggio_engraver
144     (engraver-description
145      "Arpeggio_engraver"
146      "Generate an Arpeggio from a Arpeggio_req"
147      '(Arpeggio)
148      '(
149       )))
150
151    (cons
152    'Auto_beam_engraver
153     (engraver-description
154      "Auto_beam_engraver"
155      "Generate beams based on measure characteristics and observed
156 Stems.  Uses beatLength, measureLength and measurePosition to decide
157 when to start and stop a beam.  Overriding beaming is done through
158 @ref{Stem_engraver} properties stemLeftBeamCount and
159 stemRightBeamCount.
160 "
161      '(
162        Beam)
163      '(
164       noAutoBeaming
165       autoBeamSettings)))
166
167    (cons
168     'Bar_engraver
169     (engraver-description
170      "Bar_engraver"
171      "Create barlines. This engraver is controlled through the
172 @code{whichBar} property. If it has no bar line to create, it will forbid a linebreak at this point"
173      '(BarLine)
174      '(
175       whichBar
176       staffsFound
177       )))
178
179
180    (cons
181     'Bar_number_engraver
182     (engraver-description
183      "Bar_number_engraver"
184      "A bar number is created whenever measurePosition is zero. It is
185 put on top of all staffs, and appears only at  left side of the staff."
186      '(BarNumber)
187      '(
188       currentBarNumber
189       )))
190
191
192    (cons
193     'Beam_engraver
194     (engraver-description
195      "Beam_engraver"
196      "Handles Beam_requests by engraving Beams.    If omitted, then notes will be
197     printed with flags instead of beams."
198      '(Beam)
199      '(
200       beamMelismaBusy
201       )))
202
203    (cons
204     'Break_align_engraver
205     (engraver-description
206      "Break_align_engraver"
207      "Align grobs with corresponding break-align-symbols into groups, and order the groups according to breakAlignOrder"
208      '(BreakAlignment BreakAlignGroup LeftEdge)
209      '(
210       breakAlignOrder
211       
212       )))
213
214
215    (cons
216     'Breathing_sign_engraver
217     (engraver-description
218      "Breathing_sign_engraver"
219      ""
220      '(BreathingSign)
221      '(
222       )))
223
224
225    (cons
226     'Chord_name_engraver
227     (engraver-description
228      "Chord_name_engraver"
229      "Catch Note_req's, Tonic_reqs, Inversion_reqs, Bass_req
230 and generate the appropriate chordname."
231      '(ChordName)
232      '(
233       chordInversion
234       drarnChords
235       )))
236
237
238    (cons
239     'Chord_tremolo_engraver
240     (engraver-description
241      "Chord_tremolo_engraver"
242      "Generates beams for the \repeat X tremolo ... construct"
243      '(Beam)
244      '(
245       )))
246
247
248
249    (cons
250     'Collision_engraver
251     (engraver-description
252      "Collision_engraver"
253      ""
254      '(NoteCollision
255        )
256      '(
257       )))
258
259    (cons
260     'Custos_engraver
261     (engraver-description
262      "Custos_engraver"
263      ""
264      '(Custos)
265      '(
266       )))
267
268
269    (cons
270     'Dot_column_engraver
271     (engraver-description
272      "Dot_column_engraver"
273      " Engraves dots on dotted notes shifted to the right of the note.
274 If omitted, then dots appear on top of the notes.
275 "
276      '(DotColumn
277        )
278      '(
279       )))
280
281
282    (cons
283     'Dynamic_engraver
284     (engraver-description
285      "Dynamic_engraver"
286      ""
287      '(DynamicLineSpanner
288        DynamicText Hairpin
289        TextSpanner)
290      '(
291       )))
292
293
294
295
296    (cons
297     'Grace_position_engraver
298     (engraver-description
299      "Grace_position_engraver"
300      "Attach a grace note alignment to a note-column "
301      '()
302      '(
303       )))
304
305    (cons
306     'Grace_engraver_group
307     (engraver-description
308      "Grace_engraver_group"
309      "An engraver that creates a `shielded' context-tree with separate notion of time"
310      '()
311      '(
312       )))
313
314
315    (cons
316     'Instrument_name_engraver
317     (engraver-description
318      "Instrument_name_engraver"
319      " Prints the name of the instrument (specified by
320     @code{Staff.instrument} and @code{Staff.instr}) at the left of the
321     staff."
322      '(InstrumentName)
323      '(
324       instrument
325       instr
326       )))
327
328    (cons
329     'Engraver_group_engraver
330     (engraver-description
331      "Engraver_group_engraver"
332      "A group of engravers taken together"
333      '()
334      '(
335       )))
336
337    (cons
338     'Key_engraver
339     (engraver-description
340      "Key_engraver"
341      ""
342      '(KeySignature
343        )
344      '(
345       
346       keySignature
347       keyOctaviation
348       explicitKeySignatureVisibility
349       createKeyOnClefChange
350       keyAccidentalOrder
351       keySignature
352       )))
353
354    (cons 'Lyric_engraver
355          (engraver-description
356           "Lyric_engraver"
357           ""
358           '()
359           '(
360            ;; FIXME
361            )))
362
363    (cons 'Lyric_phrasing_engraver
364          (engraver-description
365           "Lyric_phrasing_engraver"
366           ""
367           '()
368           '(
369            automaticPhrasing
370            weAreGraceContext
371            melismaEngraverBusy
372            associatedVoice
373            phrasingPunctuation
374            )))
375
376    (cons
377     'Mark_engraver
378     (engraver-description
379      "Mark_engraver"
380      ""
381      '(RehearsalMark)
382      '(
383
384       rehearsalMark
385       staffsFound
386       )))
387
388
389    (cons
390     'Melisma_engraver
391     (engraver-description
392      "Melisma_engraver"
393      ""
394      '()
395      '(
396
397       melismaBusy
398       slurMelismaBusy
399       tieMelismaBusy
400       beamMelismaBusy
401       )))
402
403
404    (cons
405     'Multi_measure_rest_engraver
406     (engraver-description
407      "Multi_measure_rest_engraver"
408      "Engraves multi-measure rests that are produced with @code{R}.  Reads
409 measurePosition and currentBarNumber to determine what number to print over the MultiMeasureRest
410    "
411      '(MultiMeasureRest)
412      '(
413       )))
414
415    (cons
416     'Note_heads_engraver
417     (engraver-description
418      "Note_heads_engraver"
419      "Generate one or more noteheads from Music of type Note_req."
420      '(NoteHead Dots)
421      '(
422       )))
423
424    (cons
425     'Note_head_line_engraver
426     (engraver-description
427      "Note_head_line_engraver"
428      "Engrave a line between two note heads."
429      '(Glissando FollowThread)
430      '(
431       )))
432
433    (cons
434     'Note_name_engraver
435     (engraver-description
436      "Note_name_engraver"
437      ""
438      '(NoteName)
439      '(
440       )))
441
442
443    (cons
444     'Output_property_engraver
445     (engraver-description
446      "Output_property_engraver"
447      "Interpret Music of Output_property type, and apply a function
448 to any Graphic objects that satisfies the predicate."
449      '()
450      '(
451       )))
452
453
454    (cons
455     'Piano_pedal_engraver
456     (engraver-description
457      "Piano_pedal_engraver"
458      "Engrave piano pedal symbols."
459      '(SostenutoPedal SustainPedal UnaChordaPedal)
460      '(pedalSostenutoStrings pedalSustainStrings pedalUnaChordaStrings
461       )))
462
463    (cons 
464     'Pitch_squash_engraver
465     (engraver-description
466      "Pitch_squash_engraver"
467      "Treat all pitches as middle C.  Note that the notes move, but
468 the locations of accidentals stay the same. 
469 Set the position field of all note heads to zero. This useful for
470 making a single line staff that demonstrates the rhythm of a melody."
471      '()
472      '(
473       squashedPosition
474       )))
475    
476    (cons
477     'Property_engraver
478     (engraver-description
479      "Property_engraver"
480 "This is a engraver that converts \property settings into
481 back-end grob-property settings. Example: Voice.stemLength will set
482 #'length in all Stem objects.
483
484 Due to CPU and memory requirements, the use of this engraver is deprecated."
485      '()
486      '(Generic_property_list)
487       ))
488
489
490    (cons
491     'Repeat_acknowledge_engraver
492     (engraver-description
493      "Repeat_acknowledge_engraver"
494      
495      "Acknowledge repeated music, and convert the contents of
496 repeatCommands ainto an appropriate setting for whichBar"
497      '()
498      '(
499       repeatCommands
500       whichBar
501  
502       )))
503
504
505    (cons
506     'Rest_collision_engraver
507     (engraver-description
508      "Rest_collision_engraver"
509      "Handles collisions of rests."
510      '(RestCollision)
511      '(
512       )))
513
514
515    (cons
516     'Rest_engraver
517     (engraver-description
518      "Rest_engraver"
519      ""
520       '(Rest Dots)
521    '(
522       )))
523
524
525    (cons
526     'Rhythmic_column_engraver
527     (engraver-description
528      "Rhythmic_column_engraver"
529      "Generates NoteColumn, an objects that groups stems, noteheads and rests."
530      '(NoteColumn)
531      '(
532       )))
533
534
535    (cons
536     'Script_column_engraver
537     (engraver-description
538      "Script_column_engraver"
539      ""
540      '(ScriptColumn)
541      '(
542       )))
543
544
545    (cons
546     'Script_engraver
547     (engraver-description
548      "Script_engraver"
549      "    Handles note ornaments generated by @code{\script}.  
550 "
551      '(Script)
552      '(
553       scriptDefinitions 
554       scriptHorizontal
555       )))
556
557    (cons
558     'Score_engraver
559     (engraver-description
560      "Score_engraver"
561      "Top level engraver. Takes care of generating columns and the complete  system (ie. LineOfScore)
562
563 This engraver decides whether a column is breakable. The default is
564 that a column is always breakable. However, when every Bar_engraver
565 that does not have a barline at a certain point will call
566 Score_engraver::forbid_breaks to stop linebreaks.  In practice, this
567 means that you can make a breakpoint by creating a barline (assuming
568 that there are no beams or notes that prevent a breakpoint.)
569
570 "
571      '(LineOfScore PaperColumn NonMusicalPaperColumn)
572      '(
573       currentMusicalColumn
574       currentCommandColumn
575       )))
576    
577    (cons 'Skip_req_swallow_translator
578          (engraver-description
579           "Skip_req_swallow_translator"
580           ""
581           '()
582           '(
583            ;; FIXME
584            )))
585
586    (cons
587     'Slur_engraver
588     (engraver-description
589      "Slur_engraver"
590      "Build slurs from Slur_reqs"
591      '(Slur)
592
593      '(
594       slurBeginAttachment
595       slurEndAttachment
596       slurMelismaBusy
597       )))
598
599
600    (cons
601     'Spacing_engraver
602     (engraver-description
603      "Spacing_engraver"
604      "make a SpacingSpanner and do bookkeeping of shortest starting and playing notes  "
605      '(SpacingSpanner)
606      '(
607       )))
608
609
610    (cons
611     'Span_arpeggio_engraver
612     (engraver-description
613      "Span_arpeggio_engraver"
614      ""
615      '(Arpeggio)
616      '(
617       connectArpeggios
618       )))
619
620
621    (cons
622     'Span_bar_engraver
623     (engraver-description
624      "Span_bar_engraver"
625      "This engraver makes cross-staff barlines: It catches all normal
626 bar lines, and draws a single span-bar across them."
627
628      '(SpanBar)
629      '(
630       )))
631
632
633    (cons
634     'Staff_symbol_engraver
635     (engraver-description
636      "Staff_symbol_engraver"
637      "create the constellation of five (default) staff lines."
638      '(StaffSymbol)
639      '(
640       )))
641
642
643    (cons
644     'Stanza_number_engraver
645     (engraver-description
646      "Stanza_number_engraver"
647      ""
648      '(StanzaNumber
649        )
650      '(
651       stz
652       stanza
653       )))
654
655
656
657    (cons
658     'System_start_delimiter_engraver
659     (engraver-description
660      "System_start_delimiter_engraver"
661      "creates a SystemStartDelimiter spanner"
662      '(SystemStartDelimiter)
663      '(
664       )))
665
666
667    (cons
668     'Text_engraver
669     (engraver-description
670      "Text_engraver"
671      "Create text-scripts"
672      '(TextScript)
673      '(
674       scriptHorizontal
675       textNonEmpty
676       )))
677
678
679    (cons
680     'Text_spanner_engraver
681     (engraver-description
682      "Text_spanner_engraver"
683      "Create text spanner from a  Span_req "
684      '(TextSpanner)
685      '(
686       )))
687
688
689    (cons
690     'Thread_devnull_engraver
691     (engraver-description
692      "Thread_devnull_engraver"
693      "Kill elements whenever we are Voice called `two' and
694 either unison, unisilence or soloADue is set"
695      '()
696      '()))
697
698
699    (cons
700     'Tie_engraver
701     (engraver-description
702      "Tie_engraver"
703      "Generate ties between noteheads of equal pitch."
704      '(Tie TieColumn)
705      '(sparseTies
706       tieMelismaBusy
707       )))
708
709
710    (cons
711     'Time_signature_engraver
712     (engraver-description
713      "Time_signature_engraver"
714      "Create a TimeSignature whenever @code{timeSignatureFraction} changes"
715      '(TimeSignature)
716      '(
717       )))
718
719
720    (cons
721     'Timing_engraver
722     (engraver-description
723      "Timing_engraver"
724      " Responsible for synchronizing timing information from staffs. 
725     Normally in @code{Score}.  In order to create polyrhythmic music,
726     this engraver should be removed from @code{Score} and placed in
727     @code{Staff}."
728      '()
729      '(
730       timeSignatureFraction
731       barCheckNoSynchronize
732       barNonAuto
733       whichBar      
734       barAlways
735       defaultBarType
736       skipBars
737       timing
738       oneBeat
739       measureLength
740       measurePosition 
741       currentBarNumber
742       )))
743
744
745    (cons
746     'Tuplet_engraver
747     (engraver-description
748      "Tuplet_engraver"
749      "Catch Time_scaled_music and generate appropriate bracket  "
750      '(
751        TupletBracket)
752      '(
753       tupletSpannerDuration
754       tupletInvisible
755       )))
756
757
758    (cons
759     'Vertical_align_engraver
760     (engraver-description
761      "Vertical_align_engraver"
762      "Catch Vertical axis groups and stack them."
763      '(VerticalAlignment)
764      '(
765       )))
766
767
768    (cons
769     'Voice_devnull_engraver
770     (engraver-description
771      "Voice_devnull_engraver"
772      "Kill off certain items and spanners if we're Voice `two' and unison or unisilence is set."
773      '()
774      '(
775       )))
776    ))
777
778
779 (set! engraver-description-alist
780       (sort engraver-description-alist alist<?))
781
782 (define context-description-alist
783   '(
784 (Grace . "
785     The context for handling grace notes.  It is instantiated
786     automatically when you use @code{\grace}.  Basically, it is an
787     `embedded' miniature of the Score context.  Since this context
788     needs special interaction with the rest of LilyPond, you should
789     not explicitly instantiate it.
790 ")
791 (LyricsVoice . "
792     Corresponds to a voice with lyrics.  Handles the printing of a
793     single line of lyrics.
794 ")
795 (Thread . "
796     Handles note heads, and is contained in the Voice context.  You
797     have to instantiate this explicitly if you want to adjust the
798     style of individual note heads.
799 ")
800 (Voice . "
801     Corresponds to a voice on a staff.  This context handles the
802     conversion of dynamic signs, stems, beams, super- and subscripts,
803     slurs, ties, and rests.
804
805     You have to instantiate this explicitly if you want to have
806     multiple voices on the same staff.")
807
808 (ChordNamesVoice . "
809     A voice with chord names.  Handles printing of a line of chord
810     names.")
811
812 (ChordNames . "
813     Typesets chord names.  Can contain @code{ChordNamesVoice}
814     contexts.")
815
816 (Lyrics . "
817     Typesets lyrics.  It can contain @code{LyricsVoice} contexts.
818 ")
819 (Staff . "
820     Handles clefs, bar lines, keys, accidentals.  It can contain
821     @code{Voice} contexts.
822 ")
823 (RhythmicStaff . "
824     A context like @code{Staff} but for printing rhythms.  Pitches are
825     ignored; the notes are printed on one line.  It can contain
826     @code{Voice} contexts.
827 ")
828 (GrandStaff . "
829     Contains @code{Staff} or @code{RhythmicStaff} contexts.  It adds a
830     brace on the left side, grouping the staffs together.  The bar
831     lines of the contained staffs are connected vertically.  It can
832     contain @code{Staff} contexts.")
833
834 (PianoStaff . "
835     Just like @code{GrandStaff} but with @code{minVerticalAlign} set
836     equal to @code{maxVerticalAlign} so that interstaff beaming and
837     slurring can be used.")
838
839 (StaffGroup . "
840     Contains @code{Staff} or @code{RhythmicStaff} contexts.  Adds a
841     bracket on the left side, grouping the staffs together.  The bar
842     lines of the contained staffs are connected vertically.  It can
843     contain @code{Staff}, @code{RhythmicStaff}, @code{GrandStaff}, or
844     @code{Lyrics} contexts.
845 ")
846 (ChoirStaff . "
847     Identical to @code{StaffGroup} except that the contained staffs
848     are not connected vertically.
849 ")
850 (Score . "
851     This is the top level notation context.  No other context can
852     contain a @code{Score} context.  This context handles the
853     administration of time signatures.  It also makes sure that items
854     such as clefs, time signatures, and key-signatures are aligned
855     across staffs.  It can contain @code{Lyrics}, @code{Staff},
856     @code{RhythmicStaff}, @code{GrandStaff}, @code{StaffGroup}, and
857     @code{ChoirStaff} contexts.
858
859     You cannot explicitly instantiate a Score context (since it is
860     not contained in any other context).  It is instantiated
861     automatically when an output definition (a @code{\score} or
862     @code{\paper} block) is processed.
863 ")
864 )
865 )
866
867 (set! context-description-alist
868       (sort context-description-alist alist<?))
869