typeset with a full size clef. By default, clef changes are
typeset in smaller size.
-
-
- @item @code{supportedClefTypes}@indexcode{supportedClefTypes} @propertytype{alist}
-
- Clef settings supported. The value is an association list clef
-descriptions indexed by clef name (alto, baritone, etc.). A clef
-description is a list with the glyph name, and the staff position
-where it should go. For internal use.
-
- @item @code{clefPitches}@indexcode{clefPitches} @propertytype{alist}
- Settings for the position of the central C, relative to this clef
- symbol. For internal use.
-
- @item @code{defaultClef}@indexcode{defaultClef} @propertytype{string}
- Clef setting to use when this context is created. If unset,
-no clef is printed upon creation.
-
- @item @code{marginDirection}@indexcode{marginDirection} @propertytype{direction}
- Set to @code{\left} or @code{\right} to specify location of
- marginal scripts.
-
- @item @code{marginScriptPadding}@indexcode{marginScriptPadding}
- Specify extra space for marginal scripts.
-
- @item @code{forgetAccidentals}@indexcode{forgetAccidentals} @propertytype{boolean}
- Causes accidentals to be printed at every note instead of
- remembered for the duration of a measure.
-
- @item @code{noResetKey}@indexcode{noResetKey} @propertytype{boolean}
- Do not reset the key at the start of a measure. Accidentals will
- be printed only once and are in effect until overridden, possibly
- many measures later.
@item @code{staffSpace}@indexcode{staffLineLeading} @propertytype{number}
Specifies the distance (in points) between lines of the staff.
@item @code{noVoltaBraces}@indexcode{noVoltaBraces} @propertytype{boolean}
Set to true to suppress the printing of brackets over alternate
- endings specified by the command @code{\alternative}.
+ endings specified by the command @code{\alternative}. [BROKEN]
@item @code{barAlways}@indexcode{barAlways} @propertytype{boolean}
@end mudela
@item @code{voltaSpannerDuration}@indexcode{voltaSpannerDuration} @propertytype{moment}
- Set to an integer to control the size of the brackets printed by
- @code{\alternative}. The integer specifies the number of whole
- notes duration to use for the brackets. It is rounded to the
- nearest measure. This can be used to shrink the length of
- brackets in the situation where one alternative is very large.
- It may have odd effects if the specified duration is longer than
- the music given in an @code{\alternative}.
+
@end table
@subsubheading GrandStaff properties
PACKAGE_NAME=LilyPond
MAJOR_VERSION=1
MINOR_VERSION=3
-PATCH_LEVEL=101
+PATCH_LEVEL=102
MY_PATCH_LEVEL=
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
--- /dev/null
+(eval-string (ly-gulp-file "translator-description.scm"))
+
+(define (document-trans-property prop-desc)
+ (string-append "<li><code>" (car prop-desc) "</code>"
+ " (" (type-name (cadr prop-desc)) "):"
+ (caddr prop-desc)
+ )
+ )
+
+(define (document-engraver engraver-name)
+
+ (let*
+ (
+ (eg (assoc (string->symbol engraver-name) engraver-description-alist))
+ (engraver-descr (if (eq? eg #f) '() (cdr eg)))
+ )
+
+
+ (if (eq? eg #f)
+ (string-append "<hr>Engraver " engraver-name ", not documented.\n")
+ (string-append
+ "<hr><h2><code>" (car engraver-descr) "</code></h2>\n"
+ "<h3>Description</h3>"
+ (cadr engraver-descr)
+ "<p>This engraver creates the following elements:\n "
+ (human-listify (map urlfy (caddr engraver-descr)))
+ "<ul>\n"
+ (apply string-append
+ (map (lambda (x) (document-trans-property x))
+ (car (cdddr engraver-descr)))
+ )
+ "</ul>\n"
+ )
+
+ )
+ )
+ )
+
+(define (urlfy x)
+ (string-append "<a href=" x ".html>" x "</a>"))
+
+(define (human-listify l)
+ (cond
+ ((null? l) "none")
+ ((null? (cdr l)) (car l))
+ ((null? (cddr l)) (string-append (car l) " and " (cadr l)))
+ (else (string-append (car l) ", " (human-listify (cdr l))))
+ ))
+
+
+
+
+(define (context-doc-string context-desc)
+ (let*
+ (
+ (nm (cdr (assoc 'type-name context-desc)))
+ (accepts (cdr (assoc 'accepts context-desc)))
+ (consists (append
+ (cdr (assoc 'consists context-desc))
+ (cdr (assoc 'end-consists context-desc))
+ ))
+ )
+
+ (string-append
+ "<h1>" nm "</h1>\n"
+ "accepts:\n"
+ (human-listify (map urlfy accepts))
+ "<hr>\n"
+ (apply string-append
+ (map document-engraver consists)
+ )
+ )
+ )
+ )
+
+;; FIXME element ChordNames overwrites context ChordNames.
+(define (document-context context-desc)
+ (let*
+ (
+ (name (cdr (assoc 'type-name context-desc)))
+ (docstr (context-doc-string context-desc))
+ (outname (string-append name ".html"))
+ (out (open-output-file outname))
+ )
+
+ (display (string-append "Writing " outname " ... \n") (current-error-port))
+ (display
+ (string-append "<title>LilyPond Context " name " </title>"
+ docstr)
+ out
+ )
+ outname)
+ )
+
+
+
+(define (document-paper paper-alist)
+ (let*
+ (
+ (ufiles (map (lambda (x) (document-context x )) paper-alist))
+ (files (sort ufiles string<?))
+ (outname (string-append "translation.html"))
+ (out (open-output-file outname))
+ (l (map (lambda (x) (string-append
+ "<li><a href=" x ">" x "</a>\n"))
+ files))
+ )
+ (write files)
+ (display
+ (string-append
+ "<title>LilyPond music translation documentation</title>"
+ "<h1>LilyPond music translation documentation</h1>"
+ "<ul>"
+ (apply string-append l)
+ "</ul>"
+ )
+ out
+ )
+ )
+ )
+
+; (display (document-engraver 'Stem_engraver))
+
+(document-paper (My_lily_parser::paper_description))
+
+;(display (human-listify '("a" "b" "c")))
--- /dev/null
+
+(define (engraver-description name description created-elts properties)
+ (list name description created-elts properties)
+ )
+
+(define (translator-property-description symbol type? description)
+ (list symbol type? description)
+ )
+
+(define engraver-description-alist
+ (list
+ (cons
+ 'Stem_engraver
+ (engraver-description
+ "Stem_engraver"
+ "Create stems and single-stem tremolos"
+ '(Stem StemTremolo)
+ (list
+ (translator-property-description 'tremoloFlags integer? "")
+ (translator-property-description 'stemLeftBeamCount integer? "")
+ (translator-property-description 'stemRightBeamCount integer? "")
+ )))
+
+ (cons
+ 'Hyphen_engraver
+ (engraver-description
+ "Hyphen_engraver"
+ "Create lyric hyphens"
+ '(LyricHyphen)
+ (list
+ )))
+
+ (cons
+ 'Extender_engraver
+ (engraver-description
+ "Extender_engraver"
+ "Create lyric extenders"
+ '(LyricExtender)
+ (list
+ )))
+
+
+ (cons
+ 'Separating_line_group_engraver
+ (engraver-description
+ "Separating_line_group_engraver"
+ "Objects that generate rods and springs for the spacing problem."
+ '(SeparationItem SeparatingGroupSpanner)
+ (list
+ )))
+
+ (cons
+ 'Axis_group_engraver
+ (engraver-description
+ "Axis_group_engraver"
+ "Group all objects created in this context in a VerticalAxisGroup spanner."
+ '(VerticalAxisGroup)
+ (list
+ (translator-property-description 'CONTEXTNAMEVerticalExtent number-pair? "hard coded vertical extent [fixme, naming]")
+ (translator-property-description 'CONTEXTNAMEMinimumVerticalExtent number-pair? "minimum vertical extent [fixme, naming]")
+ (translator-property-description 'CONTEXTNAExtraVerticalExtent number-pair? "extra vertical extent [fixme, naming]")
+ )))
+
+ (cons
+ 'Hara_kiri_engraver
+ (engraver-description
+ "Hara_kiri_engraver"
+ "Like Axis_group_engraver, but make a hara kiri spanner, and add
+interesting items (ie. note heads, lyric syllables and normal rests)"
+ '(HaraKiriVerticalGroup)
+ '()
+ ))
+
+
+ (cons
+ 'Local_key_engraver
+ (engraver-description
+ "Local_key_engraver"
+ "Make accidentals. Catches note heads, ties and notices key-change
+ events. Due to interaction with ties (which don't come together
+ with note heads), this needs to be in a context higher than Tie_engraver.
+ (FIXME)."
+ '(Accidentals)
+ (list
+ (translator-property-description 'localKeySignature list? "the key signature at this point in the measure")
+ (translator-property-description 'forgetAccidentals boolean? "do
+not set localKeySignature when a note alterated differently from
+localKeySignature is found.
+<p>
+Causes accidentals to be printed at every note instead of
+remembered for the duration of a measure.
+")
+ (translator-property-description 'noResetKey boolean? "Do not
+reset local key to the value of keySignature at the start of a measure,
+as determined by measurePosition.<p>
+ Do not reset the key at the start of a measure. Accidentals will
+ be printed only once and are in effect until overridden, possibly
+ many measures later.
+")
+
+ )))
+
+
+ (cons
+ 'Volta_engraver
+ (engraver-description
+ "Volta_engraver"
+ "Make volta brackets"
+ '(VoltaBracket)
+ (list
+ (translator-property-description 'repeatCommands list?
+"This property is read to find any command of the form (volta . X), where X is a string or #f")
+ (translator-property-description 'voltaSpannerDuration moment?
+"maximum duration of the volta bracket.<p>
+
+ Set to a duration to control the size of the brackets printed by
+@code{\alternative}. It specifies the number of whole notes duration
+to use for the brackets. This can be used to shrink the length of
+brackets in the situation where one alternative is very large. It may
+have odd effects if the specified duration is longer than the music
+given in an @code{\alternative}.
+")
+ )
+ ))
+
+ (cons
+ 'Clef_engraver
+ (engraver-description
+ "Clef_engraver"
+ "Determine and set reference point for pitches"
+ '(Clef OctavateEight)
+ (list
+ (translator-property-description 'supportedClefTypes
+ 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.")
+ (translator-property-description 'clefPosition number? " where the center of the symbol should go")
+ (translator-property-description 'clefGlyph string? "name of the symbol within the music font")
+ (translator-property-description 'centralCPosition number? "place of the central C. ")
+ (translator-property-description 'defaultClef string? "generate this clef at the very start of this staff. If not set, don't generate a clef")
+ (translator-property-description 'explicitClefVisibility procedure? "visibility-lambda function for clefs entered as \clef.")
+ (translator-property-description 'clefPitches list? "alist mapping GLYPHNAME to the position of the central C for that symbol")
+
+ )))
+
+
+ ))