From 7a558267cfbc5a90bf87a80ce9bcfed087692064 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Thu, 2 Nov 2000 21:25:16 +0100 Subject: [PATCH] release: 1.3.103 ============ * Translated auto-beam properties to alist. * Rewrite of tfmtoafm in scm. * Rewrite of emacs LilyPond mode, based upon auctex interface. * Chord name fixes and additions (Atte Andr'e Jensen) * ly-get-mus-property, ly-set-mus-property: set properties of Music * Move Span_req::span_dir_ into Scheme * removed numberOfStaffLines, staffSpace. Use StaffSymbol \push staff-space, line-count * removed minVerticalAlign, maxVerticalAlign; use VerticalAlignment \push #'threshold = #(MIN . MAX) * \property tremoloFlags can be set anywhere now * \apply #function music * Bugfix: padding of dots. * Generate documentation for separate engravers as well as for contexts. * Move some reference manual into the SCM documentation system. * Bugfix: fixed hyphen spanners. 1.3. --- CHANGES | 29 +- Documentation/index.texi | 5 +- Documentation/user/properties.itely | 493 +---------- Documentation/user/refman.itely | 272 +----- VERSION | 4 +- buildscripts/ps-to-pfa.py | 5 +- buildscripts/tfmtoafm.sh | 0 input/test/music-apply.ly | 26 + lily/beam-engraver.cc | 2 +- lily/chord-name-engraver.cc | 2 +- lily/chord-tremolo-engraver.cc | 1 + lily/dots.cc | 13 +- lily/dynamic-engraver.cc | 4 +- lily/global-translator.cc | 1 - lily/hyphen-engraver.cc | 2 +- lily/include/pitch-squash-engraver.hh | 22 - lily/include/request.hh | 5 +- lily/lyric-combine-music-iterator.cc | 4 +- lily/mark-engraver.cc | 10 - lily/molecule.cc | 11 +- lily/multi-measure-rest-engraver.cc | 4 +- lily/music-output-def.cc | 1 + lily/music-sequence.cc | 10 +- lily/music.cc | 52 ++ lily/musical-request.cc | 9 +- lily/my-lily-lexer.cc | 3 +- lily/my-lily-parser.cc | 6 +- lily/parser.yy | 26 +- lily/piano-pedal-engraver.cc | 17 +- lily/piano-pedal-performer.cc | 2 +- lily/pitch-squash-engraver.cc | 8 + lily/request.cc | 16 + lily/slur-engraver.cc | 6 +- lily/span-dynamic-performer.cc | 2 +- lily/staff-symbol-engraver.cc | 8 - lily/stem-engraver.cc | 22 +- lily/text-spanner-engraver.cc | 2 +- lily/tie-column.cc | 4 + lily/translator-def.cc | 6 +- lily/vertical-align-engraver.cc | 12 - lilypond-font-lock.el | 89 ++ lilypond-mode.el | 2 +- ly/auto-beam-settings.ly | 0 ly/generate-documentation.ly | 3 +- make/lilypond.spec.in | 1 + make/out/lilypond.lsm | 8 +- make/out/lilypond.spec | 5 +- make/toplevel.make.in | 2 +- scm/element-descriptions.scm | 5 +- scm/generate-backend-documentation.scm | 32 +- scm/generate-documentation.scm | 20 + scm/generate-engraver-documentation.scm | 157 ++-- scm/interface.scm | 16 +- scm/translator-description.scm | 1064 ++++++++++++++++++++--- 54 files changed, 1447 insertions(+), 1084 deletions(-) delete mode 100755 buildscripts/tfmtoafm.sh create mode 100644 input/test/music-apply.ly create mode 100644 lilypond-font-lock.el delete mode 100644 ly/auto-beam-settings.ly create mode 100644 scm/generate-documentation.scm diff --git a/CHANGES b/CHANGES index 7af7b3cde1..7ef18f0c3b 100644 --- a/CHANGES +++ b/CHANGES @@ -9,16 +9,35 @@ * Chord name fixes and additions (Atte Andr'e Jensen) -1.3.101.jcn2 -============ +* ly-get-mus-property, ly-set-mus-property: set properties of Music + +* Move Span_req::span_dir_ into Scheme + +* removed numberOfStaffLines, staffSpace. Use StaffSymbol \push +staff-space, line-count + +* removed minVerticalAlign, maxVerticalAlign; use VerticalAlignment +\push #'threshold = #(MIN . MAX) + +* \property tremoloFlags can be set anywhere now + +* \apply #function music + +* Bugfix: padding of dots. + +* Generate documentation for separate engravers as well as for contexts. + +* Move some reference manual into the SCM documentation system. + +* Bugfix: fixed hyphen spanners. + +1.3.102 +======= * Fixed bracket, and made some other PostScript code fixes. * Silly font initialisation fix for paper19 non-feature. -1.3.101.uu1 -=========== - * Automatic engraver/property documentation infrastructure. * Fixed system-start braces diff --git a/Documentation/index.texi b/Documentation/index.texi index ec03fcc031..fc4c732961 100644 --- a/Documentation/index.texi +++ b/Documentation/index.texi @@ -22,8 +22,9 @@ @itemize @bullet @item @uref{../user/out-www/lilypond.html,LilyPond reference manual} also available in @uref{../user/out-www/lilypond.ps.gz,Postscript} -@item LilyPond @uref{../user/out-www/backend.html,backend reference} and - @uref{../user/out-www/translation.html, context reference} +@item LilyPond @uref{../user/out-www/backend.html,backend reference}, + @uref{../user/out-www/engravers.html, engraver reference} and + @uref{../user/out-www/contexts.html, context reference}, @item @uref{../user/out-www/glossary.html,A glossary of musical terms}, includes translations. Also available in @uref{../user/out-www/glossary.ps.gz,Postscript}) @item @uref{../user/out-www/mudela-book.html,mudela-book}, a tool for diff --git a/Documentation/user/properties.itely b/Documentation/user/properties.itely index dccdba1b03..6f7adf1c02 100644 --- a/Documentation/user/properties.itely +++ b/Documentation/user/properties.itely @@ -8,254 +8,7 @@ property is listed in parentheses after the property name. @end macro -TODO: - - -@table @samp - @item @code{Generic_property_list} - Defines names and types for generic properties. These are properties - than can be plugged into the backend directly. See the init file - @file{generic-property.scm} for details. For internal use only. - - @item @code{XXXVerticalExtent}@indexcode{groupVerticalExtent} @propertytype{Interval: a cons of numbers} - Hard code the size of the vertical group in context XXX, example -@example -\property Staff.StaffVerticalExtent = #(-5.0 . 5.0) -@end example - The value is a cons of real numbers, that measure the extent in - staff spaces. -@end table - -@subsubheading Lyrics properties - -@cindex properties!Lyrics - -@table @samp - @item @code{textStyle}@indexcode{textStyle} @propertytype{string} - Set the font for lyrics. The available font choices are - @code{roman}, @code{italic}, @code{bold}, @code{large}, @code{Large}, - @code{typewriter}, and @code{finger}. The @code{finger} font can - only display numbers. Note also that you must be careful when - using @code{\property} in Lyrics mode, because of the way strings - are parsed. Either put quotes around the arguments to - @code{\property} or be sure to leave a space on both sides of the - dot. -@end table - -@subsubheading Thread properties - -@cindex properties!Thread - -@table @samp - @item @code{noteHeadStyle}@indexcode{noteHeadStyle} @propertytype{symbol} - Selects type of note head. Choices are @code{'cross}, - @code{'diamond}, @code{'harmonic}, @code{'transparent}, - @code{'mensural}, @code{'baroque}, and @code{'default}. - They are shown in that order below. The @code{'baroque}, - style gives the default symbols except for brevis and - longa notes which are square shaped as in the @code{'mensural} - style. - -@mudela[center,verbatim] - \score { - \notes { - \property Staff.barNonAuto = 1 - \property Voice.noteHeadStyle = #'cross - a' - \property Voice.noteHeadStyle = #'diamond - a' - \property Voice.noteHeadStyle = #'harmonic - a' - \property Voice.noteHeadStyle = #'transparent - a' - \property Voice.noteHeadStyle = #'mensural - a' - \property Voice.noteHeadStyle = #'default - a' - } - \paper { - linewidth = -1.; - } - } - -@end mudela -@end table - -@subsubheading Grace properties - -@cindex properties!Grace - - -@table @samp - @item @code{flagStyle}@indexcode{flagStyle} @propertytype{string} - By default set to @code{"grace"} meaning that all unbeamed - notes with flags are typeset with a slash through the flag. - Setting to @code{""} gives standard flags. - -@mudela[verbatim] -c'8 \property Voice.flagStyle = "grace" c'8 -@end mudela -@end table - - -@subsubheading Voice properties - -@cindex properties!Voice - @table @samp - @item @code{abbrev}@indexcode{abbrev} @propertytype{integer} - Set length for tremolo to be used if no length is explicitly - specified. - - @item @code{articulationScriptPadding}@indexcode{articulationScriptPadding} - Determines the extra space added between articulation marks, such - as staccato, tenuto, trill, up/down bow or fermata, and the - closest staff line or note. - - @item @code{articulationScriptVerticalDirection} @propertytype{direction} - @indexcode{articulationScriptVerticalDirection} - Determines the location of articulation marks. Set to @code{\up} - to print marks above the staff; set to @code{\down} to print marks - below the staff. This property does not override explicit - directions marked with `@code{^}' or `@code{_}' in the mudela file. - - @item @code{noAutoBeaming}@indexcode{beamAuto} @propertytype{boolean} - If set to true then beams are not generated automatically. - - @item @code{beamAutoEnd}@indexcode{beamAutoEnd} @propertytype{?} - Specifies when automatically generated beams can end. See - section XREF-autobeam [FIXME]. - - @item @code{beamAutoBegin}@indexcode{beamAutoBegin} @propertytype{?} - Specifies when automatically generated beams can start. See - section XREF-autobeam [FIXME]. - - -[outdated FIXME] - @item @code{beamQuantisation}@indexcode{beamQuantisation} @propertytype{symbol} - Set to @code{\none} for no quantization. Set to @code{\normal} to - quantize position and slope. Set to @code{\traditional} to avoid - wedges. These three settings are available via - @code{\beamposfree}@keyindex{beamposfree}, - @code{\beamposnormal}@keyindex{beamposnormal}, and - @code{\beampostraditional}@keyindex{beampostraditional}. - - @item @code{beamSlopeDamping}@indexcode{beamSlopeDamping} @propertytype{number} - Set to @code{\none} for undamped beams. Set to @code{\normal} for - damped beams. Set to @code{\infinity} for beams with zero slope. - The identifiers - @code{\beamslopeproportional}@keyindex{beamslopeproportional}, - @code{\beamslopedamped}@keyindex{beamslopedamped}, and - @code{\beamslopezero}@keyindex{beamslopezero} each set the - corresponding value. - - @item @code{dynamicDirection}@indexcode{dynamicDirection} @propertytype{direction} - Determines location of dynamic marks. Set to @code{\up} to print - marks above the staff; set to @code{\down} to print marks below - the staff. - - @item @code{dynamicStyle}@indexcode{dynamicStyle} @propertytype{string} - Set the text style for dynamics. - - @item @code{fontSize}@indexcode{fontSize} @propertytype{number} - Can be used to select smaller font sizes for music. The normal - font size is 0, and the two smaller sizes are -1 - and -2. - -@mudela[verbatim] -c''16 \property Staff.fontSize = -2 c''16 -@end mudela - - @item @code{forceHorizontalShift}@indexcode{forceHorizontalShift} - Force horizontal shift for collision resolution. It overrides - automatic collision resolution. The value is the shift amount - expressed in @code{note_width}, as set in the paper section. - -@item @code{collisionMergeDotted}@indexcode{collisionMergeDotted} @propertytype{boolean} - -Merge noteheads in collisions, even if they have a different number of -dots. This normal notation for polyphonic guitar music. - -@mudelafile[verbatim]{force-hshift.ly} - - -[FIXME: this should be moved] - -Lilypond always arranges note heads on alternate sides of a stem (that -is, within a single voice) as necessary to prevent collisions (note head -overlaps). For up stems, the upper note of a colliding pair is placed -on the right side of the stem, the lower on the left. For down stems, -the algorithm works in reverse. - -Lily also attempts to prevent collisions of note heads in different -voices. A situation where chords of two or more voices are played -simultaneously within one staff. - -By default, if only two voices (and both have opposite stem directions) -are in this 'collision group', the notes both are shifted by @code{0.5 -\quartwidth} if there are unisons or seconds between the voices. - -If there are more than two voices in a collision group, shifting is -inactive by default, since in this case, there are multiple chords with -the same stem direction. By distinguish between those chords, LilyPond -can do collision resolution in these cases as well. - -Distinguishing between voices with the same stem direction, is done by -setting the property @code{Voice.horizontalNoteShift}. It must be set -to a different integer for each voice. Then, all note heads in collision -groups (not just unisons and seconds) will be offset, one voice relative -another. The following fragment of sheet music shows how shifting is -done, with values of @code{horizontalNoteShift} printed over and under -the notes. In this case the chords are just simple notes. - -@c URG : mudela book bug. -@mudela[singleline,verbatim] -\score { - \notes \context Staff < - \context Voice = VA { \stemUp f''4^"0" } - \context Voice = VB {\stemUp - \property Voice.horizontalNoteShift = 1 d''4^" 1" } - \context Voice = VC { \stemUp \property -Voice.horizontalNoteShift = 2 b'4^" 2" } - \context Voice = VD { \stemDown \property -Voice.horizontalNoteShift = 1 g'4_"1 " } - \context Voice = VE { \stemDown e'4_"0" } - > -} -@end mudela - -If you are not satisfied with the collision resolution of LilyPond, you -can override the horizontal shift value of the chord of one Voice, by -setting @code{forceHorizontalShift}. This sets the amount shift, -measured in black note head widths. - -To take complete control of note position shifts in complex passages, -you have set things up for normal collisions and override all shifts by -setting @code{forceHorizontalShift} to zero everywhere -@example -\property Voice.horizontalNoteShift = -\property Voice.forceHorizontalShift = "0.0" -@end example - -Then you can set the force property to a suitable value before each note -that really needs it (unisons and seconds), and reset it to 0.0 after -the note. - - @item @code{horizontalNoteShift}@indexcode{horizontalNoteShift} @propertytype{integer} - Enable LilyPond to shift notes horizontally if they collide with - other notes. This is useful when typesetting many voices on one - staff. The identifier @code{\shift}@keyindex{shift} is defined to - enable this. Traditionally, the outer chords (the upmost and - downmost voices), should have no @code{horizontalNoteShift}. - - @item @code{markScriptPadding}@indexcode{markScriptPadding} @propertytype{number} - Determines the extra space added between the mark and the closest - staff line or note. - - @item @code{markDirection}@indexcode{markDirection} @propertytype{direction} - Determines if marks should be printed above or below the staff. - Set to @code{\up} to print marks above the staff; set to - @code{\down} to print marks below the staff. @item @code{midiInstrument}@indexcode{midiInstrument} @propertytype{string} Sets the instrument for MIDI output. If this property is not set @@ -275,111 +28,15 @@ r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 r128 r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 r128 @end mudela - @item @code{scriptHorizontal}@indexcode{scriptHorizontal} @propertytype{boolean} - Put scripts left or right of note heads. Support for this is - limited. Accidentals will collide with scripts. - - @item @code{slurVerticalDirection}@indexcode{slurVerticalDirection} @propertytype{direction} - Set to @code{\free} for free choice of slur direction, set to - @code{\up} to force slurs up, set to @code{\down} to force slurs - down. The shorthands @code{\slurup}@keyindex{slurup}, - @code{\slurDown}@keyindex{slurDown}, and - @code{\slurBoth}@keyindex{slurBoth} are available. - -@item @code{stemLength}@indexcode{stemLength} - Set length of stems. Unit is `@code{staffspace}/2', so - @code{stemLength} defaults to 7. -@mudela[verbatim] -g''4 \property Voice.stemLength = #14 g4 \property Voice.stemLength = #3 g4 g,,4 -@end mudela - - @item @code{stemLeftBeamCount}@indexcode{stemLeftBeamCount} @propertytype{integer} - Specify the number of beams to draw on the left side of the next - note. Overrides automatic beaming. The value is only used once, - and then it is erased. - - @item @code{stemRightBeamCount}@indexcode{stemRightBeamCount} @propertytype{integer} - Specify the number of beams to draw on the right side of the next - note. Overrides automatic beaming. The value is only used once, - and then it is erased. - - @item @code{tieDash}@indexcode{tieDash} @propertytype{integer} - Set dashing of ties. See also @code{slurDash} - - @item @code{tieVerticalDirection}@indexcode{tieVerticalDirection} @propertytype{direction} - Set to @code{\free} for free choice of tie direction, set to - @code{\up} to force ties up, set to @code{\down} to force ties - down. - @item @code{transposing}@indexcode{transposing} @propertytype{integer} Transpose the MIDI output. Set this property to the number of half-steps to transpose by. - @item @code{textEmptyDimension}@indexcode{textEmptyDimension} @propertytype{boolean} - If set to true then text placed above or below the staff is - assumed to have zero width. @code{fatText} and @code{emptyText} -are predefined settings. - -@mudela[verbatim] -c4^"foo" \emptyText c4^"foo" c4 -@end mudela - - @item @code{textStyle}@indexcode{textStyle} @propertytype{string} - Set the text style for superscripts and subscripts. See above - for list of text styles. - - @item @code{textScriptPadding}@indexcode{textScriptPadding} @propertytype{number} - Determines the extra space added between superscripted resp. - subscripted text and the closest staff line or note. - - @item @code{verticalDirection}@indexcode{verticalDirection} @propertytype{direction} - Determines the direction of stems, subscripts, beams, slurs, and - ties. Set to @code{\down} to force them down, @code{\up} to force - them up, or @code{\free} to let LilyPond decide. This can be used - to distinguish between voices on the same staff. The - @code{\stemDown}@keyindex{stemDown}, @code{\stemUp}@keyindex{stemUp}, - and @code{\stemBoth}@keyindex{stemBoth} identifiers set this - property. - - - @item @code{tupletDirection}@indexcode{tupletDirection} @propertytype{direction} - Determines the direction of triplets and other tuplets. Set to - @code{\down} to force them below the staff, @code{\up} to force - them above, or @code{\free} to let LilyPond decide. - - @item @code{tupletBracketVisibility}@indexcode{tupletBracketVisibility} @propertytype{boolean} or @propertytype{symbol} - @item @code{tupletNumberVisibility}@indexcode{tupletNumberVisibility} @propertytype{boolean} or @propertytype{symbol} - - These properties the visibility of the tuplet bracket and its -number respectively. Setting it to false will prevent printing of the -associated element. Setting the property to 'if-no-beam will make it -print only if there is no beam associated with this tuplet bracket. - -@mudelafile[verbatim]{tuplet.ly} - - @item @code{tupletInvisible}@indexcode{tupletInvisible} @propertytype{boolean} - - If set to true, tuplet bracket creation is switched off -entirely. This has the same effect as setting both -@code{tupletNumberVisibility} and @code{tupletBracketVisibility} to -@code{#f}, but as this does not even create elements, this setting -uses less memory and time. @item @code{tupletSpannerDuration} @indexcode{tupletSpannerDuration} @propertytype{moment} -Normally a tuplet bracket is as wide as the -@code{\times} expression that gave rise to it. By setting this -property, you can make brackets last shorter. Example - -@mudela[verbatim,fragment] -\context Voice \times 2/3 { - \property Voice.tupletSpannerDuration = #(make-moment 1 4) - [c8 c c] [c c c] -} -@end mudela - @end table @subsubheading Staff properties @@ -388,73 +45,11 @@ property, you can make brackets last shorter. Example @table @samp - @item @code{barNonAuto}@indexcode{barNonAuto} @propertytype{boolean} - If set to true then bar lines will not be printed - automatically; they must be explicitly created with @code{\bar} - keywords. Unlike with the @code{\cadenza} keyword, measures are - still counted. Bar generation will resume according to that - count if this property is set to zero. - - @item @code{barNumberDirection}@indexcode{barNumberDirection} @propertytype{direction} - Set to @code{\up} or @code{\down} to put bar numbers above or below - the staff. - - @item @code{barNumberScriptPadding}@indexcode{barNumberScriptPadding} - Sets extra space between the bar number and the bar it labels. - - @item @code{barSize}@indexcode{barSize} - Specify the height of the bar lines if it should be different - than the staff height. -@mudela[verbatim] -c1 c1 \property Staff.barSize = 20 c1 c1 -@end mudela - - @item @code{barAtLineStart}@indexcode{barAtLineStart} @propertytype{boolean} - Set to true to produce a bar line after the clef at the start - of each line (but not at the beginning of the music). - - [BROKEN] - - @item @code{clefStyle}@indexcode{clefStyle} @propertytype{string} - Determines how clefs are typeset. If set to @code{transparent}, - the clefs are not printed at all [FIXME], if set to - @code{fullSizeChanges}, clef changes in the middle of a line are - typeset with a full size clef. By default, clef changes are - typeset in smaller size. - - - @item @code{staffSpace}@indexcode{staffLineLeading} @propertytype{number} - Specifies the distance (in points) between lines of the staff. - - @item @code{numberOfStaffLines}@indexcode{numberOfStaffLines} @propertytype{integer} - Specifies the number of staff lines. The default is 5. - - @item @code{postBreakPadding}@indexcode{postBreakPadding} @propertytype{number} - Extra space in points to be added after the clef, time signature - and key signature on the staff. Deprecated, do not use. @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}. [BROKEN] - - @item @code{barAlways}@indexcode{barAlways} @propertytype{boolean} - If set to true a bar line is drawn after each note. - - @item @code{defaultBarType}@indexcode{defaultBarType} @propertytype{string} - Sets the default type of bar line. See Section XREF-barlines [FIXME] - for a list of available bar types. - - @item @code{instrument}, @code{instr} @propertytype{string} - @indexcode{instrument}@indexcode{instr} - If @code{Instrument_name_engraver} -@cindex Instrument_name_engraver - is - added to the Staff translator, then the @code{instrument} property - is used to label the first line of the staff and the @code{instr} - property is used to label subsequent lines. If the - @code{midiInstrument} property is not set, then @code{instrument} - is used to determine the instrument for MIDI output. @item @code{keyOctaviation}@indexcode{keyOctaviation} @propertytype{boolean} If set to false, then keys are the same in all octaves. If set @@ -466,7 +61,7 @@ c1 c1 \property Staff.barSize = 20 c1 c1 @end example The default value is @code{#f}. Can be set to @code{#t} with - @code{\specialkey} or reset with @code{\normalkey}. + @code{\specialkey} or reset with @code{\normalkey}. [BROKEN] @item @code{timeSignatureStyle}@indexcode{timeSignatureStyle} @propertytype{string} Changes the default two-digit layout for time signatures. The @@ -532,92 +127,6 @@ c1 c1 \property Staff.barSize = 20 c1 c1 @end mudela - @item @code{voltaSpannerDuration}@indexcode{voltaSpannerDuration} @propertytype{moment} - -@end table - -@subsubheading GrandStaff properties - -@cindex properties!GrandStaff - -@table @samp - @item @code{maxVerticalAlign}@indexcode{maxVerticalAlign} @propertytype{number} - Set the maximum vertical distance between staffs. - - @item @code{minVerticalAlign}@indexcode{minVerticalAlign} @propertytype{number} - Set the minimum vertical distance between staffs. -@end table - -@subsubheading Score properties -@cindex properties!Score - - - - -@table @samp - @item @code{skipBars}@indexcode{skipBars} @propertytype{boolean} - Set to 1 to skip the empty bars that are produced by - multimeasure notes and rests. These bars will not appear on the - printed output. Set to zero (the default) to expand multimeasure - notes and rests into their full length, printing the appropriate - number of empty bars so that synchronization with other voices is - preserved. - - @quotation - -@mudela[fragment,verbatim,center] -r1 r1*3 R1*3\property Score.skipBars=1 r1*3 R1*3 - -@end mudela - @end quotation - -@item @code{breakAlignOrder}@indexcode{breakAlignOrder} @propertytype{list of string} - - Defines the order in which prefatory matter (clefs, key signatures) appears, eg. this puts the key signatures after the bar lines: -@example - \property Score.breakAlignOrder = #'( - "Span_bar" - "Breathing_sign" - "Clef_item" - "Staff_bar" - "Key_item" - "Time_signature" - ) -@end example - - -@item @code{timing}@indexcode{timing} @propertytype{boolean} - Keep administration of measure length, position, bar number, etc? -Switch off for cadenzas. - -@item @code{currentBarNumber}@indexcode{currentBarNumber} @propertytype{integer} - Contains the current barnumber. This property is incremented at -every barline. - -@item @code{measurePosition}@indexcode{measurePosition} @propertytype{Moment} - - How much of the current measure (measured in whole notes) have we had? - -@item @code{oneBeat}@indexcode{oneBeat} @propertytype{Moment} - - How long does one beat in the current time signature last? - -@item @code{measureLength}@indexcode{measureLength} @propertytype{Moment} - - How long does one measure in the current time signature last? - -@end table - -@subsubheading ChordNamesVoice properties - -@cindex properties!ChordNamesVoice - -@table @samp - @item @code{chordInversion}@indexcode{chordInversion} @propertytype{boolean} - Determines whether LilyPond should look for chord inversions when - translating from notes to chord names. Set to 1 to find - inversions. The default is 0 which does not look for - inversions. @end table diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index 7c318a22bb..af651ea05a 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -141,19 +141,11 @@ internal use. The following commands access the interpreter directly. @example - \scm @keyindex{scm} @var{scheme} ; + #@var{scheme} @end example Evaluates the specified Scheme code. The result is discarded. -@example -\scmfile@keyindex{scmfile} @var{filename}; -@end example - -Reads Scheme code from the specified file. The result is discarded. - - - Identifier assignments may appear at top level. Semicolons are forbidden after top level assignments. @@ -182,6 +174,8 @@ They cannot be nested. Keywords start with a backslash, followed by a number of lower case alphabetic characters. These are all the keywords. +[FIXME] + @example \accepts \addlyrics @@ -1040,24 +1034,23 @@ Beaming can be generated automatically; see section XREF-autobeam [FIXME]. [OUTDATED, FIXME] -To place tremolo marks +To place tremolo marks between notes, use @code{\repeat} with tremolo +style. @cindex tremolo beams - between two notes, begin -with `@code{[:}@var{length}' and end with `@code{]}'. Tremolo marks -will appear instead of beams. Putting more than two notes in such a -construction will produce odd effects. To create tremolo beams on a -single note, simply attach `@code{:}@var{length}' to the note itself -(see also section XREF-tremolo [FIXME]). + To create tremolo beams on a single note, simply attach +`@code{:}@var{length}' to the note itself (see also section +XREF-tremolo [FIXME]). -@ignore -@mu dela[fragment,verbatim,center] - [:16 e'1 g'] [:8 e'4 f'] + +@mudela[fragment,verbatim,center] + \repeat "tremolo" 8 { c16 d16 } + \repeat "tremolo" 4 { c16 d16 } @end mudela - -@mud ela[fragment,verbatim,center] - c'4:32 [:16 c'8 d'8] + +@mudela[fragment,verbatim,center] + c'4:32 @end mudela -@end ignore + @cindex --@@@code{-}@code{-} @@ -2246,85 +2239,6 @@ These are the contexts supplied with the package. They are defined in the initialization file @file{ly/engraver.ly}. @table @samp - @item @code{Grace}@indexcode{Grace} - The context for handling grace notes. It is instantiated - automatically when you use @code{\grace}. Basically, it is an - `embedded' miniature of the Score context. Since this context - needs special interaction with the rest of LilyPond, you should - not explicitly instantiate it. - - @item @code{LyricVoice}@indexcode{LyricVoice} - Corresponds to a voice with lyrics. Handles the printing of a - single line of lyrics. - - @item @code{Thread}@indexcode{Thread} - Handles note heads, and is contained in the Voice context. You - have to instantiate this explicitly if you want to adjust the - style of individual note heads. - - @item @code{Voice}@indexcode{Voice} - Corresponds to a voice on a staff. This context handles the - conversion of dynamic signs, stems, beams, super- and subscripts, - slurs, ties, and rests. - - You have to instantiate this explicitly if you want to have - multiple voices on the same staff. - - @item @code{ChordNamesVoice}@indexcode{ChordNamesVoice} - A voice with chord names. Handles printing of a line of chord - names. - - @item @code{ChordNames}@indexcode{ChordNames} - Typesets chord names. Can contain @code{ChordNamesVoice} - contexts. - - @item @code{Lyrics}@indexcode{Lyrics} - Typesets lyrics. It can contain @code{LyricVoice} contexts. - - @item @code{Staff}@indexcode{Staff} - Handles clefs, bar lines, keys, accidentals. It can contain - @code{Voice} contexts. - - @item @code{RhythmicStaff}@indexcode{RhythmicStaff} - A context like @code{Staff} but for printing rhythms. Pitches are - ignored; the notes are printed on one line. It can contain - @code{Voice} contexts. - - @item @code{GrandStaff}@indexcode{GrandStaff} - Contains @code{Staff} or @code{RhythmicStaff} contexts. It adds a - brace on the left side, grouping the staffs together. The bar - lines of the contained staffs are connected vertically. It can - contain @code{Staff} contexts. - - @item @code{PianoStaff}@indexcode{PianoStaff} - Just like @code{GrandStaff} but with @code{minVerticalAlign} set - equal to @code{maxVerticalAlign} so that interstaff beaming and - slurring can be used. - - @item @code{StaffGroup}@indexcode{StaffGroup} - Contains @code{Staff} or @code{RhythmicStaff} contexts. Adds a - bracket on the left side, grouping the staffs together. The bar - lines of the contained staffs are connected vertically. It can - contain @code{Staff}, @code{RhythmicStaff}, @code{GrandStaff}, or - @code{Lyrics} contexts. - - @item @code{ChoirStaff}@indexcode{ChoirStaff} - Identical to @code{StaffGroup} except that the contained staffs - are not connected vertically. - - @item @code{Score}@indexcode{Score} - This is the top level notation context. No other context can - contain a @code{Score} context. This context handles the - administration of time signatures. It also makes sure that items - such as clefs, time signatures, and key-signatures are aligned - across staffs. It can contain @code{Lyrics}, @code{Staff}, - @code{RhythmicStaff}, @code{GrandStaff}, @code{StaffGroup}, and - @code{ChoirStaff} contexts. - - You cannot explicitly instantiate a Score context (since it is - not contained in any other context). It is instantiated - automatically when an output definition (a @code{\score} or - @code{\paper} block) is processed. @end table @@ -2417,16 +2331,14 @@ where each of the items is one of dimensions will define the characeristics of all lines beyond those explicitly specified. - @item A font declaration. Its syntax is + @item \stylesheet declaration. Its syntax is @example - - @var{fontsize} @code{=} \font@keyindex{font} @var{fontname} + \stylesheet @var{scm} @end example - @var{fontsize} is an integer describing the font to be used. - 0 is the default font. @var{fontname} is the basename of - a font (usually a member of the Feta family). + + See font.scm for details of @var{scm} @end itemize @@ -2498,12 +2410,7 @@ Nevertheless, here are some variables you may want to use or change: case @code{interscoreline} specifies the minimum spacing. Defaults to 0. - @item @code{output}@indexcode{output} - Specifies an alternate name for the the output @file{s}. - A @file{.tex}, @file{.midi} or @file{.ps} extension will be - added to the string you specify. - - @item @code{rulethickness}@indexcode{rulethickness} + @item @code{stafflinethickness}@indexcode{stafflinethickness} Determines the thickness of staff and bar lines. @end table @@ -2676,143 +2583,6 @@ translator: @end quotation - -@node engravers, , , Reference Manual - -The engravers for paper output are: - -[incomplete, FIXME] - -@table @samp - @item @code{Bar_engraver}@indexcode{Bar_engraver} - Engraves bar lines. Normally in @code{Staff} and - @code{RhythmicStaff}. - - @item @code{Bar_number_engraver}@indexcode{Bar_number_engraver} - Engrave bar numbers. These numbers appear at the start of each - line. Part of @code{Score} context. - - @item @code{Beam_engraver}@indexcode{Beam_engraver} - Handles beam requests by engraving beams. Normally appears in - the @code{Voice} translator. If omitted, then notes will be - printed with flags instead of beams. - - @item @code{Beam_req_swallow_translator} - @indexcode{Beam_req_swallow_translator} - Swallows beam requests. In @code{LyricVoice}. - - @item @code{Chord_name_engraver}@indexcode{Chord_name_engraver} - Engraves chord names. Normally in @code{ChordNameVoice} . - - @item @code{Chord_tremolo_engraver}@indexcode{Chord_tremolo_engraver} - - @item @code{Clef_engraver}@indexcode{Clef_engraver} - Engraves the clef symbol. Normally in @code{Staff}. - - @item @code{Collision_engraver}@indexcode{Collision_engraver} - - @item @code{Dot_column_engraver}@indexcode{Dot_column_engraver} - Engraves dots on dotted notes shifted to the right of the note. - Normally in @code{Voice}. If omitted, then dots appear on top of - the notes. - - @item @code{Dynamic_engraver}@indexcode{Dynamic_engraver} - Engraves dynamics symbols. Normally in @code{Voice}. - - @item @code{Font_size_engraver}@indexcode{Font_size_engraver} - - @item @code{Key_engraver}@indexcode{Key_engraver} - Engraves the key signature. Normally in @code{Staff}. - - @item @code{Local_key_engraver}@indexcode{Local_key_engraver} - - @item @code{Lyric_engraver}@indexcode{Lyric_engraver} - Engraves lyrics. Normally in @code{LyricVoice}. - - @item @code{Multi_measure_rest_engraver} - @indexcode{Multi_measure_rest_engraver} - Engraves multi-measure rests that are produced with @code{R}. - Normally in @code{Voice}. - - @item @code{Piano_bar_engraver}@indexcode{Piano_bar_engraver} - - @item @code{Pitch_squash_engraver}@indexcode{Pitch_squash_engraver} - Treat all pitches as middle C. Used in @code{RhythmicStaff}. - Note that the notes move, but the locations of accidentals stay - the same. - - Vertical position of squashing can be controlled through -@indexcode{squashedPosition}. - - @item @code{Priority_horizontal_align_engraver} - @indexcode{Priority_horizontal_align_engraver} - - @item @code{Repeat_engraver}@indexcode{Repeat_engraver} - Handles repeats? In @code{Staff} and @code{RhythmicStaff}. - - @item @code{Rest_collision_engraver}@indexcode{Rest_collision_engraver} - Handles collisions of rests. In @code{Staff}. - - @item @code{Rest_engraver}@indexcode{Rest_engraver} - Engraves rests. Normally in @code{Voice}. - - @item @code{Rhythmic_column_engraver}@indexcode{Rhythmic_column_engraver} - - @item @code{Score_priority_engraver}@indexcode{Score_priority_engraver} - - @item @code{Script_engraver}@indexcode{Script_engraver} - Handles note ornaments generated by @code{\script}. Normally in - @code{Voice}. - - @item @code{Separating_line_group_engraver} - @indexcode{Separating_line_group_engraver} - - @item @code{Skip_req_swallow_translator} - @indexcode{Skip_req_swallow_translator} - - @item @code{Slur_engraver}@indexcode{Slur_engraver} - Engraves slurs. Normally in @code{Voice}. - - @item @code{Span_bar_engraver}@indexcode{Span_bar_engraver} - Engraves lines across multiple staffs. Normally in - @code{Staffgroup} and @code{GrandStaff}. Removing this from - @code{StaffGroup} gives the definition of @code{ChoirStaff}. - - @item @code{Span_score_bar_engraver}@indexcode{Span_score_bar_engraver} - - @item @code{Staff_group_bar_engraver}@indexcode{Staff_group_bar_engraver} - - @item @code{Instrument_name_engraver}@indexcode{Instrument_name_engraver} - Prints the name of the instrument (specified by - @code{Staff.instrument} and @code{Staff.instr}) at the left of the - staff. - - @item @code{Staff_sym_engraver}@indexcode{Staff_sym_engraver} - - @item @code{Stem_engraver}@indexcode{Stem_engraver} - Engraves stems. Normally in @code{Voice}. - - @item @code{Ties_engraver}@indexcode{Ties_engraver} - Engraves ties. Normally in @code{Voice}. - - @item @code{Time_signature_engraver}@indexcode{Time_signature_engraver} - Engraves the time signature. Normally in @code{Staff} and - @code{RhythmicStaff}. - - @item @code{Timing_engraver}@indexcode{Timing_engraver} - Responsible for synchronizing timing information from staffs. - Normally in @code{Score}. In order to create polyrhythmic music, - this engraver should be removed from @code{Score} and placed in - @code{Staff}. - - @item @code{Tuplet_engraver}@indexcode{Tuplet_engraver} - Engraves tuplet brackets? In @code{Staff}. - - @item @code{Vertical_align_engraver}@indexcode{Vertical_align_engraver} -@end table - - - @node Sound output, , , Reference Manual @section Sound output diff --git a/VERSION b/VERSION index fe53eb1877..4f5c5d4af3 100644 --- a/VERSION +++ b/VERSION @@ -1,8 +1,8 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 -PATCH_LEVEL=102 -MY_PATCH_LEVEL=jcn1 +PATCH_LEVEL=103 +MY_PATCH_LEVEL= # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/buildscripts/ps-to-pfa.py b/buildscripts/ps-to-pfa.py index ef3c94a291..d0bf000fe0 100755 --- a/buildscripts/ps-to-pfa.py +++ b/buildscripts/ps-to-pfa.py @@ -13,7 +13,6 @@ version = '0.4' datadir = '' -import find import os import sys import getopt @@ -130,10 +129,10 @@ def characters (f): logfile.write ('[') files = [] - import find # q + import glob suffixes = [".[0-9]", ".[0-9][0-9]", ".[0-9][0-9][0-9]"] for suf in suffixes: - files = files + find.find (font_name + suf) + files = files + glob.glob(font_name + suf) # concat all files into charprocs. diff --git a/buildscripts/tfmtoafm.sh b/buildscripts/tfmtoafm.sh deleted file mode 100755 index e69de29bb2..0000000000 diff --git a/input/test/music-apply.ly b/input/test/music-apply.ly new file mode 100644 index 0000000000..a61ea1a7a1 --- /dev/null +++ b/input/test/music-apply.ly @@ -0,0 +1,26 @@ + +mus = \notes { c'4 d'4( e'4 f'4 } + +#(define (reverse-music mus) + (let* ( + (es (ly-get-mus-property mus 'elements)) + (reved (reverse es)) + (sd (ly-get-mus-property mus 'span-direction)) + ) + (ly-set-mus-property + mus + 'elements + reved + ) + (if (dir? sd) + (ly-set-mus-property mus 'span-direction (- sd))) + (map reverse-music reved) + mus) +) + +\score { + \context Voice { + \mus + \apply #reverse-music \mus + } +} diff --git a/lily/beam-engraver.cc b/lily/beam-engraver.cc index 29c5005974..8b01712e9a 100644 --- a/lily/beam-engraver.cc +++ b/lily/beam-engraver.cc @@ -77,7 +77,7 @@ Beam_engraver::do_try_music (Music *m) else if (c->span_type_str_ == "beam") { - Direction d =c->span_dir_; + Direction d =c->get_span_dir (); if (d == STOP && !beam_p_) { diff --git a/lily/chord-name-engraver.cc b/lily/chord-name-engraver.cc index 8729cb57a2..aa5c6f27ee 100644 --- a/lily/chord-name-engraver.cc +++ b/lily/chord-name-engraver.cc @@ -116,7 +116,7 @@ void Chord_name_engraver::create_chord_name () { assert (chord_p_); - chord_name_p_ = new Item (get_property ("ChordNames")); + chord_name_p_ = new Item (get_property ("ChordName")); /* Hmm, why not represent complete chord as list? ((tonic third fifth) (inversion bass)) diff --git a/lily/chord-tremolo-engraver.cc b/lily/chord-tremolo-engraver.cc index e504bdeadb..f21bcb3150 100644 --- a/lily/chord-tremolo-engraver.cc +++ b/lily/chord-tremolo-engraver.cc @@ -31,6 +31,7 @@ - create dots if appropriate. + - create TremoloBeam iso Beam? */ class Chord_tremolo_engraver : public Engraver diff --git a/lily/dots.cc b/lily/dots.cc index 28ef9a5526..78a6d41f7e 100644 --- a/lily/dots.cc +++ b/lily/dots.cc @@ -43,11 +43,6 @@ SCM Dots::brew_molecule (SCM d) { Score_element *sc = unsmob_element (d); - /* - Molecule mol (Lookup::blank (Box (Interval (0,0), - Interval (0,0)))); - */ - Molecule mol; SCM c = sc->get_elt_property ("dot-count"); @@ -56,8 +51,14 @@ Dots::brew_molecule (SCM d) { Molecule d = Font_interface::get_default_font (sc)->find_by_name (String ("dots-dot")); Real dw = d.extent (X_AXIS).length (); - // d.translate_axis (-dw, X_AXIS); + + /* + we need to add a real blank box, to assure that + side-positioning doth not cancel the left-most padding. */ + mol = Lookup::blank (Box (Interval (0,0), + Interval (0,0))); + for (int i = gh_scm2int (c); i--; ) { d.translate_axis (2*dw,X_AXIS); diff --git a/lily/dynamic-engraver.cc b/lily/dynamic-engraver.cc index 9befc70458..4a9e01eab7 100644 --- a/lily/dynamic-engraver.cc +++ b/lily/dynamic-engraver.cc @@ -112,7 +112,7 @@ Dynamic_engraver::do_try_music (Music * m) else if ((s->span_type_str_ == "crescendo" || s->span_type_str_ == "decrescendo")) { - accepted_spanreqs_drul_[s->span_dir_] = s; + accepted_spanreqs_drul_[s->get_span_dir()] = s; return true; } } @@ -219,7 +219,7 @@ Dynamic_engraver::do_process_music () if (current_cresc_req_) { accepted_spanreqs_drul_[START]->origin ()->warning - (current_cresc_req_->span_dir_ == 1 + (current_cresc_req_->get_span_dir() == 1 ? _ ("already have a crescendo") : _ ("already have a decrescendo")); } diff --git a/lily/global-translator.cc b/lily/global-translator.cc index ad3b7d0a8a..eeb86e177e 100644 --- a/lily/global-translator.cc +++ b/lily/global-translator.cc @@ -83,7 +83,6 @@ Global_translator::finish () void Global_translator::run_iterator_on_me (Music_iterator * iter) { - while (iter->ok () || moments_left_i ()) { Moment w; diff --git a/lily/hyphen-engraver.cc b/lily/hyphen-engraver.cc index e18619c28a..e78882d3d1 100644 --- a/lily/hyphen-engraver.cc +++ b/lily/hyphen-engraver.cc @@ -55,7 +55,7 @@ void Hyphen_engraver::acknowledge_element (Score_element_info i) { // -> text-item - if (i.elem_l_->has_interface (ly_symbol2scm ("text-item-interface"))) + if (i.elem_l_->has_interface (ly_symbol2scm ("lyric-syllable-interface"))) { current_lyric_l_ = i.elem_l_; if (hyphen_p_ diff --git a/lily/include/pitch-squash-engraver.hh b/lily/include/pitch-squash-engraver.hh index 9e06f31b68..e69de29bb2 100644 --- a/lily/include/pitch-squash-engraver.hh +++ b/lily/include/pitch-squash-engraver.hh @@ -1,22 +0,0 @@ -/* - pitch-squash-engraver.hh -- declare Pitch_squash_engraver - - source file of the GNU LilyPond music typesetter - - (c) 1997--2000 Han-Wen Nienhuys - - */ - -#ifndef PITCH_SQUASH_GRAV_HH -#define PITCH_SQUASH_GRAV_HH - -#include "engraver.hh" - -class Pitch_squash_engraver : public Engraver { -public: - VIRTUAL_COPY_CONS (Translator); - virtual void acknowledge_element (Score_element_info); -}; - -#endif /* PITCH_SQUASH_GRAV_HH */ - diff --git a/lily/include/request.hh b/lily/include/request.hh index 31cf4f8cb0..f5ab252a52 100644 --- a/lily/include/request.hh +++ b/lily/include/request.hh @@ -53,12 +53,13 @@ public: */ class Span_req : public virtual Request { public: - /// should the spanner start or stop, or is it unwanted? - Direction span_dir_; String span_type_str_; + void set_span_dir (Direction d); + Direction get_span_dir () const; Span_req(); protected: + virtual bool do_equal_b (Request const*) const; VIRTUAL_COPY_CONS(Music); diff --git a/lily/lyric-combine-music-iterator.cc b/lily/lyric-combine-music-iterator.cc index 035b83b7c8..8ab8f2920a 100644 --- a/lily/lyric-combine-music-iterator.cc +++ b/lily/lyric-combine-music-iterator.cc @@ -29,8 +29,8 @@ Lyric_combine_music_iterator::Lyric_combine_music_iterator () melisma_stop_req = new Melisma_req; melisma_start_req = new Melisma_req; } - melisma_start_req->span_dir_ = START; - melisma_stop_req->span_dir_ = STOP; + melisma_start_req->set_span_dir (START); + melisma_stop_req->set_span_dir (STOP); music_iter_p_ =0; lyric_iter_p_ =0; diff --git a/lily/mark-engraver.cc b/lily/mark-engraver.cc index bab3d1d145..7e76790d77 100644 --- a/lily/mark-engraver.cc +++ b/lily/mark-engraver.cc @@ -109,16 +109,6 @@ Mark_engraver::create_items (Request *rq) Side_position::set_axis (text_p_, Y_AXIS); - /* - -> Generic props. - */ - SCM prop = get_property ("markDirection"); - if (!isdir_b (prop)) - { - prop = gh_int2scm (UP); - } - text_p_->set_elt_property ("direction", prop); - announce_element (text_p_, rq); } diff --git a/lily/molecule.cc b/lily/molecule.cc index 240a8aec72..fa83fc6a6c 100644 --- a/lily/molecule.cc +++ b/lily/molecule.cc @@ -106,10 +106,15 @@ Molecule::add_at_edge (Axis a, Direction d, Molecule const &m, Real padding) { Real my_extent= empty_b () ? 0.0 : dim_[a][d]; Interval i (m.extent (a)); + Real his_extent; if (i.empty_b ()) - programming_error ("Molecule::add_at_edge: adding empty molecule."); - - Real his_extent = i[-d]; + { + programming_error ("Molecule::add_at_edge: adding empty molecule."); + his_extent = 0.0; + } + else + his_extent = i[-d]; + Real offset = my_extent - his_extent; Molecule toadd (m); toadd.translate_axis (offset + d * padding, a); diff --git a/lily/multi-measure-rest-engraver.cc b/lily/multi-measure-rest-engraver.cc index be25b4ab48..f8d23f7906 100644 --- a/lily/multi-measure-rest-engraver.cc +++ b/lily/multi-measure-rest-engraver.cc @@ -75,11 +75,11 @@ Multi_measure_rest_engraver::do_try_music (Music* req_l) { if (sp->span_type_str_ == "rest") { - if (sp->span_dir_ == STOP) + if (sp->get_span_dir() == STOP) { stop_req_l_ = sp; } - else if (sp->span_dir_ == START && !new_req_l_) + else if (sp->get_span_dir() == START && !new_req_l_) { new_req_l_ = sp; } diff --git a/lily/music-output-def.cc b/lily/music-output-def.cc index d2ddb4a9af..bd8fd57ff3 100644 --- a/lily/music-output-def.cc +++ b/lily/music-output-def.cc @@ -91,3 +91,4 @@ Music_output_def::get_default_output () const } + diff --git a/lily/music-sequence.cc b/lily/music-sequence.cc index 2e5243f6b5..d8089ad74d 100644 --- a/lily/music-sequence.cc +++ b/lily/music-sequence.cc @@ -14,7 +14,7 @@ void Music_sequence::truncate (int k) { - SCM l = get_mus_property ("list"); + SCM l = get_mus_property ("elements"); if (k == 0) { l = SCM_EOL; @@ -31,13 +31,13 @@ Music_sequence::truncate (int k) gh_set_cdr_x (s, SCM_EOL); } } - set_mus_property ("list", l); + set_mus_property ("elements", l); } SCM Music_sequence::music_list ()const { - return get_mus_property ("list"); + return get_mus_property ("elements"); } /* @@ -46,14 +46,14 @@ Music_sequence::music_list ()const void Music_sequence::append_music (Music *m) { - set_mus_property ("list", + set_mus_property ("elements", gh_append2( music_list(), gh_cons (m->self_scm (), SCM_EOL))); scm_unprotect_object (m->self_scm ()); } Music_sequence::Music_sequence(SCM h) { - set_mus_property ("list", h); + set_mus_property ("elements", h); } void diff --git a/lily/music.cc b/lily/music.cc index c9e001482c..5cf0e78476 100644 --- a/lily/music.cc +++ b/lily/music.cc @@ -181,3 +181,55 @@ Music::~Music () { } + +SCM +ly_get_mus_property (SCM mus, SCM sym) +{ + Music * sc = unsmob_music (mus); + + if (sc) + { + return sc->get_mus_property (sym); + } + else + { + warning (_("ly_get_mus_property (): Not a Music")); + scm_write (mus, scm_current_error_port ()); + } + return SCM_EOL; +} + + +SCM +ly_set_mus_property (SCM mus, SCM sym, SCM val) +{ + Music * sc = unsmob_music (mus); + + if (!gh_symbol_p (sym)) + { + warning (_("ly_set_mus_property (): Not a symbol")); + scm_write (mus, scm_current_error_port ()); + + return SCM_UNSPECIFIED; + } + + if (sc) + { + sc->set_mus_property (sym, val); + } + else + { + warning (_("ly_set_mus_property (): not of type Music")); + scm_write (mus, scm_current_error_port ()); + } + + return SCM_UNSPECIFIED; +} + +static void +init_functions () +{ + scm_make_gsubr ("ly-get-mus-property", 2, 0, 0, (Scheme_function_unknown)ly_get_mus_property); + scm_make_gsubr ("ly-set-mus-property", 3, 0, 0, (Scheme_function_unknown)ly_set_mus_property); +} +ADD_SCM_INIT_FUNC(musicscm,init_functions); diff --git a/lily/musical-request.cc b/lily/musical-request.cc index 43b238f877..6cadceb906 100644 --- a/lily/musical-request.cc +++ b/lily/musical-request.cc @@ -30,8 +30,6 @@ Melodic_req::transpose (Musical_pitch delta) } } - - bool Melodic_req::do_equal_b (Request const* r) const { @@ -45,10 +43,6 @@ Melodic_req::compare (Melodic_req const &m1 , Melodic_req const&m2) return Musical_pitch::compare (m1.pitch_, m2.pitch_); } - - - - int Rhythmic_req::compare (Rhythmic_req const &r1, Rhythmic_req const &r2) { @@ -101,12 +95,11 @@ bool Span_req::do_equal_b (Request const*r) const { Span_req const* s = dynamic_cast (r); - return s && span_dir_ == s->span_dir_; + return s && get_span_dir () == s->get_span_dir (); } Span_req::Span_req () { - span_dir_ = CENTER; } diff --git a/lily/my-lily-lexer.cc b/lily/my-lily-lexer.cc index 88d00fd5fd..44c2597ed7 100644 --- a/lily/my-lily-lexer.cc +++ b/lily/my-lily-lexer.cc @@ -23,8 +23,9 @@ #include "moment.hh" static Keyword_ent the_key_tab[]={ - {"autochange", AUTOCHANGE}, + {"apply", APPLY}, {"arpeggio", ARPEGGIO }, + {"autochange", AUTOCHANGE}, {"spanrequest", SPANREQUEST}, {"commandspanrequest", COMMANDSPANREQUEST}, {"simultaneous", SIMULTANEOUS}, diff --git a/lily/my-lily-parser.cc b/lily/my-lily-parser.cc index d4fa575511..a44e3c6d45 100644 --- a/lily/my-lily-parser.cc +++ b/lily/my-lily-parser.cc @@ -22,7 +22,7 @@ My_lily_parser::My_lily_parser (Sources * source_l) default_duration_.durlog_i_ = 2; error_level_i_ = 0; - fatal_error_i_ = 0; + default_header_p_ =0; } @@ -77,8 +77,6 @@ void My_lily_parser::parser_error (String s) { here_input().error (s); - if (fatal_error_i_) - exit (fatal_error_i_); error_level_i_ = 1; exit_status_i_ = 1; } @@ -124,7 +122,7 @@ My_lily_parser::paper_description () for (SCM s = al ; gh_pair_p (s); s = gh_cdr (s)) { Translator_def * td = unsmob_translator_def (gh_cdar (s)); - l = gh_cons (td->to_alist (), l); + l = gh_cons (gh_cons (gh_caar (s), td->to_alist ()), l); } return l; } diff --git a/lily/parser.yy b/lily/parser.yy index 10242bfdfe..e302696120 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -127,6 +127,7 @@ yylex (YYSTYPE *s, void * v_l) /* tokens which are not keywords */ %token AUTOCHANGE +%token APPLY %token ARPEGGIO %token DYNAMICSCRIPT %token TEXTSCRIPT @@ -772,6 +773,15 @@ Composite_music: $$ = new Transposed_music ($3, *$2); delete $2; // ugh } + | APPLY embedded_scm Music { + SCM ret = gh_call1 ($2, $3->self_scm ()); + Music *m = unsmob_music (ret); + if (!m) { + THIS->parser_error ("\\apply must return a Music"); + m = new Music (); + } + $$ = m; + } | NOTES { THIS->lexer_p_->push_note_state (); } Music @@ -935,13 +945,13 @@ shorthand_command_req: } | '[' { Span_req*b= new Span_req; - b->span_dir_ = START; + b->set_span_dir(START); b->span_type_str_ = "beam"; $$ =b; } | ']' { Span_req*b= new Span_req; - b->span_dir_ = STOP; + b->set_span_dir( STOP); b->span_type_str_ = "beam"; $$ = b; } @@ -958,7 +968,7 @@ verbose_command_req: } | COMMANDSPANREQUEST bare_int STRING { Span_req * sp_p = new Span_req; - sp_p-> span_dir_ = Direction($2); + sp_p-> set_span_dir ( Direction($2)); sp_p->span_type_str_ = ly_scm2string ($3); sp_p->set_spot (THIS->here_input ()); $$ = sp_p; @@ -1080,7 +1090,7 @@ verbose_request: } | SPANREQUEST bare_int STRING { Span_req * sp_p = new Span_req; - sp_p->span_dir_ = Direction($2); + sp_p->set_span_dir( Direction($2)); sp_p->span_type_str_ = ly_scm2string ($3); sp_p->set_spot (THIS->here_input ()); $$ = sp_p; @@ -1196,7 +1206,7 @@ hyphen_req: close_request: close_request_parens { $$ = $1; - dynamic_cast ($$)->span_dir_ = START; + dynamic_cast ($$)->set_span_dir ( START); } close_request_parens: @@ -1221,7 +1231,7 @@ close_request_parens: open_request: open_request_parens { $$ = $1; - dynamic_cast ($$)->span_dir_ = STOP; + dynamic_cast ($$)->set_span_dir ( STOP); } ; @@ -1416,8 +1426,8 @@ simple_element: Span_req *sp1 = new Span_req; Span_req *sp2 = new Span_req; - sp1-> span_dir_ = START; - sp2-> span_dir_ = STOP; + sp1-> set_span_dir ( START); + sp2-> set_span_dir ( STOP); sp1->span_type_str_ = sp2->span_type_str_ = "rest"; Request_chord * rqc1 = new Request_chord (gh_list (sp1->self_scm (), SCM_UNDEFINED)); diff --git a/lily/piano-pedal-engraver.cc b/lily/piano-pedal-engraver.cc index fa21936f81..667b3fc497 100644 --- a/lily/piano-pedal-engraver.cc +++ b/lily/piano-pedal-engraver.cc @@ -18,21 +18,6 @@ #include "item.hh" -/* - TODO: - * it would be really cool if an engraver could be initialised with a - string, ie: - - Piano_pedal_engraver::"sostenuto" - Piano_pedal_engraver::"sustain" - Piano_pedal_engraver::"una-chorda" - - */ - -/* - Would it? The semantics are unclear, and real benefits are muddy - too. --hwn -*/ @@ -135,7 +120,7 @@ Piano_pedal_engraver::do_try_music (Music *m) { if (s->span_type_str_ == p->name_) { - p->req_l_drul_[s->span_dir_] = s; + p->req_l_drul_[s->get_span_dir()] = s; return true; } } diff --git a/lily/piano-pedal-performer.cc b/lily/piano-pedal-performer.cc index 6b1efab435..9bd045aed8 100644 --- a/lily/piano-pedal-performer.cc +++ b/lily/piano-pedal-performer.cc @@ -134,7 +134,7 @@ Piano_pedal_performer::do_try_music (Music* r) { if (s->span_type_str_ == String (p->name_)) { - p->req_l_drul_[s->span_dir_] = s; + p->req_l_drul_[s->get_span_dir()] = s; return true; } } diff --git a/lily/pitch-squash-engraver.cc b/lily/pitch-squash-engraver.cc index 543ca89594..0bed2d606e 100644 --- a/lily/pitch-squash-engraver.cc +++ b/lily/pitch-squash-engraver.cc @@ -10,6 +10,14 @@ #include "note-head.hh" #include "pitch-squash-engraver.hh" #include "rhythmic-head.hh" +#include "engraver.hh" + +class Pitch_squash_engraver : public Engraver { +public: + VIRTUAL_COPY_CONS (Translator); + virtual void acknowledge_element (Score_element_info); +}; + void Pitch_squash_engraver::acknowledge_element (Score_element_info i) diff --git a/lily/request.cc b/lily/request.cc index 90831a5cab..d10693e898 100644 --- a/lily/request.cc +++ b/lily/request.cc @@ -51,3 +51,19 @@ Script_req::get_direction () const } +Direction +Span_req::get_span_dir () const +{ + SCM d = get_mus_property ("span-direction"); + + return (isdir_b (d)) ? to_dir (d) : CENTER; +} + +void +Span_req::set_span_dir (Direction d) +{ + set_mus_property ("span-direction", gh_int2scm (d)); +} + + + diff --git a/lily/slur-engraver.cc b/lily/slur-engraver.cc index ef3d6f062b..d59cbbe233 100644 --- a/lily/slur-engraver.cc +++ b/lily/slur-engraver.cc @@ -66,7 +66,7 @@ Slur_engraver::do_try_music (Music *req_l) /* Let's not start more than one slur per moment. */ - if (sl->span_dir_ == START) + if (sl->get_span_dir() == START) { if (now_mom () > last_start_) { @@ -136,7 +136,7 @@ Slur_engraver::do_process_music () { Span_req* slur_req_l = new_slur_req_l_arr_[i]; // end slur: move the slur to other array - if (slur_req_l->span_dir_ == STOP) + if (slur_req_l->get_span_dir() == STOP) { if (slur_l_stack_.empty ()) slur_req_l->origin ()->warning (_f ("can't find start of slur")); @@ -152,7 +152,7 @@ Slur_engraver::do_process_music () requests_arr_.pop (); } } - else if (slur_req_l->span_dir_ == START) + else if (slur_req_l->get_span_dir() == START) { // push a new slur onto stack. // (use temp. array to wait for all slur STOPs) diff --git a/lily/span-dynamic-performer.cc b/lily/span-dynamic-performer.cc index 38bc89117d..ccf0d08234 100644 --- a/lily/span-dynamic-performer.cc +++ b/lily/span-dynamic-performer.cc @@ -183,7 +183,7 @@ Span_dynamic_performer::do_try_music (Music* r) if (s-> span_type_str_ == "crescendo" || s->span_type_str_ == "decrescendo") { - span_req_l_drul_[s->span_dir_] = s; + span_req_l_drul_[s->get_span_dir()] = s; return true; } } diff --git a/lily/staff-symbol-engraver.cc b/lily/staff-symbol-engraver.cc index 37bfa33d6b..d3685bfbf5 100644 --- a/lily/staff-symbol-engraver.cc +++ b/lily/staff-symbol-engraver.cc @@ -54,14 +54,6 @@ Staff_symbol_engraver::do_creation_processing() void Staff_symbol_engraver::do_removal_processing() { - SCM n = get_property ("numberOfStaffLines"); - SCM ss = get_property ("staffSpace"); - - if (gh_number_p (ss)) - span_p_->set_elt_property ("staff-space", ss); - if (gh_number_p (n)) - span_p_->set_elt_property ("line-count", n); - span_p_->set_bound(RIGHT,unsmob_element (get_property ("currentCommandColumn"))); typeset_element (span_p_); span_p_ =0; diff --git a/lily/stem-engraver.cc b/lily/stem-engraver.cc index 5707d843b4..f348697f55 100644 --- a/lily/stem-engraver.cc +++ b/lily/stem-engraver.cc @@ -27,13 +27,11 @@ public: Stem_engraver(); protected: - virtual void do_creation_processing (); virtual void acknowledge_element (Score_element_info); virtual void do_pre_move_processing (); virtual bool do_try_music (Music*); private: - int default_tremolo_type_i_; Score_element *stem_p_; Score_element *tremolo_p_; Rhythmic_req *rhythmic_req_l_; @@ -47,22 +45,9 @@ Stem_engraver::Stem_engraver () tremolo_req_l_ = 0; stem_p_ = 0; tremolo_p_ = 0; - default_tremolo_type_i_ = 16; rhythmic_req_l_ =0; } -void -Stem_engraver::do_creation_processing () -{ - /* - huh, why only at creation time? - */ - SCM prop = get_property ("tremoloFlags"); - if (gh_number_p(prop)) - { - default_tremolo_type_i_ = gh_scm2int (prop); - } -} void Stem_engraver::acknowledge_element(Score_element_info i) @@ -96,10 +81,11 @@ Stem_engraver::acknowledge_element(Score_element_info i) the first and last (quarter) note bothe get one tremolo flag. */ int requested_type = tremolo_req_l_->type_i_; - if (!requested_type) - requested_type = default_tremolo_type_i_; + SCM f = get_property ("tremoloFlags"); + if (!requested_type && gh_number_p (f)) + requested_type = gh_scm2int (f); else - default_tremolo_type_i_ = requested_type; + daddy_trans_l_->set_property ("tremoloFlags", gh_int2scm (requested_type)); if (requested_type) { diff --git a/lily/text-spanner-engraver.cc b/lily/text-spanner-engraver.cc index 911aadeb0b..fe89e752bc 100644 --- a/lily/text-spanner-engraver.cc +++ b/lily/text-spanner-engraver.cc @@ -75,7 +75,7 @@ Text_spanner_engraver::do_try_music (Music *m) } else if (s->span_type_str_ == "text") { - req_drul_[s->span_dir_] = s; + req_drul_[s->get_span_dir()] = s; return true; } } diff --git a/lily/tie-column.cc b/lily/tie-column.cc index eb7b45fb58..58d3db3dca 100644 --- a/lily/tie-column.cc +++ b/lily/tie-column.cc @@ -76,6 +76,10 @@ Tie_column::set_directions (Score_element*me) ties.del (i); + if(!ties.size()) + return ; + + Direction d = Directional_element_interface::get (me); if (d) { diff --git a/lily/translator-def.cc b/lily/translator-def.cc index 3a9cc88de9..668d5a70ea 100644 --- a/lily/translator-def.cc +++ b/lily/translator-def.cc @@ -308,13 +308,13 @@ Translator_def::default_child_context_name () SCM Translator_def::to_alist ()const { - SCM l = SCM_EOL; - + SCM l = SCM_EOL; + l = gh_cons (gh_cons (ly_symbol2scm ("consists"), consists_name_list_), l); l = gh_cons (gh_cons (ly_symbol2scm ("end-consists"), end_consists_name_list_), l); l = gh_cons (gh_cons (ly_symbol2scm ("accepts"), accepts_name_list_), l); l = gh_cons (gh_cons (ly_symbol2scm ("property-ops"), property_ops_), l); - l = gh_cons (gh_cons (ly_symbol2scm ("type-name"), type_name_), l); + l = gh_cons (gh_cons (ly_symbol2scm ("type-name"), type_name_), l); // junkme. l = gh_cons (gh_cons (ly_symbol2scm ("group-type"), translator_group_type_), l); return l; diff --git a/lily/vertical-align-engraver.cc b/lily/vertical-align-engraver.cc index db986562af..9fa4ac78e5 100644 --- a/lily/vertical-align-engraver.cc +++ b/lily/vertical-align-engraver.cc @@ -42,18 +42,6 @@ Vertical_align_engraver::do_creation_processing() void Vertical_align_engraver::do_removal_processing() { - SCM min = get_property ("maxVerticalAlign"); - SCM max = get_property ("minVerticalAlign"); - - if (gh_number_p (min) || gh_number_p (max)) - { - min = gh_number_p (min) ? min : gh_double2scm (0.0); - max = gh_number_p (max) ? max : gh_double2scm (infinity_f); - - valign_p_->set_elt_property ("threshold", - gh_cons (min,max)); - } - valign_p_->set_bound(RIGHT,unsmob_element (get_property ("currentCommandColumn"))); typeset_element (valign_p_); valign_p_ =0; diff --git a/lilypond-font-lock.el b/lilypond-font-lock.el new file mode 100644 index 0000000000..c760f093a4 --- /dev/null +++ b/lilypond-font-lock.el @@ -0,0 +1,89 @@ +;; lilypond-font-lock.el + +;; Copyright (C) 1992,1993,1994 Tim Peters + +;; Author: 1997: Han-Wen Nienhuys +;; Author: 1995-1996 Barry A. Warsaw +;; 1992-1994 Tim Peters +;; Created: Feb 1992 +;; Version: 0.0 +;; Last Modified: 12SEP97 +;; Keywords: lilypond languages music notation + +;; This software is provided as-is, without express or implied +;; warranty. Permission to use, copy, modify, distribute or sell this +;; software, without fee, for any purpose and by any individual or +;; organization, is hereby granted, provided that the above copyright +;; notice and this paragraph appear in all copies. + +;; This started out as a cannabalised version of python-mode.el, by hwn +;; For changes see the LilyPond ChangeLog +;; +;; TODO: +;; - should handle block comments too. +;; - handle lexer modes (\header, \melodic, \lyric) etc. +;; - indentation +;; - notenames? +;; - fontlock: \melodic \melodic + +(defconst LilyPond-font-lock-keywords + (let* ((keywords '("spanrequest" "simultaneous" "sequential" "accepts" + "autochange" "alternative" "bar" "breathe" + "cadenza" "chordmodifiers" "chords" "clef" "cm" "consists" + "consistsend" "context" + "duration" "font" "grace" "header" "in" "lyrics" + "key" "keysignature" "mark" "musicalpitch" + "time" "times" "midi" "mm" "name" "notenames" + "notes" "partial" "paper" "penalty" "push" "pop" "property" "pt" + "relative" "remove" "repeat" "repetitions" "addlyrics" + "scm" "scmfile" "score" "script" + "shape" "skip" "textscript" "tempo" "translator" "transpose" + "type" "version" + )) + (kwregex (mapconcat (lambda (x) (concat "\\\\" x)) keywords "\\|"))) + + (list + (concat ".\\(" kwregex "\\)[^a-zA-Z]") + (concat "^\\(" kwregex "\\)[^a-zA-Z]") + '(".\\(\\\\[a-zA-Z][a-zA-Z]*\\)" 1 font-lock-variable-name-face) + '("^[\t ]*\\([a-zA-Z][_a-zA-Z]*\\) *=" 1 font-lock-variable-name-face) + )) + "Additional expressions to highlight in LilyPond mode.") + +;; define a mode-specific abbrev table for those who use such things +(defvar LilyPond-mode-abbrev-table nil + "Abbrev table in use in `LilyPond-mode' buffers.") + +(define-abbrev-table 'LilyPond-mode-abbrev-table nil) + +(defvar LilyPond-mode-syntax-table nil + "Syntax table used in `LilyPond-mode' buffers.") + +;; +(if LilyPond-mode-syntax-table + () + (setq LilyPond-mode-syntax-table (make-syntax-table)) + (mapcar (function + (lambda (x) (modify-syntax-entry + (car x) (cdr x) LilyPond-mode-syntax-table))) + '(( ?\( . "()" ) ( ?\) . ")(" ) ; need matching parens for inline lisp + ( ?\[ . "." ) ( ?\] . "." ) + ( ?\{ . "(}" ) ( ?\} . "){" ) + ( ?\< . "(>" )( ?\> . ")>") + ( ?\$ . "." ) ( ?\% . "." ) ( ?\& . "." ) + ( ?\* . "." ) ( ?\+ . "." ) ( ?\- . "." ) + ( ?\/ . "." ) ( ?\= . "." ) + ( ?\| . "." ) (?\\ . "\\" ) + ( ?\_ . "." ) + ( ?\' . "w") + ( ?\" . "\"" ) + ( ?\% . "<") + ( ?\n . ">") + +; FIXME +; ( ?% . ". 124b" ) +; ( ?{ . ". 23" ) + )) + + ) + diff --git a/lilypond-mode.el b/lilypond-mode.el index 081c1e455d..8250db03fe 100644 --- a/lilypond-mode.el +++ b/lilypond-mode.el @@ -16,7 +16,7 @@ (defconst LilyPond-version "1.3.103" "`LilyPond-mode' version number.") -(defconst LilyPond-help-address "help-gnu-music@gnu.org" +(defconst LilyPond-help-address "bug-gnu-music@gnu.org" "Address accepting submission of bug reports.") (defvar LilyPond-mode-hook nil diff --git a/ly/auto-beam-settings.ly b/ly/auto-beam-settings.ly deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ly/generate-documentation.ly b/ly/generate-documentation.ly index 924715843e..03399af21a 100644 --- a/ly/generate-documentation.ly +++ b/ly/generate-documentation.ly @@ -1,3 +1,2 @@ -#(eval-string (ly-gulp-file "generate-engraver-documentation.scm")) -#(eval-string (ly-gulp-file "generate-backend-documentation.scm")) +#(eval-string (ly-gulp-file "generate-documentation.scm")) diff --git a/make/lilypond.spec.in b/make/lilypond.spec.in index 8c6f52170d..bcd0bca7a7 100644 --- a/make/lilypond.spec.in +++ b/make/lilypond.spec.in @@ -94,6 +94,7 @@ fi %files # hairy to hook it in (possibly non-existing) emacs %doc lilypond-mode.el +%doc lilypond-font-lock.el %ifnos cygwin %{_prefix}/bin/abc2ly diff --git a/make/out/lilypond.lsm b/make/out/lilypond.lsm index 9d27f5aaaa..532b294e05 100644 --- a/make/out/lilypond.lsm +++ b/make/out/lilypond.lsm @@ -1,15 +1,15 @@ Begin3 Title: LilyPond -Version: 1.3.102 -Entered-date: 01NOV00 +Version: 1.3.103 +Entered-date: 02NOV00 Description: Keywords: music notation typesetting midi fonts engraving Author: hanwen@cs.uu.nl (Han-Wen Nienhuys) janneke@gnu.org (Jan Nieuwenhuizen) Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys) Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert - 1000k lilypond-1.3.102.tar.gz + 1000k lilypond-1.3.103.tar.gz Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/ - 1000k lilypond-1.3.102.tar.gz + 1000k lilypond-1.3.103.tar.gz Copying-policy: GPL End diff --git a/make/out/lilypond.spec b/make/out/lilypond.spec index ff03cd1a1b..625ee55aa2 100644 --- a/make/out/lilypond.spec +++ b/make/out/lilypond.spec @@ -1,9 +1,9 @@ Name: lilypond -Version: 1.3.102 +Version: 1.3.103 Release: 1 License: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.102.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.103.tar.gz Summary: A program for printing sheet music. URL: http://www.cs.uu.nl/~hanwen/lilypond # Icon: lilypond-icon.gif @@ -94,6 +94,7 @@ fi %files # hairy to hook it in (possibly non-existing) emacs %doc lilypond-mode.el +%doc lilypond-font-lock.el %ifnos cygwin %{_prefix}/bin/abc2ly diff --git a/make/toplevel.make.in b/make/toplevel.make.in index 3e980b979f..b433213ffe 100644 --- a/make/toplevel.make.in +++ b/make/toplevel.make.in @@ -17,7 +17,7 @@ SCRIPTS = configure aclocal.m4 README_FILES = DEDICATION COPYING NEWS CHANGES ROADMAP README_TXT_FILES = AUTHORS.txt README.txt INSTALL.txt IN_FILES := $(wildcard *.in) -EXTRA_DIST_FILES = lilypond-mode.el vimrc VERSION $(README_FILES) $(SCRIPTS) $(IN_FILES) +EXTRA_DIST_FILES = lilypond-font-lock.el lilypond-mode.el vimrc VERSION $(README_FILES) $(SCRIPTS) $(IN_FILES) NON_ESSENTIAL_DIST_FILES = $(README_TXT_FILES) # bootstrap stepmake: diff --git a/scm/element-descriptions.scm b/scm/element-descriptions.scm index 6cd6ea594e..ac46e1c525 100644 --- a/scm/element-descriptions.scm +++ b/scm/element-descriptions.scm @@ -84,7 +84,7 @@ (meta . ,(element-description "Clef" clef-interface font-interface break-aligned-interface )) )) - (ChordNames . ( + (ChordName . ( (molecule-callback . ,Chord_name::brew_molecule) (after-line-breaking-callback . ,Chord_name::after_line_breaking) (chord-name-function . ,default-chord-name-function) @@ -242,7 +242,8 @@ )) (RehearsalMark . ( - (molecule-callback . ,Text_item::brew_molecule) + (molecule-callback . ,Text_item::brew_molecule) + (direction . 1) (breakable . #t) (font-family . number) (font-relative-size . 1) diff --git a/scm/generate-backend-documentation.scm b/scm/generate-backend-documentation.scm index a2f445ac78..70b2f24bba 100644 --- a/scm/generate-backend-documentation.scm +++ b/scm/generate-backend-documentation.scm @@ -89,7 +89,7 @@ (outname (string-append name ".html")) (out (open-output-file outname)) ) - (display (string-append "Writing " outname " ... \n") (current-error-port)) + (writing-wip outname) (display (string-append "LilyPond Element " name " " "

" name "

" @@ -102,24 +102,24 @@ (define (document-elements elts) (let* ((files (map (lambda (x) (document-element (car x) (cdr x))) elts)) + (names (map car elts)) (outname (string-append "backend.html")) (out (open-output-file outname)) - (l (map (lambda (x) (string-append - "
  • " x "\n")) - files)) + (l (map (lambda (x) (string-append "
  • " + (urlfy x))) names)) ) - - (display - (string-append - "LilyPond backend documentation" - "

    LilyPond backend documentation

    " - "
      " - (apply string-append l) - "
    " - ) - out - ) - )) + (writing-wip outname) + (display + (string-append + "LilyPond backend documentation" + "

    LilyPond backend documentation

    " + "
      " + (apply string-append l) + "
    " + ) + out + ) + )) ; (display (document-interface stem-interface '())) ; (define b (cdr (assoc 'Dyna all-element-descriptions))) diff --git a/scm/generate-documentation.scm b/scm/generate-documentation.scm new file mode 100644 index 0000000000..14db4f9ce8 --- /dev/null +++ b/scm/generate-documentation.scm @@ -0,0 +1,20 @@ + + +(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 (writing-wip x) + (display (string-append "Writing " x " ... \n") (current-error-port)) + ) + +(eval-string (ly-gulp-file "generate-engraver-documentation.scm")) +(eval-string (ly-gulp-file "generate-backend-documentation.scm")) diff --git a/scm/generate-engraver-documentation.scm b/scm/generate-engraver-documentation.scm index 2925d1c73b..9ab114fb6d 100644 --- a/scm/generate-engraver-documentation.scm +++ b/scm/generate-engraver-documentation.scm @@ -7,72 +7,85 @@ ) ) -(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" - (apply string-append - (map (lambda (x) (document-trans-property x)) - (car (cdddr engraver-descr))) - ) - "
    \n" +(define (document-engraver engraver-descr) + + (let* ( + (props (car (cdddr engraver-descr))) + (name (car engraver-descr)) + (desc (cadr engraver-descr)) + (objs (caddr engraver-descr)) ) - - ) + (string-append + "

    " name "

    \n" + desc + "

    " + (if (null? props) + "" + (string-append + "

    Properties

    \n
      \n" + (apply string-append + (map (lambda (x) (document-trans-property x)) props) + ) + "
    \n") + ) + (if (null? objs) + "" + (string-append + "This engraver creates \n " + (human-listify (map urlfy objs)) + " objects") + ) + ) ) ) -(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 (document-engraver-by-name name) + (let* + ( + (eg (assoc (string->symbol name) engraver-description-alist)) + ) + (if (eq? eg #f) + (string-append "Engraver " name ", not documented.\n") + (document-engraver (cdr eg)) + ) +)) (define (context-doc-string context-desc) (let* ( - (nm (cdr (assoc 'type-name context-desc))) + (name (cdr (assoc 'type-name context-desc))) + (desc-handle (assoc (string->symbol name) context-description-alist)) + (desc (if (pair? desc-handle) (cdr desc-handle) "")) + (accepts (cdr (assoc 'accepts context-desc))) (consists (append + (list (cdr (assoc 'group-type context-desc))) (cdr (assoc 'consists context-desc)) (cdr (assoc 'end-consists context-desc)) )) ) (string-append - "

    " nm "

    \n" - "accepts:\n" - (human-listify (map urlfy accepts)) - "
    \n" + "

    Context " name "

    \n" + desc + + (if (null? accepts) + "This context is a `bottom' context; it can not contain other contexts." + (string-append + name " can contain \n" + (human-listify (map urlfy accepts)) + )) + "

    This context is built from the following engravers\n" (apply string-append - (map document-engraver consists) + (map document-engraver-by-name consists) ) ) ) ) + ;; FIXME element ChordNames overwrites context ChordNames. (define (document-context context-desc) (let* @@ -83,7 +96,7 @@ (out (open-output-file outname)) ) - (display (string-append "Writing " outname " ... \n") (current-error-port)) + (writing-wip outname) (display (string-append "LilyPond Context " name " " docstr) @@ -95,21 +108,23 @@ (define (document-paper paper-alist) +; (write paper-alist) (let* ( - (ufiles (map (lambda (x) (document-context x )) paper-alist)) - (files (sort ufiles string" x "\n")) - files)) + "

  • " (urlfy x))) + names)) ) - (write files) + (display (string-append - "LilyPond music translation documentation" - "

    LilyPond music translation documentation

    " + "LilyPond interpretation context documentation" + "

    LilyPond interpretation context documentation

    " "
      " (apply string-append l) "
    " @@ -119,8 +134,46 @@ ) ) +(define (document-engraver-separately desc) + (let* ( + (name (car desc)) + (outname (string-append name ".html")) + (out (open-output-file outname)) + (doc (document-engraver desc)) + ) + + (writing-wip outname) + (display doc out) + outname + )) + +(define (document-all-engravers) + (let* + ( + (descs (map cdr engraver-description-alist)) + (names (map car engraver-description-alist)) + (fnames (map document-engraver-separately descs)) + (outname "engravers.html") + (out (open-output-file outname)) + ) + + (display + (string-append + "All LilyPond engravers" + "

    All LilyPond engravers

    " + "
      " + (apply string-append + (map (lambda (x) (string-append "
    • " x)) + (map urlfy names))) + "
    " + ) out) + )) + ; (display (document-engraver 'Stem_engraver)) -(document-paper (My_lily_parser::paper_description)) + ;(display (human-listify '("a" "b" "c"))) + +(document-paper (My_lily_parser::paper_description)) +(document-all-engravers) diff --git a/scm/interface.scm b/scm/interface.scm index 11fad8eefe..870e365bbd 100644 --- a/scm/interface.scm +++ b/scm/interface.scm @@ -13,6 +13,7 @@ ) ) +(define (boolean-or-symbol? x) (or boolean? x) (or symbol? x)) (define (uniqued-alist alist acc) (if (null? alist) acc @@ -127,7 +128,12 @@ more than this (in staffspace)") (list (elt-property-description 'horizontal-shift integer? "integer that identifies ranking of note-column for horizontal shifting.") (elt-property-description 'force-hshift number? "amount of collision_note_width that overides automatic collision settings.") - (elt-property-description 'merge-differently-dotted boolean? "merge black noteheads with differing dot count in collisions.") + (elt-property-description 'merge-differently-dotted boolean? "merge black noteheads with differing dot count in collisions. +

    +Merge noteheads in collisions, even if they have a different number of +dots. This normal notation for polyphonic guitar music. + +") )) ) @@ -282,6 +288,14 @@ This procedure is called (using dependency resolution) after line breaking. Retu (elt-property-description 'columns list? " list of note-columns.") (elt-property-description 'number-gap number? "") (elt-property-description 'delta-y number? "amount of ascension") + (elt-property-description 'tuplet-bracket-visibility boolean-or-symbol? " +This controls the visibility of the tuplet bracket. +Setting it to false will prevent printing of the +bracket. Setting the property to #'if-no-beam will make it +print only if there is no beam associated with this tuplet bracket.") + (elt-property-description 'tuplet-number-visibility boolean-or-symbol? " +Like tuplet-bracket-visibility, but for the number.") + (elt-property-description 'parallel-beam boolean? "internal: true if there is a beam just as wide as the bracket ") (elt-property-description 'thick number? "thickness, in stafflinethickness") ) )) diff --git a/scm/translator-description.scm b/scm/translator-description.scm index a6dfb5af21..e05e36346b 100644 --- a/scm/translator-description.scm +++ b/scm/translator-description.scm @@ -1,4 +1,4 @@ - +(define (number-or-string? x) (or (number? x) (string? x))) (define (engraver-description name description created-elts properties) (list name description created-elts properties) ) @@ -10,108 +10,125 @@ (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? "") - ))) + '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? " +Specify the number of beams to draw on the left side of the next note. +Overrides automatic beaming. The value is only used once, and then it +is erased. +") + (translator-property-description 'stemRightBeamCount integer? "idem, for the right side") + ))) + + (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 - '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 + (cons + 'Separating_line_group_engraver + (engraver-description + "Separating_line_group_engraver" + "Generates objects for computing spacing parameters." + '(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. +The format is a pair of dimensions, for example, this sets the sizes +of a staff to 10 (5+5) staffspaces high.

    + + +\property Staff.StaffVerticalExtent = #(-5.0 . 5.0) + + + [fixme, naming]") + (translator-property-description + 'CONTEXTNAMEMinimumVerticalExtent number-pair? + "minimum vertical extent, same format as CONTEXTNAMEVerticalExtent [fixme, naming]") + (translator-property-description + 'CONTEXTNAExtraVerticalExtent number-pair? + "extra vertical extent, same format +CONTEXTNAMEMinimumVerticalExtent [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 + '(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 + '(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 + (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.

    + + ))) + + + (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 @@ -120,26 +137,861 @@ 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") + + ))) + + (cons + 'A2_engraver + (engraver-description + "A2_engraver" + "Part combine engraver for orchestral scores." + '(TextScript) + (list + (translator-property-description 'combineParts boolean? "try to combine parts?") + (translator-property-description 'unison boolean? "set if unisono is detected ") + (translator-property-description 'solo boolean? "") + (translator-property-description 'soloADue boolean? "") + (translator-property-description 'soloText string? "") + (translator-property-description 'soloIIText string? "") + (translator-property-description 'aDueText string? "") + (translator-property-description 'combineParts boolean? "") + (translator-property-description 'unisilence boolean? "") + (translator-property-description 'unison boolean? "") + (translator-property-description 'unirhythm boolean? "") + (translator-property-description 'solo boolean? "") + (translator-property-description 'split-interval number-pair? "") + (translator-property-description 'soloADue boolean? "") + ))) + + (cons + 'Align_note_column_engraver + (engraver-description + "Align_note_column_engraver" + "Generate object to put grace notes from left to right." + '(GraceAlignment) + (list + + (translator-property-description 'graceAlignPosition dir? "put the grace note before or after the main note?") + (translator-property-description 'graceAccidentalSpace number? "amount space to alot for an accidental") + ))) + + (cons + 'Arpeggio_engraver + (engraver-description + "Arpeggio_engraver" + "Generate an Arpeggio from a Arpeggio_req" + '(Arpeggio) + (list + ))) + + (cons + 'Auto_beam_engraver + (engraver-description + "Auto_beam_engraver" + "Generate beams based on measure characteristics and observed Stems. +Uses beatLength, measureLength and measurePosition to decide when to start and stop a beam. +" + '( + Beam) + (list + (translator-property-description 'noAutoBeaming boolean? " If set to true then beams are not generated automatically. +") + (translator-property-description 'beamAutoEnd moment? " + Specifies when automatically generated beams can end. See + section XREF-autobeam [FIXME].") + (translator-property-description 'beamAutoBegin moment? " + Specifies when automatically generated beams can start. See + section XREF-autobeam [FIXME].") + + ))) + + (cons + 'Bar_engraver + (engraver-description + "Bar_engraver" + "Create barlines." + '(BarLine) + (list + (translator-property-description 'whichBar string? "This property is read to determine what type of barline to create. +Example: +

    +\\property Staff.whichBar = \"|:\" + +will create a start-repeat bar in this staff only +") + (translator-property-description 'staffsFound list? "list of all staff-symbols found.") + ))) + + + (cons + 'Bar_number_engraver + (engraver-description + "Bar_number_engraver" + "A bar number is created whenever measurePosition is zero. It is +put on top of all staffs, and appears only at left side of the staff." + '(BarNumber) + (list + (translator-property-description 'currentBarNumber integer? "this is read to determine + the number to put on the bar ") + ))) + + + (cons + 'Beam_engraver + (engraver-description + "Beam_engraver" + "Handles Beam_requests by engraving Beams. If omitted, then notes will be + printed with flags instead of beams." + '(Beam) + (list + (translator-property-description 'beamMelismaBusy boolean? "Signal if a beam is set when automaticMelismata is set") + ))) + + (cons + 'Break_align_engraver + (engraver-description + "Break_align_engraver" + "Align graphic elements with corresponding break-align-symbols into groups, and order the groups according to breakAlignOrder" + '(BreakAlignment BreakAlignGroup LeftEdge) + (list + (translator-property-description 'breakAlignOrder list? + "Defines the order in which +prefatory matter (clefs, key signatures) appears, eg. this puts the +key signatures after the bar lines: + + + \\property Score.breakAlignOrder = #'( + Span_bar + Breathing_sign + Clef_item + Staff_bar + Key_item + Time_signature + ) + +") + ))) + + + (cons + 'Breathing_sign_engraver + (engraver-description + "Breathing_sign_engraver" + "" + '(BreathingSign) + (list + ))) + + + (cons + 'Chord_name_engraver + (engraver-description + "Chord_name_engraver" + "Catch Note_req's, Tonic_reqs, Inversion_reqs, Bass_req +and generate the appropriate chordname." + '(ChordNames) + (list + (translator-property-description 'chordInversion boolean? " Determines whether LilyPond should look for chord inversions when + translating from notes to chord names. Set to 1 to find + inversions. The default is 0 which does not look for + inversions.") + (translator-property-description 'drarnChords boolean? "") + ))) + + + (cons + 'Chord_tremolo_engraver + (engraver-description + "Chord_tremolo_engraver" + "Generates beams for the \repeat X tremolo ... construct" + '(Beam) + (list + ))) + + + + (cons + 'Collision_engraver + (engraver-description + "Collision_engraver" + "" + '(NoteCollision + ) + (list + ))) + + (cons + 'Custos_engraver + (engraver-description + "Custos_engraver" + "" + '(Custos) + (list + ))) + + + (cons + 'Dot_column_engraver + (engraver-description + "Dot_column_engraver" + " Engraves dots on dotted notes shifted to the right of the note. +If omitted, then dots appear on top of the notes. +" + '(DotColumn + ) + (list + ))) + + + (cons + 'Dynamic_engraver + (engraver-description + "Dynamic_engraver" + "" + '(DynamicLineSpanner + DynamicText Crescendo + TextSpanner) + (list + ))) + + + + + (cons + 'Grace_position_engraver + (engraver-description + "Grace_position_engraver" + "Attach a grace note alignment to a note-column " + '() + (list + ))) + + (cons + 'Grace_engraver_group + (engraver-description + "Grace_engraver_group" + "An engraver that creates a `shielded' context-tree with separate notion of time" + '() + (list + ))) + + + (cons + 'Instrument_name_engraver + (engraver-description + "Instrument_name_engraver" + " Prints the name of the instrument (specified by + @code{Staff.instrument} and @code{Staff.instr}) at the left of the + staff." + '(InstrumentName) + (list + (translator-property-description 'instrument string? " If @code{Instrument_name_engraver} +@cindex Instrument_name_engraver + is + added to the Staff translator, then the @code{instrument} property + is used to label the first line of the staff and the @code{instr} + property is used to label subsequent lines. If the + @code{midiInstrument} property is not set, then @code{instrument} + is used to determine the instrument for MIDI output.") + (translator-property-description 'instr string? "see instrument") + ))) + + (cons + 'Engraver_group_engraver + (engraver-description + "Engraver_group_engraver" + "A group of engravers taken together" + '() + (list + ))) + + (cons + 'Key_engraver + (engraver-description + "Key_engraver" + "" + '(KeySignature + ) + (list + + (translator-property-description 'keySignature list? "") + (translator-property-description 'keyOctaviation boolean? "") + (translator-property-description 'explicitKeySignatureVisibility procedure? "") + (translator-property-description 'createKeyOnClefChange boolean? "") + (translator-property-description 'keyAccidentalOrder list? "") + (translator-property-description 'keySignature list? "") + ))) + + (cons 'Lyric_phrasing_engraver + (engraver-description + "Lyric_phrasing_engraver" + "" + '() + (list + (translator-property-description 'automaticPhrasing boolean? "") + (translator-property-description 'weAreGraceContext boolean? "") + (translator-property-description 'melismaEngraverBusy boolean? "") + (translator-property-description 'associatedVoice string? "") + (translator-property-description 'phrasingPunctuation string? "") + ))) + + (cons + 'Mark_engraver + (engraver-description + "Mark_engraver" + "" + '(RehearsalMark) + (list + + (translator-property-description 'rehearsalMark number-or-string? "") + (translator-property-description 'staffsFound list? "") + ))) + + + (cons + 'Melisma_engraver + (engraver-description + "Melisma_engraver" + "" + '() + (list + + (translator-property-description 'melismaBusy boolean? "") + (translator-property-description 'slurMelismaBusy boolean? "") + (translator-property-description 'tieMelismaBusy boolean? "") + (translator-property-description 'beamMelismaBusy boolean? "") + ))) + + + (cons + 'Multi_measure_rest_engraver + (engraver-description + "Multi_measure_rest_engraver" + "Engraves multi-measure rests that are produced with @code{R}. Reads +measurePosition and currentBarNumber to determine what number to print over the MultiMeasureRest + " + '(MultiMeasureRest) + (list + ))) + + + (cons + 'Note_heads_engraver + (engraver-description + "Note_heads_engraver" + "Generate one or more noteheads from Music of type Note_req." + '(NoteHead Dots) + (list + ))) + + + (cons + 'Note_name_engraver + (engraver-description + "Note_name_engraver" + "" + '(NoteName) + (list + ))) + + + (cons + 'Output_property_engraver + (engraver-description + "Output_property_engraver" + "Interpret Music of Output_property type, and apply a function +to any Graphic objects that satisfies the predicate." + '() + (list + ))) + + + (cons + 'Piano_pedal_engraver + (engraver-description + "Piano_pedal_engraver" + "engrave Piano pedals symbols." + '(SostenutoPedal SustainPedal UnaChordaPedal) + (list + + (translator-property-description 'startSustain string? "") + (translator-property-description 'stopSustain string? "") + (translator-property-description 'stopStartSustain string? "") + (translator-property-description 'startUnaChorda string? "") + (translator-property-description 'stopUnaChorda string? "") + ))) + + (cons + 'Pitch_squash_engraver + (engraver-description + "Pitch_squash_engraver" + "Treat all pitches as middle C. Note that the notes move, but +the locations of accidentals stay the same. +Set the position field of all note heads to zero. This useful for +making a single line staff that demonstrates the rhythm of a melody." + '() + (list + (translator-property-description 'squashedPosition integer? " Vertical position of +squashing.") + ))) + + (cons + 'Property_engraver + (engraver-description + "Property_engraver" +"This is a engraver that converts \property settings into +back-end element-property settings. Example: Voice.stemLength will set +#'length in all Stem objects

    +Due to CPU and memory requirements, the use of this engraver is deprecated." + '() + (list + (translator-property-description 'Generic_property_list list? "description of the conversion. +

    + Defines names and types for generic properties. These are properties + than can be plugged into the backend directly. See the init file + @file{generic-property.scm} for details. For internal use only, deprecated. +") + ))) + + + (cons + 'Repeat_acknowledge_engraver + (engraver-description + "Repeat_acknowledge_engraver" + + "Acknowledge repeated music, and convert the contents of +repeatCommands ainto an appropriate setting for whichBar" + '() + (list + (translator-property-description 'repeatCommands list? "") + (translator-property-description 'whichBar string? "") + + ))) + + + (cons + 'Rest_collision_engraver + (engraver-description + "Rest_collision_engraver" + "Handles collisions of rests." + '(RestCollision) + (list + ))) + + + (cons + 'Rest_engraver + (engraver-description + "Rest_engraver" + "" + '(Rest Dots) + (list + ))) + + + (cons + 'Rhythmic_column_engraver + (engraver-description + "Rhythmic_column_engraver" + "Generates NoteColumn, an objects that groups stems, noteheads and rests." + '(NoteColumn) + (list + ))) + + + (cons + 'Script_column_engraver + (engraver-description + "Script_column_engraver" + "" + '(ScriptColumn) + (list + ))) + + + (cons + 'Script_engraver + (engraver-description + "Script_engraver" + " Handles note ornaments generated by @code{\script}. +" + '(Script) + (list + (translator-property-description 'scriptDefinitions list? " +Description of scripts to use. (fixme) +") + + (translator-property-description 'scriptHorizontal boolean? " Put scripts left or right of note heads. Support for this is + limited. Accidentals will collide with scripts. + +") + ))) + + (cons + 'Score_engraver + (engraver-description + "Score_engraver" + "Top level engraver. Takes care of generating columns and the complete system (ie. LineOfScore)" + '(LineOfScore PaperColumn NonMusicalPaperColumn) + (list + (translator-property-description 'currentMusicalColumn ly-element? "") + (translator-property-description 'currentCommandColumn ly-element? "") + ))) + + (cons + 'Slur_engraver + (engraver-description + "Slur_engraver" + "Build slurs from Slur_reqs" + '(Slur) + + (list + (translator-property-description 'slurBeginAttachment symbol? "") + (translator-property-description 'slurEndAttachment symbol? "") + (translator-property-description 'slurMelismaBusy boolean? "Signal a slur if automaticMelismata is set") + ))) + + + (cons + 'Spacing_engraver + (engraver-description + "Spacing_engraver" + "make a SpacingSpanner and do bookkeeping of shortest starting and playing notes " + '(SpacingSpanner) + (list + ))) + + + (cons + 'Span_arpeggio_engraver + (engraver-description + "Span_arpeggio_engraver" + "" + '(Arpeggio) + (list + (translator-property-description 'connectArpeggios boolean? " If +set, connect all arpeggios that are found. In this way, you can make +arpeggios that cross staffs. +") + ))) + + + (cons + 'Span_bar_engraver + (engraver-description + "Span_bar_engraver" + "This engraver makes cross-staff barlines: It catches all normal +bar lines, and draws a single span-bar across them.

    " + + '(SpanBar) + (list + ))) + + + (cons + 'Staff_symbol_engraver + (engraver-description + "Staff_symbol_engraver" + "create the constellation of five (default) staff lines." + '(StaffSymbol) + (list + ))) + + + (cons + 'Stanza_number_engraver + (engraver-description + "Stanza_number_engraver" + "" + '(StanzaNumber ) + (list + (translator-property-description 'stz string? "") + (translator-property-description 'stanza string? "Stanza `number' to print at start of a verse") + ))) + + + + (cons + 'System_start_delimiter_engraver + (engraver-description + "System_start_delimiter_engraver" + "creates a SystemStartDelimiter spanner" + '(SystemStartDelimiter) + (list + ))) + + + (cons + 'Text_engraver + (engraver-description + "Text_engraver" + "Create text-scripts" + '(TextScript) + (list + (translator-property-description 'scriptHorizontal boolean? " Put scripts left or right of note heads. Support for this is + limited. Accidentals will collide with scripts. + +") + (translator-property-description 'textNonEmpty boolean? " If set +to true then text placed above or below the staff is not assumed to +have zero width. @code{fatText} and @code{emptyText} are predefined +settings. +") + ))) + + + (cons + 'Text_spanner_engraver + (engraver-description + "Text_spanner_engraver" + "Create text spanner from a Span_req " + '(TextSpanner) + (list + ))) + + + (cons + 'Thread_devnull_engraver + (engraver-description + "Thread_devnull_engraver" + "Kill elements whenever we are Voice called `two' and +either unison, unisilence or soloADue is set" + '() + '())) + + + (cons + 'Tie_engraver + (engraver-description + "Tie_engraver" + "Generate ties between noteheads of equal pitch." + '(Tie TieColumn) + (list + + + (translator-property-description 'sparseTies boolean? "only create one tie per chord.") + (translator-property-description 'tieMelismaBusy boolean? "Signal ties when automaticMelismata is set") + ))) + + + (cons + 'Time_signature_engraver + (engraver-description + "Time_signature_engraver" + "Create a TimeSignature whenever timeSignatureFraction changes" + '(TimeSignature) + (list + ))) + + + (cons + 'Timing_engraver + (engraver-description + "Timing_engraver" + " Responsible for synchronizing timing information from staffs. + Normally in @code{Score}. In order to create polyrhythmic music, + this engraver should be removed from @code{Score} and placed in + @code{Staff}." + '() + (list + (translator-property-description 'timeSignatureFraction number-pair? " +pair of numbers, signifying the time signature. For example #'(4 . 4) is a 4/4 time signature.") + + (translator-property-description 'barNonAuto boolean? " If set to true then bar lines will not be printed + automatically; they must be explicitly created with @code{\bar} + keywords. Unlike with the @code{\cadenza} keyword, measures are + still counted. Bar generation will resume according to that + count if this property is set to zero. +") + (translator-property-description 'whichBar string? "if not set +explicitly (by \property or \bar), this is set according to values of +defaultBarType, barAlways, barNonAuto and measurePosition. + ") + + (translator-property-description 'barAlways boolean? " If set to true a bar line is drawn after each note. +") + (translator-property-description 'defaultBarType string? "Sets the default type of bar line. See Section XREF-barlines [FIXME] + for a list of available bar types. +") + (translator-property-description 'skipBars boolean? " Set to true to skip the empty bars that are produced by + multimeasure notes and rests. These bars will not appear on the + printed output. If not set (the default) multimeasure + notes and rests expand into their full length, printing the appropriate + number of empty bars so that synchronization with other voices is + preserved. + +@mudela[fragment,verbatim,center] +r1 r1*3 R1*3\property Score.skipBars=1 r1*3 R1*3 + +@end mudela + +") + (translator-property-description 'timing boolean? " Keep administration of measure length, position, bar number, etc? +Switch off for cadenzas.") + (translator-property-description 'oneBeat moment? " How long does one beat in the current time signature last?") + (translator-property-description 'measureLength moment? " How long does one measure in the current time signature last?") + (translator-property-description 'measurePosition moment? " + How much of the current measure (measured in whole notes) have we had? +") + (translator-property-description 'currentBarNumber integer? "Contains the current barnumber. This property is incremented at +every barline. +") + ))) + + + (cons + 'Tuplet_engraver + (engraver-description + "Tuplet_engraver" + "Catch Time_scaled_music and generate appropriate bracket " + '( + TupletBracket) + (list + (translator-property-description 'tupletSpannerDuration moment? " +Normally a tuplet bracket is as wide as the +@code{\times} expression that gave rise to it. By setting this +property, you can make brackets last shorter. Example +

    +@mudela[verbatim,fragment] +\context Voice \times 2/3 { + \property Voice.tupletSpannerDuration = #(make-moment 1 4) + [c8 c c] [c c c] +} +@end mudela + +") + (translator-property-description 'tupletInvisible boolean? " + If set to true, tuplet bracket creation is switched off +entirely. This has the same effect as setting both +@code{tupletNumberVisibility} and @code{tupletBracketVisibility} to +@code{#f}, but as this does not even create elements, this setting +uses less memory and time.") + ))) + + + (cons + 'Vertical_align_engraver + (engraver-description + "Vertical_align_engraver" + "Catch Vertical axis groups and stack them." + '(VerticalAlignment) + (list + ))) + + + (cons + 'Voice_devnull_engraver + (engraver-description + "Voice_devnull_engraver" + "Kill off certain items and spanners if we're Voice `two' and unison or unisilence is set." + '() + (list + ))) )) - (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") - - ))) - - - )) + + + +(define context-description-alist + '( +(Grace . " + The context for handling grace notes. It is instantiated + automatically when you use @code{\grace}. Basically, it is an + `embedded' miniature of the Score context. Since this context + needs special interaction with the rest of LilyPond, you should + not explicitly instantiate it. +") +(LyricVoice . " + Corresponds to a voice with lyrics. Handles the printing of a + single line of lyrics. +") +(Thread . " + Handles note heads, and is contained in the Voice context. You + have to instantiate this explicitly if you want to adjust the + style of individual note heads. +") +(Voice . " + Corresponds to a voice on a staff. This context handles the + conversion of dynamic signs, stems, beams, super- and subscripts, + slurs, ties, and rests. + + You have to instantiate this explicitly if you want to have + multiple voices on the same staff.") + +(ChordNamesVoice . " + A voice with chord names. Handles printing of a line of chord + names.") + +(ChordNames . " + Typesets chord names. Can contain @code{ChordNamesVoice} + contexts.") + +(Lyrics . " + Typesets lyrics. It can contain @code{LyricVoice} contexts. +") +(Staff . " + Handles clefs, bar lines, keys, accidentals. It can contain + @code{Voice} contexts. +") +(RhythmicStaff . " + A context like @code{Staff} but for printing rhythms. Pitches are + ignored; the notes are printed on one line. It can contain + @code{Voice} contexts. +") +(GrandStaff . " + Contains @code{Staff} or @code{RhythmicStaff} contexts. It adds a + brace on the left side, grouping the staffs together. The bar + lines of the contained staffs are connected vertically. It can + contain @code{Staff} contexts.") + +(PianoStaff . " + Just like @code{GrandStaff} but with @code{minVerticalAlign} set + equal to @code{maxVerticalAlign} so that interstaff beaming and + slurring can be used.") + +(StaffGroup . " + Contains @code{Staff} or @code{RhythmicStaff} contexts. Adds a + bracket on the left side, grouping the staffs together. The bar + lines of the contained staffs are connected vertically. It can + contain @code{Staff}, @code{RhythmicStaff}, @code{GrandStaff}, or + @code{Lyrics} contexts. +") +(ChoirStaff . " + Identical to @code{StaffGroup} except that the contained staffs + are not connected vertically. +") +(Score . " + This is the top level notation context. No other context can + contain a @code{Score} context. This context handles the + administration of time signatures. It also makes sure that items + such as clefs, time signatures, and key-signatures are aligned + across staffs. It can contain @code{Lyrics}, @code{Staff}, + @code{RhythmicStaff}, @code{GrandStaff}, @code{StaffGroup}, and + @code{ChoirStaff} contexts. + + You cannot explicitly instantiate a Score context (since it is + not contained in any other context). It is instantiated + automatically when an output definition (a @code{\score} or + @code{\paper} block) is processed. +") +) +) -- 2.39.2