From ad6c60230a76f46fe7537c7e714b045fa306357d Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 27 Mar 2002 00:48:09 +0000 Subject: [PATCH] lilypond-1.3.123 --- Documentation/header.html.in | 1 - Documentation/user/bugs.itexi | 3 +- Documentation/user/convert-ly.itexi | 13 +- Documentation/user/development.itexi | 35 +- Documentation/user/features.itely | 715 +++++++++++++++++++++++++++ Documentation/user/invoking.itexi | 2 +- Documentation/user/lilypond.tely | 24 +- Documentation/user/ly2dvi.itexi | 253 ++++++++++ Documentation/user/macros.itexi | 44 ++ Documentation/user/midi2ly.itexi | 42 ++ Documentation/user/programs.itexi | 16 + Documentation/user/refman.itely | 39 +- Documentation/user/tutorial.itely | 3 +- input/bugs/chord-changes.ly | 12 +- input/test/chord-changes.ly | 9 +- lily/chord-name-engraver.cc | 13 +- lily/chord.cc | 4 + lily/include/ly-smobs.icc | 3 +- scm/backend-documentation-lib.scm | 70 ++- scm/chord-name.scm | 7 +- scm/documentation-lib.scm | 4 +- scm/engraver-documentation-lib.scm | 29 +- scm/generate-documentation.scm | 2 +- scm/interface-description.scm | 3 +- scm/standalone.scm | 4 +- 25 files changed, 1214 insertions(+), 136 deletions(-) create mode 100644 Documentation/user/features.itely create mode 100644 Documentation/user/ly2dvi.itexi create mode 100644 Documentation/user/macros.itexi create mode 100644 Documentation/user/midi2ly.itexi create mode 100644 Documentation/user/programs.itexi diff --git a/Documentation/header.html.in b/Documentation/header.html.in index bb84e2874b..e23d7c22f9 100644 --- a/Documentation/header.html.in +++ b/Documentation/header.html.in @@ -52,7 +52,6 @@ which substitutes some @AT_VARIABLES@ as well. Small FAQ
Full FAQ
User manual
- Features
Regression Test
To do

