From c2eeafc72b47697c1b01530952875521a1f0dc81 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Wed, 23 Apr 1997 14:02:28 +0200 Subject: [PATCH] release: 0.0.55 --- .version | 2 +- AUTHORS.text | 2 +- Documentation/convert-mudela.pod | 7 +++ Documentation/mudela.pod | 93 +++++++++++++++++++++++--------- NEWS | 6 +++ TODO | 21 ++++++-- bin/convert-mudela | 86 +++++++++++++++++++---------- bin/show-latest | 0 init/symbol.ini | 2 +- input/cadenza.ly | 1 + input/collisions.ly | 1 + input/coriolan-alto.ly | 1 + input/error.ly | 2 +- input/kortjakje.ly | 2 +- input/maartje.ly | 2 +- input/scales.ly | 4 +- input/scsii-menuetto.ly | 2 +- input/standchen.ly | 2 +- input/wohltemperirt.ly | 2 +- lily/.version | 2 +- lily/include/input-music.hh | 2 +- lily/include/lyric-item.hh | 19 ------- lily/include/staff-side.hh | 8 +-- lily/include/text-item.hh | 1 + lily/lyric-item.cc | 26 --------- lily/lyric-register.cc | 7 +-- lily/note-column.cc | 8 +-- lily/parser.y | 55 +++++++++++-------- lily/script.cc | 3 +- lily/staff-side.cc | 50 +++++++++-------- lily/text-item.cc | 9 +++- make/Rules.make | 7 ++- make/lilypond.lsm | 6 +-- make/lilypond.spec | 4 +- mi2mu/lily-stream.cc | 1 + 35 files changed, 268 insertions(+), 178 deletions(-) mode change 100644 => 100755 bin/show-latest delete mode 100644 lily/include/lyric-item.hh delete mode 100644 lily/lyric-item.cc diff --git a/.version b/.version index 187deb764c..aa37e9bbac 100644 --- a/.version +++ b/.version @@ -1,6 +1,6 @@ TOPLEVEL_MAJOR_VERSION = 0 TOPLEVEL_MINOR_VERSION = 0 -TOPLEVEL_PATCH_LEVEL = 54 +TOPLEVEL_PATCH_LEVEL = 55 # use to send patches, always empty for released version: # include separator: ".postfix", "-pl" makes rpm barf diff --git a/AUTHORS.text b/AUTHORS.text index 0e38986625..fd9add63fc 100644 --- a/AUTHORS.text +++ b/AUTHORS.text @@ -61,6 +61,6 @@ DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN -21/Apr/97 LilyPond 0.0.54 1 +19/Apr/97 LilyPond 0.0.53 1 diff --git a/Documentation/convert-mudela.pod b/Documentation/convert-mudela.pod index 34e5bc8fa9..956c16bc9e 100644 --- a/Documentation/convert-mudela.pod +++ b/Documentation/convert-mudela.pod @@ -40,3 +40,10 @@ available version. =back +=head1 BUGS + +Not all language changes are handled. Multiple output options won't work + +=head1 AUTHOR + +Han-Wen Nienhuys diff --git a/Documentation/mudela.pod b/Documentation/mudela.pod index 7fb25b38a4..2b85a67b51 100644 --- a/Documentation/mudela.pod +++ b/Documentation/mudela.pod @@ -17,13 +17,15 @@ as from a musical performing point of view. The Musical Definition Language (Mudela) S, has a logical structure, making use of typing and naming (using identifiers), that -allows for flexible input, and definition reuse. +allows for flexible input, and definition reuse. See MANIFESTO for +reasons and design considerations. The below included for explanatory purposes only (i.e., for a complete and up-to-date definition, see F and F): As a related note, you should take a look at the examples and the init -file, as this document does not cover every aspect of mudela yet. +file, as this document does not cover every aspect of mudela yet, and +may be out of date. =head2 Files @@ -34,7 +36,7 @@ entering C at the start of a line: =head2 Comments -Line comments are introduced by a C<%> +Line comments are introduced by a C<%>. =head2 Versions @@ -45,6 +47,9 @@ inputfile was written, \version "0.0.50"; +A perl-script which tries to convert to newer versions +(F) is included in the LilyPond distribution. + =head2 Words Keywords are preceded by a backslash "\". They contain alphabetic @@ -173,7 +178,7 @@ another example: This is an A flat, (just below 110 Hz concert-pitch). The C<*2/3> signifies that this note is part of a triplet (3 in stead of 2). The -duration is one and a half quaver (C<4.>) times 2/3. +duration is one and a half quaver (C<4.>) times 2/3. Notenames are just a special kind of identifiers, and can be declared @@ -228,9 +233,10 @@ example: Please note that these two characters do I necessarrily nest, eg: [c8 e8(] [)g8 c'8] + [c8 c8 c8]2/3 % a triplet - -Symbols which can be put at either side of a staff are entered as follows: +Symbols which can be put at either side (above or below) of a staff +are entered as follows: a-^ % marcato, direction: default a^- % portato, direction: above note @@ -324,7 +330,20 @@ Mudela reads left to right, but you can still stack voices and Voice_elements which are produced in two directions: horizontal (voice like) and vertical (chord like) -You can start horizontal music by enclosing a sequence of notes with { and } +A sequence of notes (horizontal) is called simple horizontal, eg + + c4 c4 g4 g4 + + +You can also glue two pieces of simple horizontal music together with the +concatenation operator: + + horOne = \melodic { c c g g } + horTwo = \melodic { a a g2 } + twinkle = \melodic { \horOne ++ \horTwo } + +If you enclose simple horizontal music in braces ( { } ), then you get +horizontal music: { c c g g a a g2 } % twinkle twinkle @@ -347,21 +366,21 @@ The duration of a chord equals the union of the durations of each of its elements. The C<\multivoice> is a construct which is explained below. -You can also glue two horizontal pieces music together with -concatenation operator: - - \horOne = \melodic { c c g g } - \horTwo = \melodic { a a g2 } - \twinkle = \melodic { \horOne ++ \horTwo } =head2 Transposition You can transpose horizontal music in the following way: - \transpose { d % from c to d that's one octave up. - { e4 f4 } % the horizontal music + + \melodic { + c4 ++ \transpose { + d % from c to the d that's one octave down + { e4 f4 } % the horizontal music + } ++ g4 } +The result is, as you can see, simple horizontal music again + =head2 Rhythms Rhythms in Mudela are entered identical to Simple mudela. @@ -376,15 +395,21 @@ any optional multipliers/dots A meter has this form: - \meter { 3/4 } + \meter 3/4 ; Rhythmic grouping is a concept closely associated with this. For example, in a 5/8 meter, the counts are grouped 2+3. In mudela this is entered as - \grouping { 8*2 8*3 } + \grouping 8*2 8*3 ; +You can start the piece with a partial measure, the command takes the +same syntax as grouping: + \partial 16*3 4; + +Make the piece start with a partial measure [transl?] lasting 1 3/4 +quaver. =head1 STRUCTURE @@ -396,11 +421,10 @@ In concrete, a piece of Mudela has the following structure: % instantiate (=create tex, midi output) the score: \score{ - \staff{ melody } - \staff{ accompany } - \commands{ } + \staff{ melodicregs melody } + \staff{ melodicregs accompany } \midi{ } - \paper{ } } =head2 Examples @@ -464,12 +488,29 @@ In music typesetting, the user might want to cram a lot more symbols on the paper than actually fits. To reflect this idea (the user asks more than we can do), the container for this data is called Request. -A request is done to -the C which contains the C. The staff decides -whether to to honor the request, ignore it, or merge it with other -requests. Merging of requests is preferably done with other requests -done by members of the same voicegroups (beams, brackets, stems) +A request is done to the C which contains the +C. The staff decides whether to to honor the request, +ignore it, or merge it with other requests. Merging of requests is +preferably done with other requests done by members of the same +voicegroups (beams, brackets, stems) + +=head2 Staff + +The staff is a simple container (containing Voices). The so-called +"registers" determine the characteristics of the Staff. At this time, +LilyPond supports the following personalities: + +=over 4 + +=item melodicregs + +This makes the staff into a single five line melodic staff. + +=item lyricregs +This makes the staff into a staff which will only set Lyric_requests. + +=back =head1 HISTORY diff --git a/NEWS b/NEWS index 657fe561bc..8497bd8fe3 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,9 @@ +pl 55 + - staff-side robustification + - script-on-rest bug + - doc update + - transpose syntax + pl 54 - bugfix Colhpos.cc::OK assert fail. - Inclusion of MusixTeX MF files, diff --git a/TODO b/TODO index 53c2457685..a08cea7fb2 100644 --- a/TODO +++ b/TODO @@ -1,12 +1,19 @@ 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 * decent TeX page layout - * per-pstaff item-widths + * per-pstaff item-widths [JCN] * script priority @@ -16,7 +23,9 @@ IMPORTANT * check return status in make_website - * tutorial + * plet.ly + + * a Hands on tutorial [HKN] This is an assorted collection of stuff that will be done, might be done, or is an idea that I want to think about @@ -28,7 +37,10 @@ BUGS * detect -pipe - * redo timing stuff <-> pulk to allow \meter 2/4; e2. to work out correctly + * redo timing stuff <-> pulk to allow \meter 2/4; e2. to work + out correctly + + * key transposition. * hairpin width @@ -40,7 +52,6 @@ BUGS * lilypond - -> crash - * wohltemperirt.ly SEVERELY LACKING: diff --git a/bin/convert-mudela b/bin/convert-mudela index 2ead27d9b9..e4a8af3013 100755 --- a/bin/convert-mudela +++ b/bin/convert-mudela @@ -2,6 +2,9 @@ use Getopt::Long; + + + sub version_string_conv { @@ -16,12 +19,17 @@ sub { } + sub conv_pl52_pl53 { s/include \"/$1\\include \"/g; } +sub conv_pl53_pl54 +{ + print STDERR "Not smart enough to convert \\transpose\n" if (/\\transpose/) ; +} ############################################################### @@ -29,8 +37,7 @@ sub conv_pl52_pl53 -sub - usage +sub usage { print STDERR "Usage: convert-mudela\n"; print STDERR "other options: --edit --output=FILE --show-rules\n"; @@ -39,7 +46,8 @@ sub my %minor_conversions = (50 => \&no_conv, 52 => \&conv_pl0_0_50_pl0_0_52, - 53 => \&conv_pl52_pl53 + 53 => \&conv_pl52_pl53, + 54 => \&conv_pl53_pl54 ); sub versions { @@ -47,15 +55,13 @@ sub versions } -sub - show_rules +sub show_rules { print "Rules: ", join(", ", sort keys %minor_conversions), "\n"; } -sub - do_conversion +sub do_conversion { my ($from,$to) = @_; @@ -83,7 +89,8 @@ sub print OUTLY; } } -sub set_auto_from + +sub get_auto_from { my ($fn)=@_; my ($ver); @@ -97,7 +104,11 @@ sub set_auto_from last; } } - die "can't determine mudela version." unless (defined($ver)); + if (!defined($ver)){ + print STDERR "can't determine mudela version in $fn.\n"; + my $u; + return $u; + } $ver =~ s/0\.0\.// ; close INLY; return $ver; @@ -114,7 +125,7 @@ sub set_files } if (( ! -f $infile) && (! $infile =~ /\\.ly$/s ) ){ $infile .= ".ly"; - print STDERR "trying $infile"; + } if ($opt_edit && $infile ne "-") { @@ -122,6 +133,36 @@ sub set_files $outfile = "$infile.NEW"; $infile = "$infile"; } + print STDERR "Input $infile.. "; + +} + +sub do_one_arg +{ + set_files; + + local ($from_version, $to_version); + $from_version = $opt_from; + $to_version = $opt_to; + + ($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)); + + + die "can't open \`$infile\'" unless open INLY,$infile ; + die "can't open \`$outfile\'" unless open OUTLY, ">$outfile"; + + do_conversion $from_version, $to_version; + close INLY; + close OUTLY; + + if ($opt_edit) { + rename $infile, "$infile~"; + rename $outfile, "$infile"; + } } GetOptions ("output=s", "from=i", "to=i", "minor=i", "edit", "show-rules"); @@ -133,24 +174,13 @@ if ($opt_show_rules) { } local ( $infile,$outfile); -set_files; - - -($opt_from = set_auto_from $infile) unless defined($opt_from); - -my @v = versions; -($opt_to = pop @v) unless (defined($opt_to)); +my $processed_one=0; - -die "can't open \`$infile\'" unless open INLY,$infile ; -die "can't open \`$outfile\'" unless open OUTLY, ">$outfile"; - -do_conversion $opt_from, $opt_to; -close INLY; -close OUTLY; - -if ($opt_edit) { - rename $infile, "$infile~"; - rename $outfile, "$infile"; +while (defined($ARGV[0])) { + do_one_arg; + shift @ARGV; + $processed_one = 1; } +do_one_arg unless ($processed_one); + diff --git a/bin/show-latest b/bin/show-latest old mode 100644 new mode 100755 diff --git a/init/symbol.ini b/init/symbol.ini index 359bcd9855..91aad8cee5 100644 --- a/init/symbol.ini +++ b/init/symbol.ini @@ -1,4 +1,4 @@ -\version "0.0.53"; +\version "0.0.54"; \include "register.ini" \include "dynamic.ini" diff --git a/input/cadenza.ly b/input/cadenza.ly index c50d815ced..b8a31404d8 100644 --- a/input/cadenza.ly +++ b/input/cadenza.ly @@ -3,6 +3,7 @@ % % author: unknown. Copyright: none % +\version "0.0.54"; cad = \melodic { \cadenza 1; diff --git a/input/collisions.ly b/input/collisions.ly index 6cc9992383..333fd67e40 100644 --- a/input/collisions.ly +++ b/input/collisions.ly @@ -1,4 +1,5 @@ % test the Collision resolution +\version "0.0.54"; two_voice_steminvert = \melodic { < \multivoice diff --git a/input/coriolan-alto.ly b/input/coriolan-alto.ly index c2b8ed5da3..8e5d3b568e 100644 --- a/input/coriolan-alto.ly +++ b/input/coriolan-alto.ly @@ -10,6 +10,7 @@ % when lily can handle this, i-ll type the other 304 bars % (maybe even sooner :-) % +\version "0.0.54"; alto = \melodic{ diff --git a/input/error.ly b/input/error.ly index f5690f0c8a..9eeada0ea9 100644 --- a/input/error.ly +++ b/input/error.ly @@ -1,4 +1,4 @@ -\version "0.0.53"; +\version "0.0.54"; \include "this-is-hopefully-a-nonexisting-file" diff --git a/input/kortjakje.ly b/input/kortjakje.ly index 167236c1e9..31af298810 100644 --- a/input/kortjakje.ly +++ b/input/kortjakje.ly @@ -8,7 +8,7 @@ % copyright: None % % declare melody (which will be in *one* staff ) for the lead voice -\version "0.0.53"; +\version "0.0.54"; melodie = \melodic { % switch Lilypond in note-mode diff --git a/input/maartje.ly b/input/maartje.ly index bebe65d14f..5bcf7c303c 100644 --- a/input/maartje.ly +++ b/input/maartje.ly @@ -3,7 +3,7 @@ % COPYRIGHT: GPL % % -\version "0.0.53"; +\version "0.0.54"; globals=\melodic{ \meter 4/ 4; diff --git a/input/scales.ly b/input/scales.ly index 966cfbb3b3..54cb531859 100644 --- a/input/scales.ly +++ b/input/scales.ly @@ -13,7 +13,7 @@ blah = \staff{ melodicregs c d \clef "violin" ; \octave c' ; - < \transpose { d { e f } } > + ++ \transpose { d { e f } } ++ \octave c'' ; c d \duration 8 ; @@ -22,6 +22,7 @@ blah = \staff{ melodicregs \octave c' ; |[ a a a a a a a a \! a ]6/9 \octave c'' ; + ['c->-.-\fermata \< 'g->-.-\fermata d->-.-\fermata a->-.-\fermata e'->-.-\fermata b'-. f''-. c'''->-.-\fermata \! g'''->-.-\fermata \> ]6/9 [g'''->-.-\fermata c'''->-.-\fermata f''->-.-\fermata b'->-.-\fermata e'->-.-\fermata a->-.-\fermata d->-.-\fermata 'g->-.-\fermata \! 'c->-.-\fermata ]6/9 @@ -45,6 +46,7 @@ blah = \staff{ melodicregs c1 \duration 8; + r8-"text" r8^. r8_. r8 r8 r8 r8 r8 [c-> d-> e-> f->][g-> a-> b-> c'->] % 1 \octave c'; [c'-^ b-^ a-^ g-^][f-^ e-^ d-^ c-^] \octave c; [c'-^ b-^ a-^ g-^][f-^ e-^ d-^ c-^] diff --git a/input/scsii-menuetto.ly b/input/scsii-menuetto.ly index b42f912ff9..cc3f3636fb 100644 --- a/input/scsii-menuetto.ly +++ b/input/scsii-menuetto.ly @@ -11,7 +11,7 @@ % The purpose of this file is to demonstrate features of LilyPond. % (there is an accompanying LaTeX file, scsii-menuetto.tex) % -\version "0.0.53"; +\version "0.0.54"; %% Stuff from MPP version % \lefttitle{Menuetto} % \tempo{Moderato} diff --git a/input/standchen.ly b/input/standchen.ly index 49b0cf6059..e545dd011c 100644 --- a/input/standchen.ly +++ b/input/standchen.ly @@ -9,7 +9,7 @@ % The purpose of this file is to demonstrate features of LilyPond. % (there is an accompanying LaTeX file, standchen.tex) % -\version "0.0.53"; +\version "0.0.54"; melodie = \melodic{ \meter 3/4 ; diff --git a/input/wohltemperirt.ly b/input/wohltemperirt.ly index 82659d3800..66c3ae015e 100644 --- a/input/wohltemperirt.ly +++ b/input/wohltemperirt.ly @@ -2,7 +2,7 @@ % % Public Domain -- typed by by HWN % -\version "0.0.53"; +\version "0.0.54"; global = \melodic{ \meter 4/4 ; diff --git a/lily/.version b/lily/.version index 99892df436..f50a4d2508 100644 --- a/lily/.version +++ b/lily/.version @@ -1,6 +1,6 @@ MAJOR_VERSION = 0 MINOR_VERSION = 0 -PATCH_LEVEL = 54 +PATCH_LEVEL = 55 # use to send patches, always empty for released version: # include separator: ".postfix", "-pl" makes rpm barf diff --git a/lily/include/input-music.hh b/lily/include/input-music.hh index 49e41d5729..7102ed35eb 100644 --- a/lily/include/input-music.hh +++ b/lily/include/input-music.hh @@ -71,7 +71,7 @@ struct Complex_music : Input_music { /* *************** */ virtual void transpose(Melodic_req const&) const ; virtual void set_default_group(String g); - void add(Input_music*); + void add(Input_music*inmusic_p); Complex_music(); Complex_music(Complex_music const &); virtual void print() const ; diff --git a/lily/include/lyric-item.hh b/lily/include/lyric-item.hh deleted file mode 100644 index a5dc27b67b..0000000000 --- a/lily/include/lyric-item.hh +++ /dev/null @@ -1,19 +0,0 @@ -// -// lyric-item.hh -- part of LilyPond -// -// copyright 1997 Jan Nieuwenhuizen - -#ifndef LYRIC_ITEM_HH -#define LYRIC_ITEM_HH - -#include "text-item.hh" - -struct Lyric_item : Text_item { - /* *************** */ - Lyric_item(Lyric_req* lreq_l, int voice_count_i); - virtual void do_pre_processing(); -}; - - -#endif // LYRIC_ITEM_HH // - diff --git a/lily/include/staff-side.hh b/lily/include/staff-side.hh index e24dfa62e6..1300871023 100644 --- a/lily/include/staff-side.hh +++ b/lily/include/staff-side.hh @@ -15,12 +15,14 @@ /// A symbol which sits along the staff class Staff_side { Array support_l_arr_; - - Staff_symbol * staff_sym_l_; + int staff_size_i_; Staff_elem * elem_l_; Interval support_height()const; + Staff_symbol* staff_sym_l_; + void read_staff_sym(); public: - /** + Real inter_f_; + /** Vertical dir of symbol relative to staff. -1 = below staff? */ int dir_i_; diff --git a/lily/include/text-item.hh b/lily/include/text-item.hh index bf40574946..d9ccb61c4b 100644 --- a/lily/include/text-item.hh +++ b/lily/include/text-item.hh @@ -32,6 +32,7 @@ protected: virtual void set_default_index(); Molecule* brew_molecule_p() const; virtual void do_post_processing(); + virtual void do_pre_processing(); }; diff --git a/lily/lyric-item.cc b/lily/lyric-item.cc deleted file mode 100644 index 3186523937..0000000000 --- a/lily/lyric-item.cc +++ /dev/null @@ -1,26 +0,0 @@ -#include "musical-request.hh" -#include "paper-def.hh" -#include "lyric-item.hh" -#include "stem.hh" -#include "molecule.hh" -#include "lookup.hh" -#include "text-def.hh" -#include "source-file.hh" -#include "source.hh" -#include "debug.hh" - -Lyric_item::Lyric_item(Lyric_req* lreq_l, int voice_count_i) - : Text_item(lreq_l) -{ - pos_i_ = -voice_count_i * 4 ; // 4 fontsize dependant. TODO - dir_i_ = -1; -} - -void -Lyric_item::do_pre_processing() -{ - - // test context-error - if ( tdef_l()->text_str_.index_i( "Gates" ) >=0)// :-) - tdef_l()->warning( "foul word"); -} diff --git a/lily/lyric-register.cc b/lily/lyric-register.cc index db86760cb4..9245e3ea36 100644 --- a/lily/lyric-register.cc +++ b/lily/lyric-register.cc @@ -8,8 +8,8 @@ #include "staff-walker.hh" #include "lyric-register.hh" -#include "lyric-item.hh" #include "musical-request.hh" +#include "text-item.hh" Lyric_register::Lyric_register() { @@ -30,9 +30,10 @@ Lyric_register::try_request(Request*r) void Lyric_register::process_requests() { - Lyric_item * last_item_l =0; + Text_item * last_item_l =0; for (int i=0; i < lreq_arr_.size(); i++) { - Lyric_item *lp = new Lyric_item(lreq_arr_[i],i); + Text_item *lp = new Text_item(lreq_arr_[i]); + lp->dir_i_ = -1; if (last_item_l) lp->add_support(last_item_l); last_item_l = lp; diff --git a/lily/note-column.cc b/lily/note-column.cc index 075e61d1ab..9dbc4f93dd 100644 --- a/lily/note-column.cc +++ b/lily/note-column.cc @@ -118,12 +118,13 @@ Note_column::do_pre_processing() top_head_l = bot_head_l; if (!bot_head_l) bot_head_l = top_head_l; - assert(bot_head_l && top_head_l); + //assert(bot_head_l && top_head_l); Item *support_l=top_head_l; int j; for (j = 0; j < 2; j++ ) { for (int i=0; i < placed_l_arr_a[j].size(); i++) { - placed_l_arr_a[j][i]->add_support(support_l); + if (support_l) + placed_l_arr_a[j][i]->add_support(support_l); support_l = placed_l_arr_a[j][i]; } } @@ -131,7 +132,8 @@ Note_column::do_pre_processing() support_l=bot_head_l; for (; j < 4; j++ ) { for (int i=0; i < placed_l_arr_a[j].size(); i++) { - placed_l_arr_a[j][i]->add_support(support_l); + if (support_l) + placed_l_arr_a[j][i]->add_support(support_l); support_l = placed_l_arr_a[j][i]; } } diff --git a/lily/parser.y b/lily/parser.y index fdde1c198e..ec5646b8d4 100644 --- a/lily/parser.y +++ b/lily/parser.y @@ -1,7 +1,7 @@ %{ // -*-Fundamental-*- #include -#define MUDELA_VERSION "0.0.53" +#define MUDELA_VERSION "0.0.54" #include "script-def.hh" #include "symtable.hh" @@ -190,8 +190,9 @@ yylex(YYSTYPE *s, void * v_l) %type midi_block midi_body %type duration_length %type init_music +%type simple_horizontal_music horizontal_music horizontal_music_body %type transposed_music_voice init_lyrics_voice -%type music_voice_body music_voice init_music_voice concat_body +%type music_voice_body init_music_voice %type paper_block paper_body %type dim real %type unit @@ -513,14 +514,15 @@ init_music: init_lyrics_voice: LYRIC { THIS->lexer_p_->push_lyric_state(); } - music_voice { $$ = $3; THIS->lexer_p_->pop_state(); } + horizontal_music { $$ = $3; THIS->lexer_p_->pop_state(); } ; init_music_voice: MELODIC { THIS->lexer_p_->push_note_state(); } - /* cont*/ music_voice + /* cont*/ horizontal_music { $$=$3; THIS->lexer_p_->pop_state(); } ; + init_music_chord: { THIS->lexer_p_->push_note_state(); } /* cont*/ music_chord @@ -530,37 +532,46 @@ init_music_chord: MUSIC */ - - -transposed_music_voice: - steno_melodic_req music_voice { +horizontal_music: + '{' horizontal_music_body '}' { $$ = $2; - $$->transpose(*$1); - delete $1; } ; -music_voice: '{' concat_body '}' { $$ = $2; } - | TRANSPOSE '{' transposed_music_voice '}' { - $$ = $3; +horizontal_music_body: + simple_horizontal_music { + $$ = $1; + } + | horizontal_music_body CONCAT simple_horizontal_music { + $$->add($3);/* niet echt */ } ; -concat_body: - music_voice_body { +simple_horizontal_music: + TRANSPOSE '{' transposed_music_voice '}' { + $$ = $3; + } + | VOICE_IDENTIFIER { + $$ = $1->mvoice(true); + } + | music_voice_body { $$ = $1; } - | concat_body CONCAT music_voice_body { - $$->add($3);/* niet echt */ + ; + + +transposed_music_voice: + steno_melodic_req horizontal_music { + $$ = $2; + $$->transpose(*$1); + delete $1; } ; + music_voice_body: - VOICE_IDENTIFIER { - $$ = $1->mvoice(true); - } - | /* */ { + /* */ { $$ = new Music_voice; } | music_voice_body full_element { @@ -592,7 +603,7 @@ music_chord_body: | MULTIVOICE { $$ = new Multi_voice_chord; } - | music_chord_body music_voice { + | music_chord_body horizontal_music { $$->add($2); } | music_chord_body full_element { diff --git a/lily/script.cc b/lily/script.cc index 2f471e6ef2..8a35f2ed89 100644 --- a/lily/script.cc +++ b/lily/script.cc @@ -74,7 +74,8 @@ Script::symbol()const void Script::do_pre_processing() { - set_default_dir(); + if (!dir_i_) + set_default_dir(); set_symdir(); } diff --git a/lily/staff-side.cc b/lily/staff-side.cc index 0bf26223ab..b9974b5b5a 100644 --- a/lily/staff-side.cc +++ b/lily/staff-side.cc @@ -6,6 +6,7 @@ (c) 1997 Han-Wen Nienhuys */ +#include "dimen.hh" #include "staff-side.hh" #include "staff-sym.hh" #include "debug.hh" @@ -18,18 +19,33 @@ Staff_side::set_staffsym(Staff_symbol* s_l) Staff_side::Staff_side(Staff_elem * elem_l) { + inter_f_ = 2 PT; + staff_size_i_ = 0; + staff_sym_l_=0; elem_l_ = elem_l; dir_i_ =0; - staff_sym_l_ =0; inside_staff_b_ =false; } +void +Staff_side::read_staff_sym() +{ + if (! staff_sym_l_) + return ; + inter_f_ = staff_sym_l_->inter_note_f(); + staff_size_i_ = staff_sym_l_->steps_i(); +} + Interval Staff_side::support_height() const return r; { + for (int i=0; i < support_l_arr_.size(); i++) r.unite(support_l_arr_[i]->height()); + if (r.empty_b()) { + r = Interval(0,0); + } } void @@ -42,45 +58,35 @@ Staff_side::add_support(Staff_elem*i) int Staff_side::get_position_i()const { - if (!staff_sym_l_) - return 0; + ((Staff_side*)this)->read_staff_sym(); if (!dir_i_) { - warning("Staff_side::get_position_i(): returning -20"); + warning("Staff_side::get_position_i(): " + "somebody forgot to set my vertical direction, returning -20"); return -20; } - Real inter_f = staff_sym_l_->inter_note_f(); - int staff_size_i = staff_sym_l_->steps_i(); + Real y=0; if (!inside_staff_b_) { - y = (dir_i_ > 0) ? staff_size_i + 2: -2; - y *=inter_f; + y = (dir_i_ > 0) ? staff_size_i_ + 2: -2; + y *=inter_f_; Interval v= support_height(); if (dir_i_ > 0) { - y = y >? (v.max() + 2*inter_f); + y = y >? (v.max() + 2*inter_f_); } else if (dir_i_ < 0) { - y = y inter_note_f(); - int i= get_position_i(); - return i+ int(rint(- sym_dim[dir_i_] / inter_f)); + return i+ int(rint(- sym_dim[dir_i_] / inter_f_)); } diff --git a/lily/text-item.cc b/lily/text-item.cc index e97c7357b3..9092be3259 100644 --- a/lily/text-item.cc +++ b/lily/text-item.cc @@ -54,11 +54,16 @@ Text_item::set_default_index() } void -Text_item::do_post_processing() +Text_item::do_pre_processing() { if (!dir_i_) dir_i_ = -1; - set_default_index(); +} + +void +Text_item::do_post_processing() +{ + set_default_index(); } diff --git a/make/Rules.make b/make/Rules.make index 1b01a3ed27..2e0b686e66 100644 --- a/make/Rules.make +++ b/make/Rules.make @@ -67,5 +67,10 @@ $(outdir)/%.1: %.pod # build and config stuff: (could make this generic default rule...) # %/.build: - echo 0 >$@ + echo 0 > $@ + + +%.text: check-doc-deps + rm -f $@ + ln `find ${depth}/Documentation -name $@|head -1` . diff --git a/make/lilypond.lsm b/make/lilypond.lsm index 0600cc065d..6989f8034a 100644 --- a/make/lilypond.lsm +++ b/make/lilypond.lsm @@ -2,8 +2,8 @@ Begin3 Title: LilyPond -Version: 0.0.54 -Entered-date: 04/22/97 +Version: 0.0.55 +Entered-date: 04/23/97 Description: LilyPond is a program which converts a music-script (mudela) into TeX output, or MIDI to produce multi-staff scores. Features include multiple meters, clefs, keys, lyrics, versatile input-language, cadenzas @@ -13,7 +13,7 @@ Author: hanwen@stack.nl (Han-Wen Nienhuys) jan@digicash.com (Jan Nieuwenhuizen) Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys) Primary-site: pcnov095.win.tue.nl /pub/lilypond/ - 300k lilypond-0.0.54.tar.gz + 300k lilypond-0.0.55.tar.gz Alternate-site: Original-site: Platform: unix/win32, GNU C++ diff --git a/make/lilypond.spec b/make/lilypond.spec index cc8fa318fb..980a4e3a4c 100644 --- a/make/lilypond.spec +++ b/make/lilypond.spec @@ -1,9 +1,9 @@ Name: lilypond -Version: 0.0.54 +Version: 0.0.55 Release: 1 Copyright: GPL Group: Applications/Publishing -Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.0.54.tar.gz +Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.0.55.tar.gz Summary: A preprocessor to make TeX typeset music. URL: http://www.stack.nl/~hanwen/lilypond Packager: Han-Wen Nienhuys diff --git a/mi2mu/lily-stream.cc b/mi2mu/lily-stream.cc index 8552c42267..ea80a4fd01 100644 --- a/mi2mu/lily-stream.cc +++ b/mi2mu/lily-stream.cc @@ -107,6 +107,7 @@ Lily_stream::header() *os_p_ << "% from input file: "; *os_p_ << midi_parser_l_g->filename_str_; *os_p_ << "\n\n"; + *os_p_ << "\\version \"0.0.54\";\n"; } /* snapnie: dit kan toch automaties? Zie ook dstream. -- 2.39.5