]> git.donarmstrong.com Git - lilypond.git/blob - scm/translator-description.scm
patch::: 1.3.112.jcn1
[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"
14      '(Stem StemTremolo)
15      '(
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 Stems.
156 Uses beatLength, measureLength and measurePosition to decide when to start and stop a beam.
157 "
158      '(
159        Beam)
160      '(
161       noAutoBeaming
162       autoBeamSettings)))
163
164    (cons
165     'Bar_engraver
166     (engraver-description
167      "Bar_engraver"
168      "Create barlines. This engraver is controlled through the
169 @code{whichBar} property. If it has no bar line to create, it will forbid a linebreak at this point"
170      '(BarLine)
171      '(
172       whichBar
173       staffsFound
174       )))
175
176
177    (cons
178     'Bar_number_engraver
179     (engraver-description
180      "Bar_number_engraver"
181      "A bar number is created whenever measurePosition is zero. It is
182 put on top of all staffs, and appears only at  left side of the staff."
183      '(BarNumber)
184      '(
185       currentBarNumber
186       )))
187
188
189    (cons
190     'Beam_engraver
191     (engraver-description
192      "Beam_engraver"
193      "Handles Beam_requests by engraving Beams.    If omitted, then notes will be
194     printed with flags instead of beams."
195      '(Beam)
196      '(
197       beamMelismaBusy
198       )))
199
200    (cons
201     'Break_align_engraver
202     (engraver-description
203      "Break_align_engraver"
204      "Align graphic elements with corresponding break-align-symbols into groups, and order the groups according to breakAlignOrder"
205      '(BreakAlignment BreakAlignGroup LeftEdge)
206      '(
207       breakAlignOrder
208       
209       )))
210
211
212    (cons
213     'Breathing_sign_engraver
214     (engraver-description
215      "Breathing_sign_engraver"
216      ""
217      '(BreathingSign)
218      '(
219       )))
220
221
222    (cons
223     'Chord_name_engraver
224     (engraver-description
225      "Chord_name_engraver"
226      "Catch Note_req's, Tonic_reqs, Inversion_reqs, Bass_req
227 and generate the appropriate chordname."
228      '(ChordName)
229      '(
230       chordInversion
231       drarnChords
232       )))
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 Crescendo
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."
426      '(Glissando FollowThread)
427      '(
428       )))
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 pedals symbols."
456      '(SostenutoPedal SustainPedal UnaChordaPedal)
457      '(
458       
459         startSustain
460         stopSustain
461         stopStartSustain
462         startUnaChorda
463         stopUnaChorda
464       )))
465
466    (cons 
467     'Pitch_squash_engraver
468     (engraver-description
469      "Pitch_squash_engraver"
470      "Treat all pitches as middle C.  Note that the notes move, but
471 the locations of accidentals stay the same. 
472 Set the position field of all note heads to zero. This useful for
473 making a single line staff that demonstrates the rhythm of a melody."
474      '()
475      '(
476       squashedPosition
477       )))
478    
479    (cons
480     'Property_engraver
481     (engraver-description
482      "Property_engraver"
483 "This is a engraver that converts \property settings into
484 back-end element-property settings. Example: Voice.stemLength will set
485 #'length in all Stem objects.
486
487 Due to CPU and memory requirements, the use of this engraver is deprecated."
488      '()
489      '(Generic_property_list)
490       ))
491
492
493    (cons
494     'Repeat_acknowledge_engraver
495     (engraver-description
496      "Repeat_acknowledge_engraver"
497      
498      "Acknowledge repeated music, and convert the contents of
499 repeatCommands ainto an appropriate setting for whichBar"
500      '()
501      '(
502       repeatCommands
503       whichBar
504  
505       )))
506
507
508    (cons
509     'Rest_collision_engraver
510     (engraver-description
511      "Rest_collision_engraver"
512      "Handles collisions of rests."
513      '(RestCollision)
514      '(
515       )))
516
517
518    (cons
519     'Rest_engraver
520     (engraver-description
521      "Rest_engraver"
522      ""
523       '(Rest Dots)
524    '(
525       )))
526
527
528    (cons
529     'Rhythmic_column_engraver
530     (engraver-description
531      "Rhythmic_column_engraver"
532      "Generates NoteColumn, an objects that groups stems, noteheads and rests."
533      '(NoteColumn)
534      '(
535       )))
536
537
538    (cons
539     'Script_column_engraver
540     (engraver-description
541      "Script_column_engraver"
542      ""
543      '(ScriptColumn)
544      '(
545       )))
546
547
548    (cons
549     'Script_engraver
550     (engraver-description
551      "Script_engraver"
552      "    Handles note ornaments generated by @code{\script}.  
553 "
554      '(Script)
555      '(
556       scriptDefinitions 
557       scriptHorizontal
558       )))
559
560    (cons
561     'Score_engraver
562     (engraver-description
563      "Score_engraver"
564      "Top level engraver. Takes care of generating columns and the complete  system (ie. LineOfScore)
565
566 This engraver decides whether a column is breakable. The default is
567 that a column is always breakable. However, when every Bar_engraver
568 that does not have a barline at a certain point will call
569 Score_engraver::forbid_breaks to stop linebreaks.  In practice, this
570 means that you can make a breakpoint by creating a barline (assuming
571 that there are no beams or notes that prevent a breakpoint.)
572
573 "
574      '(LineOfScore PaperColumn NonMusicalPaperColumn)
575      '(
576       currentMusicalColumn
577       currentCommandColumn
578       )))
579    
580    (cons 'Skip_req_swallow_translator
581          (engraver-description
582           "Skip_req_swallow_translator"
583           ""
584           '()
585           '(
586            ;; FIXME
587            )))
588
589    (cons
590     'Slur_engraver
591     (engraver-description
592      "Slur_engraver"
593      "Build slurs from Slur_reqs"
594      '(Slur)
595
596      '(
597       slurBeginAttachment
598       slurEndAttachment
599       slurMelismaBusy
600       )))
601
602
603    (cons
604     'Spacing_engraver
605     (engraver-description
606      "Spacing_engraver"
607      "make a SpacingSpanner and do bookkeeping of shortest starting and playing notes  "
608      '(SpacingSpanner)
609      '(
610       )))
611
612
613    (cons
614     'Span_arpeggio_engraver
615     (engraver-description
616      "Span_arpeggio_engraver"
617      ""
618      '(Arpeggio)
619      '(
620       connectArpeggios
621       )))
622
623
624    (cons
625     'Span_bar_engraver
626     (engraver-description
627      "Span_bar_engraver"
628      "This engraver makes cross-staff barlines: It catches all normal
629 bar lines, and draws a single span-bar across them."
630
631      '(SpanBar)
632      '(
633       )))
634
635
636    (cons
637     'Staff_symbol_engraver
638     (engraver-description
639      "Staff_symbol_engraver"
640      "create the constellation of five (default) staff lines."
641      '(StaffSymbol)
642      '(
643       )))
644
645
646    (cons
647     'Stanza_number_engraver
648     (engraver-description
649      "Stanza_number_engraver"
650      ""
651      '(StanzaNumber
652        )
653      '(
654       stz
655       stanza
656       )))
657
658
659
660    (cons
661     'System_start_delimiter_engraver
662     (engraver-description
663      "System_start_delimiter_engraver"
664      "creates a SystemStartDelimiter spanner"
665      '(SystemStartDelimiter)
666      '(
667       )))
668
669
670    (cons
671     'Text_engraver
672     (engraver-description
673      "Text_engraver"
674      "Create text-scripts"
675      '(TextScript)
676      '(
677       scriptHorizontal
678       textNonEmpty
679       )))
680
681
682    (cons
683     'Text_spanner_engraver
684     (engraver-description
685      "Text_spanner_engraver"
686      "Create text spanner from a  Span_req "
687      '(TextSpanner)
688      '(
689       )))
690
691
692    (cons
693     'Thread_devnull_engraver
694     (engraver-description
695      "Thread_devnull_engraver"
696      "Kill elements whenever we are Voice called `two' and
697 either unison, unisilence or soloADue is set"
698      '()
699      '()))
700
701
702    (cons
703     'Tie_engraver
704     (engraver-description
705      "Tie_engraver"
706      "Generate ties between noteheads of equal pitch."
707      '(Tie TieColumn)
708      '(sparseTies
709       tieMelismaBusy
710       )))
711
712
713    (cons
714     'Time_signature_engraver
715     (engraver-description
716      "Time_signature_engraver"
717      "Create a TimeSignature whenever @code{timeSignatureFraction} changes"
718      '(TimeSignature)
719      '(
720       )))
721
722
723    (cons
724     'Timing_engraver
725     (engraver-description
726      "Timing_engraver"
727      " Responsible for synchronizing timing information from staffs. 
728     Normally in @code{Score}.  In order to create polyrhythmic music,
729     this engraver should be removed from @code{Score} and placed in
730     @code{Staff}."
731      '()
732      '(
733       timeSignatureFraction
734       barCheckNoSynchronize
735       barNonAuto
736       whichBar      
737       barAlways
738       defaultBarType
739       skipBars
740       timing
741       oneBeat
742       measureLength
743       measurePosition 
744       currentBarNumber
745       )))
746
747
748    (cons
749     'Tuplet_engraver
750     (engraver-description
751      "Tuplet_engraver"
752      "Catch Time_scaled_music and generate appropriate bracket  "
753      '(
754        TupletBracket)
755      '(
756       tupletSpannerDuration
757       tupletInvisible
758       )))
759
760
761    (cons
762     'Vertical_align_engraver
763     (engraver-description
764      "Vertical_align_engraver"
765      "Catch Vertical axis groups and stack them."
766      '(VerticalAlignment)
767      '(
768       )))
769
770
771    (cons
772     'Voice_devnull_engraver
773     (engraver-description
774      "Voice_devnull_engraver"
775      "Kill off certain items and spanners if we're Voice `two' and unison or unisilence is set."
776      '()
777      '(
778       )))
779    ))
780
781
782 (set! engraver-description-alist
783       (sort engraver-description-alist alist<?))
784
785 (define context-description-alist
786   '(
787 (Grace . "
788     The context for handling grace notes.  It is instantiated
789     automatically when you use @code{\grace}.  Basically, it is an
790     `embedded' miniature of the Score context.  Since this context
791     needs special interaction with the rest of LilyPond, you should
792     not explicitly instantiate it.
793 ")
794 (LyricVoice . "
795     Corresponds to a voice with lyrics.  Handles the printing of a
796     single line of lyrics.
797 ")
798 (Thread . "
799     Handles note heads, and is contained in the Voice context.  You
800     have to instantiate this explicitly if you want to adjust the
801     style of individual note heads.
802 ")
803 (Voice . "
804     Corresponds to a voice on a staff.  This context handles the
805     conversion of dynamic signs, stems, beams, super- and subscripts,
806     slurs, ties, and rests.
807
808     You have to instantiate this explicitly if you want to have
809     multiple voices on the same staff.")
810
811 (ChordNamesVoice . "
812     A voice with chord names.  Handles printing of a line of chord
813     names.")
814
815 (ChordNames . "
816     Typesets chord names.  Can contain @code{ChordNamesVoice}
817     contexts.")
818
819 (Lyrics . "
820     Typesets lyrics.  It can contain @code{LyricVoice} contexts.
821 ")
822 (Staff . "
823     Handles clefs, bar lines, keys, accidentals.  It can contain
824     @code{Voice} contexts.
825 ")
826 (RhythmicStaff . "
827     A context like @code{Staff} but for printing rhythms.  Pitches are
828     ignored; the notes are printed on one line.  It can contain
829     @code{Voice} contexts.
830 ")
831 (GrandStaff . "
832     Contains @code{Staff} or @code{RhythmicStaff} contexts.  It adds a
833     brace on the left side, grouping the staffs together.  The bar
834     lines of the contained staffs are connected vertically.  It can
835     contain @code{Staff} contexts.")
836
837 (PianoStaff . "
838     Just like @code{GrandStaff} but with @code{minVerticalAlign} set
839     equal to @code{maxVerticalAlign} so that interstaff beaming and
840     slurring can be used.")
841
842 (StaffGroup . "
843     Contains @code{Staff} or @code{RhythmicStaff} contexts.  Adds a
844     bracket on the left side, grouping the staffs together.  The bar
845     lines of the contained staffs are connected vertically.  It can
846     contain @code{Staff}, @code{RhythmicStaff}, @code{GrandStaff}, or
847     @code{Lyrics} contexts.
848 ")
849 (ChoirStaff . "
850     Identical to @code{StaffGroup} except that the contained staffs
851     are not connected vertically.
852 ")
853 (Score . "
854     This is the top level notation context.  No other context can
855     contain a @code{Score} context.  This context handles the
856     administration of time signatures.  It also makes sure that items
857     such as clefs, time signatures, and key-signatures are aligned
858     across staffs.  It can contain @code{Lyrics}, @code{Staff},
859     @code{RhythmicStaff}, @code{GrandStaff}, @code{StaffGroup}, and
860     @code{ChoirStaff} contexts.
861
862     You cannot explicitly instantiate a Score context (since it is
863     not contained in any other context).  It is instantiated
864     automatically when an output definition (a @code{\score} or
865     @code{\paper} block) is processed.
866 ")
867 )
868 )
869
870 (set! context-description-alist
871       (sort context-description-alist alist<?))
872