From: fred Date: Tue, 26 Mar 2002 23:10:21 +0000 (+0000) Subject: lilypond-1.3.41 X-Git-Tag: release/1.5.59~1711 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=11f72b258cd5ea0ce6992b0e4e42eb78d3fe9ada;p=lilypond.git lilypond-1.3.41 --- diff --git a/Documentation/user/invoking.itexi b/Documentation/user/invoking.itexi index f6d5f1d08a..c8c6775965 100644 --- a/Documentation/user/invoking.itexi +++ b/Documentation/user/invoking.itexi @@ -48,27 +48,7 @@ code and named output. When invoked with a filename that has no extension, LilyPond will try -adding `@file{.ly}' as an extension first, then `@file{.fly}' and -finally `@file{.sly}' extension. If the filename ends with -`@file{.fly}', LilyPond processes the file as music using -`@file{init.fly}'. In this case, LilyPond does something like: - -@quotation - -@example -\score @{ - \notes\relative c @{ -1 \input "yourfile.fly" - @} - \paper@{@} - \midi@{@} -@} -@end example - -@end quotation - -The result of `@file{.sly}' is similar except that a single unjustified -line is produced. +adding `@file{.ly}' as an extension first. If you invoke LilyPond with a file `@file{foo.}@var{ext}' that doesn't have the `@file{.ly}' extension, then LilyPond will look for a file diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index 3862e3ad4d..2827b4b0f8 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -1038,6 +1038,8 @@ Some more elaborate constructions: Beaming can be generated automatically; see section XREF-autobeam [FIXME]. +[OUTDATED, FIXME] + To place tremolo marks @cindex tremolo beams between two notes, begin diff --git a/input/example-1.ly b/input/example-1.ly new file mode 100644 index 0000000000..839690d4c7 --- /dev/null +++ b/input/example-1.ly @@ -0,0 +1,20 @@ +\score { + \context Voice \notes\relative c { + c' d e f g a b c + + % A simple scale in Mudela. + % + % Type: + % + % ly2dvi example-1 + % xdvi example-1 # or your dvi viewer here + % + % For more elaborate examples see twinkle.ly, input/* and mutopia/*. + % + % A docmument on Mudela is under construction: Documentation/tex/mudela.doc + % (available as .ps from the website too). + + } + \paper { } + \midi { } +} \ No newline at end of file diff --git a/input/example-2.ly b/input/example-2.ly new file mode 100644 index 0000000000..982027eb40 --- /dev/null +++ b/input/example-2.ly @@ -0,0 +1,20 @@ +\score { + \context Voice \notes\relative c { + a''2 ~ c4( [e8 )e] [a,16 a a a] + + % Some beamed and slurred notes of different taste in Mudela. + % + % Type: + % + % ly2dvi example-2 + % xdvi example-2 # or your dvi viewer here + % + % For more elaborate examples see twinkle.ly, input/* and mutopia/*. + % + % A docmument on Mudela is under construction: Documentation/tex/mudela.doc + % (available as .ps from the website too). + + } + \paper { } + \midi { } +} \ No newline at end of file diff --git a/input/star-spangled-banner.ly b/input/star-spangled-banner.ly index e25e162a3d..87bbd5595c 100644 --- a/input/star-spangled-banner.ly +++ b/input/star-spangled-banner.ly @@ -168,7 +168,11 @@ handLyrics = \notes \context GrandStaff < } \translator { \LyricsContext + } + \translator { + \LyricsVoiceContext \consists "Bar_engraver"; + } } \midi {} diff --git a/input/test/accid.ly b/input/test/accid.ly new file mode 100644 index 0000000000..fb00fbc50e --- /dev/null +++ b/input/test/accid.ly @@ -0,0 +1,13 @@ +\score { + \context Voice \notes\relative c { + \time 3/4; + cisis'' cisis! cisis? | + cis cis! cis? | + c c! c? | + ces ces! ces? | + ceses ceses! ceses? | + + } + \paper { } + \midi { } +} \ No newline at end of file diff --git a/input/test/accidental-spacing.ly b/input/test/accidental-spacing.ly new file mode 100644 index 0000000000..19d07f138b --- /dev/null +++ b/input/test/accidental-spacing.ly @@ -0,0 +1,10 @@ +\score { + \context Voice \notes\relative c { + c''4 c4 cis4 cis [c8 c \clef "bass"; f,, f] + + } + \paper { + linewidth=-1.0; + } + \midi { } +} \ No newline at end of file diff --git a/input/test/as.ly b/input/test/as.ly new file mode 100644 index 0000000000..3aa062eec9 --- /dev/null +++ b/input/test/as.ly @@ -0,0 +1,9 @@ +\score { + \context Voice \notes\relative c { + \time 4/4; + g''1 a2 b4. c8 + + } + \paper { } + \midi { } +} \ No newline at end of file diff --git a/input/test/as1.ly b/input/test/as1.ly new file mode 100644 index 0000000000..cd66621667 --- /dev/null +++ b/input/test/as1.ly @@ -0,0 +1,10 @@ +\score { + \context Voice \notes\relative c { + \time 4/4; + g''1 a2 b4. c8 + \repeat "volta" 2 { a4 b c d } \alternative { { c c c c } { d2 d4 [d8 d] } } + + } + \paper { } + \midi { } +} \ No newline at end of file diff --git a/input/test/beam-abbrev.ly b/input/test/beam-abbrev.ly new file mode 100644 index 0000000000..117b13e7eb --- /dev/null +++ b/input/test/beam-abbrev.ly @@ -0,0 +1,12 @@ +\score { + \context Voice \notes\relative c { + c'1:16 + \stemup + c4:8 c4:16 [c8:16 c:] [c,8:16 c'':] + \stemboth + [c,,8:16 c'':] + + } + \paper { } + \midi { } +} \ No newline at end of file diff --git a/input/test/beam-control.ly b/input/test/beam-control.ly new file mode 100644 index 0000000000..0c27c6b744 --- /dev/null +++ b/input/test/beam-control.ly @@ -0,0 +1,23 @@ +\score { + \context Voice \notes\relative c { + % beam-control.fly + + % from upper staffline (position 4) to centre (position 0) + \property Voice.beamVerticalPosition = #4 + \property Voice.beamHeight = #-4 + [c'8 c] + + % from center to one above centre (position 2) + \property Voice.beamVerticalPosition = #0 + \property Voice.beamHeight = #2 + [c c] + + % normal beam-algorithm + \property Voice.beamHeight = ##f + \property Voice.beamVerticalPosition = ##f + [c e] [e c] + + } + \paper { } + \midi { } +} \ No newline at end of file diff --git a/input/test/beam-dir.ly b/input/test/beam-dir.ly new file mode 100644 index 0000000000..3b431ef15b --- /dev/null +++ b/input/test/beam-dir.ly @@ -0,0 +1,8 @@ +\score { + \context Voice \notes\relative c { + [b''16 a] + + } + \paper { } + \midi { } +} \ No newline at end of file diff --git a/input/test/beam-length.ly b/input/test/beam-length.ly new file mode 100644 index 0000000000..c408e64b2c --- /dev/null +++ b/input/test/beam-length.ly @@ -0,0 +1,10 @@ +\score { + \context Voice \notes\relative c { + % beams should look the same + [d''8 d d] [d g d] + c c + + } + \paper { } + \midi { } +} \ No newline at end of file diff --git a/input/test/beam-position.ly b/input/test/beam-position.ly new file mode 100644 index 0000000000..2d912fd9e3 --- /dev/null +++ b/input/test/beam-position.ly @@ -0,0 +1,12 @@ +\score { + \context Voice \notes\relative c { + [f8 f] [f64 f] \grace { [f8 e8] } + \property Voice.noStemExtend = ##t + [f8 f] + + } + \paper { + linewidth=-1.0; + } + \midi { } +} \ No newline at end of file diff --git a/input/test/beam-slope.ly b/input/test/beam-slope.ly new file mode 100644 index 0000000000..90316d2ea4 --- /dev/null +++ b/input/test/beam-slope.ly @@ -0,0 +1,8 @@ +\score { + \context Voice \notes\relative c { + [c''16 b] [a b] + + } + \paper { } + \midi { } +} \ No newline at end of file diff --git a/input/test/collision-merge-dotted.ly b/input/test/collision-merge-dotted.ly new file mode 100644 index 0000000000..b3a2f455d4 --- /dev/null +++ b/input/test/collision-merge-dotted.ly @@ -0,0 +1,18 @@ +\score { + \context Voice \notes\relative c { + + \relative c'' \context Staff < + \context Voice = one { + \property Staff.collisionMergeDotted = ##t + \stemup + [c8 f g a] + } + \context Voice = two { + \stemdown c,4. f8 + + }> + + } + \paper { } + \midi { } +} \ No newline at end of file diff --git a/input/test/dots.ly b/input/test/dots.ly new file mode 100644 index 0000000000..fca6280b39 --- /dev/null +++ b/input/test/dots.ly @@ -0,0 +1,17 @@ +\score { + \context Voice \notes\relative c { + \time 6/8; + d''4. b + + + + \context Staff < + \context Voice = VA { \stemup f'' r4. } + \context Voice = VB { \stemdown b, r4. } + > + + + } + \paper { } + \midi { } +} \ No newline at end of file diff --git a/input/test/dynamics.ly b/input/test/dynamics.ly new file mode 100644 index 0000000000..cd8b8d8a9f --- /dev/null +++ b/input/test/dynamics.ly @@ -0,0 +1,10 @@ +\score { + \context Voice \notes\relative c { + c''4 \p c \ff c^\ff + \property Voice.dynamicPadding = 10 + c \p \< \! c \ff\> c \!c-\p + + } + \paper { } + \midi { } +} \ No newline at end of file diff --git a/input/test/force-hshift.ly b/input/test/force-hshift.ly new file mode 100644 index 0000000000..a80f05eae9 --- /dev/null +++ b/input/test/force-hshift.ly @@ -0,0 +1,25 @@ +\score { + \context Voice \notes\relative c { + + \context Staff < + \context Voice = VA { + \property Voice.forceHorizontalShift = #0.1 + \stemup + \property Voice.horizontalNoteShift=1 + + } + + \context Voice = VB { + \stemdown + \property Voice.horizontalNoteShift=1 + \property Voice.forceHorizontalShift = #-0.1 + + } + > + + } + \paper { + linewidth=-1.0; + } + \midi { } +} \ No newline at end of file diff --git a/input/test/grace-end.ly b/input/test/grace-end.ly new file mode 100644 index 0000000000..d61b1047b7 --- /dev/null +++ b/input/test/grace-end.ly @@ -0,0 +1,9 @@ +\score { + \context Voice \notes\relative c { + + c4 \grace { [d16 d16] } + + } + \paper { } + \midi { } +} \ No newline at end of file diff --git a/input/test/harmonics.ly b/input/test/harmonics.ly new file mode 100644 index 0000000000..1a8eb47295 --- /dev/null +++ b/input/test/harmonics.ly @@ -0,0 +1,7 @@ +\score { + \context Voice \notes\relative c { + + } + \paper { } + \midi { } +} \ No newline at end of file diff --git a/input/test/hshift.ly b/input/test/hshift.ly new file mode 100644 index 0000000000..44fc980698 --- /dev/null +++ b/input/test/hshift.ly @@ -0,0 +1,17 @@ +\score { + \context Voice \notes\relative c { + + \context Staff < + \context Voice =VA {\property Voice.verticalDirection=1 \property Voice.horizontalNoteShift = 0 g'' } + \context Voice =VB {\property Voice.verticalDirection=1 \property Voice.horizontalNoteShift = 1 e } + \context Voice =VC {\property Voice.verticalDirection=1 \property Voice.horizontalNoteShift = 2 c } + \context Voice =VD {\property Voice.verticalDirection=1 \property Voice.horizontalNoteShift = 3 a } + \context Voice =VE {\property Voice.verticalDirection=1 \property Voice.horizontalNoteShift = 4 f } + > + + + + } + \paper { } + \midi { } +} \ No newline at end of file diff --git a/input/test/multi-slope.ly b/input/test/multi-slope.ly new file mode 100644 index 0000000000..1cea6506b3 --- /dev/null +++ b/input/test/multi-slope.ly @@ -0,0 +1,8 @@ +\score { + \context Voice \notes\relative c { + [c8 c16 c16] + + } + \paper { } + \midi { } +} \ No newline at end of file diff --git a/input/test/no-stem-extend.ly b/input/test/no-stem-extend.ly new file mode 100644 index 0000000000..2f43ce8586 --- /dev/null +++ b/input/test/no-stem-extend.ly @@ -0,0 +1,20 @@ +\score { + \context Voice \notes\relative c { + % test noStemExtend + \context Staff < + \context Voice = "a" { + f2 f8 g a b + \property Voice.noStemExtend = ##t + f2 f8 g a b + } + \context Voice = "b" { + c''2 c8 b a g + \property Voice.noStemExtend = ##t + c2 c8 b a g + } + > + + } + \paper { } + \midi { } +} \ No newline at end of file diff --git a/input/test/note-shift.ly b/input/test/note-shift.ly new file mode 100644 index 0000000000..c81ae2efe3 --- /dev/null +++ b/input/test/note-shift.ly @@ -0,0 +1,32 @@ +\score { + \context Voice \notes\relative c { + \context Staff \notes\relative c''< + \context Voice=one { + \property Voice.horizontalNoteShift=0 + \property Voice.verticalDirection=1 + e4 + } + \context Voice=two { + \property Voice.verticalDirection=1 + \property Voice.horizontalNoteShift=1 + cis + } + \context Voice=three { + \property Voice.horizontalNoteShift=2 + \property Voice.verticalDirection=1 + ais + } + \context Voice=four { + \property Voice.verticalDirection=-1 + \property Voice.horizontalNoteShift=-1 + fis + } + > + + + } + \paper { + linewidth=-1.0; + } + \midi { } +} \ No newline at end of file diff --git a/input/test/number-staff-lines.ly b/input/test/number-staff-lines.ly new file mode 100644 index 0000000000..d1d42d05af --- /dev/null +++ b/input/test/number-staff-lines.ly @@ -0,0 +1,9 @@ +\score { + \context Voice \notes\relative c { + + c' c c c | g' g g g \property Staff . numberOfStaffLines = 3 + + } + \paper { } + \midi { } +} \ No newline at end of file diff --git a/input/test/perform-grace.ly b/input/test/perform-grace.ly new file mode 100644 index 0000000000..39a88c14fe --- /dev/null +++ b/input/test/perform-grace.ly @@ -0,0 +1,12 @@ +\score { + \context Voice \notes\relative c { + \context Voice=VoiceOne + \property Voice.graceFraction = #(make-moment 1 4) + \grace c8 d4 d d d d + \property Voice.graceFraction = #(make-moment 1 2) + \grace { e16 f e f } d4 d d d d + + } + \paper { } + \midi { } +} \ No newline at end of file diff --git a/input/test/perform-tie.ly b/input/test/perform-tie.ly new file mode 100644 index 0000000000..7ec02e5e6a --- /dev/null +++ b/input/test/perform-tie.ly @@ -0,0 +1,9 @@ +\score { + \context Voice \notes\relative c { + c8 c c ~ c c c c ~ c ~ c ~ c c c + %\grace { d16 c16 d16 } c8 + + } + \paper { } + \midi { } +} \ No newline at end of file diff --git a/input/test/repeatbar.ly b/input/test/repeatbar.ly new file mode 100644 index 0000000000..4631d472e9 --- /dev/null +++ b/input/test/repeatbar.ly @@ -0,0 +1,10 @@ +\score { + \context Voice \notes\relative c { + c'' d e f | \repetitions1*3 | + \time 3/4; + g4 a b | R2.*2 | + + } + \paper { } + \midi { } +} \ No newline at end of file diff --git a/input/test/rests.ly b/input/test/rests.ly new file mode 100644 index 0000000000..a52025ae07 --- /dev/null +++ b/input/test/rests.ly @@ -0,0 +1,12 @@ +\score { + \context Voice \notes\relative c { + r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 r128 + \property Staff.restStyle = "mensural" + \emptyText + r\longa^"restStyle = \"mensural\"" r\breve r1 r2 r4 r8 r16 r32 r64 r128 r128 + + + } + \paper { } + \midi { } +} \ No newline at end of file diff --git a/input/test/scales.ly b/input/test/scales.ly new file mode 100644 index 0000000000..d31e9ca81d --- /dev/null +++ b/input/test/scales.ly @@ -0,0 +1,109 @@ +\score { + \context Voice \notes\relative c { + % sharp-major + % c g d a e b fis cis + + \key c; + c' d e f g a b c + + \key g; + g a b c d e fis g + + \key d; + d, e fis g a b cis d + + \key a; + a b cis d e fis gis a + + \key e; + e, fis gis a b cis dis e + + \key b; + b cis dis e fis gis ais b + + \key fis; + fis, gis ais b cis dis eis fis + + \key cis; + cis, dis eis fis gis ais bis cis + + % sharp-minor + % a e b fis cis gis dis ais + + \key a\minor; + a b c d e f gis a + + \key e\minor; + e, fis g a b c dis e + + \key b\minor; + b cis d e fis g ais b + + \key fis\minor; + fis, gis a b cis d eis fis + + \key cis\minor; + cis, dis e fis gis a bis cis + + \key gis\minor; + gis ais b cis dis e fisis gis + + \key dis\minor; + dis, eis fis gis ais b cisis dis + + \key ais\minor; + ais bis cis dis eis fis gisis ais + + % flat-major + % c f bes es as des ges ces + + \key f; + f, g a bes c d e f + + \key bes; + bes, c d es f g a bes + + \key es; + es,, f g as bes c d es + + \key as; + as, bes c des es f g as + + \key des; + des,, es f ges as bes c des + + \key ges; + ges, as bes ces des es f ges + + \key ces; + ces,, des es fes ges as bes ces + + % flat-minor + % a d g c f bes es as + + \key d\minor; + d, e f g a bes cis d + + \key g\minor; + g, a bes c d es fis g + + \key c\minor; + c,, d es f g as b c + + \key f\minor; + f, g as bes c des e f + + \key bes\minor; + bes, c des es f ges a bes + + \key es\minor; + es,, f ges as bes ces d es + + \key as\minor; + as, bes ces des es fes g as + + + } + \paper { } + \midi { } +} \ No newline at end of file diff --git a/input/test/script-column.ly b/input/test/script-column.ly new file mode 100644 index 0000000000..13f8b4207b --- /dev/null +++ b/input/test/script-column.ly @@ -0,0 +1,10 @@ +\score { + \context Voice \notes\relative c { + %c''4^|^.^"foo"^"klap" + c''4^|^.^"foo"^"klap"^"puk"^\fermata^\stopped + c4_|_._"foo"_"klap"_"puk"_\fermata_\stopped + + } + \paper { } + \midi { } +} \ No newline at end of file diff --git a/input/test/sizes.ly b/input/test/sizes.ly new file mode 100644 index 0000000000..420decf0b9 --- /dev/null +++ b/input/test/sizes.ly @@ -0,0 +1,17 @@ +\score { + \context Voice \notes\relative c { + % to see the magic: uncomment size stuff in init/paper20.ly + + c'4 c4 + + \property Voice.fontsize= -2 + b16 * 1 / 2 ( + \property Voice.fontsize= 0 ) + g4 *31/32 + + a a g2 + + } + \paper { } + \midi { } +} \ No newline at end of file diff --git a/input/test/slur-follow-music.ly b/input/test/slur-follow-music.ly new file mode 100644 index 0000000000..b710ab9361 --- /dev/null +++ b/input/test/slur-follow-music.ly @@ -0,0 +1,24 @@ +\score { + \context Voice \notes\relative c { + % CASE 3 + d''4 ( ) b a ( ) e' \break + g,( \stemdown ) b \stemboth c ( ) f, \break + + % no adjusting... + \stemup [d'8 ( b a] \stemboth ) e' \break + \stemup [g,8 ( b d] \stemboth ) c \break + + % still ugly + g4 ( b d ) c \break + + %TIES + d ~ b a ~ e' \break + g, ~ \stemdown b \stemboth c ~ f, \break + + + } + \paper { + linewidth=-1.0; + } + \midi { } +} \ No newline at end of file diff --git a/input/test/staccato-pos.ly b/input/test/staccato-pos.ly new file mode 100644 index 0000000000..a6a3489511 --- /dev/null +++ b/input/test/staccato-pos.ly @@ -0,0 +1,12 @@ +\score { + \context Voice \notes\relative c { + + e''4-. f-. d-. + c,-. b-. c'''-. d-. + + } + \paper { + linewidth=-1.0; + } + \midi { } +} \ No newline at end of file diff --git a/input/test/stem-length.ly b/input/test/stem-length.ly index 8b13789179..ca1aec2324 100644 --- a/input/test/stem-length.ly +++ b/input/test/stem-length.ly @@ -1 +1,9 @@ - +\score { + \context Voice \notes\relative c { + + g''4 \property Voice.stemLength = #14 g4 \property Voice.stemLength = #3 g4 g,,4 + + } + \paper { } + \midi { } +} \ No newline at end of file diff --git a/input/test/stem-spacing.ly b/input/test/stem-spacing.ly new file mode 100644 index 0000000000..9c391a6142 --- /dev/null +++ b/input/test/stem-spacing.ly @@ -0,0 +1,11 @@ +\score { + \context Voice \notes\relative c { + + \time 12/4; c''4 c c c a f' f, a + + } + \paper { + linewidth=-1.0; + } + \midi { } +} \ No newline at end of file diff --git a/input/test/tie-sparse.ly b/input/test/tie-sparse.ly new file mode 100644 index 0000000000..a3b30ae2dc --- /dev/null +++ b/input/test/tie-sparse.ly @@ -0,0 +1,13 @@ +\score { + \context Voice \notes\relative c { + + \context Voice { + \property Voice.sparseTies = ##t + c'' ~ } + + } + \paper { + linewidth=-1.0; + } + \midi { } +} \ No newline at end of file diff --git a/input/test/time.ly b/input/test/time.ly new file mode 100644 index 0000000000..e9cae53f81 --- /dev/null +++ b/input/test/time.ly @@ -0,0 +1,146 @@ +\score { + \context Voice \notes\relative c { + \property Staff.textEmptyDimension = 1 + \property Voice.textEmptyDimension = 1 + \property Staff.timeSignatureStyle = "C" + \time 1/1; + c''1^"timeSignatureStyle = \"C\"" + \time 2/2; + c1 + \time 2/4; + c2 + \time 3/4; + c2. + \time 4/4; + c1 + \time 5/4; + c2. c2 + \time 6/4; + c1. + \time 3/2; + c1. + \time 7/4; + c1 c2. + \time 8/4; + c\breve + \time 9/4; + c2. c2. c2. + \break + \property Staff.timeSignatureStyle = "old" + \time 1/1; + c1^"timeSignatureStyle = \"old\"" + \time 2/2; + c1 + \time 2/4; + c2 + \time 3/4; + c2. + \time 4/4; + c1 + \time 5/4; + c2. c2 + \time 6/4; + c1. + \time 3/2; + c1. + \time 7/4; + c1 c2. + \time 8/4; + c\breve + \time 9/4; + c2. c2. c2. + \time 6/8; + c2. + \time 9/8; + c4. c4. c4. + \break + \property Staff.timeSignatureStyle = "" + \time 1/1; + c1^"timeSignatureStyle = \"\"" + \time 2/2; + c1 + \time 2/4; + c2 + \time 3/4; + c2. + \time 4/4; + c1 + \time 5/4; + c2. c2 + \time 6/4; + c1. + \time 3/2; + c1. + \time 7/4; + c1 c2. + \time 8/4; + c\breve + \time 9/4; + c2. c2. c2. + \break + \property Staff.timeSignatureStyle = "1" + \time 1/1; + c1^"timeSignatureStyle = \"1\"" + \time 2/2; + c1 + \time 2/4; + c2 + \time 3/4; + c2. + \time 4/4; + c1 + \time 5/4; + c2. c2 + \time 6/4; + c1. + \time 3/2; + c1. + \time 7/4; + c1 c2. + \time 8/4; + c\breve + \time 9/4; + c2. c2. c2. + \break + \property Staff.textalignment = \center + \property Staff.timeSignatureStyle = "old9/8" + \time 1/1; + c1^"old9/8" + \property Staff.timeSignatureStyle = "old6/8" + \time 1/1; + c1^"old6/8" + \property Staff.timeSignatureStyle = "old6/8alt" + \time 1/1; + c1^"old6/8alt" + \property Staff.timeSignatureStyle = "old9/4" + \time 1/1; + c1^"old9/4" + \property Staff.timeSignatureStyle = "old6/4" + \time 1/1; + c1^"old6/4" + \property Staff.timeSignatureStyle = "old3/2" + \time 1/1; + c1^"old3/2" + \property Staff.timeSignatureStyle = "old4/4" + \time 1/1; + c1^"old4/4" + \property Staff.timeSignatureStyle = "old2/2" + \time 1/1; + c1^"old2/2" + \property Staff.timeSignatureStyle = "old2/4" + \time 1/1; + c1^"old2/4" + \property Staff.timeSignatureStyle = "old4/8" + \time 1/1; + c1^"old4/8" + \property Staff.timeSignatureStyle = "C4/4" + \time 1/1; + c1^"C4/4" + \property Staff.timeSignatureStyle = "C2/2" + \time 1/1; + c1^"C2/2" + + } + \paper { } + \midi { } +} \ No newline at end of file diff --git a/input/test/timing.ly b/input/test/timing.ly new file mode 100644 index 0000000000..cd8ba855c4 --- /dev/null +++ b/input/test/timing.ly @@ -0,0 +1,23 @@ +\score { + \context Voice \notes\relative c { + + + % \property Score. measurePosition = #(make-moment -1 4) + \partial 4; + c''4 c4 c4 c2 c1 + \cadenzaOn [c8 d e f] [g a b c b c b c] + \cadenzaOff + c4 c4 c4 c4 + \property Score. measureLength = #(make-moment 5 4) + + c1 c4 + c1 c4 + c4 c4 + \property Score. measurePosition = #(make-moment -3 8) + b8 b b + c4 c1 + + } + \paper { } + \midi { } +} \ No newline at end of file diff --git a/input/test/transposing.ly b/input/test/transposing.ly new file mode 100644 index 0000000000..3c2ebc2478 --- /dev/null +++ b/input/test/transposing.ly @@ -0,0 +1,17 @@ +\score { + \context Voice \notes\relative c { + % btw: this is not how transposing is done in mudela, + % this is a transposing performer, i.e. for midi-output only + \property Staff.transposing = 0 c + \property Staff.transposing = 2 c + \property Staff.transposing = 4 c + \property Staff.transposing = 5 c + \property Staff.transposing = 7 c + \property Staff.transposing = 9 c + \property Staff.transposing = 11 c + \property Staff.transposing = 12 c + + } + \paper { } + \midi { } +} \ No newline at end of file diff --git a/input/test/tuplet-2.ly b/input/test/tuplet-2.ly new file mode 100644 index 0000000000..7e8b18c46d --- /dev/null +++ b/input/test/tuplet-2.ly @@ -0,0 +1,10 @@ +\score { + \context Voice \notes\relative c { + + \times 2/3 { c''8 c c } + \times 2/3 { c8 c'' c,, } + + } + \paper { } + \midi { } +} \ No newline at end of file diff --git a/input/test/tuplet.ly b/input/test/tuplet.ly new file mode 100644 index 0000000000..68e2768fd3 --- /dev/null +++ b/input/test/tuplet.ly @@ -0,0 +1,50 @@ +\score { + \context Voice \notes\relative c { + \property Voice.textEmptyDimension = 1 + \property Voice.textScriptPadding = 10 + \property Voice.tupletVisibility = 0 + \times2/3{c'4^"tupletVisibility = 0" d e} \times2/3{[f8 g a]} + \times2/3{b16 c d} c8 | + \property Voice.tupletVisibility = 1 + \times2/3{c,4^"tupletVisibility = 1" d e} \times2/3{[f8 g a]} + \times2/3{b16 c d} c8 | + \property Voice.tupletVisibility = 2 + \times2/3{c,4^"tupletVisibility = 2" d e} \times2/3{[f8 g a]} + \times2/3{b16 c d} c8 | + \property Voice.tupletVisibility = 3 + \times2/3{c,4^"tupletVisibility = 3" d e} \times2/3{[f8 g a]} + \times2/3{b16 c d} c8 | + \property Voice.tupletVisibility = 4 + \times2/3{c,4^"tupletVisibility = 4" d e} \times2/3{[f8 g a]} + \times2/3{b16 c d} c8 | \break + + \property Voice.tupletDirection = \down + \property Voice.tupletVisibility = 0 + \times2/3{c,4^"tupletDirection = down" d e} + \times2/3{[[f8 g a]]} \times2/3{b16 c d} c8 | + \property Voice.tupletVisibility = 1 + \times2/3{c,4 d e} \times2/3{[f8 g a]} \times2/3{b16 c d} c8 | + \property Voice.tupletVisibility = 2 + \times2/3{c,4 d e} \times2/3{[f8 g a]} \times2/3{b16 c d} c8 | + \property Voice.tupletVisibility = 3 + \times2/3{c,4 d e} \times2/3{[f8 g a]} \times2/3{b16 c d} c8 | + \property Voice.tupletVisibility = 4 + \times2/3{c,4 d e} \times2/3{[f8 g a]} \times2/3{b16 c d} c8 |\break + + \property Voice.tupletDirection = \up + \property Voice.tupletVisibility = 0 + \times2/3{c,4^"tupletDirection = up" d e} + \times2/3{[[f8 g a]]} \times2/3{b16 c d} c8 | + \property Voice.tupletVisibility = 1 + \times2/3{c,4 d e} \times2/3{[f8 g a]} \times2/3{b16 c d} c8 | + \property Voice.tupletVisibility = 2 + \times2/3{c,4 d e} \times2/3{[f8 g a]} \times2/3{b16 c d} c8 | + \property Voice.tupletVisibility = 3 + \times2/3{c,4 d e} \times2/3{[f8 g a]} \times2/3{b16 c d} c8 | + \property Voice.tupletVisibility = 4 + \times2/3{c,4 d e} \times2/3{[f8 g a]} \times2/3{b16 c d} c8 | + + } + \paper { } + \midi { } +} \ No newline at end of file diff --git a/input/test/updown.ly b/input/test/updown.ly new file mode 100644 index 0000000000..f21e78a109 --- /dev/null +++ b/input/test/updown.ly @@ -0,0 +1,18 @@ +\score { + \context Voice \notes\relative c { + % this used to work: + % <{\voiceone e} + % {\voicetwo c}> + + % now we need: + \context Staff + <{\voiceone e} + {\voicetwo c}> + + + \version "1.0.21"; + + } + \paper { } + \midi { } +} \ No newline at end of file diff --git a/input/test/volta.ly b/input/test/volta.ly new file mode 100644 index 0000000000..443f79dfde --- /dev/null +++ b/input/test/volta.ly @@ -0,0 +1,24 @@ +\score { + \context Voice \notes\relative c { + % Test of prima/secunda volta brackets in conjunction with + % line breaks and special bars. + + c' d e f | + \repeat "volta" 2 { g a b c } + \alternative { { c b a g a g a g} { f e d c } } + \repeat "volta" 2 { g a b c } + \alternative { { c b a g \break a g a g} { f e d c } } + c' d e f | + \repeat "volta" 2 { g a b c } + \alternative { { c b a g \break a g a g \break a b a b } { f e d c } } + c' d e f | + \repeat "volta" 2 { g a b c } + \alternative { { c b a g } { f e d c \break a g a g} } + c' d e f | + \repeat "volta" 2 { g a b c } + \alternative { { c b a g a g a g} { f e d c \bar "|.";} } + + } + \paper { } + \midi { } +} \ No newline at end of file diff --git a/lily/auto-beam-engraver.cc b/lily/auto-beam-engraver.cc index 5ee092ad59..26ef80cf7e 100644 --- a/lily/auto-beam-engraver.cc +++ b/lily/auto-beam-engraver.cc @@ -19,6 +19,11 @@ ADD_THIS_TRANSLATOR (Auto_beam_engraver); + +/* + TODO: remove all references to Timing_engraver; should read properties. + + */ Auto_beam_engraver::Auto_beam_engraver () { stem_l_arr_p_ = 0; @@ -52,7 +57,7 @@ void Auto_beam_engraver::consider_end_and_begin (Moment test_mom) { if (!timer_l_) - return; + return; int num; int den; diff --git a/lily/bar-number-engraver.cc b/lily/bar-number-engraver.cc index c334d087ee..53d4cf4766 100644 --- a/lily/bar-number-engraver.cc +++ b/lily/bar-number-engraver.cc @@ -6,12 +6,10 @@ (c) 1997--2000 Han-Wen Nienhuys */ - #include "bar-number-engraver.hh" -#include "timing-translator.hh" -#include "timing-engraver.hh" #include "engraver-group-engraver.hh" #include "text-item.hh" +#include "moment.hh" Bar_number_engraver::Bar_number_engraver() { @@ -24,14 +22,13 @@ Bar_number_engraver::Bar_number_engraver() void Bar_number_engraver::do_process_music () { - Translator *tr = daddy_grav_l ()->get_simple_translator ("Timing_engraver"); - Timing_translator *time = dynamic_cast(tr); - // todo include (&&!time->cadenza_b_ ) SCM bn = get_property("currentBarNumber"); - + SCM smp = get_property ("measurePosition"); + Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0); + if (gh_number_p (bn) && - !time->measure_position () && now_mom () > Moment (0)) + !mp && now_mom () > Moment (0)) { create_items (0); diff --git a/lily/beam-engraver.cc b/lily/beam-engraver.cc index cb65aa5863..075af92ed9 100644 --- a/lily/beam-engraver.cc +++ b/lily/beam-engraver.cc @@ -6,14 +6,12 @@ (c) 1998--2000 Han-Wen Nienhuys */ -#include "timing-engraver.hh" #include "engraver-group-engraver.hh" #include "beam-engraver.hh" #include "musical-request.hh" #include "beam.hh" #include "stem.hh" #include "warn.hh" -#include "timing-translator.hh" #include "beaming.hh" #include "score-engraver.hh" @@ -91,9 +89,10 @@ Beam_engraver::do_process_music () prev_start_req_ = reqs_drul_[START]; beam_p_ = new Beam; - Translator * t = daddy_grav_l ()->get_simple_translator ("Timing_engraver"); - Timing_engraver *timer = dynamic_cast (t); - beam_start_location_ = (t) ? timer->measure_position () : Moment (0); + SCM smp = get_property ("measurePosition"); + Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0); + + beam_start_location_ = mp; beam_start_mom_ = now_mom(); beam_info_p_ = new Beaming_info_list; diff --git a/lily/chord-tremolo-engraver.cc b/lily/chord-tremolo-engraver.cc index 769ec5a3fc..291133c50e 100644 --- a/lily/chord-tremolo-engraver.cc +++ b/lily/chord-tremolo-engraver.cc @@ -1,38 +1,56 @@ -/* - chord-tremolo-engraver.cc -- implement Chord_tremolo_engraver - +/* + new-chord-tremolo-engraver.cc -- implement Chord_tremolo_engraver + source file of the GNU LilyPond music typesetter + + (c) 2000 Han-Wen Nienhuys + + */ - (c) 1997--2000 Han-Wen Nienhuys - Jan Nieuwenhuizen -*/ - -#include "timing-translator.hh" -#include "stem.hh" +#include "engraver.hh" #include "beam.hh" +#include "repeated-music.hh" +#include "stem.hh" +#include "note-head.hh" +#include "engraver-group-engraver.hh" #include "musical-request.hh" -#include "misc.hh" #include "warn.hh" -#include "score-engraver.hh" -#include "engraver.hh" -#include "drul-array.hh" -#include "timing-engraver.hh" -#include "beaming.hh" +#include "misc.hh" /** - Generate a beam tremolo. Eat stems. + This acknowledges repeated music with "tremolo" style. It typesets + a beam. + + TODO: + + - perhaps use engraver this to steer other engravers? That would + create dependencies between engravers, which is bad. + + - create dots if appropriate. - UGH. Derive me from Beam_engraver. - */ + class Chord_tremolo_engraver : public Engraver { + void typeset_beam (); public: VIRTUAL_COPY_CONS(Translator); - - Chord_tremolo_engraver(); +protected: + Repeated_music * repeat_; + /// moment (global time) where beam started. + Moment start_mom_; + Moment stop_mom_; + + /// location within measure where beam started. + Moment beam_start_location_; + + int note_head_i_; + + Beam * beam_p_; + Beam * finished_beam_p_; + protected: virtual void do_removal_processing(); virtual void do_process_music(); @@ -40,122 +58,60 @@ protected: virtual void acknowledge_element (Score_element_info); virtual void do_pre_move_processing(); virtual void do_post_move_processing(); - -private: - void typeset_beam (); - Drul_array reqs_drul_; - Chord_tremolo_req* prev_start_req_; - Beam* beam_p_; - Beam* finished_beam_p_; - - /// location within measure where beam started. - Moment beam_start_location_; - - /// moment (global time) where beam started. - Moment beam_start_mom_; - Beaming_info_list * beam_info_p_; - Beaming_info_list * finished_beam_info_p_; }; -ADD_THIS_TRANSLATOR (Chord_tremolo_engraver); - -Chord_tremolo_engraver::Chord_tremolo_engraver () +Chord_tremolo_engraver::Chord_tremolo_engraver() { - reqs_drul_[LEFT] = reqs_drul_[RIGHT] = 0; - beam_p_ = 0; - finished_beam_p_ = 0; - prev_start_req_ = 0; - finished_beam_info_p_=0; - beam_info_p_ =0; + beam_p_ = finished_beam_p_ = 0; + repeat_ =0; + note_head_i_ = 0; } bool -Chord_tremolo_engraver::do_try_music (Music* m) +Chord_tremolo_engraver::do_try_music (Music * m) { - if (Chord_tremolo_req* b = dynamic_cast (m)) + Repeated_music * rp = dynamic_cast (m); + if (rp && rp->type_ == "tremolo" && !repeat_) { - Direction d = b->span_dir_; - if (reqs_drul_[d] && !reqs_drul_[d]->equal_b (b)) - return false; + Moment l = rp->body_length_mom (); + repeat_ = rp; + start_mom_ = now_mom (); + stop_mom_ = start_mom_ + l; - if ((d == STOP) && !beam_p_) - { - m->warning (_ ("can't find start of chord tremolo")); - return false; - } - - reqs_drul_[d] = b; + // ugh. should generate dots, triplet beams. + note_head_i_ = l.den () warning (_ ("can't find start of chord tremolo")); - - prev_start_req_ = 0; - - finished_beam_p_ = beam_p_; - beam_p_ = 0; - - finished_beam_info_p_ = beam_info_p_; - beam_info_p_ = 0; - } - - if (beam_p_) - { - Score_engraver * e = 0; - Translator * t = daddy_grav_l (); - for (; !e && t; t = t->daddy_trans_l_) - { - e = dynamic_cast (t); - } - - if (!e) - programming_error ("No score engraver!"); - else - e->forbid_breaks (); - } - - if (reqs_drul_[START]) + if (repeat_ && !beam_p_) { - if (beam_p_) - { - reqs_drul_[START]->warning (_ ("already have a chord tremolo")); - return; - } - - prev_start_req_ = reqs_drul_[START]; - beam_p_ = new Beam; beam_p_->set_elt_property ("chord-tremolo", SCM_BOOL_T); - Translator * t = daddy_grav_l ()->get_simple_translator ("Timing_engraver"); - Timing_engraver *timer = dynamic_cast (t); - beam_start_location_ = (t) ? timer->measure_position () : Moment (0); - beam_start_mom_ = now_mom(); - beam_info_p_ = new Beaming_info_list; - - announce_element (Score_element_info (beam_p_, reqs_drul_[LEFT])); - } -} -void -Chord_tremolo_engraver::do_post_move_processing () -{ - reqs_drul_ [START] = 0; + + SCM smp = get_property ("measurePosition"); + Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0); + beam_start_location_ = mp; + announce_element (Score_element_info (beam_p_, repeat_)); + } } void -Chord_tremolo_engraver::do_pre_move_processing () +Chord_tremolo_engraver::do_removal_processing () { typeset_beam (); + if (beam_p_) + { + repeat_->warning (_ ("unterminated chord tremolo")); + finished_beam_p_ = beam_p_; + typeset_beam (); + } } void @@ -163,29 +119,11 @@ Chord_tremolo_engraver::typeset_beam () { if (finished_beam_p_) { - finished_beam_info_p_->beamify (); - finished_beam_p_->set_beaming (finished_beam_info_p_); typeset_element (finished_beam_p_); finished_beam_p_ = 0; - delete finished_beam_info_p_; - finished_beam_info_p_ =0; - - reqs_drul_[STOP] = 0; } } -void -Chord_tremolo_engraver::do_removal_processing () -{ - typeset_beam (); - if (beam_p_) - { - prev_start_req_->warning (_ ("unterminated chord tremolo")); - finished_beam_p_ = beam_p_; - finished_beam_info_p_ = beam_info_p_; - typeset_beam (); - } -} void Chord_tremolo_engraver::acknowledge_element (Score_element_info info) @@ -194,11 +132,10 @@ Chord_tremolo_engraver::acknowledge_element (Score_element_info info) { if (Stem* s = dynamic_cast (info.elem_l_)) { - int type_i = prev_start_req_->type_i_; - s->set_elt_property ("duration-log", gh_int2scm (intlog2 (type_i) - 2)); - - s->set_beaming (s->flag_i (), LEFT); - s->set_beaming ( s->flag_i (), RIGHT); + int f = s->flag_i (); + f = (f > 2) ? f - 2 : 1; + s->set_beaming (f, LEFT); + s->set_beaming (f, RIGHT); /* URG: this sets the direction of the Stem s. @@ -206,7 +143,10 @@ Chord_tremolo_engraver::acknowledge_element (Score_element_info info) Stem:: type_i () ->first_head ()->get_direction () -> directional_element (me).set (d); - + + + don't understand this comment. + --hwn. */ SCM d = s->get_elt_property ("direction"); if (s->type_i () != 1) @@ -220,9 +160,7 @@ Chord_tremolo_engraver::acknowledge_element (Score_element_info info) { beam_p_->add_stem (s); Moment stem_location = now_mom () - - beam_start_mom_ + beam_start_location_; - beam_info_p_->add_stem (stem_location, - (r->duration_.durlog_i_ - 2) >? 1); + start_mom_ + beam_start_location_; } else { @@ -233,6 +171,32 @@ Chord_tremolo_engraver::acknowledge_element (Score_element_info info) ::warning (s); } } + if (Note_head *nh = dynamic_cast (info.elem_l_)) + { + nh->set_elt_property ("duration-log", gh_int2scm (intlog2 (note_head_i_))); + } + } +} + + +void +Chord_tremolo_engraver::do_post_move_processing () +{ + if (beam_p_ && stop_mom_ == now_mom ()) + { + finished_beam_p_ = beam_p_; + + repeat_ = 0; + beam_p_ = 0; } } + +void +Chord_tremolo_engraver::do_pre_move_processing () +{ + typeset_beam (); +} + +ADD_THIS_TRANSLATOR(Chord_tremolo_engraver); + diff --git a/lily/include/beaming.hh b/lily/include/beaming.hh index cb0b455a5c..06dd19f451 100644 --- a/lily/include/beaming.hh +++ b/lily/include/beaming.hh @@ -24,6 +24,10 @@ struct Beaming_info Beaming_info (); }; +/* + Generate beaming given durations of notes. Beam uses this to + set_beaming () for each of its stems. +*/ struct Beaming_info_list { Array infos_; diff --git a/lily/include/lily-proto.hh b/lily/include/lily-proto.hh index 1b85d39f98..8f0e8c956f 100644 --- a/lily/include/lily-proto.hh +++ b/lily/include/lily-proto.hh @@ -61,7 +61,6 @@ struct Chord; struct Chord_name; struct Chord_name_engraver; struct Chord_tremolo_engraver; -struct Chord_tremolo_req; struct Clef_change_req; struct Clef_engraver; struct Clef_item; diff --git a/lily/include/moment.hh b/lily/include/moment.hh index 17835b3e95..615928a62c 100644 --- a/lily/include/moment.hh +++ b/lily/include/moment.hh @@ -28,6 +28,8 @@ struct Moment : public Rational }; +Moment * unsmob_moment (SCM); + IMPLEMENT_ARITHMETIC_OPERATOR (Moment, / ); IMPLEMENT_ARITHMETIC_OPERATOR (Moment, + ); IMPLEMENT_ARITHMETIC_OPERATOR (Moment, * ); diff --git a/lily/include/musical-request.hh b/lily/include/musical-request.hh index 9fbbd284cd..b70763d9b8 100644 --- a/lily/include/musical-request.hh +++ b/lily/include/musical-request.hh @@ -176,19 +176,7 @@ class Melisma_req : public Span_req public: VIRTUAL_COPY_CONS(Music); }; -/** - Start / stop a tremolo beam. */ -class Chord_tremolo_req : public Span_req -{ -public: - VIRTUAL_COPY_CONS (Music); - - Chord_tremolo_req (); - virtual void do_print () const; - - int type_i_; -}; /** Helping req to signal start of a melisma from within a context, and diff --git a/lily/include/my-lily-parser.hh b/lily/include/my-lily-parser.hh index 7c93a9a15b..3ea7db50a7 100644 --- a/lily/include/my-lily-parser.hh +++ b/lily/include/my-lily-parser.hh @@ -42,18 +42,12 @@ public: Scope *default_header_p_; - - // JUNKME - int chord_tremolo_type_i_; - int fatal_error_i_; Sources * source_l_; int error_level_i_; My_lily_lexer * lexer_p_; bool ignore_version_b_; - - Input here_input() const; void remember_spot(); diff --git a/lily/include/repeated-music.hh b/lily/include/repeated-music.hh index 7d572eb766..4f373f5958 100644 --- a/lily/include/repeated-music.hh +++ b/lily/include/repeated-music.hh @@ -66,7 +66,7 @@ public: /// The duration of this piece of music virtual Moment length_mom () const; - + Moment body_length_mom () const; Moment alternatives_length_mom () const; void print() const; diff --git a/lily/local-key-engraver.cc b/lily/local-key-engraver.cc index 2641421cca..2051672ebe 100644 --- a/lily/local-key-engraver.cc +++ b/lily/local-key-engraver.cc @@ -220,7 +220,11 @@ Local_key_engraver::acknowledge_element (Score_element_info info) void Local_key_engraver::do_process_music() { - if (time_trans_l_ && !time_trans_l_->measure_position ()) + + SCM smp = get_property ("measurePosition"); + Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0); + + if (!mp) { if (!to_boolean (get_property ("noResetKey")) && key_grav_l_) local_key_= key_grav_l_->key_; diff --git a/lily/multi-measure-rest-engraver.cc b/lily/multi-measure-rest-engraver.cc index de6975998a..6a49f50a54 100644 --- a/lily/multi-measure-rest-engraver.cc +++ b/lily/multi-measure-rest-engraver.cc @@ -10,13 +10,13 @@ #include "multi-measure-rest.hh" #include "paper-column.hh" #include "engraver-group-engraver.hh" -#include "timing-translator.hh" #include "bar.hh" #include "staff-symbol-referencer.hh" #include "engraver.hh" #include "moment.hh" /** + The name says it all: make multi measure rests */ class Multi_measure_rest_engraver : public Engraver { @@ -109,28 +109,24 @@ Multi_measure_rest_engraver::do_process_music () if (busy_span_req_l_ && !mmrest_p_) { - Translator * tr = daddy_grav_l()->get_simple_translator ("Timing_engraver"); // ugh - Timing_translator * time = dynamic_cast (tr); - mmrest_p_ = new Multi_measure_rest; Staff_symbol_referencer_interface si (mmrest_p_); si.set_interface (); announce_element (Score_element_info (mmrest_p_, busy_span_req_l_)); start_measure_i_ - = gh_scm2int (time->get_property ("currentBarNumber")); + = gh_scm2int (get_property ("currentBarNumber")); } } void Multi_measure_rest_engraver::do_pre_move_processing () { - Moment now (now_mom ()); - Translator * tr = daddy_grav_l()->get_simple_translator ("Timing_engraver"); // ugh - Timing_translator * time = dynamic_cast (tr); + SCM smp = get_property ("measurePosition"); + Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0); - if (mmrest_p_ && (now >= start_moment_) - && !time->measure_position () + if (mmrest_p_ && (now_mom () >= start_moment_) + && !mp && (scm_ilength (mmrest_p_->get_elt_property ("columns")) >= 2)) { typeset_element (mmrest_p_); @@ -155,15 +151,16 @@ Multi_measure_rest_engraver::do_pre_move_processing () void Multi_measure_rest_engraver::do_post_move_processing () { - Translator * tr = daddy_grav_l()->get_simple_translator ("Timing_engraver"); // ugh - Timing_translator * time = dynamic_cast (tr); - Moment now (now_mom ()); - - if (mmrest_p_ && !time->measure_position ()) + + + SCM smp = get_property ("measurePosition"); + Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0); + + if (mmrest_p_ && !mp) { lastrest_p_ = mmrest_p_; - int cur = gh_scm2int (time->get_property ("currentBarNumber")); + int cur = gh_scm2int (get_property ("currentBarNumber")); lastrest_p_->set_elt_property ("measure-count", gh_int2scm (cur - start_measure_i_)); mmrest_p_ = 0; diff --git a/lily/musical-request.cc b/lily/musical-request.cc index 192ea5d48e..cdcda7ac01 100644 --- a/lily/musical-request.cc +++ b/lily/musical-request.cc @@ -159,19 +159,6 @@ Span_req::Span_req () span_dir_ = CENTER; } -Chord_tremolo_req::Chord_tremolo_req () -{ - type_i_ = 0; -} - -void -Chord_tremolo_req::do_print () const -{ -#ifndef NPRINT - DEBUG_OUT << type_i_; -#endif -} - void Text_script_req::do_print () const { diff --git a/lily/my-lily-parser.cc b/lily/my-lily-parser.cc index 0991ef79fc..233f910ca6 100644 --- a/lily/my-lily-parser.cc +++ b/lily/my-lily-parser.cc @@ -27,7 +27,6 @@ My_lily_parser::My_lily_parser (Sources * source_l) { source_l_ = source_l; lexer_p_ = 0; - chord_tremolo_type_i_ = 0; default_duration_.durlog_i_ = 2; error_level_i_ = 0; @@ -99,15 +98,6 @@ My_lily_parser::set_last_duration (Duration const *d) default_duration_ = *d; } -void -My_lily_parser::set_chord_tremolo (int type_i) -{ - chord_tremolo_type_i_ = type_i; -} - - - - // junk me Simultaneous_music * My_lily_parser::get_chord (Musical_pitch tonic, diff --git a/lily/parser.yy b/lily/parser.yy index dab130bfa0..8f3762b595 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -98,7 +98,7 @@ print_mudela_versions (ostream &os) Real real; Request * request; - /* We use SCMs to do strings, because it saves us the trouble of + /* We use SCMs to do strings, because it saves us the trouble of deleting them. Let's hope that a stack overflow doesnt trigger a move of the parse stack onto the heap. */ SCM scm; @@ -951,39 +951,11 @@ shorthand_command_req: b->span_type_str_ = "beam"; $$ =b; } - | '[' ':' unsigned { - // JUNKME - if (!is_duration_b ($3)) - THIS->parser_error (_f ("not a duration: %d", $3)); - else - THIS->set_chord_tremolo ($3); - - Chord_tremolo_req* a = new Chord_tremolo_req; - a->span_dir_ = START; - // urg - a->type_i_ = THIS->chord_tremolo_type_i_; - $$=a; - } | ']' { - /* URG - */ - if (!THIS->chord_tremolo_type_i_) - { - Span_req*b= new Span_req; - b->span_dir_ = STOP; - b->span_type_str_ = "beam"; - $$ = b; - } - else - { - Chord_tremolo_req* a = new Chord_tremolo_req; - a->span_dir_ = STOP; - a->type_i_ = THIS->chord_tremolo_type_i_; - - // JUNKME. - THIS->set_chord_tremolo (0); - $$ = a; - } + Span_req*b= new Span_req; + b->span_dir_ = STOP; + b->span_type_str_ = "beam"; + $$ = b; } | BREATHE { $$ = new Breathing_sign_req; @@ -1143,7 +1115,6 @@ verbose_request: a->articulation_str_ = ly_scm2string ($2); a->set_spot (THIS->here_input ()); $$ = a; - } ; @@ -1417,17 +1388,7 @@ simple_element: n->pitch_ = *$1; n->duration_ = *$4; - /* - URG, JUNKTHIS! - */ - if (THIS->chord_tremolo_type_i_) - { - if (n->duration_.plet_b ()) - // urg, burp. what nonsense / silly implementation - THIS->parser_error (_ ("can't put stem tremolo on tuplet")); - else - n->duration_.set_plet (1, 2); - } + n->cautionary_b_ = $3 % 2; n->forceacc_b_ = $2 % 2 || n->cautionary_b_; diff --git a/lily/repeated-music.cc b/lily/repeated-music.cc index 2ff126ea33..bf6b9908d5 100644 --- a/lily/repeated-music.cc +++ b/lily/repeated-music.cc @@ -112,23 +112,21 @@ Repeated_music::alternatives_length_mom () const } Moment -Repeated_music::length_mom () const +Repeated_music::body_length_mom () const { - Moment m =0; - if (fold_b_) - { - if (repeat_body_p_) - m += repeat_body_p_->length_mom (); - } - else + Moment m = 0; + if (repeat_body_p_) { - Moment beg = (repeat_body_p_) ? repeat_body_p_->length_mom () : Rational(0); - if (!volta_fold_b_) - beg *= Rational (repeats_i_); - m += beg; + m = repeat_body_p_->length_mom (); + if (!fold_b_ && !volta_fold_b_) + m *= Rational (repeats_i_); } - - m += alternatives_length_mom (); return m; } +Moment +Repeated_music::length_mom () const +{ + return body_length_mom () + alternatives_length_mom (); +} + diff --git a/lily/span-score-bar-engraver.cc b/lily/span-score-bar-engraver.cc index 4e717788a0..dc71a0ea17 100644 --- a/lily/span-score-bar-engraver.cc +++ b/lily/span-score-bar-engraver.cc @@ -57,6 +57,10 @@ void Staff_group_bar_engraver::acknowledge_element (Score_element_info i) { Base_span_bar_engraver::acknowledge_element (i); + + /* + UGH. This has to go into the backend. + */ if (Span_bar * b = dynamic_cast (i.elem_l_)) { SCM gl = b->get_elt_property ("glyph"); diff --git a/lily/timing-engraver.cc b/lily/timing-engraver.cc index f74a9be590..c88e521412 100644 --- a/lily/timing-engraver.cc +++ b/lily/timing-engraver.cc @@ -12,11 +12,8 @@ #include "score-element-info.hh" #include "multi-measure-rest.hh" - - ADD_THIS_TRANSLATOR(Timing_engraver); - void Timing_engraver::do_post_move_processing( ) { diff --git a/lily/timing-translator.cc b/lily/timing-translator.cc index 4ef6f4df26..9cec28f42b 100644 --- a/lily/timing-translator.cc +++ b/lily/timing-translator.cc @@ -14,6 +14,11 @@ #include "global-translator.hh" #include "multi-measure-rest.hh" +/* + TODO: change the rest of lily, so communication with + Timing_translator is only done through properties. This means the + class declaration can go here. */ + bool Timing_translator::do_try_music (Music*r) { diff --git a/ly/engraver.ly b/ly/engraver.ly index 571ca885ed..8e6f1f58b3 100644 --- a/ly/engraver.ly +++ b/ly/engraver.ly @@ -134,8 +134,8 @@ VoiceContext = \translator { \consists "Beam_engraver"; \consists "Auto_beam_engraver"; \include "auto-beam-settings.ly"; - \consists "Chord_tremolo_engraver"; + \consists "Chord_tremolo_engraver"; \consists "Melisma_engraver"; textScriptPadding = #3.0 \consists "Text_engraver"; @@ -254,7 +254,7 @@ LyricsVoiceContext= \translator{ LyricsContext = \translator { \type "Engraver_group_engraver"; \name Lyrics; - \consists Vertical_align_engraver;%need this for getting folded repeats right. + \consists Vertical_align_engraver; %need this for getting folded repeats right. Generic_property_list = #generic-lyrics-properties \consists "Property_engraver"; \consistsend "Axis_group_engraver"; diff --git a/ly/init.sly b/ly/init.sly index afe59cc20e..294bdad3bd 100644 --- a/ly/init.sly +++ b/ly/init.sly @@ -10,7 +10,7 @@ \maininput } \paper { - linewidth=-1.0; + % indent = 0.0; } \midi{ }