From d7a456350ef24c14ec8d63f303fa4f57bfbf2428 Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 27 Mar 2002 00:02:00 +0000 Subject: [PATCH] lilypond-1.3.102 --- Documentation/user/properties.itely | 42 +------ VERSION | 2 +- scm/generate-engraver-documentation.scm | 126 ++++++++++++++++++++ scm/translator-description.scm | 145 ++++++++++++++++++++++++ 4 files changed, 274 insertions(+), 41 deletions(-) create mode 100644 scm/generate-engraver-documentation.scm create mode 100644 scm/translator-description.scm diff --git a/Documentation/user/properties.itely b/Documentation/user/properties.itely index 375a1d1083..dccdba1b03 100644 --- a/Documentation/user/properties.itely +++ b/Documentation/user/properties.itely @@ -422,38 +422,6 @@ c1 c1 \property Staff.barSize = 20 c1 c1 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. @@ -467,7 +435,7 @@ no clef is printed upon creation. @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} @@ -565,13 +533,7 @@ no clef is printed upon creation. @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 diff --git a/VERSION b/VERSION index f45f6ae029..e8e6aeb436 100644 --- a/VERSION +++ b/VERSION @@ -1,7 +1,7 @@ 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 diff --git a/scm/generate-engraver-documentation.scm b/scm/generate-engraver-documentation.scm new file mode 100644 index 0000000000..2925d1c73b --- /dev/null +++ b/scm/generate-engraver-documentation.scm @@ -0,0 +1,126 @@ +(eval-string (ly-gulp-file "translator-description.scm")) + +(define (document-trans-property prop-desc) + (string-append "
  • " (car prop-desc) "" + " (" (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 "
    Engraver " engraver-name ", not documented.\n") + (string-append + "

    " (car engraver-descr) "

    \n" + "

    Description

    " + (cadr engraver-descr) + "

    This engraver creates the following elements:\n " + (human-listify (map urlfy (caddr engraver-descr))) + "

    \n" + ) + + ) + ) + ) + +(define (urlfy x) + (string-append "" x "")) + +(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 + "

    " nm "

    \n" + "accepts:\n" + (human-listify (map urlfy accepts)) + "
    \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 "LilyPond Context " name " " + docstr) + out + ) + outname) + ) + + + +(define (document-paper paper-alist) + (let* + ( + (ufiles (map (lambda (x) (document-context x )) paper-alist)) + (files (sort ufiles string" x "\n")) + files)) + ) + (write files) + (display + (string-append + "LilyPond music translation documentation" + "

    LilyPond music translation documentation

    " + "" + ) + out + ) + ) + ) + +; (display (document-engraver 'Stem_engraver)) + +(document-paper (My_lily_parser::paper_description)) + +;(display (human-listify '("a" "b" "c"))) diff --git a/scm/translator-description.scm b/scm/translator-description.scm new file mode 100644 index 0000000000..a6dfb5af21 --- /dev/null +++ b/scm/translator-description.scm @@ -0,0 +1,145 @@ + +(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. +

    +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.

    + 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.

    + + 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") + + ))) + + + )) -- 2.39.5