]> git.donarmstrong.com Git - lilypond.git/blob - scm/translator-description.scm
754ab1cc00e77ab8e6578b81cc6d6ebd31029ddb
[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      '(chordChanges)))
233
234
235    (cons
236     'Chord_tremolo_engraver
237     (engraver-description
238      "Chord_tremolo_engraver"
239      "Generates beams for the \repeat X tremolo ... construct"
240      '(Beam)
241      '(
242       )))
243
244
245
246    (cons
247     'Collision_engraver
248     (engraver-description
249      "Collision_engraver"
250      ""
251      '(NoteCollision
252        )
253      '(
254       )))
255
256    (cons
257     'Custos_engraver
258     (engraver-description
259      "Custos_engraver"
260      ""
261      '(Custos)
262      '(
263       )))
264
265
266    (cons
267     'Dot_column_engraver
268     (engraver-description
269      "Dot_column_engraver"
270      " Engraves dots on dotted notes shifted to the right of the note.
271 If omitted, then dots appear on top of the notes.
272 "
273      '(DotColumn
274        )
275      '(
276       )))
277
278
279    (cons
280     'Dynamic_engraver
281     (engraver-description
282      "Dynamic_engraver"
283      ""
284      '(DynamicLineSpanner
285        DynamicText Hairpin
286        TextSpanner)
287      '(
288       )))
289
290
291
292
293    (cons
294     'Grace_position_engraver
295     (engraver-description
296      "Grace_position_engraver"
297      "Attach a grace note alignment to a note-column "
298      '()
299      '(
300       )))
301
302    (cons
303     'Grace_engraver_group
304     (engraver-description
305      "Grace_engraver_group"
306      "An engraver that creates a `shielded' context-tree with separate notion of time"
307      '()
308      '(
309       )))
310
311
312    (cons
313     'Instrument_name_engraver
314     (engraver-description
315      "Instrument_name_engraver"
316      " Prints the name of the instrument (specified by
317     @code{Staff.instrument} and @code{Staff.instr}) at the left of the
318     staff."
319      '(InstrumentName)
320      '(
321       instrument
322       instr
323       )))
324
325    (cons
326     'Engraver_group_engraver
327     (engraver-description
328      "Engraver_group_engraver"
329      "A group of engravers taken together"
330      '()
331      '(
332       )))
333
334    (cons
335     'Key_engraver
336     (engraver-description
337      "Key_engraver"
338      ""
339      '(KeySignature
340        )
341      '(
342       
343       keySignature
344       keyOctaviation
345       explicitKeySignatureVisibility
346       createKeyOnClefChange
347       keyAccidentalOrder
348       keySignature
349       )))
350
351    (cons 'Lyric_engraver
352          (engraver-description
353           "Lyric_engraver"
354           ""
355           '()
356           '(
357            ;; FIXME
358            )))
359
360    (cons 'Lyric_phrasing_engraver
361          (engraver-description
362           "Lyric_phrasing_engraver"
363           ""
364           '()
365           '(
366            automaticPhrasing
367            weAreGraceContext
368            melismaEngraverBusy
369            associatedVoice
370            phrasingPunctuation
371            )))
372
373    (cons
374     'Mark_engraver
375     (engraver-description
376      "Mark_engraver"
377      ""
378      '(RehearsalMark)
379      '(
380
381       rehearsalMark
382       staffsFound
383       )))
384
385
386    (cons
387     'Melisma_engraver
388     (engraver-description
389      "Melisma_engraver"
390      ""
391      '()
392      '(
393
394       melismaBusy
395       slurMelismaBusy
396       tieMelismaBusy
397       beamMelismaBusy
398       )))
399
400
401    (cons
402     'Multi_measure_rest_engraver
403     (engraver-description
404      "Multi_measure_rest_engraver"
405      "Engraves multi-measure rests that are produced with @code{R}.  Reads
406 measurePosition and currentBarNumber to determine what number to print over the MultiMeasureRest
407    "
408      '(MultiMeasureRest)
409      '(
410       )))
411
412    (cons
413     'Note_heads_engraver
414     (engraver-description
415      "Note_heads_engraver"
416      "Generate one or more noteheads from Music of type Note_req."
417      '(NoteHead Dots)
418      '(
419       )))
420
421    (cons
422     'Note_head_line_engraver
423     (engraver-description
424      "Note_head_line_engraver"
425      "Engrave a line between two note heads, for example a glissando.
426 If followThread is set, staff switches also generate a line."
427      '(Glissando FollowThread)
428      '(followThread)))
429
430    (cons
431     'Note_name_engraver
432     (engraver-description
433      "Note_name_engraver"
434      ""
435      '(NoteName)
436      '(
437       )))
438
439
440    (cons
441     'Output_property_engraver
442     (engraver-description
443      "Output_property_engraver"
444      "Interpret Music of Output_property type, and apply a function
445 to any Graphic objects that satisfies the predicate."
446      '()
447      '(
448       )))
449
450
451    (cons
452     'Piano_pedal_engraver
453     (engraver-description
454      "Piano_pedal_engraver"
455      "Engrave piano pedal symbols."
456      '(SostenutoPedal SustainPedal UnaChordaPedal)
457      '(pedalSostenutoStrings pedalSustainStrings pedalUnaChordaStrings
458       )))
459
460    (cons 
461     'Pitch_squash_engraver
462     (engraver-description
463      "Pitch_squash_engraver"
464      "Treat all pitches as middle C.  Note that the notes move, but
465 the locations of accidentals stay the same. 
466 Set the position field of all note heads to zero. This useful for
467 making a single line staff that demonstrates the rhythm of a melody."
468      '()
469      '(
470       squashedPosition
471       )))
472    
473    (cons
474     'Property_engraver
475     (engraver-description
476      "Property_engraver"
477 "This is a engraver that converts \property settings into
478 back-end grob-property settings. Example: Voice.stemLength will set
479 #'length in all Stem objects.
480
481 Due to CPU and memory requirements, the use of this engraver is deprecated."
482      '()
483      '(Generic_property_list)
484       ))
485
486
487    (cons
488     'Repeat_acknowledge_engraver
489     (engraver-description
490      "Repeat_acknowledge_engraver"
491      
492      "Acknowledge repeated music, and convert the contents of
493 repeatCommands ainto an appropriate setting for whichBar"
494      '()
495      '(
496       repeatCommands
497       whichBar
498  
499       )))
500
501
502    (cons
503     'Rest_collision_engraver
504     (engraver-description
505      "Rest_collision_engraver"
506      "Handles collisions of rests."
507      '(RestCollision)
508      '(
509       )))
510
511
512    (cons
513     'Rest_engraver
514     (engraver-description
515      "Rest_engraver"
516      ""
517       '(Rest Dots)
518    '(
519       )))
520
521
522    (cons
523     'Rhythmic_column_engraver
524     (engraver-description
525      "Rhythmic_column_engraver"
526      "Generates NoteColumn, an objects that groups stems, noteheads and rests."
527      '(NoteColumn)
528      '(
529       )))
530
531
532    (cons
533     'Script_column_engraver
534     (engraver-description
535      "Script_column_engraver"
536      ""
537      '(ScriptColumn)
538      '(
539       )))
540
541
542    (cons
543     'Script_engraver
544     (engraver-description
545      "Script_engraver"
546      "    Handles note ornaments generated by @code{\script}.  
547 "
548      '(Script)
549      '(
550       scriptDefinitions 
551       scriptHorizontal
552       )))
553
554    (cons
555     'Score_engraver
556     (engraver-description
557      "Score_engraver"
558      "Top level engraver. Takes care of generating columns and the complete  system (ie. LineOfScore)
559
560 This engraver decides whether a column is breakable. The default is
561 that a column is always breakable. However, when every Bar_engraver
562 that does not have a barline at a certain point will call
563 Score_engraver::forbid_breaks to stop linebreaks.  In practice, this
564 means that you can make a breakpoint by creating a barline (assuming
565 that there are no beams or notes that prevent a breakpoint.)
566
567 "
568      '(LineOfScore PaperColumn NonMusicalPaperColumn)
569      '(
570       currentMusicalColumn
571       currentCommandColumn
572       )))
573    
574    (cons 'Skip_req_swallow_translator
575          (engraver-description
576           "Skip_req_swallow_translator"
577           ""
578           '()
579           '(
580            ;; FIXME
581            )))
582
583    (cons
584     'Slur_engraver
585     (engraver-description
586      "Slur_engraver"
587      "Build slurs from Slur_reqs"
588      '(Slur)
589
590      '(
591       slurBeginAttachment
592       slurEndAttachment
593       slurMelismaBusy
594       )))
595
596
597    (cons
598     'Spacing_engraver
599     (engraver-description
600      "Spacing_engraver"
601      "make a SpacingSpanner and do bookkeeping of shortest starting and playing notes  "
602      '(SpacingSpanner)
603      '(
604       )))
605
606
607    (cons
608     'Span_arpeggio_engraver
609     (engraver-description
610      "Span_arpeggio_engraver"
611      ""
612      '(Arpeggio)
613      '(
614       connectArpeggios
615       )))
616
617
618    (cons
619     'Span_bar_engraver
620     (engraver-description
621      "Span_bar_engraver"
622      "This engraver makes cross-staff barlines: It catches all normal
623 bar lines, and draws a single span-bar across them."
624
625      '(SpanBar)
626      '(
627       )))
628
629
630    (cons
631     'Staff_symbol_engraver
632     (engraver-description
633      "Staff_symbol_engraver"
634      "create the constellation of five (default) staff lines."
635      '(StaffSymbol)
636      '(
637       )))
638
639
640    (cons
641     'Stanza_number_engraver
642     (engraver-description
643      "Stanza_number_engraver"
644      ""
645      '(StanzaNumber
646        )
647      '(
648       stz
649       stanza
650       )))
651
652
653
654    (cons
655     'System_start_delimiter_engraver
656     (engraver-description
657      "System_start_delimiter_engraver"
658      "creates a SystemStartDelimiter spanner"
659      '(SystemStartDelimiter)
660      '(
661       )))
662
663
664    (cons
665     'Text_engraver
666     (engraver-description
667      "Text_engraver"
668      "Create text-scripts"
669      '(TextScript)
670      '(
671       scriptHorizontal
672       textNonEmpty
673       )))
674
675
676    (cons
677     'Text_spanner_engraver
678     (engraver-description
679      "Text_spanner_engraver"
680      "Create text spanner from a  Span_req "
681      '(TextSpanner)
682      '(
683       )))
684
685
686    (cons
687     'Thread_devnull_engraver
688     (engraver-description
689      "Thread_devnull_engraver"
690      "Kill elements whenever we are Voice called `two' and
691 either unison, unisilence or soloADue is set"
692      '()
693      '()))
694
695
696    (cons
697     'Tie_engraver
698     (engraver-description
699      "Tie_engraver"
700      "Generate ties between noteheads of equal pitch."
701      '(Tie TieColumn)
702      '(sparseTies
703       tieMelismaBusy
704       )))
705
706
707    (cons
708     'Time_signature_engraver
709     (engraver-description
710      "Time_signature_engraver"
711      "Create a TimeSignature whenever @code{timeSignatureFraction} changes"
712      '(TimeSignature)
713      '(
714       )))
715
716
717    (cons
718     'Timing_engraver
719     (engraver-description
720      "Timing_engraver"
721      " Responsible for synchronizing timing information from staffs. 
722     Normally in @code{Score}.  In order to create polyrhythmic music,
723     this engraver should be removed from @code{Score} and placed in
724     @code{Staff}."
725      '()
726      '(
727       timeSignatureFraction
728       barCheckNoSynchronize
729       barNonAuto
730       whichBar      
731       barAlways
732       defaultBarType
733       skipBars
734       timing
735       oneBeat
736       measureLength
737       measurePosition 
738       currentBarNumber
739       )))
740
741
742    (cons
743     'Tuplet_engraver
744     (engraver-description
745      "Tuplet_engraver"
746      "Catch Time_scaled_music and generate appropriate bracket  "
747      '( TupletBracket)
748      '(tupletNumberFormatFunction tupletSpannerDuration tupletInvisible)))
749
750
751    (cons
752     'Vertical_align_engraver
753     (engraver-description
754      "Vertical_align_engraver"
755      "Catch Vertical axis groups and stack them."
756      '(VerticalAlignment)
757      '(
758       )))
759
760
761    (cons
762     'Voice_devnull_engraver
763     (engraver-description
764      "Voice_devnull_engraver"
765      "Kill off certain items and spanners if we're Voice `two' and unison or unisilence is set."
766      '()
767      '(
768       )))
769    ))
770
771
772 (set! engraver-description-alist
773       (sort engraver-description-alist alist<?))
774
775 (define context-description-alist
776   '(
777 (Grace . "
778     The context for handling grace notes.  It is instantiated
779     automatically when you use @code{\grace}.  Basically, it is an
780     `embedded' miniature of the Score context.  Since this context
781     needs special interaction with the rest of LilyPond, you should
782     not explicitly instantiate it.
783 ")
784 (LyricsVoice . "
785     Corresponds to a voice with lyrics.  Handles the printing of a
786     single line of lyrics.
787 ")
788 (Thread . "
789     Handles note heads, and is contained in the Voice context.  You
790     have to instantiate this explicitly if you want to adjust the
791     style of individual note heads.
792 ")
793 (Voice . "
794     Corresponds to a voice on a staff.  This context handles the
795     conversion of dynamic signs, stems, beams, super- and subscripts,
796     slurs, ties, and rests.
797
798     You have to instantiate this explicitly if you want to have
799     multiple voices on the same staff.")
800
801 (ChordNamesVoice . "
802     A voice with chord names.  Handles printing of a line of chord
803     names.")
804
805 (ChordNames . "
806     Typesets chord names.  Can contain @code{ChordNamesVoice}
807     contexts.")
808
809 (Lyrics . "
810     Typesets lyrics.  It can contain @code{LyricsVoice} contexts.
811 ")
812 (Staff . "
813     Handles clefs, bar lines, keys, accidentals.  It can contain
814     @code{Voice} contexts.
815 ")
816 (RhythmicStaff . "
817     A context like @code{Staff} but for printing rhythms.  Pitches are
818     ignored; the notes are printed on one line.  It can contain
819     @code{Voice} contexts.
820 ")
821 (GrandStaff . "
822     Contains @code{Staff} or @code{RhythmicStaff} contexts.  It adds a
823     brace on the left side, grouping the staffs together.  The bar
824     lines of the contained staffs are connected vertically.  It can
825     contain @code{Staff} contexts.")
826
827 (PianoStaff . "
828     Just like @code{GrandStaff} but with @code{minVerticalAlign} set
829     equal to @code{maxVerticalAlign} so that interstaff beaming and
830     slurring can be used.")
831
832 (StaffGroup . "
833     Contains @code{Staff} or @code{RhythmicStaff} contexts.  Adds a
834     bracket on the left side, grouping the staffs together.  The bar
835     lines of the contained staffs are connected vertically.  It can
836     contain @code{Staff}, @code{RhythmicStaff}, @code{GrandStaff}, or
837     @code{Lyrics} contexts.
838 ")
839 (ChoirStaff . "
840     Identical to @code{StaffGroup} except that the contained staffs
841     are not connected vertically.
842 ")
843 (Score . "
844     This is the top level notation context.  No other context can
845     contain a @code{Score} context.  This context handles the
846     administration of time signatures.  It also makes sure that items
847     such as clefs, time signatures, and key-signatures are aligned
848     across staffs.  It can contain @code{Lyrics}, @code{Staff},
849     @code{RhythmicStaff}, @code{GrandStaff}, @code{StaffGroup}, and
850     @code{ChoirStaff} contexts.
851
852     You cannot explicitly instantiate a Score context (since it is
853     not contained in any other context).  It is instantiated
854     automatically when an output definition (a @code{\score} or
855     @code{\paper} block) is processed.
856 ")
857 )
858 )
859
860 (set! context-description-alist
861       (sort context-description-alist alist<?))
862