From: fred Date: Wed, 27 Mar 2002 00:34:40 +0000 (+0000) Subject: lilypond-1.3.117 X-Git-Tag: release/1.5.59~1036 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=12fd767bc3e39f2268a896e004e612a9dd490378;p=lilypond.git lilypond-1.3.117 --- diff --git a/Documentation/user/features.tely b/Documentation/user/features.tely new file mode 100644 index 0000000000..e0d85a7de4 --- /dev/null +++ b/Documentation/user/features.tely @@ -0,0 +1,294 @@ +\input texinfo @c -*-texinfo-*- +@setfilename features.info +@settitle GNU LilyPond Features + +@ignore +TODO + * add more un/badly documented features + * write some text + * add to/merge with refman +@end ignore + +@node Top +@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 +* Markup text:: Markup text +* Output property:: Output property +* Embedded TeX:: Embedded TeX +* Embedded PostScript:: Embedded PostScript +@end menu + +Testin'' a b c... +@lilypond[fragment,relative,verbatim,center] + a'' b c +@end lilypond + +@node Arpeggio +@section Arpeggio + +@lilypond[fragment,relative,verbatim,center] + \context Voice +@end lilypond + +@lilypond[fragment,relative,verbatim,center] + \context PianoStaff < + \property PianoStaff.connectArpeggios = ##t + \context Staff \context Voice + \context Staff=other \context Voice + > +@end lilypond + + +@node Glissando +@section Glissando + + +@lilypond[fragment,relative,verbatim,center] + c'' \glissando c' +@end lilypond + +@subsection Follow Thread +@lilypond[fragment,relative,verbatim,center] + \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 + +@c part combiner + +@node Manual beam settings +@section Manual beam settings + + +Beams over rests... + +@lilypond[fragment,relative,verbatim,center] + \context Staff { + r4 [r8 g'' a] + } +@end lilypond + + +Control number of beams... + +@lilypond[fragment,relative,verbatim,center] + \context Staff { + [f'8 r16 f g a] + [f8 r16 \property Voice.stemLeftBeamCount = #1 f g a] + } +@end lilypond + +@lilypond[fragment,relative,verbatim,center] + 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 + +Don't extend to middle line esp. for grace + +@lilypond[fragment,relative,verbatim,center] + \grace a'8 a4 + \property Voice.Stem \set #'no-stem-extend = ##t + \grace g8 g4 +@end lilypond + +@c beam slope +@c beam start beam end + + +@node Slur attachments +@section Slur attachments + +BUG Override attachments... +@lilypond[fragment,relative,verbatim,center] + \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 + +Ophee slurs... +@lilypond[fragment,relative,verbatim,center] + \property Voice.Slur \set #'direction = #1 + \property Voice.Slur \set #'attachment = #'(head . head) + g''16()g()g()g()d'()d()d()d +@end lilypond + + +@c steep slur correct +@c high slurs, eg from gnossienes + + +@node Text spanner +@section Text spanner + +Have crescendo set a text spanner iso hairpin +@lilypond[fragment,relative,verbatim,center] + \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,center] + 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,center] +\score { + \notes \relative c'' { + a b c d + d c b a + } + \paper { + \translator { + \StaffContext + whichBar = #"" + \remove "Time_signature_engraver"; + linewidth = -1.; + } + } +} +@end lilypond + +No staff, no clef, squash pitches +@lilypond[verbatim,center] +\score { + \notes { c4 c4 c8 c8 } + \paper { + \translator { + \StaffContext + \remove Staff_symbol_engraver; + \consists Pitch_squash_engraver; + \remove Clef_engraver; + } + linewidth = -1.; + } +} +@end lilypond + + +@node Markup text +@section Markup text + +@c markup text hacking + +Metrome hack... + +@lilypond[verbatim,center] +#(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,center] + \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] +#(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 subsection no clefs +@c equalizer + + +@c Embedded TeX + +@node Embedded TeX +@section Embedded TeX +@lilypond[fragment,relative,verbatim,center] + a''^"3 $\\times$ \\`a deux" +@end lilypond + +@node Embedded PostScript +@section Embedded PostScript + +Arbitrary lines and curves not supported... +@lilypond[verbatim,center] +\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.0*\staffspace; + } +} +@end lilypond + +@bye + + + diff --git a/input/bugs/coda-kludge.ly b/input/bugs/coda-kludge.ly new file mode 100644 index 0000000000..ea590a55eb --- /dev/null +++ b/input/bugs/coda-kludge.ly @@ -0,0 +1,54 @@ +%{ +Hi, + I want to write some music that has the structure: + + Intro + \repeat 4 { Chorus [first-ending] verse } + fifth-ending final + + The obvious: + + \repeat 4 { Chorus \alternative{{first-ending}{}} verse} + \alternative{{}{fifth-ending}} + final + + doesn't work. + + And the (logically correct but ugly) + + \repeat 4 {Chorus} + \alternative {{first-ending verse}{fifth ending}} + final + + is very ugly, because the volta bracket keeps going for so + long. + + Peter C +%} + +\score{ + < + \context Staff \notes\relative c''{ + c c c c + % coda-klugde: let volta span only one bar + \property Staff.voltaSpannerDuration = #(make-moment 1 1) + \repeat "volta" 5 { d d d d } + \alternative { { e e e e f f f f } + { g g g g } } + } + \context Lyrics \lyrics{ + intro1 + \repeat fold 5 {} + \alternative { + { chorus1 one verse1 } + { chorus1 two verse1 } + { chorus1 three verse } + { chorus1 four verse } + } + five1 + } + > +} + + +%\version "1.0.16"; diff --git a/input/test/lines.ly b/input/test/lines.ly new file mode 100644 index 0000000000..1f9352a12a --- /dev/null +++ b/input/test/lines.ly @@ -0,0 +1,21 @@ +\header { +texidoc=" +Draw abritrary lines. This brings LilyPond on par with Mup. +"; +} + +\score { + \notes\relative c { +% globally positioned +% a-#"\\special{ps: 0 0 moveto 200 200 lineto stroke}" +% b-#"\\special{ps: 0 0 moveto 0 0 10 20 80 40 200 30 curveto stroke}" + 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.0*\staffspace; + } +} \ No newline at end of file diff --git a/lily/beam.cc b/lily/beam.cc index 25f90cb6eb..db50deee27 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -624,8 +624,15 @@ Beam::set_beaming (Grob*me,Beaming_info_list *beaming) { do { - if (Stem::beam_count (stems[i], d) == 0) - Stem::set_beaming ( stems[i], beaming->infos_.elem (i).beams_i_drul_[d],d); + /* Don't overwrite user override (?) */ + if (Stem::beam_count (stems[i], d) == 0 + /* Don't set beaming for outside of outer stems */ + && ! (d == LEFT && i == 0) + && ! (d == RIGHT && i == stems.size () -1)) + { + int b = beaming->infos_.elem (i).beams_i_drul_[d]; + Stem::set_beaming (stems[i], b, d); + } } while (flip (&d) != LEFT); } diff --git a/lily/timing-engraver.cc b/lily/timing-engraver.cc index d246f08f0d..468dc0eb3b 100644 --- a/lily/timing-engraver.cc +++ b/lily/timing-engraver.cc @@ -5,8 +5,6 @@ (c) 1997--2000 Han-Wen Nienhuys */ -#include - #include "translator-group.hh" #include "command-request.hh" #include "grob-info.hh" @@ -47,6 +45,7 @@ Timing_engraver::start_translation_timestep( ) if (!measure_position () || (to_boolean (always))) { + /* should this work, or be junked? See input/bugs/no-bars.ly */ which=get_property ("defaultBarType" ); } } diff --git a/scm/slur.scm b/scm/slur.scm index 02e4642f0e..81cf5050ec 100644 --- a/scm/slur.scm +++ b/scm/slur.scm @@ -67,13 +67,14 @@ (ly-get-elt-property stem 'beam) ;; and beam on same side as slur (let ((beaming (ly-get-elt-property stem 'beaming))) + ;; (display "beaming (") (display dir) (display "): ") (write beaming) (newline) (if (pair? beaming) - (<= 1 - (if (= dir -1) (car beaming) (cdr beaming))) + (>= (if (= dir -1) (cdr beaming) (car beaming)) + 1) #f)))))) 'stem) - ;;(cons (lambda (slur dir) (begin (display "before loose-end") (newline))#f) #f) + ;; (cons (lambda (slur dir) (begin (display "before loose-end") (newline))#f) #f) (cons (lambda (slur dir) (not (attached-to-stem slur dir))) 'loose-end) ;; (cons (lambda (slur dir) (begin (display "after loose-end") (newline))#f) #f)