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