From c4621aa165c30daf7f893148628d747ca2b7fd7e Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Thu, 24 Apr 1997 15:32:05 +0200 Subject: [PATCH] release: 0.0.56 --- .version | 4 +- ANNOUNCE | 2 +- AUTHORS.text | 2 +- Documentation/CodingStyle.pod | 6 + Documentation/faq.pod | 9 +- Documentation/language.pod | 2 - INSTALL.text | 8 +- NEWS | 11 ++ README | 2 - TODO | 21 ++-- bin/convert-mudela | 78 ++++++++---- bin/release | 20 ++- input/martien.ly | 31 +++-- input/mlvio2.ly | 2 +- input/scsii-menuetto.ly | 5 +- input/standchen.ly | 115 ++++++++++-------- input/twinkle.ly | 1 + lily/beam.cc | 50 ++++---- lily/collision.cc | 31 +---- lily/head-reg.cc | 2 +- lily/include/collision.hh | 2 +- lily/include/lily-proto.hh | 5 +- lily/include/note-column-reg.hh | 9 +- lily/include/note-column.hh | 22 ++-- lily/include/notehead.hh | 13 +- lily/include/rest-collision-reg.hh | 26 ++++ lily/include/rest-collision.hh | 26 ++++ lily/include/rest-column.hh | 28 +++++ lily/include/script-column.hh | 33 +++++ lily/include/staff-elem.hh | 1 + lily/include/stem.hh | 66 ++++++---- lily/include/voice-element.hh | 1 + lily/input-register.cc | 4 +- lily/midi-item.cc | 4 + lily/midi-walker.cc | 4 +- lily/my-lily-parser.cc | 10 +- lily/note-column-reg.cc | 68 +++++++++-- lily/note-column.cc | 123 +------------------ lily/notehead.cc | 50 ++++---- lily/parser.y | 1 + lily/pulk-voice.cc | 4 +- lily/register.cc | 4 +- lily/rest-collision-reg.cc | 44 +++++++ lily/rest-collision.cc | 58 +++++++++ lily/rest-column.cc | 27 +++++ lily/script-column.cc | 106 ++++++++++++++++ lily/script-reg.cc | 1 + lily/slur.cc | 22 ++-- lily/staff-elem.cc | 14 ++- lily/staff-regs.cc | 4 +- lily/staff-side.cc | 4 +- lily/stem-beam-reg.cc | 12 +- lily/stem.cc | 189 ++++++++++++++++++----------- lily/symbol.cc | 4 +- lily/voice-element.cc | 7 +- lily/walk-regs.cc | 4 +- make/Rules.make | 2 +- make/Targets.make | 9 +- make/lilypond.lsm | 4 +- make/lilypond.spec | 4 +- 60 files changed, 933 insertions(+), 488 deletions(-) create mode 100644 lily/include/rest-collision-reg.hh create mode 100644 lily/include/rest-collision.hh create mode 100644 lily/include/rest-column.hh create mode 100644 lily/include/script-column.hh create mode 100644 lily/rest-collision-reg.cc create mode 100644 lily/rest-collision.cc create mode 100644 lily/rest-column.cc create mode 100644 lily/script-column.cc diff --git a/.version b/.version index aa37e9bbac..632e299ef8 100644 --- a/.version +++ b/.version @@ -1,7 +1,7 @@ TOPLEVEL_MAJOR_VERSION = 0 TOPLEVEL_MINOR_VERSION = 0 -TOPLEVEL_PATCH_LEVEL = 55 +TOPLEVEL_PATCH_LEVEL = 56 # use to send patches, always empty for released version: # include separator: ".postfix", "-pl" makes rpm barf -TOPLEVEL_MY_PATCH_LEVEL = +TOPLEVEL_MY_PATCH_LEVEL = diff --git a/ANNOUNCE b/ANNOUNCE index 5e446d8f0f..42e9686124 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -74,7 +74,7 @@ dynamics (both absolute and hairpin style) clef changes, meter changes, cadenza-mode, key changes, repeat bars -[Kudos to FSF, all linux hackers, and --of course-- especially +[Kudos to the FSF, all linux hackers, and --of course-- especially GrandMaster Linus T, for the OS and The Announce :-] Han-Wen Nienhuys diff --git a/AUTHORS.text b/AUTHORS.text index fd9add63fc..76413dec6f 100644 --- a/AUTHORS.text +++ b/AUTHORS.text @@ -61,6 +61,6 @@ DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN -19/Apr/97 LilyPond 0.0.53 1 +19/Apr/97 LilyPond 0.0.55 1 diff --git a/Documentation/CodingStyle.pod b/Documentation/CodingStyle.pod index 9f13c7bbd3..1a4b1263d4 100644 --- a/Documentation/CodingStyle.pod +++ b/Documentation/CodingStyle.pod @@ -59,7 +59,13 @@ in emacs: '(lambda() (c-set-style "Stroustrup") ) ) +If you like using font-lock, you can also add this to your F<.emacs>: + (setq font-lock-maximum-decoration t) + (setq c++-font-lock-keywords-3 + (cons + '("\\b\\([a-zA-Z_]+_\\)\\b" 1 font-lock-variable-name-face) + c++-font-lock-keywords-3)) =head2 CLASSES and TYPES: diff --git a/Documentation/faq.pod b/Documentation/faq.pod index 70162a6095..3b33cf79b5 100644 --- a/Documentation/faq.pod +++ b/Documentation/faq.pod @@ -100,25 +100,28 @@ saves us a I of trouble. GNU LilyPond and FlowerLib use: =over 4 =item * + builtin bool =item * + 64 bit integral type long long =item * + typeof =item * + operator ? =item * + the new for-scope =item * -class Rational (libg++) -=item * -named return values +class Rational (libg++) =back diff --git a/Documentation/language.pod b/Documentation/language.pod index 0961c0aeaa..3139429302 100644 --- a/Documentation/language.pod +++ b/Documentation/language.pod @@ -92,8 +92,6 @@ abbrev: c4=16 (heu, =?), plet === midi-note: c4*2/3; c4*385/384, -=back - =item * drop \music, diff --git a/INSTALL.text b/INSTALL.text index 17819376c6..11cb0cd473 100644 --- a/INSTALL.text +++ b/INSTALL.text @@ -61,7 +61,7 @@ CCCCOOOONNNNFFFFIIIIGGGGUUUURRRRIIIINNNNGGGG a -22/Apr/97 LilyPond 0.0.54 1 +22/Apr/97 LilyPond 0.0.56 1 @@ -127,7 +127,7 @@ INSTALL(1) LilyPond documentation INSTALL(1) -22/Apr/97 LilyPond 0.0.54 2 +22/Apr/97 LilyPond 0.0.56 2 @@ -193,7 +193,7 @@ RRRREEEEDDDDHHHHAAAATTTT LLLLIIIINNNNUUUUXXXX -22/Apr/97 LilyPond 0.0.54 3 +22/Apr/97 LilyPond 0.0.56 3 @@ -259,6 +259,6 @@ AAAAUUUUTTTTHHHHOOOORRRRSSSS -22/Apr/97 LilyPond 0.0.54 4 +22/Apr/97 LilyPond 0.0.56 4 diff --git a/NEWS b/NEWS index 8497bd8fe3..dc064446d5 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,14 @@ +pl 56 + - Massive Rest/Stem/Collision/Note_column rewrite: resolve +notehead/rest ambiguities and bugs. eg, [c8 r8 c8] + +pl 54.jnc1 + - standchen.ly: repeats; lyricii to end + - convert-mudela: help + usage + - fixed midi key/meter-change (triggered by martien.ly) bug + +****** +April 23 pl 55 - staff-side robustification - script-on-rest bug diff --git a/README b/README index 9042e4f255..416108902b 100644 --- a/README +++ b/README @@ -33,5 +33,3 @@ me, Have fun! -====================== - diff --git a/TODO b/TODO index a08cea7fb2..d34d6b91c4 100644 --- a/TODO +++ b/TODO @@ -1,12 +1,6 @@ IMPORTANT - * resolve notehead/rest ambiguities and bugs. [HWN] - eg, [c8 r8 c8] - - * mi2mu man page - * use Real for y positions. - * update 20 pt table * rename mf fonts to avoid conflicts with musixtex @@ -67,6 +61,8 @@ FURTHER FOR ORCHESTRAL SCORE: * abbreviations c4=16 + * doublebar "||", finishbar "|||" (or "||." ?) + INPUTLANGUAGE * relative mode for pitch entering @@ -85,7 +81,9 @@ INPUTLANGUAGE SMALLISH PROJECTS - * use rest size in Collision + * write Rest_collision + + * use Real for y positions. * bugreport to doc++ devel: struct not in class hier; public virtual baseclasses @@ -108,6 +106,8 @@ SMALLISH PROJECTS * caching breakpoints / saving them. + * hack ElectricFence to use with LD_PRELOAD + * use dstream feature in mi2mu * qtor, btor, mtor-> tor( QUIET_ver ), tor( DEBUG_ver ), etc. @@ -259,3 +259,10 @@ IDEAS * breath marks * used fixedpoint arithmetic for min. energy. + + * default convert mudela-file.ly -> mudela-file.tex + - move test.tex: '\include lilyponddefs' -> + mudela-file.ly: '\texinclude "lilyponddefs";' + (junking test.tex and latex.test) + - rename {standchen,scsii-menuetto,...}.tex + diff --git a/bin/convert-mudela b/bin/convert-mudela index e4a8af3013..d879a5c1b0 100755 --- a/bin/convert-mudela +++ b/bin/convert-mudela @@ -1,12 +1,16 @@ #!/usr/bin/perl -w +# +# version of "supporting" engine, not mudela conversions. +# + +$convert_mudela_version = "0.1"; use Getopt::Long; -sub - version_string_conv +sub version_string_conv { my ($from_version, $to_version) = @_; s/\version \"0.0.$from_version\"/\version \"0.0.$to_version\"/g; @@ -14,41 +18,58 @@ sub ################################################################ -sub - conv_pl0_0_50_pl0_0_52 +sub no_conv { - } - -sub conv_pl52_pl53 + +sub convert_0_0_52_to_0_0_53 { s/include \"/$1\\include \"/g; } -sub conv_pl53_pl54 + +sub convert_0_0_53_to_0_0_54 { print STDERR "Not smart enough to convert \\transpose\n" if (/\\transpose/) ; } ############################################################### - - - - -sub usage +sub last_conversion { - print STDERR "Usage: convert-mudela\n"; - print STDERR "other options: --edit --output=FILE --show-rules\n"; - exit 2; + my @v = &versions; + return pop @v; } +sub identify +{ + print STDERR "This is convert-mudela " . $convert_mudela_version . + " (up to mudela version 0.0.", last_conversion, ")\n"; +} + + + sub usage + { + print STDERR "Usage: convert-mudela [options] [mudela-file]...\n" + . "Convert old mudela source from mudela-file or stdin\n\n" + . "Options:\n" + . " -e, --edit perform in-place conversion\n" + . " -f, --from=PATHLEVEL use source version 0.0.PATCHLEVEL\n" + . " -h, --help print this help\n" + . " -o, --output=FILE name output file\n" + . " -s, --show-rules print all known conversion rules\n" + . " -t, --to=PATCHLEVEL convert to version 0.0.PATCHLEVEL\n" + } + +# beware of the year 2000 my %minor_conversions = (50 => \&no_conv, - 52 => \&conv_pl0_0_50_pl0_0_52, - 53 => \&conv_pl52_pl53, - 54 => \&conv_pl53_pl54 - ); + 52 => \&convert_0_0_50_to_0_0_52, + 53 => \&convert_0_0_52_to_0_0_53, + 54 => \&convert_0_0_53_to_0_0_54 + ); + + sub versions { return (sort keys %minor_conversions); @@ -133,7 +154,7 @@ sub set_files $outfile = "$infile.NEW"; $infile = "$infile"; } - print STDERR "Input $infile.. "; + print STDERR "Input ", (($infile eq "-") ?"STDIN" : $infile), " .. "; } @@ -148,8 +169,7 @@ sub do_one_arg ($from_version = get_auto_from $infile) unless defined($opt_from); return if (!defined($from_version)); - my @v = versions; - ($to_version = pop @v) unless (defined($opt_to)); + ($to_version = last_conversion) unless (defined($opt_to)); die "can't open \`$infile\'" unless open INLY,$infile ; @@ -165,7 +185,17 @@ sub do_one_arg } } -GetOptions ("output=s", "from=i", "to=i", "minor=i", "edit", "show-rules"); +## "main" + +identify; + +GetOptions ("help", "output=s", "from=i", "to=i", "minor=i", "edit", "show-rules"); + +if ($opt_help) { + usage(); + $opt_help = 0; # to extinguish typo check. + exit 0; +} if ($opt_show_rules) { show_rules ; diff --git a/bin/release b/bin/release index a9a70bbe73..4f38a8883e 100755 --- a/bin/release +++ b/bin/release @@ -32,12 +32,16 @@ heredir=`pwd` make dist; setversion LILYVER=$NEWVER -mv lilypond-$LILYVER.tar.gz ../releases + +tarball=lilypond-$LILYVER.tar.gz +patch=patch-$LILYVER.gz + +mv $tarball ../releases cd ../test $heredir/bin/make_patch $LASTVER $NEWVER lilypond gzip -f9 patch-$NEWVER -mv patch-$NEWVER.gz ../patches/ +mv $patch ../patches/ RPMS=`find ~/rpms/ -name lilypond-$NEWVER'*'rpm` rm *.rpm {lilypond,patch}-*.gz @@ -45,10 +49,14 @@ rm *.rpm {lilypond,patch}-*.gz if [ ! -z $RPMS ]; then ln $RPMS . fi -ln ../releases/lilypond-$NEWVER.tar.gz . -ln ../patches/patch-$NEWVER.gz . + +ln ../releases/$tarball . +ln ../patches/$patch . + -RPMS=`echo *.rpm` -tar cf updeet {lily,patch-}*.gz $RPMS +if [ ! -z $RPMS ]; then + RPMS=lilypond-$LILYVER-1.i386.rpm lilypond-$LILYVER-1.src.rpm +fi +tar cf updeet $tarball $patch $RPMS tar tfv updeet diff --git a/input/martien.ly b/input/martien.ly index 8f117dc2d3..cdc617cebb 100644 --- a/input/martien.ly +++ b/input/martien.ly @@ -1,4 +1,3 @@ -%% BUG in MIDI! % % Viola Quartet % Martien Lohman (194x-????) @@ -13,17 +12,17 @@ % \barnumbering5 % \barnumberstyle\boxed -globalmusic= \melodic{ - \meter 2/4; -% \key fis - \skip 2*56; -% \key bes es as - \skip 2*8; - \meter 6/8; - \skip 8*48; - \meter 2/4; - \skip 2*16; -% \key fis +commands = \melodic{ + \meter 2/4; +% \key fis + \skip 2*56; +% \key bes es as + \skip 2*8; + \meter 6/8; + \skip 8*48; + \meter 2/4; + \skip 2*16; +% \key fis } \include "mlalt.ly" @@ -32,10 +31,10 @@ globalmusic= \melodic{ \include "mlcello.ly" \score{ - \staff{ melodicregs globalmusic alto } - \staff{melodicregs globalmusic violinI } - \staff{ melodicregs globalmusic violinII } - \staff{ melodicregs globalmusic cello } + \staff{ melodicregs commands alto } + \staff{ melodicregs commands violinI } + \staff{ melodicregs commands violinII } + \staff{ melodicregs commands cello } \paper{ \unitspace 24\mm \width 195\mm diff --git a/input/mlvio2.ly b/input/mlvio2.ly index 8a0ada446a..71a6ca9d9a 100644 --- a/input/mlvio2.ly +++ b/input/mlvio2.ly @@ -208,7 +208,7 @@ violinII = \melodic { %86 ges | %87 -% = g | + g! | %88 \textstyle "italic"; fis_"dacapo" \key fis;| diff --git a/input/scsii-menuetto.ly b/input/scsii-menuetto.ly index cc3f3636fb..b665c77a7c 100644 --- a/input/scsii-menuetto.ly +++ b/input/scsii-menuetto.ly @@ -83,7 +83,10 @@ ii_menuetto = \melodic{ %%20 < { [ c'( bes a )bes g( )bes ] } { [ d ] } { [ g ] } > | %%21 - < \multivoice {\stem 1; d'4(\stem 1; ) cis'4 d'4 } { \stem -1; g2 f4 } > | + < \multivoice + {\stem 1; d'4(\stem 1; ) cis'4 d'4 } + { \stem -1; g2 f4 } + > | %%22 < { [ g( )f g e ] } { [ cis ] } > < f4 d4 > | %%23 diff --git a/input/standchen.ly b/input/standchen.ly index e545dd011c..7d9d9c7378 100644 --- a/input/standchen.ly +++ b/input/standchen.ly @@ -11,66 +11,78 @@ % \version "0.0.54"; -melodie = \melodic{ - \meter 3/4 ; +commands = \melodic{ + \skip 2.*4; + \bar ":|"; + \skip 2.*24; +% volta1 + \skip 2.*8; +% volta2 + \bar ":|"; + \skip 2.*22; + \bar "||"; + } + +melodie = \melodic{ + \meter 3/4; \clef\violin; - \key bes ; - \octave c' ; - \duration 8 ; + \key bes; + \octave c'; + \duration 8; r \pp < [ d 'a-| > f-| < d 'a-| > f-| < d 'a-| ] > | %%2 r < [ d 'bes-| > f-| < d 'bes-| > f-| < d 'bes-| ] > | %%3 \textstyle "italic"; r_"simile" < [ d 'bes > e < d 'bes > e < d 'bes ] >| - \textstyle "roman" ; + \textstyle "roman"; %%4 r < [ 'a cis > e < 'a cis > e < 'a cis ] > | %%5 - [ a()bes a ]2/3 d'4. a | + [ a()bes a ]2/3 d'4. a | %%6 - [ g()a g ]2/3 d'4 g r | + [ g()a g ]2/3 d'4 g r | %%7 - a4.^> g [ g()f e ]2/3 | + a4.^> g [ g()f e ]2/3 | %%8 f2 r4 | %%9 - < { a'4.( )g' [ g'( f' )e' ]2/3 } - { cis'4. e'_"dolce" \plet 2/3 ; e' \plet 1/1 ; } > | + < { a'4.( )g' [ g'( f' )e' ]2/3 } + { cis'4. e'_"dolce" \plet 2/3; e' \plet 1/1; } > | %%10 < f'2. d'2. > | %%11 - [ a (\pp )bes a ]2/3 f'4. a | + [ a (\pp )bes a ]2/3 f'4. a | %%12 - [ g( ) a g ]2/3 e'4. d' | + [ g( ) a g ]2/3 e'4. d' | %%13 - c'4. bes [ bes( ) a g ]2/3 | + c'4. bes [ bes( ) a g ]2/3 | %%14 a2 r - < { d'( | )c'4. g [ bes a g ]2/3 } - { f \p ( | )e4._"dolce" bes - \plet 2/3 ; g - \plet 1/1 ; + < { d'( | )c'4. g [ bes a g ]2/3 } + { f \p ( | )e4._"dolce" bes + \plet 2/3; g + \plet 1/1; } > | %%16 < a2. f2. > | %%17 \textstyle "italic"; [ a8._"cresc." cis'16 ] f'4. e' - \textstyle "roman" ;| + \textstyle "roman";| %%18 [ d'8. a16 ] f4. d | %%19 %#% c'\grace\stemup - [ bes (\pp ) a bes ]2/3 d'4. bes | + [ bes (\pp ) a bes ]2/3 d'4. bes | %%20 a2. | %%21 %#% a\grace - [ g( )fis g ]2/3 bes4.^> g | + [ g( )fis g ]2/3 bes4.^> g | %%22 f!2. | %%23 @@ -87,12 +99,12 @@ melodie = \melodic{ < d'2. fis2. > | %#%\volta1 %%29 - < { bes2( [ d'8.( ))g16 ] } + < { bes2( [ d'8.( ))g16 ] } { g2 \mf [ bes8. bes16 ] } > | %%30 < { a4. [ a-. a-. a-. ] } { fis4. [ fis-.( fis-. )fis-. ] } > | -%%31 +%%31 < { a4. [ a-. a-. a-. ] } { g4. [ cis-.( e-. )g-. ] } > | %%32 @@ -119,7 +131,7 @@ melodie = \melodic{ %%40 cis'2 r4 | %%41 - < fis'4. \> cis'4. \f > e' [ e'( )d' \! cis' ]2/3 | + < fis'4. \> cis'4. \f > e' [ e'( )d' \! cis' ]2/3 | %%42 [ b8. cis'16 ] d'4^> b r | %%43 @@ -128,16 +140,16 @@ melodie = \melodic{ %%44 [ b8. \> cis'16 ] d'4^> b \! r | %%45 - [ b \p ( )ais b ]2/3 d'4. b | + [ b \p ( )ais b ]2/3 d'4. b | %%46 | %%47 - [ e' \f( )dis' e' ]2/3 g'4.^> cis' | + [ e' \f( )dis' e' ]2/3 g'4.^> cis' | %%48 \textstyle "italic"; < { fis2.( \group "+1"; \stem -1; )f2. } - { d'2. ( \stem 1 ; )d'4 r4_"decresc." d'4 } + { d'2. ( \stem 1; )d'4 r4_"decresc." d'4 } > \textstyle "roman"; | %%50 @@ -170,7 +182,7 @@ begeleiding = \melodic{ \meter 3/4; \clef\bass; \key bes; - \octave c' ; + \octave c'; \duration 2; 'd r4 | %%2 @@ -182,8 +194,8 @@ begeleiding = \melodic{ %%4 ''a r4 | %%5 -\duration 8 ; - < \multivoice { \stem 1 ; +\duration 8; + < \multivoice { \stem 1; [ 'f 'a d 'a d 'a ] [ 'd 'e 'g 'e 'g 'e ] [ 'cis 'e 'g 'e 'g e ] @@ -201,7 +213,7 @@ begeleiding = \melodic{ [ 'd 'a d 'a d 'a ] | %%11 < \multivoice - { \stem 1 ; + { \stem 1; [ 'f 'a d 'a d 'a ] [ 'd 'e 'g 'e 'g 'e ] [ 'e 'g 'bes 'g 'bes 'g ] @@ -219,7 +231,7 @@ begeleiding = \melodic{ < \multivoice { \stem 1; [ ''a 'e 'g 'e 'g 'e ][ 'd 'a d 'a d 'a ] - [ ''bes 'f 'bes 'f 'bes 'f ][ ''f 'c 'f 'c 'f 'c ] } + [ ''bes 'f 'bes 'f 'bes 'f ][ ''f 'c 'f 'c 'f 'c ] } { \stem -1; ''a2 r4 'd2 r4 @@ -268,11 +280,11 @@ begeleiding = \melodic{ %%37 [ ''a 'e 'g 'e ''bes^> 'e ] | %%38 - [ ''a < e cis 'a > < e cis 'a > < e cis 'a > < e cis 'a > < e cis 'a ] > | + [ ''a < e cis 'a > < e cis 'a > < e cis 'a > < e cis 'a > < e cis 'a ] > | %%39 [ ''a 'e 'g 'e ''bes^> 'e ] | %%40 - [ ''a < e cis 'a > < e cis 'a > < e cis 'a > < e cis 'a > < e cis 'a ] > | + [ ''a < e cis 'a > < e cis 'a > < e cis 'a > < e cis 'a > < e cis 'a ] > | %%41 [ ''ais 'e 'fis 'e 'fis 'e ] | %%42 @@ -319,7 +331,7 @@ begeleiding = \melodic{ tekstI = \lyric{ - \meter 3/4 ; + \meter 3/4; \duration 4; _ _ _ _ _ _ @@ -329,7 +341,7 @@ tekstI = \lyric{ [ Lei- se8 ]2/3 fleh-4. en8 [ mei- ne8 ]2/3 Lie- der8 _8 Durch4. die8 [ Nacht zu8 ]2/3 - dir;2 _ + dir;2 _ _ _ _ _ _ _ % 11 @@ -367,7 +379,7 @@ tekstI = \lyric{ % 37 La\ss8. auch16 dir8. die16 Brust8. be-16 we- gen, _ - Lieb-4. chen,8 h\"o-8. re16 + Lieb-4. chen,8 h\"o-8. re16 mich!2 _ Be-8. bend16 harr' ich8 _8 dir8. ent-16 ge- gen!8 _8 @@ -386,7 +398,7 @@ tekstI = \lyric{ } tekstII = \lyric{ - \meter 3/4; + \meter 3/4; \duration 4; _ _ _ _ _ _ @@ -423,7 +435,6 @@ tekstII = \lyric{ Herz.2. _ _ _ _ _ _ - % volta 1 % 29 _ _ _ _ _ _ @@ -433,19 +444,19 @@ tekstII = \lyric{ % volta 2 % 37 -% _ _ _ _ _ _ -% _ _ _ _ _ _ -% _ _ _ _ _ _ -% _ _ _ _ _ _ -% _ _ _ _ _ _ + _ _ _ _ _ _ + _ _ _ _ _ _ + _ _ _ _ _ _ + _ _ _ _ _ _ + _ _ _ _ _ _ % 47 -% _ _ _ _ _ _ -% _ _ _ _ _ _ -% _ _ _ _ _ _ -% _ _ _ _ _ _ -% _ _ _ _ _ _ + _ _ _ _ _ _ + _ _ _ _ _ _ + _ _ _ _ _ _ + _ _ _ _ _ _ + _ _ _ _ _ _ % 57 -% _ _ _ _ _ _ + _ _ _ _ _ _ } @@ -453,8 +464,8 @@ tekstII = \lyric{ \staff{ lyricregs tekstI } \staff{ lyricregs tekstII } - \staff{ melodicregs melodie } - \staff{ melodicregs begeleiding } + \staff{ melodicregs melodie commands} + \staff{ melodicregs begeleiding commands } \paper{ \width 195\mm diff --git a/input/twinkle.ly b/input/twinkle.ly index 5d29a8ca98..3bbbaf2d92 100644 --- a/input/twinkle.ly +++ b/input/twinkle.ly @@ -6,6 +6,7 @@ melody = \melodic{ \clef\violin; + \octave c'; c4 c | g g | a a | g g | f f | e e | d d8.( e16 | )c2 | % :| diff --git a/lily/beam.cc b/lily/beam.cc index 389226fa71..ccf37114db 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -29,12 +29,11 @@ struct Stem_info { Stem_info::Stem_info(Stem const *s) { - x = s->hindex(); + x = s->hpos_f(); int dir = s->dir_i_; - idealy = max(dir*s->top, dir*s->bot); - miny = max(dir*s->minnote, dir*s-> maxnote); + idealy = dir * s->stem_end_f(); + miny = dir * s->stem_start_f(); assert(miny <= idealy); - } /* *************** */ @@ -60,7 +59,7 @@ Beam::add(Stem*s) { stems.bottom().add(s); s->add_dependency(this); - s->print_flag = false; + s->print_flag_b_ = false; } void @@ -87,6 +86,9 @@ Beam::solve_slope() Array sinfo; for (iter_top(stems,i); i.ok(); i++) { i->set_default_extents(); + if (i->invisible_b()) + continue; + Stem_info info(i); sinfo.push(info); } @@ -120,9 +122,9 @@ void Beam::set_stemlens() { iter_top(stems,s); - Real x0 = s->hindex(); + Real x0 = s->hpos_f(); for (; s.ok() ; s++) { - Real x = s->hindex()-x0; + Real x = s->hpos_f()-x0; s->set_stemend(left_pos + slope * x); } } @@ -149,7 +151,7 @@ Beam::set_grouping(Rhythmic_grouping def, Rhythmic_grouping cur) iter_top(stems,s); Array flags; for (; s.ok(); s++) { - int f = intlog2(abs(s->flag))-2; + int f = intlog2(abs(s->flag_i_))-2; assert(f>0); flags.push(f); } @@ -162,8 +164,8 @@ Beam::set_grouping(Rhythmic_grouping def, Rhythmic_grouping cur) iter_top(stems,s); for (int i=0; i < b.size() && s.ok(); i+=2, s++) { - s->beams_left = b[i]; - s->beams_right = b[i+1]; + s->beams_left_i_ = b[i]; + s->beams_right_i_ = b[i+1]; } } @@ -193,8 +195,8 @@ Interval Beam::do_width() const { Beam * me = (Beam*) this; // ugh - return Interval( (*me->stems.top()) ->hindex(), - (*me->stems.bottom()) ->hindex() ); + return Interval( (*me->stems.top()) ->hpos_f(), + (*me->stems.bottom()) ->hpos_f() ); } /* @@ -203,8 +205,8 @@ Beam::do_width() const Molecule Beam::stem_beams(Stem *here, Stem *next, Stem *prev)const { - assert( !next || next->hindex() > here->hindex() ); - assert( !prev || prev->hindex() < here->hindex() ); + assert( !next || next->hpos_f() > here->hpos_f() ); + assert( !prev || prev->hpos_f() < here->hpos_f() ); Real dy=paper()->internote()*2; Real stemdx = paper()->rule_thickness(); Real sl = slope*paper()->internote(); @@ -215,9 +217,9 @@ Beam::stem_beams(Stem *here, Stem *next, Stem *prev)const /* half beams extending to the left. */ if (prev) { - int lhalfs= lhalfs = here->beams_left - prev->beams_right ; - int lwholebeams= here->beams_left beams_right ; - Real w = (here->hindex() - prev->hindex())/4; + int lhalfs= lhalfs = here->beams_left_i_ - prev->beams_right_i_ ; + int lwholebeams= here->beams_left_i_ beams_right_i_ ; + Real w = (here->hpos_f() - prev->hpos_f())/4; Symbol dummy; Atom a(dummy); if (lhalfs) // generates warnings if not @@ -231,10 +233,10 @@ Beam::stem_beams(Stem *here, Stem *next, Stem *prev)const } if (next){ - int rhalfs = here->beams_right - next->beams_left; - int rwholebeams = here->beams_right beams_left; + int rhalfs = here->beams_right_i_ - next->beams_left_i_; + int rwholebeams = here->beams_right_i_ beams_left_i_; - Real w = next->hindex() - here->hindex(); + Real w = next->hpos_f() - here->hpos_f(); Atom a = paper()->lookup_l()->beam(sl, w + stemdx); int j = 0; @@ -261,11 +263,12 @@ Beam::stem_beams(Stem *here, Stem *next, Stem *prev)const Molecule* -Beam::brew_molecule_p() const return out; +Beam::brew_molecule_p() const { + Molecule *out=0; Real inter=paper()->internote(); out = new Molecule; - Real x0 = stems.top()->hindex(); + Real x0 = stems.top()->hpos_f(); for (iter_top(stems,i); i.ok(); i++) { PCursor p(i-1); @@ -274,11 +277,12 @@ Beam::brew_molecule_p() const return out; Stem * next = n.ok() ? n.ptr() : 0; Molecule sb = stem_beams(i, next, prev); - Real x = i->hindex()-x0; + Real x = i->hpos_f()-x0; sb.translate(Offset(x, (x * slope + left_pos)* inter)); out->add(sb); } out->translate(Offset(x0 - left_col_l_->hpos,0)); + return out; } IMPLEMENT_STATIC_NAME(Beam); diff --git a/lily/collision.cc b/lily/collision.cc index 2fbb0d8018..53c64fed95 100644 --- a/lily/collision.cc +++ b/lily/collision.cc @@ -76,7 +76,6 @@ Collision::do_pre_processing() Note_column * col_l_a[4]; Real x_off [4]; int y_off[4]; - bool rest_b_a[4]; for (int j =0 ; j < 4; j++) { if (clash_group_arr_a[j].size()) @@ -88,7 +87,7 @@ Collision::do_pre_processing() y_extent[j] = col_l_a[j]->head_positions_interval(); } - rest_b_a[j] = (col_l_a[j]) ? col_l_a[j]->rest_b_ : false; + x_off [j] = 0.0; y_off[j] = 0; } @@ -97,28 +96,8 @@ Collision::do_pre_processing() x_off[idx(d, true)] = d*0.5; } while ((d *= -1) != 1); - do { - int i1 = idx(d, false); - int i2 = idx(d,true); - if (!intersection(y_extent[i1] , - y_extent[i2]).empty_b()) { - if (rest_b_a[i1]) { - y_off[i1] = -y_extent[i1][-d] + y_extent[1][d] + d*4; // ugh - y_extent[i1] += y_off[i1]; - } - } - } while ((d *= -1) != 1); + - do { - int i1 = idx(d, false); - int i2 = idx(-d,false); - - if (d*(y_extent[i1][-d] - y_extent[i2][d] )< 0&& rest_b_a[i1]) { - y_off[i1] = -y_extent[i1][-d] + y_extent[i2][d] +d* 4; // ugh - y_extent[i1] += y_off[i1]; - } - } while ((d *= -1) != 1); - Interval_t middle( y_extent[0].min(), y_extent[3].max()); Interval_t open_middle( y_extent[3].max()+1, y_extent[0].min()-1); do{ @@ -127,12 +106,10 @@ Collision::do_pre_processing() } while ((d *= -1) != 1); if (!middle.empty_b() && - middle.length() <= 1 && col_l_a[idx(1,0)] && col_l_a[idx(-1,0)] - && !rest_b_a[idx(1,0)] && !rest_b_a[idx(-1,0)]) { - + middle.length() <= 1 && col_l_a[idx(1,0)] && col_l_a[idx(-1,0)]) { Notehead * nu_l= col_l_a[idx(1,0)]->head_l_arr_[idx(1,0)]; Notehead * nd_l = col_l_a[idx(-1,0)]->head_l_arr_[idx(1,0)]; - if (! (nu_l->balltype == nd_l->balltype && nu_l->dots == nd_l->dots)) { + if (! (nu_l->balltype_i_ == nd_l->balltype_i_ && nu_l->dots_i_ == nd_l->dots_i_)) { x_off[idx(1,0)] -= 0.5; x_off[1] -= 0.5; x_off[2] += 0.5; diff --git a/lily/head-reg.cc b/lily/head-reg.cc index a0a5676a74..5b1557ea78 100644 --- a/lily/head-reg.cc +++ b/lily/head-reg.cc @@ -38,7 +38,7 @@ Notehead_register::process_requests() n_p->set_rhythmic(note_req_l_->rhythmic()); if (note_req_l_->note()) { - n_p->position = note_req_l_->note()->height() + + n_p->position_i_ = note_req_l_->note()->height() + *get_staff_info().c0_position_i_l_; } else if (note_req_l_->rest()) { n_p->rest_b_ = true; diff --git a/lily/include/collision.hh b/lily/include/collision.hh index 844496a855..4d25f93c05 100644 --- a/lily/include/collision.hh +++ b/lily/include/collision.hh @@ -13,10 +13,10 @@ #include "item.hh" class Collision : public Item { - Array clash_l_arr_; protected: virtual void do_pre_processing(); public: + Array clash_l_arr_; NAME_MEMBERS(Collision); void add (Note_column*ncol_l); Collision(); diff --git a/lily/include/lily-proto.hh b/lily/include/lily-proto.hh index 7db99e41ca..8239946370 100644 --- a/lily/include/lily-proto.hh +++ b/lily/include/lily-proto.hh @@ -62,5 +62,8 @@ struct Note_column_register; struct Note_column; struct Staff_side; struct Staff_symbol; - +struct Script_column; +struct Rest_column; +struct Rest_collision_register; +struct Rest_collision; #endif // LILY_PROTO_HH diff --git a/lily/include/note-column-reg.hh b/lily/include/note-column-reg.hh index ddcbdae2f5..d052d04983 100644 --- a/lily/include/note-column-reg.hh +++ b/lily/include/note-column-reg.hh @@ -13,16 +13,23 @@ #include "register.hh" class Note_column_register :public Request_register { + Rest_column * rest_col_l(); + Note_column * note_col_l(); + + Array< Script * > script_l_arr_; + Stem * stem_l_; Note_column *ncol_p_; + Rest_column *restcol_p_; bool h_shift_b_; int dir_i_; + /* *************** */ bool acceptable_elem_b(Staff_elem const*)const; protected: virtual void set_feature(Feature); virtual void acknowledge_element(Staff_elem_info); virtual void pre_move_processing(); - + virtual void post_move_processing(); public: Note_column_register(); NAME_MEMBERS(Note_column_register); diff --git a/lily/include/note-column.hh b/lily/include/note-column.hh index b6562ed83b..e96ef11605 100644 --- a/lily/include/note-column.hh +++ b/lily/include/note-column.hh @@ -10,35 +10,29 @@ #ifndef NOTE_COLUMN_HH #define NOTE_COLUMN_HH #include "item.hh" -#include "interval.hh" +#include "script-column.hh" /** a struct for treating a group of noteheads (noteheads, stem (chord) and scripts ) as a single entity. */ -class Note_column : public Item { - virtual Interval do_height()const; - virtual void do_print() const ; - virtual void do_pre_processing(); - virtual Interval do_width()const; +class Note_column : public Script_column { public: bool h_shift_b_; - Stem * stem_l_; - Array