From: fred Date: Wed, 27 Mar 2002 00:35:20 +0000 (+0000) Subject: lilypond-1.3.122 X-Git-Tag: release/1.5.59~1004 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=7fd435ac507224115d36c298096ac1dddeaa43c1;p=lilypond.git lilypond-1.3.122 --- diff --git a/Documentation/user/features.tely b/Documentation/user/features.tely index 7f7c939553..694729a70a 100644 --- a/Documentation/user/features.tely +++ b/Documentation/user/features.tely @@ -7,8 +7,32 @@ TODO * add more un/badly documented features * write some text * add to/merge with refman + + + + 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 + +@macro keyindex {word} +@cindex \word\ + +@end macro + +@macro indexcode {word} +@cindex \word\ + +@end macro + + + @node Top @chapter Features @@ -25,41 +49,78 @@ TODO * Output property:: Output property * Embedded TeX:: Embedded TeX * Embedded PostScript:: Embedded PostScript +* Index:: Checking Feature index @end menu -@ignore -Testin'' a b c... -@lilypond[fragment,relative,verbatim,center] - a'' b c -@end lilypond -@end ignore - @node Arpeggio @section Arpeggio +@cindex argepeggio + +@cindex broken arpeggio +@c @cindex ``doorlopend'' argpeggio + +You can specify an arpeggio sign on a chord by issuing an +@c duh +@c @code{\arpeggio}@indexcode{\arpeggio} request: +@code{\arpeggio} request: +@cindex @code{\arpeggio} -@lilypond[fragment,relative,verbatim,center] +@quotation +@lilypond[fragment,relative,verbatim] \context Voice @end lilypond +@end quotation -@lilypond[fragment,relative,verbatim,center] +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 glissando line can be requested by issuing a +@c duh +@c @code{\glissando}@indexcode{\glissando} request: +@code{\glissando} request: +@cindex @code{\glissando} -@lilypond[fragment,relative,verbatim,center] +@quotation +@lilypond[fragment,relative,verbatim] c'' \glissando c' @end lilypond +@end quotation + +Printing of the additional text @code{"gliss."} is currently not +supported. + @subsection Follow Thread -@lilypond[fragment,relative,verbatim,center] +@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 { @@ -70,30 +131,54 @@ Testin'' a b c... \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{]}: -Beams over rests... - -@lilypond[fragment,relative,verbatim,center] +@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 -Control number of beams... +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}; -@lilypond[fragment,relative,verbatim,center] +@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 -@lilypond[fragment,relative,verbatim,center] +and @code{Voice.stemRightBeamCount}@indexcode{stemRightBeamCount}: + +@quotation +@lilypond[fragment,relative,verbatim] f'32 g a b b a g f \property Voice.autoBeamSettings @@ -105,42 +190,57 @@ Control number of beams... \property Voice.stemLeftBeamCount = #1 b a g f @end lilypond +@end quotation -Don't extend to middle line esp. for grace +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}: -@lilypond[fragment,relative,verbatim,center] +@quotation +@lilypond[fragment,relative,verbatim] \grace a'8 a4 \property Voice.Stem \set #'no-stem-extend = ##t - \grace g8 g4 + \grace g8 g4 [g8 g] @end lilypond - -Beam slope (height) +@end quotation + +The beam symbol can be tweaked through @code{Voice.Beam}'s +grob-properties @code{height-hs} and @code{y-position-hs}. -Horizontal beam +Set @code{height-hs} to zero, to get horizontal beams: -@lilypond[fragment,relative,verbatim,center] +@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 -beam start-y beam-height +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): -Weird beam -@lilypond[fragment,relative,verbatim,center] +@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} -Like stem... - -@lilypond[fragment,relative,verbatim,center] +@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. @@ -161,17 +261,21 @@ mean centre distance of all notes mean centre distance weighted per note @end table -You can spot the difference of these settings quite easily from these simple examples: +You can spot the differences of these settings from these simple +examples: -@lilypond[fragment,relative,verbatim,center] +@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 - -@lilypond[fragment,relative,verbatim,center] +@end quotation + +@quotation +@lilypond[fragment,relative,verbatim] \time 3/8; [d''8 a a] \property Voice.Beam \set #'dir-function = #beam-dir-mean @@ -179,13 +283,25 @@ You can spot the difference of these settings quite easily from these simple exa \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 -Override attachments... -@lilypond[fragment,relative,verbatim,center] +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 @@ -194,26 +310,22 @@ Override attachments... g8(g)g4 g4(g8)g @end lilypond +*@end quotation - -Test Before, after - -@c Ugh, ugh @multitable is broken in texinfo-4.0 -@c Fixed in 4.0.jcn3 -@c We'll have to postpone this before/after representation until -@c jcn3 is rolled into texinfo... +Trying Before | After example... +@c Fix rolled into 4.0a prerelease @multitable @columnfractions .40 .40 @item @noindent -@lilypond[fragment,relative,verbatim,center] +@lilypond[fragment,relative,verbatim] \property Voice.Slur \set #'direction = #1 g''8(g)g4 g4(g8)g @end lilypond @tab -@lilypond[fragment,relative,verbatim,center] +@lilypond[fragment,relative,verbatim] \property Voice.Slur \set #'direction = #1 \property Voice.Stem @@ -225,26 +337,41 @@ g4(g8)g @end lilypond @end multitable - -Ophee slurs... -@lilypond[fragment,relative,verbatim,center] + +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: -Steep slur correct... -@lilypond[fragment,relative,verbatim,center] +@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: -Ugly slurs... -@lilypond[verbatim,center] +@quotation +@lilypond[verbatim] \score { \notes \context PianoStaff < \time 6/4; @@ -274,13 +401,14 @@ Ugly slurs... } } @end lilypond +@end quotation @node Text spanner @section Text spanner Have crescendo set a text spanner iso hairpin -@lilypond[fragment,relative,verbatim,center] +@lilypond[fragment,relative,verbatim] \context Voice { \property Voice.crescendoText = "cresc." \property Voice.crescendoSpanner = #'dashed-line @@ -290,7 +418,7 @@ Have crescendo set a text spanner iso hairpin @subsection Ottava -@lilypond[fragment,relative,verbatim,center] +@lilypond[fragment,relative,verbatim] a'''' b c a \property Voice.TextSpanner \set #'type = #'dotted-line \property Voice.TextSpanner \set #'edge-height = #'(0 . 1.5) @@ -305,7 +433,7 @@ Have crescendo set a text spanner iso hairpin @section Engraver hacking No time signature, no barlines... -@lilypond[verbatim,center] +@lilypond[verbatim] \score { \notes \relative c'' { a b c d @@ -323,7 +451,7 @@ No time signature, no barlines... @end lilypond No staff, no clef, squash pitches -@lilypond[verbatim,center] +@lilypond[verbatim] \score { \notes { c4 c4 c8 c8 } \paper { @@ -342,7 +470,7 @@ No staff, no clef, squash pitches @node Part combiner @section Part combiner -@lilypond[verbatim,center] +@lilypond[verbatim] \score{ \context Staff = flauti < \time 4/4; @@ -380,7 +508,9 @@ No staff, no clef, squash pitches Metrome hack... -@lilypond[verbatim,center] + + +@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"))) @@ -403,14 +533,14 @@ Metrome hack... @node Output property @section Output property -@lilypond[fragment,relative,verbatim,center] +@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,center] +@lilypond[verbatim] #(define (make-text-checker text) (lambda (grob) (equal? text (ly-get-elt-property grob 'text)))) @@ -432,7 +562,7 @@ Don't move the finger 2, only text "m.d." ... @node Apply hacking @section Apply hacking -@lilypond[verbatim,center] +@lilypond[verbatim] music = \notes { c'4 d'4( e'4 f'4 } #(define (reverse-music music) @@ -487,7 +617,7 @@ on Lily, I'd be very rich :) @end example -@lilypond[verbatim,center] +@lilypond[verbatim] #(define (unhair-pitch p) (let* ((o (pitch-octave p)) (a (pitch-alteration p)) @@ -558,7 +688,7 @@ music = \notes \relative c' { c4 d e f g a b c } @node Embedded TeX @section Embedded TeX -@lilypond[fragment,relative,verbatim,center] +@lilypond[fragment,relative,verbatim] a''^"3 $\\times$ \\`a deux" @end lilypond @@ -569,7 +699,7 @@ Arbitrary lines and curves not supported... [TODO:] Make a direct postscript command? -@lilypond[verbatim,center] +@lilypond[verbatim] \score { \notes \relative c'' { a-#"\\embeddedps{3 4 moveto 5 3 rlineto stroke}" @@ -582,6 +712,13 @@ Arbitrary lines and curves not supported... } @end lilypond + +@node Index +@section Checking Feature index + +@printindex cp + + @bye diff --git a/Documentation/user/lilypond-book.tely b/Documentation/user/lilypond-book.tely index 125303f3ef..fdcb19b52e 100644 --- a/Documentation/user/lilypond-book.tely +++ b/Documentation/user/lilypond-book.tely @@ -72,7 +72,7 @@ translation approved by the Free Software Foundation. @end tex @contents -@node Top, , , (dir) +@node Top @top diff --git a/Documentation/user/moreinfo.itexi b/Documentation/user/moreinfo.itexi index ff5b7353d6..4c9459fb5a 100644 --- a/Documentation/user/moreinfo.itexi +++ b/Documentation/user/moreinfo.itexi @@ -1,3 +1,3 @@ -@node More information, , , Top +@node More information @section Resources diff --git a/Documentation/user/properties.itely b/Documentation/user/properties.itely index 1594b6eade..102577880d 100644 --- a/Documentation/user/properties.itely +++ b/Documentation/user/properties.itely @@ -1,4 +1,5 @@ -@node Properties, , , Reference Manual +@node Properties +@section Properties Properties are Scheme values. Most of them are in the generated documentation, but some MIDI properties are not. Here is their documentation diff --git a/input/test/explicit.ly b/input/test/explicit.ly new file mode 100644 index 0000000000..83ffd57083 --- /dev/null +++ b/input/test/explicit.ly @@ -0,0 +1,10 @@ +\header{ +texidoc="Explicit pitches and durations."; +} +\score { + \notes { + \pitch #(make-pitch 0 0 0) \duration #(make-duration 1 0) + \pitch #(make-pitch 1 1 1) \duration #(make-duration 2 0) + + } +} \ No newline at end of file diff --git a/lily/duration.cc b/lily/duration.cc index cc44db4def..9ea1ec5e20 100644 --- a/lily/duration.cc +++ b/lily/duration.cc @@ -129,7 +129,6 @@ Duration::less_p (SCM p1, SCM p2) return SCM_BOOL_F; } - static SCM make_duration (SCM l, SCM d) { diff --git a/lily/my-lily-lexer.cc b/lily/my-lily-lexer.cc index 5424b0fa72..763c9e90db 100644 --- a/lily/my-lily-lexer.cc +++ b/lily/my-lily-lexer.cc @@ -56,7 +56,7 @@ static Keyword_ent the_key_tab[]={ {"lyrics", LYRICS}, {"key", KEY}, {"mark", MARK}, - {"musicalpitch", MUSICAL_PITCH}, + {"pitch", PITCH}, {"time", TIME_T}, {"times", TIMES}, {"midi", MIDI}, diff --git a/lily/parser.yy b/lily/parser.yy index 7366cea832..bbfaf2438a 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -170,7 +170,7 @@ yylex (YYSTYPE *s, void * v_l) %token MEASURES %token MIDI %token MM_T -%token MUSICAL_PITCH +%token PITCH %token NAME %token PITCHNAMES %token NOTES @@ -245,8 +245,8 @@ yylex (YYSTYPE *s, void * v_l) %type pre_requests post_requests %type gen_text_def -%type steno_musical_pitch musical_pitch absolute_musical_pitch -%type steno_tonic_pitch +%type steno_pitch pitch absolute_pitch +%type explicit_pitch steno_tonic_pitch %type chord_additions chord_subtractions chord_notes chord_step %type chord @@ -820,7 +820,7 @@ Composite_music: | Repeated_music { $$ = $1; } | Simultaneous_music { $$ = $1; } | Sequential_music { $$ = $1; } - | TRANSPOSE musical_pitch Music { + | TRANSPOSE pitch Music { $$ = new Transposed_music (SCM_EOL); Music *p = $3; Pitch pit = *unsmob_pitch ($2); @@ -874,7 +874,7 @@ Composite_music: ; relative_music: - RELATIVE absolute_musical_pitch Music { + RELATIVE absolute_pitch Music { Music * p = $3; Pitch pit = *unsmob_pitch ($2); $$ = new Relative_octave_music (SCM_EOL); @@ -1297,7 +1297,7 @@ sub_quotes: } ; -steno_musical_pitch: +steno_pitch: NOTENAME_PITCH { $$ = $1; } @@ -1337,15 +1337,22 @@ steno_tonic_pitch: } ; -musical_pitch: - steno_musical_pitch { +pitch: + steno_pitch { $$ = $1; } - | MUSICAL_PITCH embedded_scm { - if (!unsmob_pitch ($2)) + | explicit_pitch { + $$ = $1; + } + ; + +explicit_pitch: + PITCH embedded_scm { + $$ = $2; + if (!unsmob_pitch ($2)) { THIS->parser_error (_f ("Expecting musical-pitch value", 3)); - Pitch m; - $$ = m.smobbed_copy (); + $$ = Pitch ().smobbed_copy (); + } } ; @@ -1483,8 +1490,8 @@ pre_requests: } ; -absolute_musical_pitch: - steno_musical_pitch { +absolute_pitch: + steno_pitch { $$ = $1; } ; @@ -1493,6 +1500,9 @@ duration_length: steno_duration { $$ = $1; } + | explicit_duration { + $$ = $1; + } | duration_length '*' bare_unsigned { $$ = unsmob_duration ($$)->compressed ( $3) .smobbed_copy (); } @@ -1514,6 +1524,9 @@ optional_notemode_duration: | entered_notemode_duration { $$ = $1; } + | explicit_duration { + $$ = $1; + } ; steno_duration: @@ -1556,7 +1569,7 @@ tremolo_type: simple_element: - musical_pitch exclamations questions optional_notemode_duration { + pitch exclamations questions optional_notemode_duration { if (!THIS->lexer_p_->note_state_b ()) THIS->parser_error (_ ("Have to be in Note mode for notes")); diff --git a/po/de.po b/po/de.po index dc7d3ddaf9..3c1a256a87 100644 --- a/po/de.po +++ b/po/de.po @@ -10,7 +10,7 @@ msgstr "" "Last-Translator: Erwin Dieterich \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: ENCODING\n" #: data-file.cc:54 diff --git a/po/it.po b/po/it.po index a083e18a43..cc09a30495 100644 --- a/po/it.po +++ b/po/it.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "POT-Creation-Date: 2000-12-17 15:35+0100\n" -"Content-Type: text/plain; charset=\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" "Date: 1998-05-30 00:17:12+0200\n" "From: \n" "Xgettext-Options: --c++ --default-domain=lilypond --join " diff --git a/po/nl.po b/po/nl.po index 266852ac97..10482e6c3a 100644 --- a/po/nl.po +++ b/po/nl.po @@ -7,6 +7,7 @@ # the TP robot wants them like this (I hope). # Of course, Han-Wen also was FIRST AUTHOR. # +#, fuzzy msgid "" msgstr "" "Project-Id-Version: lilypond 1.3.59\n" @@ -15,7 +16,7 @@ msgstr "" "Last-Translator: Jan Nieuwenhuizen \n" "Language-Team: Dutch \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=8859-1\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" "Date: 1998-05-26 11:26:28+0200\n" "From: \n" diff --git a/scm/documentation-lib.scm b/scm/documentation-lib.scm index 317fc486db..30dcec73c7 100644 --- a/scm/documentation-lib.scm +++ b/scm/documentation-lib.scm @@ -50,7 +50,7 @@ "\n@html" "\n
" "\n@end html" - "\n@node " name ",,,")) + "\n@node " name)) (define texi-section-alist '( @@ -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") top + (node "Top") ",(lilypond)Development,," top "\n@top" (texi-section 1 name #f) (texi-menu items-alist) diff --git a/scm/translator-property-description.scm b/scm/translator-property-description.scm index 4c5b2199ca..b7683b72ee 100644 --- a/scm/translator-property-description.scm +++ b/scm/translator-property-description.scm @@ -168,7 +168,7 @@ the start of the music. (translator-property-description 'melismaBusy boolean? "Signifies whether a melisma is active. This can be used to signal melismas on top of those automatically detected. ") -(translator-property-description 'melismaEngraverBusy boolean? "See @ref{melismaBusy}. This is set automatically.") +(translator-property-description 'melismaEngraverBusy boolean? "See @ref{(lilypond)melismaBusy}. This is set automatically.") (translator-property-description 'midiInstrument string? "Name of the MIDI instrument to use ") (translator-property-description 'noAutoBeaming boolean? "If set to true then beams are not generated automatically. diff --git a/scripts/convert-ly.py b/scripts/convert-ly.py index 045371f4e5..0c0505f58b 100644 --- a/scripts/convert-ly.py +++ b/scripts/convert-ly.py @@ -619,6 +619,7 @@ if 1: str = re.sub ('(paper_[a-z]+)', regularize_paper, str) str = re.sub ('sustainup', 'sustainUp', str) + str = re.sub ('nobreak', 'noBreak', str) str = re.sub ('sustaindown', 'sustainDown', str) str = re.sub ('sostenutoup', 'sostenutoUp', str) str = re.sub ('sostenutodown', 'sostenutoDown', str) @@ -629,6 +630,15 @@ if 1: conversions.append (((1,3,120), conv, 'paper_xxx -> paperXxxx, pedalup -> pedalUp.')) +if 1: + def conv (str): + str = re.sub ('drarnChords', 'chordChanges', str) + str = re.sub ('\\musicalpitch', '\\pitch', str) + return str + + conversions.append (((1,3,122), conv, 'drarnChords -> chordChanges, \\musicalpitch -> \\pitch')) + + ############################