diff --git a/Documentation/user/bugs.itexi b/Documentation/user/bugs.itexi index e6500cc39e..e9fb63e084 100644 --- a/Documentation/user/bugs.itexi +++ b/Documentation/user/bugs.itexi @@ -1,6 +1,7 @@ -@node Reporting Bugs, , , top +@node Bug reports @chapter Bug reports @cindex bugs +@cindex bug reports @cindex reporting bugs LilyPond development moves quickly, so if you have a problem, it is diff --git a/Documentation/user/convert-ly.itexi b/Documentation/user/convert-ly.itexi index e1658dbbc6..1b8bf18726 100644 --- a/Documentation/user/convert-ly.itexi +++ b/Documentation/user/convert-ly.itexi @@ -1,16 +1,21 @@ +@c -*-texinfo-*- -@node convert-ly, , , Top -@chapter convert-ly -@code{convert-ly} sequentially applies different +@node Convert-ly +@section Convert-ly + + +Convert-ly sequentially applies different lilypond-conversions to upgrade a Lilypond input file. It uses @code{\version} statements in the file to detect the old version number. +@subsection Invoking convert-ly + @example convert-ly [options] [files] @end example -@section Options + @table @samp @item --output The output file to write. diff --git a/Documentation/user/development.itexi b/Documentation/user/development.itexi index 56a37a4d9c..d21699b48b 100644 --- a/Documentation/user/development.itexi +++ b/Documentation/user/development.itexi @@ -1,4 +1,8 @@ -@node Internals, , , Top +@c -*-texinfo-*- + +@c Move chapter +@node Internals +@chapter Internals @menu * Conversion stages:: Lilypond is a multi-pass program. @@ -119,9 +123,8 @@ to. Whenever the note head is moved, the staccato dot moves along automatically. If you keep following offset reference points, you will always end up at -the root-object. This root object is called @code{Line_of_score} -@ref{(lilypond-internals)Element Line_of_score}, and it represents a -system (ie. a line of music). +the root-object. This root object is called @rgrob{Line_of_score}, and it +represents a system (ie. a line of music). All grobs carry a set of grob-properties. In the Stem example above, the property @code{direction} is set to value @code{1}. The function @@ -133,13 +136,12 @@ properties. Often, a grob also is associated with a symbol. On the other hand, Some grobs do not print any symbols, but take care of grouping objects. For example, there is a separate grob that stacks staffs -vertically, so they are not printed in overstrike. The NoteCollision -@ref{(lilypond-internals)Element NoteCollision} is another example of -an abstract grob. It only moves around chords, but doesn't print -anything. +vertically, so they are not printed in overstrike. The +@rgrob{NoteCollision} is another example of an abstract grob. It only +moves around chords, but doesn't print anything. A complete list of grob types is found in -@ref{(lilypond-internals)Elements} +@ref{(lilypond-internals)LilyPond backend} Grobs are created in the "Interpreting music" phase, by things in LilyPond called engravers. In this phase of the translation, a load of @@ -382,7 +384,7 @@ Molecule. -@node Development, , , top +@node Development @chapter Development @menu @@ -392,7 +394,7 @@ Molecule. * Helping with development:: @end menu -@node CodingStyle, , , Development +@node CodingStyle @section CodingStyle - standards while programming for GNU LilyPond As a general rule, you should always try to continue computations, even @@ -621,7 +623,7 @@ files, doing a release. Use them. -@node Making patches, , , Development +@node Making patches @section Making patches @unnumberedsec Track and distribute your code changes @@ -721,7 +723,7 @@ and don't forget to make automatically generated files: @end example -@node Localisation, , , Development +@node Localisation @section Localisation - User messages in LilyPond This document provides some guidelines for uniformising user messages. @@ -883,9 +885,8 @@ Please don't run make po/po-update with GNU gettext < 0.10.35 @end itemize -@node Helping with development, , , Development - -@chapter Getting involved +@node Helping with development +@section Getting involved If you want to help developing LilyPond your efforts are appreciated. You can help LilyPond in several ways. Not all tasks requiring @@ -958,5 +959,3 @@ tools} @item Helping @uref{primrose.sourceforge.net,primrose}, a tool for scanning sheet music. @end itemize - - diff --git a/Documentation/user/features.itely b/Documentation/user/features.itely new file mode 100644 index 0000000000..fa5034eb54 --- /dev/null +++ b/Documentation/user/features.itely @@ -0,0 +1,715 @@ +@ignore + +TODO + * move some stuff to refman + * merge some stuff with refman entries + + * add @ref{}s to lilypond-internals: + @rgrob{Name} to grob + @reng{Name} to engraver + + there's a very simple, very general noXXX mechanism; try + +noop \property Staff.VoltaBrace = #'() +yes: \property Staff.VoltaBracket = #'((meta . ((interfaces . ())))) + + + visibility? + brew_molecule? +@end ignore + + +@node Features +@chapter Features + +@menu +* Arpeggio:: Arpeggio +* Glissando:: Glissando +* Manual beam settings:: Manual beam settings +* Slur attachments:: Slur attachments +* Text spanner:: Text spanner +* Engraver hacking:: Engraver hacking +* Part combiner:: Part combiner +* Markup text:: Markup text +* Apply hacking:: Apply hacking +* Output property:: Output property +* Embedded TeX:: Embedded TeX +* Embedded PostScript:: Embedded PostScript +@c * Index:: Checking Feature index +@end menu + + +@node Arpeggio +@section Arpeggio +@cindex argepeggio + +@cindex broken arpeggio + +You can specify an @rgrob{Arpeggio} sign on a chord by issuing an +@c FIXME +@c @code{\arpeggio}@indexcode{\arpeggio} request: +@code{\arpeggio} request: + + +@quotation +@lilypond[fragment,relative,verbatim] + \context Voice +@end lilypond +@end quotation + +Typesetting of simultanious chords with arpeggios can be controlled with +the property @code{PianoStaff.connectArpeggios} @footnote{ FIXME: +connectArpeggios. Can't find the English terms for two kinds of +arpeggio (Dutch: gebroken arpeggio vs doorlopend arpeggio).} By +default, LilyPond prints broken arpeggios; when set to true, one +extended arpeggio sign is printed. + +@quotation +@lilypond[fragment,relative,verbatim] + \context PianoStaff < + \property PianoStaff.connectArpeggios = ##t + \context Staff \context Voice + \context Staff=other \context Voice + > +@end lilypond +@end quotation + +@node Glissando +@section Glissando +@cindex glissando + +A @rgrob{Glissando} line can be requested by issuing a +@c FIXME +@c @code{\glissando}@indexcode{\glissando} request: +@code{\glissando} request: + + +@quotation +@lilypond[fragment,relative,verbatim] + c'' \glissando c' +@end lilypond +@end quotation + +Printing of the additional text @samp{gliss.} is currently not +supported. + + +@subsection Follow Thread +@cindex follow thread +@cindex staff switching +@cindex cross staff + +@c Documented here because it looks like a glissando... +A glissando-like line can be printed to connect notes whenever a thread +switches to another staff. This is enabled if the property +@code{PianoStaff.followThread}@indexcode{followThread} is set to true: + +@quotation +@lilypond[fragment,relative,verbatim] + \context PianoStaff < + \property PianoStaff.followThread = ##t + \context Staff \context Voice { + c'1 + \translator Staff=two + b2 a + } + \context Staff=two {\clef bass; \skip 1*2;} + > +@end lilypond +@end quotation + +@node Manual beam settings +@section Manual beam settings +@cindex beams +@cindex beam settings +@cindex manual beams + +In some cases it may be necessary to override LilyPond's automatic +beaming algorithm. For example, the auto beamer will not beam over +rests, so if you want that, specify the begin and end point manually +using @code{[}@indexcode{[} and @code{]}@indexcode{]}: + +@quotation +@lilypond[fragment,relative,verbatim] + \context Staff { + r4 [r8 g'' a] + } +@end lilypond +@end quotation + +Similarly, for beams over bar lines: + +@quotation +@lilypond[fragment,relative,verbatim] + \context Staff { + a''8 r a2 r8 [a a] + } +@end lilypond +@end quotation + +If you have specific wishes for the number of beams, you can fully +control the number of beams through the properties +@code{Voice.stemLeftBeamCount}@indexcode{stemLeftBeamCount}; + +@quotation +@lilypond[fragment,relative,verbatim] + \context Staff { + [f'8 r16 f g a] + [f8 r16 \property Voice.stemLeftBeamCount = #1 f g a] + } +@end lilypond +@end quotation + +and @code{Voice.stemRightBeamCount}@indexcode{stemRightBeamCount}: + +@quotation +@lilypond[fragment,relative,verbatim] + f'32 g a b b a g f + + \property Voice.autoBeamSettings + \set #'(end * * * *) = #(make-moment 1 4) + f32 g a b b a g f + + f32 g a + \property Voice.stemRightBeamCount = #1 b + \property Voice.stemLeftBeamCount = #1 b + a g f +@end lilypond +@end quotation + +Conventionally, stems extend to the middle staff line, and thus so do +beams. The extending of the stems can be controlled through +@code{Voice.Stem}'s grob-property +@code{no-stem-extend}@indexcode{no-stem-extend}: + +@quotation +@lilypond[fragment,relative,verbatim] + \grace a'8 a4 + \property Voice.Stem \set #'no-stem-extend = ##t + \grace g8 g4 [g8 g] +@end lilypond +@end quotation + +The beam symbol can be tweaked through @code{Voice.Beam}'s +grob-properties @code{height-hs} and @code{y-position-hs}. + +Set @code{height-hs} to zero, to get horizontal beams: + +@quotation +@lilypond[fragment,relative,verbatim] + \property Voice.Beam \set #'direction = #1 + \property Voice.Beam \set #'height-hs = #0 + [a''8 e' d c] +@end lilypond +@end quotation + +Both are in half spaces. Here's how you'd specify a weird looking beam +that instead of beaing horizontal, falls two staff spaces (ie, four half +spaces): + +@quotation +@lilypond[fragment,relative,verbatim] + \property Voice.Beam \set #'y-position-hs = #4 + \property Voice.Beam \set #'height-hs = #-4 + [c'8 c] +@end lilypond +@end quotation + +The direction of a perfectly centred beams can be +controlled through @code{Voice.Beam}'s grob-property +@code{default-neutral-direction}@indexcode{default-neutral-direction} + +@quotation +@lilypond[fragment,relative,verbatim] + [b''8 b] + \property Voice.Beam \set #'default-neutral-direction = #-1 + [b b] +@end lilypond +@end quotation + +There are several ways to calculate the direction of a beam. + +[Ross] states that the majority of the notes dictates the +direction (and not the mean of "center distance") + +But is that because it really looks better, or because he wants +to provide some real simple hands-on rules? + +We have our doubts, so we simply provide all sensible alternatives: + +@table @samp +@item majority +number count of up or down notes +@item mean +mean centre distance of all notes +@item median +mean centre distance weighted per note +@end table + +You can spot the differences of these settings from these simple +examples: + +@quotation +@lilypond[fragment,relative,verbatim] + [d''8 a] + \property Voice.Beam \set #'dir-function = #beam-dir-mean + [d a] + \property Voice.Beam \set #'dir-function = #beam-dir-median + [d a] +@end lilypond +@end quotation + +@quotation +@lilypond[fragment,relative,verbatim] + \time 3/8; + [d''8 a a] + \property Voice.Beam \set #'dir-function = #beam-dir-mean + [d a a] + \property Voice.Beam \set #'dir-function = #beam-dir-median + [d a a] +@end lilypond +@end quotation + +These beam direction functions are defined in @file{scm/beam.scm}. If +your favourite algorithm isn't one of these, you can hook up your own. + + + +@node Slur attachments +@section Slur attachments + +The ending of a slur should whenever possible be attached to a note +head. Only in some instances where beams are involved, LilyPond may +attach a slur to a stem end. In some cases, you may want to override +LilyPond's decision, eg to attach the slur to the stem end. This can be +done through @code{Voice.Slur}'s grob-property @code{attachment}: +@c FIXME: make @ref{} to backend doco + +@quotation +@lilypond[fragment,relative,verbatim] + \property Voice.Slur \set #'direction = #1 + \property Voice.Stem \set #'length = #5.5 + g''8(g)g4 + g4(g8)g + \property Voice.Slur \set #'attachment = #'(stem . stem) + g8(g)g4 + g4(g8)g +@end lilypond +@end quotation + +Trying Before | After example... +@c Fix rolled into 4.0a prerelease +@c is this nice? + +@multitable @columnfractions .40 .40 +@item +@noindent +@lilypond[fragment,relative,verbatim] +\property Voice.Slur + \set #'direction = #1 +g''8(g)g4 +g4(g8)g +@end lilypond +@tab +@lilypond[fragment,relative,verbatim] +\property Voice.Slur + \set #'direction = #1 +\property Voice.Stem + \set #'length = #5.5 +\property Voice.Slur + \set #'attachment = #'(stem . stem) +g''8(g)g4 +g4(g8)g +@end lilypond +@end multitable + + +Similarly, slurs can be attached to note heads even when beams are +involved (aka Ophee slurs): + +@quotation +@lilypond[fragment,relative,verbatim] + \property Voice.Slur \set #'direction = #1 + \property Voice.Slur \set #'attachment = #'(head . head) + g''16()g()g()g()d'()d()d()d +@end lilypond +@end quotation + +If a slur would strike through a stem or beam, LilyPond will move the +slur away vertically (upward or downward). In some cases, this may +cause ugly slurs that you may want to correct: + +@quotation +@lilypond[fragment,relative,verbatim] + \property Voice.Stem \set #'direction = #1 + \property Voice.Slur \set #'direction = #1 + d'32( d'4 )d8.. + \property Voice.Slur \set #'attachment = #'(stem . stem) + d,32( d'4 )d8.. +@end lilypond +@end quotation + +LilyPond will increase the curvature of a slur trying to stay free of +note heads and stems. However, if the curvature would increase too much, +the slur will be reverted to its default shape. This decision is based +on @code{Voice.Slur}'s grob-property @code{beautiful} value. In some +cases, you may find ugly slurs beautiful, and tell LilyPond so by +increasing the @code{beautiful} value: + +@quotation +@lilypond[verbatim] +\score { + \notes \context PianoStaff < + \time 6/4; + \context Staff=up { s1 * 6/4 } + \context Staff=down < + \clef bass; + \autochange Staff \context Voice + \notes \relative c { + d,8( a' d f a d f d a f d )a + } + > + > + \paper { + linewidth = -1.; + \translator { + \VoiceContext + Slur \override #'beautiful = #5.0 + Slur \override #'direction = #1 + Stem \override #'direction = #-1 + autoBeamSettings \override #'(end * * * *) + = #(make-moment 1 2) + } + \translator { + \PianoStaffContext + VerticalAlignment \override #'threshold = #'(5 . 5) + } + } +} +@end lilypond +@end quotation + + +@node Text spanner +@section Text spanner + + + +Have crescendo set a text spanner iso hairpin + + +@lilypond[fragment,relative,verbatim] + \context Voice { + \property Voice.crescendoText = "cresc." + \property Voice.crescendoSpanner = #'dashed-line + a''2\mf\< a a \!a + } +@end lilypond + +@subsection Ottava + +@lilypond[fragment,relative,verbatim] + a'''' b c a + \property Voice.TextSpanner \set #'type = #'dotted-line + \property Voice.TextSpanner \set #'edge-height = #'(0 . 1.5) + \property Voice.TextSpanner \set #'edge-text = #'("8va " . "") + \property Staff.centralCPosition = #-13 + a\spanrequest \start "text" b c a \spanrequest \stop "text" +@end lilypond + + + +@node Engraver hacking +@section Engraver hacking + +No time signature, no barlines... +@lilypond[verbatim] +\score { + \notes \relative c'' { + a b c d + d c b a + } + \paper { + linewidth = -1.; + \translator { + \StaffContext + whichBar = #"" + \remove "Time_signature_engraver"; + } + } +} +@end lilypond + +No staff, no clef, squash pitches +@lilypond[verbatim] +\score { + \notes { c4 c4 c8 c8 } + \paper { + linewidth = -1.; + \translator { + \StaffContext + \remove Staff_symbol_engraver; + \consists Pitch_squash_engraver; + \remove Clef_engraver; + } + } +} +@end lilypond + + +@node Part combiner +@section Part combiner + +@lilypond[verbatim] +\score{ + \context Staff = flauti < + \time 4/4; + \context Voice=one \partcombine Voice + \context Thread=one \notes\relative c'' { + c4 d e f | b,4 d c d | r2 e4 f | c4 d e f | + c4 r e f | c4 r e f | c4 r a r | a a r a | + a2 \property Voice.soloADue = ##f a | + } + \context Thread=two \notes\relative c'' { + g4 b d f | r2 c4 d | a c c d | a4. b8 c4 d + c r e r | r2 s2 | a,4 r a r | a r r a | + a2 \property Voice.soloADue = ##f a | + } + > + \paper{ + linewidth = 80 * \staffspace; + \translator{ + \ThreadContext + \consists Rest_engraver; + } + \translator{ + \VoiceContext + \remove Rest_engraver; + } + } +} +@end lilypond + + + + +@node Markup text +@section Markup text + +Metrome hack... + + + +@lilypond[verbatim] +#(define note '(rows (music "noteheads-2" ((kern . -0.1) "flags-stem")))) +#(define eight-note `(rows ,note ((kern . -0.1) (music ((raise . 3.5) "flags-u3"))))) +#(define dotted-eight-note `(rows ,eight-note (music "dots-dot"))) + +\score { + \notes\relative c'' { + a1^#`(rows ,dotted-eight-note " = 64") + } + \paper { + linewidth = -1.; + \translator{ + \ScoreContext + TextScript \override #'font-shape = #'upright + } + } +} +@end lilypond + + +@node Output property +@section Output property + +@lilypond[fragment,relative,verbatim] + \outputproperty #(make-type-checker 'note-head-interface) + #'extra-offset = #'(2 . 3) + c''2 c +@end lilypond + +Don't move the finger 2, only text "m.d." ... +@lilypond[verbatim] +#(define (make-text-checker text) + (lambda (grob) (equal? text (ly-get-elt-property grob 'text)))) + +\score { + \notes\relative c''' { + \property Voice.Stem \set #'direction = #1 + \outputproperty #(make-text-checker "m.d.") + #'extra-offset = #'(-3.5 . -4.5) + a^2^"m.d." + } + \paper { linewidth = -1.; } +} +@end lilypond + + +@c equalizer + + +@node Apply hacking +@section Apply hacking + +@lilypond[verbatim] +music = \notes { c'4 d'4( e'4 f'4 } + +#(define (reverse-music music) + (let* ((elements (ly-get-mus-property music 'elements)) + (reversed (reverse elements)) + (span-dir (ly-get-mus-property music 'span-direction))) + + (ly-set-mus-property music 'elements reversed) + + (if (dir? span-dir) + (ly-set-mus-property music 'span-direction (- span-dir))) + + (map reverse-music reversed) + + music)) + +\score { + \context Voice { + \music + \apply #reverse-music \music + } + \paper { linewidth = -1.; } +} +@end lilypond + + +LilyPond is more flexible than some users realise. Han-Wen could be +very rich. + +Just too funny not to include. + +@example +@quotation + I've just entered a request on cosource.com : +@quotation + http://www.cosource.com/cgi-bin/cos.pl/wish/info/387 +@end quotation + Here's a copy of my feature request : +@quotation + Your task, if you accept it is to implement a \smarttranspose + command> that would translate such oddities into more natural + notations. Double accidentals should be removed, as well as #E + (-> F), bC (-> B), bF (-> E), #B (-> C). +@end quotation +@end quotation +You mean like this. (Sorry 'bout the nuked indentation.) + +Add IMPLEMENT_TYPE_P(Music, "music?"); to music.cc, and presto, done. + +That's an easy $ 100; if I'd make $ 200/hour for every hour I worked +on Lily, I'd be very rich :) +@end example + + +@lilypond[verbatim] +#(define (unhair-pitch p) + (let* ((o (pitch-octave p)) + (a (pitch-alteration p)) + (n (pitch-notename p))) + + (cond + ((and (> a 0) (or (eq? n 6) (eq? n 2))) + (set! a (- a 1)) (set! n (+ n 1))) + ((and (< a 0) (or (eq? n 0) (eq? n 3))) + (set! a (+ a 1)) (set! n (- n 1)))) + + (cond + ((eq? a 2) (set! a 0) (set! n (+ n 1))) + ((eq? a -2) (set! a 0) (set! n (- n 1)))) + + (if (< n 0) (begin (set! o (- o 1)) (set! n (+ n 7)))) + (if (> n 7) (begin (set! o (+ o 1)) (set! n (- n 7)))) + + (make-pitch o n a))) + +#(define (smart-transpose music pitch) + (let* ((es (ly-get-mus-property music 'elements)) + (e (ly-get-mus-property music 'element)) + (p (ly-get-mus-property music 'pitch)) + (body (ly-get-mus-property music 'body)) + (alts (ly-get-mus-property music 'alternatives))) + + (if (pair? es) + (ly-set-mus-property + music 'elements + (map (lambda (x) (smart-transpose x pitch)) es))) + + (if (music? alts) + (ly-set-mus-property + music 'alternatives + (smart-transpose alts pitch))) + + (if (music? body) + (ly-set-mus-property + music 'body + (smart-transpose body pitch))) + + (if (music? e) + (ly-set-mus-property + music 'element + (smart-transpose e pitch))) + + (if (pitch? p) + (begin + (set! p (unhair-pitch (Pitch::transpose p pitch))) + (ly-set-mus-property music 'pitch p))) + + music)) + + +music = \notes \relative c' { c4 d e f g a b c } + +\score { + \notes \context Staff { + \transpose ais' \music + \apply #(lambda (x) (smart-transpose x (make-pitch 0 5 1))) + \music + } + \paper { linewidth = -1.; } +} +@end lilypond + + +@node Embedded TeX +@section Embedded TeX +@lilypond[fragment,relative,verbatim] + a''^"3 $\\times$ \\`a deux" +@end lilypond + +@node Embedded PostScript +@section Embedded PostScript + +Arbitrary lines and curves not supported... + +[TODO:] Make a direct postscript command? + +@lilypond[verbatim] +\score { + \notes \relative c'' { + a-#"\\embeddedps{3 4 moveto 5 3 rlineto stroke}" + -#"\\embeddedps{ [ 0 1 ] 0 setdash 3 5 moveto 5 -3 rlineto stroke}" + b-#"\\embeddedps{3 4 moveto 0 0 1 2 8 4 20 3.5 rcurveto stroke}" + s2 + a'1 + } + \paper { linewidth = 70 * \staffspace; } +} +@end lilypond + +@ignore +@node Index +@section Checking Feature index + +@printindex cp + + +@bye +@end ignore + + diff --git a/Documentation/user/invoking.itexi b/Documentation/user/invoking.itexi index 2f24bdaefe..9c35990006 100644 --- a/Documentation/user/invoking.itexi +++ b/Documentation/user/invoking.itexi @@ -1,4 +1,4 @@ -@node Invoking LilyPond, , , top +@node Invoking LilyPond @chapter Invoking LilyPond @cindex Invoking LilyPond diff --git a/Documentation/user/lilypond.tely b/Documentation/user/lilypond.tely index 4b47b0a6e5..c6c63bd78b 100644 --- a/Documentation/user/lilypond.tely +++ b/Documentation/user/lilypond.tely @@ -87,6 +87,7 @@ than the names being similar :-)" @ifnottex @node Top +@c FIXME: this should not be necessary... @top @end ifnottex @@ -104,13 +105,13 @@ this and other documentation. @menu -* Tutorial:: A tutorial introduction to lilypond. +* Tutorial:: A tutorial introduction to LilyPond. * Invoking LilyPond:: Operation. -* Reporting Bugs:: Where to report bugs. +* Bug reports:: Where to report bugs. * Reference Manual:: Reference Manual. -@c Move to Reference Manual? +* Features:: Features, tips and tricks. * Internals:(lilypond-internals). Auto generated detailed documentation. -* convert-ly:: Upgrading input files. +* Programs:: External programs. * Internals:: How it all works. * Development:: On developing code for LilyPond. * Index:: Unified index. @@ -118,14 +119,8 @@ this and other documentation. @contents -@macro keyindex {word} -@cindex \\@code{\word\} -@end macro - -@macro indexcode {word} -@cindex @code{\word\} -@end macro +@mbinclude macros.itexi @mbinclude tutorial.itely @@ -135,11 +130,14 @@ this and other documentation. @mbinclude refman.itely -@mbinclude convert-ly.itexi +@mbinclude features.itely + +@mbinclude programs.itexi @mbinclude development.itexi -@node Index, , , top +@c FIXME: Index has two alphabetically sorted lists @code vs plain? +@node Index @unnumbered Index @printindex cp diff --git a/Documentation/user/ly2dvi.itexi b/Documentation/user/ly2dvi.itexi new file mode 100644 index 0000000000..345d04870d --- /dev/null +++ b/Documentation/user/ly2dvi.itexi @@ -0,0 +1,253 @@ +@c -*-texinfo-*- + +@node Ly2dvi +@section Ly2dvi + +Ly2dvi is a Python script which creates input file for La@TeX{}, +based on information from the output files from LilyPond. +The script handles multiple files. If a LilyPond file name is +specified LilyPond is run to make an output (@TeX{}) file. + +One or more La@TeX{} files are created, based on information found +in the output (@TeX{}) files, and latex is finally run to create +one or more DVI files. + +The majority of this utility came from a bourne script written by Jan +Arne Fagertun name @file{ly2dvi}. + +@subsection Invoking ly2dvi + + ly2dvi [options] inputfile[.ly] [....] + + +@table @samp +@item -D,--debug + Set debug mode. There are two levels - in level one some debug + info is written, in level two the command @strong{set -x} is run, which + echoes every command in the ly2dvi script. +@item -F,--headers= + Name of additional La@TeX{} headers file. This is included in the + tex file at the end of the headers, last line before @code{\begin@{document@}} +@item -H,--Heigth= + Set paper heigth (points). Used together with width and La@TeX{} name of + papersize in case of papersize unknown to ly2dvi. +@item -K,--keeplilypond + Keep LilyPond output after the run. +@item -L,--landscape + Set landscape orientation - portrait is the default. + Use together with @code{dvips -t landscape} if you run dvips + separately. +@item -N,--nonumber + Switch off page numbering. +@item -O,--orientation= + Set orientation landscape - obsolete, use @strong{-L} instead. +@item -P,--postscript + In addition to the DVI file, also Generate a postsript file. +@item -W,--Width= + Set paper width (points). Used together with heigth and La@TeX{} name of + papersize in case of papersize unknown to ly2dvi. +@item -d,--dependencies + Tell LilyPond to make dependencies file. +@item -h,--help + Print help. +@item -k,--keeply2dvi + Keep the La@TeX{} file after the run. +@item -l,--language= + Specify La@TeX{} language. + (@strong{-l norsk} produces @code{\usepackage[norsk]@{babel@}}). +@item -o,--output= + Set output directory. +@item -p,--papersize= + Specify papersize. + (@strong{-p a4} produces @code{\usepackage[a4paper]@{article@}}) +@item -s,--separate + Normally all output files are included into one La@TeX{} file. + With this switch all files are run separately, to produce one + DVI file for each. +@end table + + +@subsection Ly2dvi Features + +Ly2dvi responds to several parameters specified in the LilyPond +file. They are overridden by corresponding command line options. + +@table @samp +@item language=""; + Specify La@TeX{} language +@item latexheaders=""; + Specify additional La@TeX{} headers file +@item orientation=""; + Set orientation. +@item paperlinewidth=""; + Specify the width (pt, mm or cm) of the printed lines. +@item papersize=""; + Specify name of papersize. +@end table + +@subsection Ly2dvi Environment + +@table @samp +@item LILYPONDPREFIX + Sets the root directory of the LilyPond installation +@item LILYINCLUDE + Additional directories for input files. +@item TMP + Temporary directory name. Default is /tmp +@end table + +@subsection Ly2dvi Files + +@file{titledefs.tex} is inspected for definitions used to extract +additional text definitions from the LilyPond file. In the current +version the following are defined: + +@table @samp +@item title + The title of the music. Centered on top of the first page. +@item subtitle + Subtitle, centered below the title. +@item poet + Name of the poet, leftflushed below the below subtitle. +@item composer + Name of the composer, rightflushed below the subtitle. +@item metre + Meter string, leftflushed below the below poet. +@item opus + Name of the opus, rightflushed below the below composer. +@item arranger + Name of the arranger, rightflushed below the opus. +@item instrument + Name of the instrument, centered below the arranger +@item piece + Name of the piece, leftflushed below the instrument +@end table + +@file{$LILYPONDPREFIX/share/.lilyrc $HOME/.lilyrc ./.lilyrc} are files +to set up default running conditions. On Windows OS initialization +files are named @file{_lilyrc}. The file syntax is as follows: + +@example +VARIABLE-NAME=VALUE +@end example + + +Where @strong{VARIABLE-NAME} is the name of the variable documented below +and @strong{VALUE} is either a string, a 1, or a 0. All files are parsed, +in the shown sequence. In the current version the following are +allowed: + +@table @samp +@item DEBUG=value +This turns off (default) or on the debug capabilities. Possible +values are 0 (off) and 1 (on). +@item DEPENDENCIES=value +This turns off (default) or on the ability to generate a Makefile +dependency list. Possible values are 0 (off) and 1 (on). +@item KEEPLILYPOND=value +This turns off (default) or on the ability to keep the log file +associated with the LilyPond job. Possible values are 0 (off) and 1 +(on). +@item KEEPLY2DVI=value +This turns off (default) or on the ability to keep the temporary files +that are generated by the ly2dvi job. Possible values are 0 (off) and +1 (on) +@item LANGUAGE=value +Specify La@TeX{} language. Possible value is a valid La@TeX{} language. +@item LATEXHF=value +Specify additional La@TeX{} headers file. Possible value is a file +specification. +@item LILYINCLUDE=value +Additional directories for input files. Possible value is a delimited +directory path list. +@item LILYPONDPREFIX=value +This defines the LilyPond root directory. Possible value is a valid +directory specification to the LilyPond distribution location. +@item NONUMBER=value +This turns off (default) or on the page numbering capability. +Possible values are 0 (page numbering enabled) and 1 (page numbering +disabled). +@item ORIENTATION=value +This sets the image orientation. Possible values are +portrait (default) and landscape. +@item OUTPUTDIR=value +This defines the directory where the resultant files will be +generated. Possible value is a valid directory specification. +Default is the current working directory. +@item PAPERSIZE=value +This defines the papersize the image will be sized to fit. Possible +values are a0, a1, a2, a3, a4 (default), a5, a6, a7, a8, a9, a10, b0, +b1, b2, b3, b4, b5, archA, archB, archC, archD, archE, flsa, flse, +halfletter, ledger, legal, letter, or note. +@item PHEIGHT=value +Specify paperheight (points - an inch is 72.27, a cm is 28.453 points). +@item POSTSCRIPT=value +This turns off (default) or on the capability of additionally +generating a postscript file. Possible values are 0 (off) and 1 (on). +@item PWIDTH=value +Specify paperwidth (points - an inch is 72.27, a cm is 28.453 points). +@item SEPARATE=value +This turns off (default) or on the capability of generating multiple +dvi and postscript files from multiple source files. The default is +to generate a concatenation of the source files. Possible values are +0 (single file) and 1 (separate files). +@item TMP=value +This defines the emporary directory. Actually this is not used at the +present. Possible value is a valid directory specification that is +writable to the user. +@end table + +@subsection Ly2dvi Initialization Sequence +The initialization process reads inputs for several sources. Below is +a list of priorities for lowest to hightest proirity. + +@itemize @bullet +@item Program's defaults +@item Values found in LilyPond output file +@item Environment variables +@item $LILYPONDPREFIX/share/lilypond/.lilyrc +@item $HOME/.lilyrc +@item ./.lilyrc +@item command line options +@end itemize + +Note that this differs slightly from the original bourne shell +version. + +@subsection Ly2dvi Bugs + +@c should? +FIXME. +See @ref{Bug reports}. +If you have found a bug, you should send a bugreport. + +@itemize @bullet +@item Send a copy of the input which causes the error. +@item Send a description of the platform you use. +@item Send a description of the LilyPond and ly2dvi version you use. +@item Send a description of the bug itself. +@item Send it to @email{bug-gnu-music@@gnu.org} (you don't have to subscribe + to this mailinglist). +@end itemize + +@subsection Ly2dvi Remarks + +Many papersizes are now supported. Information on other sizes +(La@TeX{} names, horizontal and vertical sizes) should be mailed to +the author or to the mailing list. + +Supported papersizes are: + +a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, archA, archB, archC, archD, +archE, b0, b1, b2, b3, b4, b5, flsa, flse, halfletter, ledger, legal, +letter, note + +@subsection Ly2dvi Authors +Python Version author: +@email{daboys@@austin.rr.com, Jeffrey B. Reed}, +@uref{http://home.austin.rr.com/jbr/jeff/lilypond/} + +Original bourne shell version author: +@email{Jan.A.Fagertun@@energy.sintef.no, Jan Arne Fagertun}, +@uref{http://www.termo.unit.no/mtf/people/janaf/} + diff --git a/Documentation/user/macros.itexi b/Documentation/user/macros.itexi new file mode 100644 index 0000000000..b7dff0aa8d --- /dev/null +++ b/Documentation/user/macros.itexi @@ -0,0 +1,44 @@ + +@ifnottex +@macro keyindex {word} +@cindex @code{ \word\ } +@end macro + +@macro indexcode {word} +@cindex @code{ \word\ } +@end macro +@end ifnottex + +@iftex +@macro keyindex {word} +@cindex @code{ \word\ } + +@end macro + +@macro indexcode {word} +@cindex @code{ \word\ } + +@end macro +@end iftex + +@ifinfo +@macro rgrob {word} +@ref{ (lilypond-internals)Grob \word\, \word\ }, + +@end macro +@macro reng {word} +@ref{ (lilypond-internals)Engraver \word\, \word\ }, + +@end macro +@end ifinfo + +@ifnotinfo +@macro rgrob {word} +@ref{ (lilypond-internals)Grob \word\, \word\ } + +@end macro +@macro reng {word} +@ref{ (lilypond-internals)Engraver \word\, \word\ } + +@end macro +@end ifnotinfo diff --git a/Documentation/user/midi2ly.itexi b/Documentation/user/midi2ly.itexi new file mode 100644 index 0000000000..3ba298539a --- /dev/null +++ b/Documentation/user/midi2ly.itexi @@ -0,0 +1,42 @@ +@c -*-texinfo-*- + +@node Midi2ly +@section Midi2ly + +Midi2ly translates a MIDI input file to a LilyPond source file. +Midi2ly is part of the GNU LilyPond music typesetting package. + +@subsection Invoking midi2ly + + midi2ly [options] midi-file + + +@table @samp +@item -b, --no-quantify, + Write exact durations, e.g.: `a4*385/384'. +@item -D, --debug, + Print lots of debugging stuff. +@item -h, --help, + Show a summary of usage. +@item -I, --include=@file{DIR}, + Add DIR to search path. +@item -k, --key=ACC[:MINOR], + Set default key. ACC > 0 sets number of sharps; ACC < 0 sets number + of flats. A minor key is indicated by ":1". +@item -n, --no-silly, + Assume no plets or double dots, assume smallest (reciprocal) duration 16. +@item -o, --output=@file{FILE}, + Set @file{FILE} as default output. +@item -p, --no-plets, + Assume no plets. +@item -q, --quiet, + Be quiet. +@item -s, --smallest=N, + Assume no shorter (reciprocal) durations than N. +@item -v, --verbose, + Be verbose. +@item -w, --warranty, + Show the warranty with which midi2ly comes. (It comes with @strong{NO WARRANTY}!) +@item -x, --no-double-dots, + Assume no double dotted notes. +@end table diff --git a/Documentation/user/programs.itexi b/Documentation/user/programs.itexi new file mode 100644 index 0000000000..6bd147ab36 --- /dev/null +++ b/Documentation/user/programs.itexi @@ -0,0 +1,16 @@ +@c -*-texinfo-*- + +@node Programs +@chapter Programs + +@menu +* Ly2dvi:: Generating nice output with titles. +* Convert-ly:: Upgrading input files. +* Midi2ly:: Converting from MIDI input. +@end menu + +@mbinclude ly2dvi.itexi +@mbinclude convert-ly.itexi +@mbinclude midi2ly.itexi + + diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index 33a734826d..518da2666e 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -5,10 +5,15 @@ @c - Restructure! Separate internal commands from user level commands. /MB @c - Add some words about Guile. /MB @c - Fix indexing (keyindex) so it doesn't add line breaks /MB +@c +@c FIXME: Index has two alphabetically sorted lists @code vs plain? +@c +@c If we'd include the auto-generated documentation, we 'd get a lot of +@c very useful index entries. +@c -@c ugh: because of @include, we need to fill in these nodes -@node Reference Manual, , , top +@node Reference Manual @chapter Reference Manual @menu @@ -41,7 +46,6 @@ * Sound output:: Sound output * midilist:: midilist * Pre-defined Identifiers:: Pre-defined Identifiers -@c May be fragile. Better make single link to generated doco? * Interpretation contexts:(lilypond-internals)LilyPond interpretation contexts. * Engravers:(lilypond-internals)LilyPond engravers. * Backend:(lilypond-internals)LilyPond backend. @@ -52,11 +56,13 @@ @node Overview @section Overview + This document@footnote{This document has been revised for LilyPond 1.2.} describes the the GNU LilyPond input format This format represents a piece of music in an elegant way, but contains enough information for both automatic typesetting and automatic performances. + LilyPond input can be classified into three types: @itemize @bullet @item musical expressions: a musical expression is some combination of @@ -109,6 +115,7 @@ It is customary to put the @code{\header} at the top of the file. @node Pitch names @section Pitch names + @cindex pitch names @cindex note names @cindex chord modifier names @@ -116,14 +123,14 @@ It is customary to put the @code{\header} at the top of the file. Note names and chord modifiers can be customised for nationalities. languages and conventions. The syntax is as follows. @example - \pitchnames @keyindex{pitchnames} @var{scheme-alist} + \pitchnames@keyindex{pitchnames} @var{scheme-alist} \chordmodifiers@keyindex{chordmodifiers} @var{scheme-alist} @end example See @file{ly/nederlands.ly} and @file{ly/chord-modifiers.ly} for specific examples how to do this. tables can be tailored specified using. Some national note names have been provided, see -@ref{Other languages}. +section @ref{Other languages}. A @code{\paper} block at top level sets the default paper block. A @code{\midi} block at top level works similarly. @@ -132,14 +139,12 @@ forbidden after top level assignments. @cindex assignments - @node Lexical conventions @section Lexical conventions @cindex lexical conventions - @unnumberedsubsec Comments @cindex comment @@ -520,9 +525,7 @@ corresponding to C and 7 corresponding to B. The shift is zero for a natural, negative to add flats, or positive to add sharps. In Note and Chord mode, pitches may be designated by names. See -section - @c @ref{Other languages} FIXME - for pitch names in different languages. +section @ref{Other languages} for pitch names in different languages. The syntax for duration specification is @@ -569,7 +572,7 @@ and `@code{ees}' are contracted to `@code{as}' and `@code{es}' in Dutch, but both forms will be accepted. LilyPond has predefined sets of notenames for various languages. See -@ref{Other languages}. +section @ref{Other languages}. The optional octave specification takes the form of a series of single quote (`@code{'}@indexcode{'}') characters or a series of comma @@ -1499,6 +1502,7 @@ their written length: A grace note expression has duration 0; the next real note is assumed to be the main note. + You cannot have the grace note after the main note, in terms of duration, and main notes, but you can typeset the grace notes to the right of the main note using the property @@ -1901,17 +1905,20 @@ display the chord name after a line break: @quotation @lilypond[verbatim] scheme = \chords { -% \property ChordNames.chordChanges = ##t c1:m \break c:m c:m c:m d } \score { \notes < - \context ChordNamesVoice \scheme + \context ChordNames \scheme \context Staff \transpose c'' \scheme > \paper{ linewidth = 40 * \staffspace; + \translator { + \ChordNamesContext + chordChanges = ##t + } } } @end lilypond @@ -2318,6 +2325,7 @@ built of. These modules are called @emph{translators}. Translators for notation are called @emph{engravers}, and translators for sound are called @emph{performers}. + @mbinclude properties.itely @node Page layout @@ -2374,9 +2382,8 @@ where each of the items is one of See @file{font.scm} for details of @var{alist}. @end itemize -@subsection Paper variables - +@subsection Paper variables The paper block has some variables you may want to use or change: @@ -2753,7 +2760,6 @@ piano. @c @end quotation - @node Pre-defined Identifiers @section Pre-defined Identifiers @@ -2794,3 +2800,4 @@ set different shift values. @end table + diff --git a/Documentation/user/tutorial.itely b/Documentation/user/tutorial.itely index cbdf7e76c0..d6b1234759 100644 --- a/Documentation/user/tutorial.itely +++ b/Documentation/user/tutorial.itely @@ -1,7 +1,6 @@ @c -*-texinfo-*- -@c ugh: because of @include, we need to fill in these nodes? -@node Tutorial, , , Top +@node Tutorial @chapter Tutorial @menu diff --git a/input/bugs/chord-changes.ly b/input/bugs/chord-changes.ly index 55f2d1d1f0..49e8c4cc14 100644 --- a/input/bugs/chord-changes.ly +++ b/input/bugs/chord-changes.ly @@ -6,16 +6,24 @@ chord name after a line break. } scheme = \chords { - \property ChordNames.chordChanges = ##t + % ugh ugh: this breaks the output of notes in the regular staff + \property ChordNamesVoice.chordChanges = ##t + % and this even breaks the chord names + \property ChordNames.chordChanges = ##t + c1:m \break c:m c:m c:m d c1:m \break c:m c:m c:m d } \score { \notes < - \context ChordNamesVoice \scheme + \context ChordNames \scheme \context Staff \transpose c'' \scheme > \paper{ linewidth = 40 * \staffspace; + \translator { + \ChordNamesVoiceContext + chordChanges = ##t + } } } diff --git a/input/test/chord-changes.ly b/input/test/chord-changes.ly index 2ac2cc20e9..f9a7697319 100644 --- a/input/test/chord-changes.ly +++ b/input/test/chord-changes.ly @@ -6,16 +6,21 @@ chord name after a line break. } scheme = \chords { -% \property ChordNames.chordChanges = ##t + % ugh ugh: this breaks the output of notes in the regular staff +% \property ChordNamesVoice.chordChanges = ##t c1:m \break c:m c:m c:m d } \score { \notes < - \context ChordNamesVoice \scheme + \context ChordNames \scheme \context Staff \transpose c'' \scheme > \paper{ linewidth = 40 * \staffspace; + \translator { + \ChordNamesContext + chordChanges = ##t + } } } diff --git a/lily/chord-name-engraver.cc b/lily/chord-name-engraver.cc index a3541404a3..ebe406f1f8 100644 --- a/lily/chord-name-engraver.cc +++ b/lily/chord-name-engraver.cc @@ -35,6 +35,7 @@ private: void add_note (Note_req *); Item* chord_name_p_; + Protected_scm chord_; Protected_scm last_chord_; }; @@ -93,18 +94,8 @@ Chord_name_engraver::create_grobs () chord_name_p_->set_grob_property ("chord", chord_); announce_grob (chord_name_p_, 0); SCM s = get_property ("chordChanges"); -#ifdef DEBUG - /* - gdb crashes upon printscm (chord_) etc... - ugh: why does gh_equal_p () not seem to work?? - */ - printf ("chord: %s\n", ly_scm2string (ly_write2scm (chord_)).ch_C ()); - printf ("last_chord: %s\n", ly_scm2string (ly_write2scm (last_chord_)).ch_C ()); - int i = gh_equal_p (chord_, last_chord_); - printf ("i: %d\n", i); -#endif if (to_boolean (s) && last_chord_ != SCM_EOL - && gh_equal_p (chord_, last_chord_)) + && gh_equal_p (chord_, last_chord_)) chord_name_p_->set_grob_property ("begin-of-line-visible", SCM_BOOL_T); } } diff --git a/lily/chord.cc b/lily/chord.cc index a4e428e5d4..2b7fa42d67 100644 --- a/lily/chord.cc +++ b/lily/chord.cc @@ -152,6 +152,8 @@ Chord::member_notename (SCM p, SCM pitches) } } } + else + member = gh_car (member); return member; } @@ -175,6 +177,8 @@ Chord::member_pitch (SCM p, SCM pitches) } } } + else + member = gh_car (member); return member; } diff --git a/lily/include/ly-smobs.icc b/lily/include/ly-smobs.icc index 902f8c507f..c38d545829 100644 --- a/lily/include/ly-smobs.icc +++ b/lily/include/ly-smobs.icc @@ -51,7 +51,8 @@ void \ CL::init_smobs () \ { \ smob_tag_ = scm_make_smob_type_mfpe ( \ - #CL, 0, CL::mark_smob, CL::free_smob, CL::print_smob, 0); \ + #CL, 0, CL::mark_smob, CL::free_smob, CL::print_smob, \ + CL::equal_p); \ } \ SCM CL::smobbed_self () const \ { \ diff --git a/scm/backend-documentation-lib.scm b/scm/backend-documentation-lib.scm index d33d70bca3..ac1e63a75c 100644 --- a/scm/backend-documentation-lib.scm +++ b/scm/backend-documentation-lib.scm @@ -12,61 +12,49 @@ (define (backend-property->texi sym) - (let* ( - (name (symbol->string sym)) + (let* ((name (symbol->string sym)) (type (object-property sym 'backend-type?)) (typename (type-name type)) - (desc (object-property sym 'backend-doc)) - ) + (desc (object-property sym 'backend-doc))) (cons (string-append "@code{" name "} " "(" typename ")" ":" ) - desc) - )) + desc))) (define (document-grob-property sym grob-description only-doc-if-set) - (let* - ( - (handle (assoc sym grob-description)) - (defval (if (eq? handle #f) - "" - (scm->texi (cdr handle)) - )) - (propdoc (backend-property->texi sym)) - ) - - (if (and only-doc-if-set (eq? handle #f) ) + (let* ((handle (assoc sym grob-description)) + (defval (if (eq? handle #f) + "" + (scm->texi (cdr handle)))) + (propdoc (backend-property->texi sym))) + + (if (and only-doc-if-set (eq? handle #f)) '("" . "") (cons (car propdoc) (string-append (cdr propdoc) "\nDefault value: " - defval))) - )) + defval))))) (define (document-interface where interface grob-description) - " - -" (let* ((level (if (eq? where 'grob) 3 2)) (name (car interface)) (desc (cadr interface)) (props (caddr interface)) - (docfunc (lambda (x) + (docfunc (lambda (x) (document-grob-property x grob-description (eq? where 'grob)))) - (docs (map docfunc props)) - ) + (docs (map docfunc props))) (string-append - (texi-section level (string-append (interface-name (symbol->string name))) (eq? where 'grob)) ;gur. + (texi-section level + (string-append (interface-name (symbol->string name))) + (eq? where 'grob)) ;gur. desc - - (description-list->texi docs) - ))) + (description-list->texi docs)))) ;; First level Interface description (define (document-separate-interface interface) - (let ((name (car interface))) + (let ((name (symbol->string (car interface)))) (processing name) (string-append (node (interface-name name)) @@ -84,9 +72,10 @@ (name (cdr (assoc 'name meta))) (ifaces (cdr (assoc 'interface-descriptions meta))) - (ifacedoc (map (lambda (x) (document-interface 'grob x description)) + (ifacedoc (map (lambda (x) + (document-interface 'grob x description)) (reverse ifaces)))) - + (string-append (node (grob-name name)) (texi-section 2 (grob-name name) #f) @@ -104,16 +93,19 @@ engraver-description-alist)))) (string-append name " grobs are created by: " - (human-listify (map reffy (map engraver-name engravers))))) + (human-listify (map reffy + (map engraver-name + (map symbol->string engravers)))))) (apply string-append ifacedoc)))) (define (document-all-grobs name) (let* ((doc (apply string-append - (map (lambda (x) (document-grob (car x) (cdr x))) + (map (lambda (x) + (document-grob (symbol->string (car x)) (cdr x))) all-grob-descriptions))) - (names (map car all-grob-descriptions))) + (names (map symbol->string (map car all-grob-descriptions)))) (string-append (texi-node-menu name (map (lambda (x) (cons (grob-name x) "")) @@ -145,7 +137,7 @@ (define (ugh-standalone-list-interface-names) (let* ((text interface-file-str) (t1 (regexp-substitute/global #f "\n" text 'pre 'post)) - (t (regexp-substitute/global #f "[^\t ]*[ \t]([a-z-]+interface)" + (t (regexp-substitute/global #f "[^\t ]define[ \t]*([a-z-]+interface)" t1 1 " " 'post)) (ugh (regexp-substitute/global #f " .*" t 'pre 'post)) (l (separate-fields-discarding-char #\ ugh list))) @@ -164,7 +156,8 @@ ;; guile> (load "backend-documentation-lib.scm") ;; For some reason, this can't be generated when lilypond is loaded; ;; the regexp stuff behaves weird. -(define (list-interface-names) '("general-grob-interface" "general-grob-interface" "beam-interface" "clef-interface" "axis-group-interface" "note-column-interface" "stem-interface" "slur-interface" "side-position-interface" "accidentals-interface" "line-of-score-interface" "note-head-interface" "note-name-interface" "rhythmic-head-interface" "rest-interface" "tuplet-bracket-interface" "align-interface" "aligned-interface" "align-interface" "break-aligned-interface" "chord-name-interface" "time-signature-interface" "bar-line-interface" "hairpin-interface" "arpeggio-interface" "note-collision-interface" "custos-interface" "dot-interface" "font-interface" "text-interface" "dot-column-interface" "dynamic-interface" "finger-interface" "separation-spanner-interface" "text-script-interface" "grace-alignment-interface" "hara-kiri-group-interface" "line-spanner-interface" "lyric-hyphen-interface" "key-signature-interface" "lyric-extender-interface" "lyric-syllable-interface" "mark-interface" "multi-measure-rest-interface" "font-interface" "paper-column-interface" "spaceable-element-interface" "rest-collision-interface" "script-interface" "script-column-interface" "spacing-spanner-interface" "staff-symbol-interface" "stem-tremolo-interface" "separation-item-interface" "sustain-pedal-interface" "system-start-delimiter-interface" "text-spanner-interface" "tie-interface" "tie-column-interface" "volta-bracket-interface")) +(define (list-interface-names) '("general-grob-interface" "beam-interface" "clef-interface" "axis-group-interface" "note-column-interface" "stem-interface" "slur-interface" "side-position-interface" "accidentals-interface" "line-of-score-interface" "note-head-interface" "note-name-interface" "rhythmic-head-interface" "rest-interface" "tuplet-bracket-interface" "align-interface" "aligned-interface" "break-aligned-interface" "chord-name-interface" "time-signature-interface" "bar-line-interface" "hairpin-interface" "arpeggio-interface" "note-collision-interface" "custos-interface" "dot-interface" "font-interface" "text-interface" "dot-column-interface" "dynamic-interface" "finger-interface" "separation-spanner-interface" "text-script-interface" "grace-alignment-interface" "hara-kiri-group-interface" "line-spanner-interface" "lyric-hyphen-interface" "key-signature-interface" "lyric-extender-interface" "lyric-syllable-interface" "mark-interface" "multi-measure-rest-interface" "paper-column-interface" "spaceable-element-interface" "rest-collision-interface" "script-interface" "script-column-interface" "spacing-spanner-interface" "staff-symbol-interface" "stem-tremolo-interface" "separation-item-interface" "sustain-pedal-interface" "system-start-delimiter-interface" "text-spanner-interface" "tie-interface" "tie-column-interface" "volta-bracket-interface" "span-bar-interface")) + (eval-string (ly-gulp-file "interface-description.scm")) @@ -176,7 +169,8 @@ (define (document-all-interfaces name) (string-append - (texi-node-menu name (map (lambda (x) (cons (interface-name x) "")) + (texi-node-menu name (map (lambda (x) + (cons (interface-name (symbol->string x)) "")) (map cadr interface-description-alist))) (apply string-append (map document-separate-interface diff --git a/scm/chord-name.scm b/scm/chord-name.scm index eac4cd2659..900532aacc 100644 --- a/scm/chord-name.scm +++ b/scm/chord-name.scm @@ -487,7 +487,8 @@ ;; ;; CHORD: (pitches (base . inversion)) (define (default-chord-name-function style chord) - (let* ((pitches (map new-to-old-pitch (car chord))) + (let* ((style-string (symbol->string style)) + (pitches (map new-to-old-pitch (car chord))) (modifiers (cdr chord)) (base-and-inversion (if (pair? modifiers) (cons (new-to-old-pitch (car modifiers)) @@ -495,9 +496,9 @@ '(() . ()))) (diff (pitch::diff '(0 0 0) (car pitches))) (name-func - (ly-eval (string->symbol (string-append "chord::name-" style)))) + (ly-eval (string->symbol (string-append "chord::name-" style-string)))) (names-alist - (ly-eval (string->symbol (string-append "chord::names-alist-" style))))) + (ly-eval (string->symbol (string-append "chord::names-alist-" style-string))))) (let loop ((note-names (reverse pitches)) (chord '()) (user-name #f)) diff --git a/scm/documentation-lib.scm b/scm/documentation-lib.scm index 30dcec73c7..dd863c9b17 100644 --- a/scm/documentation-lib.scm +++ b/scm/documentation-lib.scm @@ -1,4 +1,4 @@ -;; +;;; ;;; documentation-lib.scm -- Assorted Functions for generated documentation ;;; ;;; source file of the GNU LilyPond music typesetter @@ -125,7 +125,7 @@ Add a ref if REF is set ;; prepend GNU for dir, must be unique "\n* GNU " name " (" file-name "). " name "." "\n@end direntry" - (node "Top") ",(lilypond)Development,," top + (node "Top") ",(lilypond)Features,," top "\n@top" (texi-section 1 name #f) (texi-menu items-alist) diff --git a/scm/engraver-documentation-lib.scm b/scm/engraver-documentation-lib.scm index e886d6fb64..bdab2c870e 100644 --- a/scm/engraver-documentation-lib.scm +++ b/scm/engraver-documentation-lib.scm @@ -20,13 +20,13 @@ ;; First level Engraver description and ;; second level Context description (define (document-engraver where engraver-descr) - (let* ( (level (if (eq? where 'context) 3 2)) (props (car (cdddr engraver-descr))) (name (car engraver-descr)) + (name-sym (string->symbol name)) (desc (cadr engraver-descr)) - (objs (caddr engraver-descr)) + (objs (map symbol->string (caddr engraver-descr))) ) (string-append @@ -60,7 +60,7 @@ (cdr (assoc 'consists x)) (cdr (assoc 'end-consists x))))) - (if (member name consists) + (if (member name-sym consists) (list context) '()))) context-description-alist)))) @@ -131,12 +131,14 @@ (texi-section 2 (context-name name) #f) doc))) +(define (symbolstring l) (symbol->string r))) (define (document-paper name) (let* ((paper-alist (sort (My_lily_parser::paper_description) - (lambda (x y) (stringstring (map car paper-alist)) stringstring (map car engraver-description-alist))) (doc (apply string-append (map (lambda (x) (document-separate-engraver name x)) descs)))) - (string-append (texi-node-menu name (map (lambda (x) (cons (engraver-name x) "")) names)) doc))) (define (document-all-engraver-properties name) - (let* - ( - (ps (sort (map symbol->string all-translation-properties) stringsymbol ps)) - (propdescs (map document-translator-property sortedsyms)) - (texi (description-list->texi propdescs)) - ) + (let* ((ps (sort (map symbol->string all-translation-properties) stringsymbol ps)) + (propdescs (map document-translator-property sortedsyms)) + (texi (description-list->texi propdescs))) (string-append (node name) (texi-section 1 name #f) - texi - ))) + texi))) diff --git a/scm/generate-documentation.scm b/scm/generate-documentation.scm index 0234671732..9e605e9424 100644 --- a/scm/generate-documentation.scm +++ b/scm/generate-documentation.scm @@ -32,7 +32,7 @@ (let* ((doc (string-append (document-paper "LilyPond interpretation contexts") (document-all-engravers "LilyPond engravers") - (document-all-engraver-properties "LilyPond context properties") + (document-all-engraver-properties "LilyPond context properties") (document-all-grobs "LilyPond backend") (document-all-interfaces "LilyPond interfaces") (document-all-backend-properties "LilyPond backend properties") diff --git a/scm/interface-description.scm b/scm/interface-description.scm index 4ae22d7a7d..caf6363c92 100644 --- a/scm/interface-description.scm +++ b/scm/interface-description.scm @@ -262,7 +262,6 @@ object." ) )) - (define align-interface (lily-interface 'align-interface @@ -772,6 +771,6 @@ direction = Forced direction for all ties" '( ))) - +;(define urg-miss-last-interface ) diff --git a/scm/standalone.scm b/scm/standalone.scm index dc3ee80fce..c4d75ac23e 100644 --- a/scm/standalone.scm +++ b/scm/standalone.scm @@ -6,7 +6,7 @@ ;;;; Han-Wen Nienhuys (define standalone (not (defined? 'ly-gulp-file))) -(write standalone (current-error-port)) +;;(write standalone (current-error-port)) (define (gulp-file name) (let* ((file (open-input-file name)) @@ -34,4 +34,4 @@ (define ly-gulp-file scm-gulp-file) (define ly-number->string scm-number->string) -(eval-string (ly-gulp-file "lily.scm")) \ No newline at end of file +(eval-string (ly-gulp-file "lily.scm")) -- 2.39.5