]> git.donarmstrong.com Git - lilypond.git/commitdiff
release: 0.0.50 release/0.0.50
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 10 Apr 1997 12:46:59 +0000 (14:46 +0200)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 10 Apr 1997 12:46:59 +0000 (14:46 +0200)
91 files changed:
.version
ANNOUNCE
Documentation/Makefile
Documentation/lilypond.pod
Documentation/mudela.pod
INSTALL.text
NEWS
TODO
bin/Makefile
bin/convert-mudela [new file with mode: 0644]
flower/TODO
init/register.ini
init/script.ini
input/error.ly
input/kortjakje.ly
input/midi.ly [deleted file]
input/plet.ly
input/rhythm.ly
input/scales.ly
input/scsii-menuetto.ly
input/standchen.ly
input/wohltemperirt.ly
lib/include/input.hh
lily/.version
lily/beam.cc
lily/clef-reg.cc
lily/crescendo.cc
lily/dynamic-reg.cc
lily/global-regs.cc
lily/headreg.cc
lily/include/beam.hh
lily/include/crescendo.hh
lily/include/dynamic-reg.hh
lily/include/head-reg.hh
lily/include/headreg.hh [deleted file]
lily/include/item.hh
lily/include/key.hh
lily/include/lily-proto.hh
lily/include/my-lily-parser.hh
lily/include/note-column-reg.hh [new file with mode: 0644]
lily/include/note-column.hh [new file with mode: 0644]
lily/include/notehead.hh
lily/include/register.hh
lily/include/rest.hh [deleted file]
lily/include/script-def.hh
lily/include/script-reg.hh
lily/include/script.hh
lily/include/spanner.hh
lily/include/staff-elem-info.hh
lily/include/staff-elem.hh
lily/include/staff-info.hh
lily/include/staff-regs.hh
lily/include/staff-side.hh [new file with mode: 0644]
lily/include/staff-sym-reg.hh
lily/include/staff-sym.hh
lily/include/stem.hh
lily/include/text-item.hh
lily/key-reg.cc
lily/lexer.l
lily/lily-version.cc
lily/local-key-reg.cc
lily/lyric-item.cc
lily/main.cc
lily/my-lily-lexer.cc
lily/my-lily-parser.cc
lily/note-column-reg.cc [new file with mode: 0644]
lily/note-column.cc [new file with mode: 0644]
lily/notehead.cc
lily/parser.y
lily/register-group.cc
lily/register.cc
lily/rest.cc [deleted file]
lily/script-def.cc
lily/script-reg.cc
lily/script.cc
lily/slur-reg.cc
lily/spanner.cc
lily/staff-elem-info.cc
lily/staff-elem.cc
lily/staff-info.cc
lily/staff-regs.cc
lily/staff-side.cc [new file with mode: 0644]
lily/staff-sym-reg.cc
lily/staff-sym.cc
lily/stem-beam-reg.cc
lily/stem.cc
lily/text-item.cc
lily/text-reg.cc
lily/walk-regs.cc
make/Configure_variables.make.in
make/Variables.make

index 65d7dba42d77b94591d61e68bb8cc14aef3b635b..3434710ebe66572bb0d9b8434c383722ea35dab7 100644 (file)
--- a/.version
+++ b/.version
@@ -1,6 +1,6 @@
 TOPLEVEL_MAJOR_VERSION = 0
 TOPLEVEL_MINOR_VERSION = 0
-TOPLEVEL_PATCH_LEVEL = 49
+TOPLEVEL_PATCH_LEVEL = 50
 # use to send patches, always empty for released version:
 # include separator: ".postfix", "-pl" makes rpm barf
 
index 6d05b1d38c7e8c552194f7749d99f51887aecfbe..0b79200e5b3c3856b94e17ae87b393de3e6fdc19 100644 (file)
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -1,22 +1,22 @@
 
        Announcing
-       
-               LILYPOND
+                       
+       GNU LilyPond
 
        The Music Typesetter
 
 Do you pine for the nice days of Linux 0.95, when men were men and
 wrote their own applications? Are you without a nice project and just
 dying to cut your teeth into a bleeding edge application you can
-modify for your needs. Do you find it frustrating that everything
+modify for your needs Do you find it frustrating that everything
 works in LaTeX?  No more all-nighters to get a nifty program working?
 Then this post might be just for you!
 
 I have been working very hard on a music typesetting system (called
-LilyPond) the past half year, and I finally think it is ready to be
+GNU LilyPond) the past half year, and I finally think it is ready to be
 used and hacked at by a larger public than me and my co-developer.
 
-Sources for this project are on
+Sources for this project are on:
 
        ftp://pcnov095.win.tue.nl/pub/lilypond/
 
@@ -29,7 +29,7 @@ detailed info and examples can be found on the webpage at:
 
 [DETAILED DESCRIPTION]
 
-WHAT IS LILYPOND
+WHAT IS GNU LilyPond
 
 Technically it is a preprocessor which generates TeX
 (or LaTeX) output which contains information to typeset a musical
index dc87ae02d99271d8d37689719251545b636f3ae9..dd61be8065049a3229d9960d0a1183d382a64bd2 100644 (file)
@@ -48,6 +48,7 @@ include ./$(depth)/make/Rules.make
 #
 
 localclean:
+       rm -f out/*
        rm -f $(TEXTFILES) $(HTMLFILES) $(GROFFFILES) $(HTMLFILES)
 
 localinstall: $(outdir)/lilypond.1 $(outdir)/mudela.5
index da1d68bf3fab7cd5a31088a8a16d3664d5d4d56d..3482fa961c231b1401f4d4edf4c6fb4da8c7d9ee 100644 (file)
@@ -1,6 +1,6 @@
 =head1 NAME
 
-LilyPond - a music typesetter
+lilypond - the GNU music typesetter
 
 =head1 SYNOPSIS
 
@@ -8,7 +8,7 @@ LilyPond - a music typesetter
 
 =head1 DESCRIPTION
 
-Technically LilyPond is a preprocessor which generates TeX
+Technically GNU LilyPond is a preprocessor which generates TeX
 (or LaTeX) output which contains information to typeset a musical
 score. Practically it is a typesetter, which only uses TeX as an
 output medium. (this is handy because there exist music fonts for TeX)
@@ -17,7 +17,7 @@ As a bonus, you can also output a MIDI file of what you typed.
 
 It translates script files (mudela files or F<*.ly>'s) into TeX input.
 Typesetting music is a complex task, whereas the message that printed
-music conveys is usually a simple one. LilyPond is a try at providing
+music conveys is usually a simple one. GNU LilyPond is a try at providing
 a simple interface for setting music.
 
 
@@ -36,13 +36,13 @@ do midi output only
 
 =item B<-d,--debug>,
 
-Turn debugging info. LilyPond will read the file F<.dstreamrc>, which
+Turn debugging info. GNU LilyPond will read the file F<.dstreamrc>, which
 tells for what functions and classes may produce copious debugging
 output.
 
 =item B<-w,--warranty>,
 
-Show the warranty with which LilyPond comes. (It comes with B<NO WARRANTY>!)
+Show the warranty with which GNU LilyPond comes. (It comes with B<NO WARRANTY>!)
 
 =item B<-o,--output=>F<FILE>,
 
@@ -110,7 +110,7 @@ clef changes, meter changes, cadenza-mode, key changes, repeat bars
 
 =head1 DESIGN CONSIDERATIONS
 
-LilyPond was written with some considerations in mind:
+GNU LilyPond was written with some considerations in mind:
 
 =over 5
 
@@ -118,7 +118,7 @@ LilyPond was written with some considerations in mind:
 
 Describing a well-defined language for defining music. We call
 this language (rather arrogantly) The Musical Definition Language
-(mudela for short). LilyPond reads a mudela sourcefile and outputs a
+(mudela for short). GNU LilyPond reads a mudela sourcefile and outputs a
 TeX file.  
 
 =item *
@@ -131,8 +131,8 @@ pitch.
 
 =item *
 
-LilyPond uses MusiXTeX fonts and TeX for its output. This is not a key
-issue: in a future version, LilyPond might bypass TeX, but at the moment
+GNU LilyPond uses MusiXTeX fonts and TeX for its output. This is not a key
+issue: in a future version, GNU LilyPond might bypass TeX, but at the moment
 TeX is very convenient for producing output.
 
 =item  *
@@ -143,23 +143,23 @@ setting is not possible without a knowledgeable printer,"  untrue.
 
 =item *
 
-LilyPond does not display notes directly, nor will it be rehacked to be
-used interactively. LilyPond writes output to a file.  It will not be
+GNU LilyPond does not display notes directly, nor will it be rehacked to be
+used interactively. GNU LilyPond writes output to a file.  It will not be
 extended to play music, or to recognize music.
 
 =item *
 
-LilyPond is intended to run on Unix platforms, but it should
+GNU LilyPond is intended to run on Unix platforms, but it should
 be portable to any platform which can run TeX and the GNU tools
 
 =item *
 
-LilyPond is free. Commercial windows packages for setting music are
+GNU LilyPond is free. Commercial windows packages for setting music are
 abundant. Free musicprinting software is scarce.
 
 =item *
 
-LilyPond is written in GNU C++. It will not be downgraded/ported to fit
+GNU LilyPond is written in GNU C++. It will not be downgraded/ported to fit
 broken systems.
 
 =back
@@ -167,10 +167,10 @@ broken systems.
 =head1
 DISCLAIMER & COPYING POLICY
 
-LilyPond is copyright 1996,97 by its authors. LilyPond is
+GNU LilyPond is copyright 1996,97 by its authors. GNU LilyPond is
 distributed under the terms of the GNU General Public
-License. LilyPond is provided without any warranty what so ever.
-LilyPond may be freely distributed.  For further information consult
+License. GNU LilyPond is provided without any warranty what so ever.
+GNU LilyPond may be freely distributed.  For further information consult
 the GNU General Public License, which is in the file F<COPYING>
 
 =head1 AUTHORS
@@ -179,13 +179,16 @@ the GNU General Public License, which is in the file F<COPYING>
 
 =item *
 
-Han-Wen Nienhuys <hanwen@stack.nl>, Main author
+Han-Wen Nienhuys <hanwen@stack.nl>, http://www.stack.nl/~hanwen
+
+Main author
 
 =item *
 
-Jan Nieuwenhuizen <jan@digicash.com>, Context errors, Lyrics,
-mi2mu, MIDI stuff, make structure, bits of FlowerLib, general
-comments, Mudela design.
+Jan Nieuwenhuizen <jan@digicash.com>,  http://www.digicash.com/~jan.
+
+Context errors, Lyrics, mi2mu, MIDI stuff, make structure, bits of
+FlowerLib, general comments, Mudela design.
 
 =item *
 
@@ -199,7 +202,7 @@ coding C++
 
 =head1 EXAMPLES
 
-At this time, LilyPond output looks nice, but is not of production
+At this time, GNU LilyPond output looks nice, but is not of production
 quality. If you're not discouraged; this is what I type in my xterm:
 
        lilypond someinput.ly
@@ -208,7 +211,7 @@ quality. If you're not discouraged; this is what I type in my xterm:
 
 This is what the output looks like over here:
 
-       LilyPond 0.0.40 #0/FlowerLib 1.1.7 #2. Compile: Mar 11 1997, 22:58:47 (g++ 2.7.2)
+       GNU LilyPond 0.0.40 #0/FlowerLib 1.1.7 #2. Compile: Mar 11 1997, 22:58:47 (g++ 2.7.2)
        Parsing ... [./init//symbol.ini[./init//dynamic.ini][./init//dutch.ini]
        [./init//script.ini][./init//table_sixteen.ini]][./input/wohltemperirt.ly]
        Setting up music ...Processing music ............
@@ -234,7 +237,7 @@ Check out the input files, some of them have comments
 
 =head1 PROBLEMS
 
-If LilyPond bombs out, then please recompile using with debugging info
+If GNU LilyPond bombs out, then please recompile using with debugging info
 turned on, and send a copy of the input which causes the error and a
 gdb stacktrace of the crash. It also helps if you can print the values
 of the objects. So if your trace is
@@ -248,12 +251,12 @@ of the objects. So if your trace is
          :
 
 Than it would help if you send a dump of the Interval and the Item
-(use: C<print *this> or use LilyPond C<print()> methods).
+(use: C<print *this> or use GNU LilyPond C<print()> methods).
 
-This is a beta version of LilyPond. Please send your helpful comments
+This is a beta version of GNU LilyPond. Please send your helpful comments
 and patches to me (see AUTHORS section)
 
-LilyPond is updated very frequently, the latest version is always available at:
+GNU LilyPond is updated very frequently, the latest version is always available at:
 ftp://pcnov095.win.tue.nl/pub/lilypond.
 
 
@@ -282,14 +285,14 @@ http://www.stack.nl/~hanwen/lilypond/index.html
 
 =head1  REMARKS
 
-LilyPond has no connection with the music package RoseGarden, other
+GNU LilyPond has no connection with the music package Rosegarden, other
 than the names being similar :-)
 
 =head1 HISTORY
 
 (for a  detailed changelog, see F<NEWS>)
 
-LilyPond's roots lie in MPP, a preprocessor to the rather arcane
+GNU LilyPond's roots lie in MPP, a preprocessor to the rather arcane
 MusiXTeX macro package for TeX. A friend of mine, Jan Nieuwenhuizen
 wrote the first 44 versions (0.01 to 0.44), then his program caught my
 attention, and I was slowly sucked in to the interesting problem of
index 159a4050dce29e73ce4eecec9b9646d4f5e20c44..4ee456d040e6f4c215eae8ff97746042baa69566 100644 (file)
@@ -187,18 +187,18 @@ At the start of parsing, Mudela assumes normal mode.
 In Normal mode, a word is looked up in the following order:
 
        word    identifier, string
-       \word   keyword, string
+       \word   keyword, identifier, string
 
 In normalmode, a word is assumed to start with an alphabetic
 character, followed by alpha-numeric characters.
 
 =item Note mode
 
-Note mode (and thus Simple mudela) is introduced by the keyword C<\music>.
+Note mode (and thus Simple mudela) is introduced by the keyword C<\melodic>.
 In Note mode, a word is looked up in the following order:
 
-       word    identifier, string
-       \word   keyword, string
+       word    notename, string
+       \word   keyword, identifier, string
 
 In Note mode a word is considered to have alphabetic characters only.
 
@@ -209,7 +209,7 @@ Lyrics mode (and thus Simple mudela)  is introduced by the keyword C<\lyrics>.
 In Lyrics mode, a word is looked up in the following order:
 
        word    string
-       \word   keyword, string
+       \word   keyword, identifier, string
 
 In Lyric mode every sequence of non-digit and non-white characters
 starting with an alphabetic character is considered a word.
@@ -222,8 +222,8 @@ starting with an alphabetic character is considered a word.
 =back
 
 These modes are of a lexical nature. Normal and Note mode largely
-resemble each other, save the possibility of entering Reals, and
-meaning of C<_>
+resemble each other, save the possibility of entering Reals, 
+meaning of C<_> and the resolution of words
 
 =head2 Notes
 
@@ -232,9 +232,8 @@ enter.
 
        a'4     % dutch names
 
-is a A-1 pitched quaver. The ' as well as the ' signify an octave change.
-A-1 is 440 Hz concert-pitch. C<c'> is also known as the central
-c. More examples:
+is a A-1 pitched quaver. The ' signifies an octave change.  A-1 is 440
+Hz concert-pitch. C<c'> is also known as the central c. More examples:
 
        'a      % 110
        a       % 220
@@ -249,7 +248,10 @@ 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. 
 
-The default language for notenames is defined to be dutch,
+
+Notenames are just a special kind of identifiers, and can be declared
+for any language appropriate (see F<dutch.ini>).  The default language
+for notenames is defined to be dutch,
 
        % double sharp
        cisis disis eisis fisis gisis aisis bisis
@@ -305,6 +307,7 @@ Symbols which can be put at either side of a staff are entered as follows:
        a^-     % portato, direction: above note
        a_.     % staccato, direction: below note
        a^\script { "symbolindex"  . . . } % see script.ini for details.
+       a^\fermata      % predefined identifier
 
 Dynamics can be put after the notename:
 
@@ -320,14 +323,17 @@ and the following abbreviations:
        \>      % start decrescendo
        \!      % end crescendo/decrescendo
 
-=head2 General
+=head2 Text
+
+To accompany a note with a text (eg, "marcato"), you should say: 
+
+       c_"marcato"
+       c^"marcato"
+       c-"marcato"
 
-The general form of a note is:
+the c- construct chooses the default up/down direction.
 
-       post-requests de-octavate notename octavate duration pre-requests 
 
-Notenames are just identifiers, and can be declared for any
-language appropriate (see F<dutch.ini>). 
 
 
 
@@ -401,7 +407,7 @@ notes with < and >. Example:
 
 You can also put vertical music inside horizontal music:
 
-       { c < c e > <c e g> <c e g c'> }        % 4 increasing chords
+       { c <c e> <c e g> <c e g c'> }  % 4 increasing chords
 
 And vice versa
 
index 7c2df20b4e76bd46be1349c8e8d36660590b7ecb..7d6f7d5427f2bfa0eba8f809214756a8bda9cc02 100644 (file)
@@ -61,7 +61,7 @@ C\bC\bC\bCO\bO\bO\bON\bN\bN\bNF\bF\bF\bFI\bI\bI\bIG\bG\bG\bGU\bU\bU\bUR\bR\bR\bRI\bI\bI\bIN\bN\bN\bNG\bG\bG\bG a\b
 
 
 
-3/Apr/97                 LilyPond 0.0.48                        1
+3/Apr/97                 LilyPond 0.0.50                        1
 
 
 
@@ -127,7 +127,7 @@ R\bR\bR\bRU\bU\bU\bUN\bN\bN\bNN\bN\bN\bNI\bI\bI\bIN\bN\bN\bNG\bG\bG\bG
 
 
 
-3/Apr/97                 LilyPond 0.0.48                        2
+3/Apr/97                 LilyPond 0.0.50                        2
 
 
 
@@ -193,6 +193,6 @@ A\bA\bA\bAU\bU\bU\bUT\bT\bT\bTH\bH\bH\bHO\bO\bO\bOR\bR\bR\bRS\bS\bS\bS
 
 
 
-3/Apr/97                 LilyPond 0.0.48                        3
+3/Apr/97                 LilyPond 0.0.50                        3
 
 
diff --git a/NEWS b/NEWS
index 7176a07fcbb9012cb21ddc736f1098d35cc9ea93..237aac8d2f3b73db0a1e0cee5ca09d6556c5fa2e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,14 +1,35 @@
-pl 48.hwn1
+pl 50
+       - merge rest / notehead.
+       - Staff_side as a base class for most "staff-side" symbols.
+       - version check
+       - Note_column_register, Note_column
+       - multiple scripts
+********
+april 8
+pl 49.jcn1
+Bugfix
+       - configure[.in], make/Configure_variables.make.in c++ (=doze fix)
+       - "configure; make" ok for doze, win32 target may be removed now
+       - win32/gcc 2.7.2 compile fixes -- why does this all compile 
+           (without warnings, why can-t i even trigger warnings) under 
+           linux/gcc-2.7.2.1?  it's quite a tedious job fixing this 
+           shit _on doze_ all the time.
+           * fixed #includes global-regs.cc, staff-info.cc, staff.cc
+           * key.hh:Key() -> Octave_key()
+           * added missing lily/include/input.hh: Input( Input const& )
+       
+pl 49
        - lsm template
        - clef in cadenza mode.
        - notename clear
        - \command bla; for \meter, \clef, \octave etc.
-
+*******
 pl 48
        - notenames init
        - Duration order -> grouping
        - broken key s
        - default octave
+
 ******
 april 3
 pl 47
diff --git a/TODO b/TODO
index 2d56c054f3cbe8ce097a7026b46c2c1925793cfd..1ba47b577aef11fa20b1b6b3ffeefdce10ff05f8 100644 (file)
--- a/TODO
+++ b/TODO
@@ -24,11 +24,13 @@ BUGS
 
        * help-lines
 
+       * help-lines for rests
+
        * [c8. c32 c32]
 
        * cis ( | ) cis
 
-       * lilypond - -> 
+       * lilypond - -> crash
 
 SEVERELY LACKING:
 
@@ -44,6 +46,8 @@ FURTHER FOR ORCHESTRAL SCORE:
 
 INPUTLANGUAGE
 
+       * relative mode for pitch entering
+
        * configure pitch_byte
 
        * special key.
@@ -69,7 +73,9 @@ SMALLISH PROJECTS
 
        * rpm package buildroot
 
-       * indentable stream for TeX stream, lily stream, Dstream.
+       * indentable stream as baseclass for TeX stream, lily stream, Dstream.
+
+       * caching Item/spanner dimensions.
 
        * key transposition
        
@@ -105,7 +111,9 @@ SMALLISH PROJECTS
        * Decent TeX titledefs (\tempo, \metron, etc. )
 
        * command priority into enum
-       
+
+       * don't broadcast Staff_sym
+
        * C meter iso 4/4
 
        * textspanner: center position
@@ -139,6 +147,10 @@ DOC
 
 FUTURE
 
+       * Reg_configure_request
+
+       * slurs per voicegroup.
+
        * slur parts as a script
        
        * multiple scripst.
@@ -179,9 +191,9 @@ IDEAS
 
        * move MIDI io to a ANSI C libmidi library.
 
-       * itemcolumns: Use dummy items.
-
        * use an embedded language: scheme, lisp, S-lang, Perl, GUILE, ?
+               - Items/Spanners
+               - Registers
 
        * y -dims in internote?
 
@@ -200,7 +212,7 @@ IDEAS
        we get different keychanges in different staffs.
 
        * Integrating (objectiveC) MusicKit with LilyPond
-       
+               
        * MusixTeX output possible?
 
        * PostScript output (esp. Beams, Slurs, etc)
@@ -208,3 +220,7 @@ IDEAS
        * caching breakpoints
 
        * use exceptions iso assert?
+
+       * #c <-> cis
+
+       * breath marks 
index 7284a0b5ffd02a85e8d5b2cb257090d8050fcde4..bf5b107ce9efabd13b5b3eb7a21024c5e3639efe 100644 (file)
@@ -3,16 +3,11 @@
 # subdir level:
 #
 depth = ..
-#
-
-include ./$(depth)/make/Include.make
-# generic stuff/Makefile
-#
-#
-
+include $(depth)/make/Include.make
 # list of distribution files:
-# 
-SCRIPTS = clearlily cpgento genheader make_patch make_version make_website release
+
+SCRIPTS = clearlily cpgento genheader make_patch \
+       make_version make_website release convert-mudela
 EXTRA_DISTFILES = $(SCRIPTS)
 #
 
diff --git a/bin/convert-mudela b/bin/convert-mudela
new file mode 100644 (file)
index 0000000..d64a7d7
--- /dev/null
@@ -0,0 +1,3 @@
+#!/usr/bin/perl -w
+
+print "todo\n!";
index 3e10b2b3af89a4d474951cd0926c165cba44f844..b810fabd7ad6846b17f5f05276e3d63b4315f94e 100644 (file)
@@ -1,6 +1,8 @@
        * fix/junk ambiguous String constructor overloads, e.g.:
          String( int ) and String( char )
 
+       * version numbering for shared lib.
+
        * LGPL?
 
        * disable this auto conv: const pointer -> bool -> string
@@ -13,7 +15,7 @@
 
        * extend Interval
 
-       * use template handle in handle.hh for strings.
+       * use template handle in handle.hh for strings?
 
        * move towards gnu or STL?
 
index b8447d2dc4f0429bc98f20aa93eb4562f57e0fa1..e5822087ba5e56a8cdd2a627736446a975549a9c 100644 (file)
@@ -14,6 +14,7 @@ melodicregs = \inputregister {
                \inputregister { Stem_beam_register }
                \inputregister { Text_register }
                \inputregister { Script_register }
+               \inputregister { Note_column_register }
                \inputregister { Voice_registers
                        \inputregister { Notehead_register }
                        \inputregister { Slur_register }
index f800923fdc6db7e3b1e988938552cfa04c7f1668..665d8aa4e641935ac93c30796c1e37c65760274c 100644 (file)
@@ -3,13 +3,13 @@
 % indexstring same_dir_as_stem above_below_staff symbol_can_beinverted }
 %
 
-accent = \script { "sforzato" -1 0 0 }
-marcato = \script { "marcato" -1 0 1  }
-staccatissimo = \script { "staccatissimo" -1 0 1 }
-portato= \script { "portato" -1 0 1 }
-fermata = \script { "fermata" 1 0 1 }
-stopped = \script { "stopped" 0 1 0 }
-staccato = \script { "staccato" -1 0 0 }
-tenuto = \script {"tenuto" -1 0 0 }
-upbow = \script { "upbow" 0 1 0 }
-downbow = \script { "downbow" 0 1 0 }
+accent = \script { "sforzato"  0 -1 0 0 }
+marcato = \script { "marcato" -1 0 1  }
+staccatissimo = \script { "staccatissimo" 0  -1 0 1 }
+portato= \script { "portato" -1 0 1 }
+fermata = \script { "fermata" 1 0 1 }
+stopped = \script { "stopped" 0 1 0 }
+staccato = \script { "staccato" -1 0 0 }
+tenuto = \script {"tenuto" -1 0 0 }
+upbow = \script { "upbow" 0 1 0 }
+downbow = \script { "downbow" 0 1 0 }
index d63164147efa1fc9dcf13321369d54ba450a2405..3c7967eef53b5da771da20db807efcf874574001 100644 (file)
@@ -2,7 +2,7 @@ include "this-is-hopefully-a-nonexisting-file"
 
 
 mwa = \melodic{
-       \meter{3/4}
+       \meter 3/4;
        [ a8 a8 a8 a8 a8 ]      % 
        [ a8 ]  % 
 %       segfault
index 47624c49361821a71ee0911d5aea53eb1a08d61b..f0aaaf9aa3139ef0674c22bf1b7d50f0bf1d5d22 100644 (file)
@@ -9,11 +9,11 @@
 %
 % declare melody (which will be in *one* staff ) for the lead voice
 
-melodie = \melodic 
+melodie = \melodic {
                                % switch Lilypond in note-mode
-       \clef\violin
-       \meter{ 2/4 ;
-       \octave  c ;            % set the default octave
+       \clef\violin;
+       \meter 2/4 ;
+       \octave  c';            % set the default octave
        % the default note duratino is 4
        %%% theme
        c c |                   % the '|' checks if there is a new measure here.
@@ -33,10 +33,10 @@ melodie = \melodic
 }
 
                                % more of this.
-begeleiding = \melodic 
-       \clef "bass"
-       \meter{ 2/4 ;
-       \octave  c ;            % default octave: 1 below the first octave.
+begeleiding = \melodic{ 
+       \clef "bass";
+       \meter 2/4 ;
+       \octave  c';            % default octave: 1 below the first octave.
 
        %%% theme
        'c                      % ' before note means one octave lower.
diff --git a/input/midi.ly b/input/midi.ly
deleted file mode 100644 (file)
index 8207361..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-% midi.ly
-% test source for lilypond-s midi output
-
-melodie = \melodic{
-       \clef\violin
-       \meter{ 2/4 }
-       c c | g g | a a | g2 
-       f f | e e | d d8.( e16 | )c2 | % :|
-       
-}
-
-begeleiding = \melodic{
-       \clef\bass
-       \meter{ 2/4 }
-       \octave{'c}
-       c c' | e' c' | f' c' | e' c' 
-       d' b | c' a | f g | c2 | 
-       
-}
-
-\score{
-       \staff{ melodie }
-       \staff{ begeleiding }
-       \midi{
-               \tempo 4:120
-       }
-}
-
index 255ee658a1ab1424ac330a3ac87c2b0c8df248cb..8cdf05f297d85d35229458993122f74c5387f0c7 100644 (file)
@@ -1,9 +1,10 @@
+% urgh
 
-melanie = \melodic{
-       \meter{2/4}
-       \duration{8}
-       [ c d ] { [ d d' } { c c' ] } |
-       [ c d ] [ e { d g } c ]2/3 |
+melanie = \melodic{ 
+       \meter 2/4;
+       \duration 8;
+       [ c d ] < [ d d'>< c c' ] > |
+       [ c d ] [ e <d g > c ]2/3 |
        [ c d ] [ c16 d16 e'16 e'16 d16 c16 ]4/6 |
        [ c d e e d c ]4/6 |
        [c d ] < { [ c d e ]2/3 } { [ f g a ]2/3 } > |
@@ -11,9 +12,9 @@ melanie = \melodic{
         
 }
 
-michelle = \melodic{
-       \meter{2/4}
-       \duration{8}
+michelle = \melodic{ 
+       \meter 2/4;
+       \duration 8;
        [ c c c c ] |
        [ c c c c ] |
        [ c c c c ] |
@@ -22,9 +23,9 @@ michelle = \melodic{
        [ c c c c ] |
 }
 
-mireille = \lyric{
-       \meter{2/4}
-       \duration{8}
+mireille = \lyric{ 
+       \meter 2/4;
+       \duration 8;
        o o o o |
        o o [ o o o ]2/3 |
        [ o o o ]2/3 [ o16 o16 o16 o16 o16 o16 ]4/6 |
@@ -34,8 +35,8 @@ mireille = \lyric{
 }
 
 \score{
-       \staff{ mireille }
-       \staff{ melanie }
-       \staff{ michelle }
+       \staff{ melodicregs mireille }
+       \staff{ melodicregs melanie }
+       \staff{ melodicregs michelle }
        \paper{}
 }
index 5739294fbfdcdda04dbd73bcd447828e2ee1ccfb..c76a1ee0cd303cf3f24bf77b4d14e0d1b2defd5b 100644 (file)
@@ -5,23 +5,23 @@
 
 ritme = \staff {
        melodicregs
-       \melodic{ %\octave {c}
-       \partial {8}    
-       \meter{ 4/4}
+       \melodic{ %\octave ;
+       \partial 8;
+       \meter  4/4;
        c8                                      |
        
        [a8() a8. a8 a16 a16 a16] c4.           |       % watch the beams!
         r32 r32 r16 r8 r4 r2                   |
-       \meter{  5/16}
+       \meter   5/16;
 
        % divide measure in 5 equal parts. Usually it 2+3 or 3+2
-       \grouping { 5*16 }      
+       \grouping  16*5 ;       
        [c8 c16 c8 ]                            |       % watch THIS!
         [c16 c16 c16 c16]5/4 |
-       \meter{  2/8}
+       \meter   2/8;
        c4                              |
        c4      c4      c4      c4
-       \meter {4/4}
+       \meter 4/4;
        c1 c1 c1
        
 %      [c16 c16 c16 c16 ]                      |
@@ -31,14 +31,16 @@ ritme = \staff {
         }
        
 }
-another = \staff{      melodicregs
-       \melodic{ \meter{ 4/4} 
-               c1 c1 c1 c4 c4 c4 c4  \meter{ 4/4} c1 c1 c1
+another = \staff {
+       melodicregs
+       \melodic{ \meter 4/4; 
+               c1 c1 c1 c4 c4 c4 c4  \meter  4/4; c1 c1 c1
         }
 }
 
-yanother = \staff{     melodicregs
-       \melodic{ \meter{ 4/4} 
+yanother = \staff      { 
+       melodicregs
+       \melodic{ \meter 4/4; 
                c1 c1 c1 c4 c4 c4 c4  c1 c1 c1
         }
 }
index 2b6aa54c2907f0246d3b2fca77e76bbfa5a23d5c..727b458d5afb3417255805c8e70986240a978df5 100644 (file)
@@ -47,10 +47,10 @@ c1
 \octave c;     [c'-^ b-^ a-^ g-^][f-^ e-^ d-^ c-^]
        [c-. d-. e-. f-.][g-. a-. b-. c'-.]
        [c'-- b-- a-- g][f-- e-- d c--] % 5
-       [c-portato d-portato e-portato f-portato]
-               [g-portato a-portato b-portato c'-portato]
-       [c'-upbow b-upbow a-downbow g-downbow]
-               [f-downbow e-downbow d-upbow c-upbow]
+       [c-\portato d-\portato e-\portato f-\portato]
+               [g-\portato a-\portato b-\portato c'-\portato]
+       [c'-\upbow b-\upbow a-\downbow g-\downbow]
+               [f-\downbow e-\downbow d-\upbow c-\upbow]
        [c-| d-| e-| f-|][g-| a-| b-| c'-|]
        [c' b a g][f e d c]
        [c d e f][g a b c'] % 10 
index a2cd75861896fe823a3e5eb2755169ea1880ce21..12183e79e79c4b94bbf7a7c7149f32084f7f6266 100644 (file)
@@ -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.50";
 %% Stuff from MPP version
 % \lefttitle{Menuetto}
 % \tempo{Moderato}
@@ -45,10 +45,10 @@ ii_menuetto = \melodic{
        c'!4-. |
 %%7
        < a4-. f4>
-       < d'4-.-upbow f4 'bes4 >
-       < e'4-.-downbow g4 'g4 > |
+       < d'4-.-\upbow f4 'bes4 >
+       < e'4-.-\downbow g4 'g4 > |
 %%8
-       < cis'2.-upbow e2. 'a2. > 
+       < cis'2.-\upbow e2. 'a2. > 
                \bar ":|:";
 %%9
        \clef "violin";
@@ -69,9 +69,9 @@ ii_menuetto = \melodic{
                 { \stem -1; g4(\stem -1;) f4 e4 }% ugh
        > |
 %%14
-       < [ a f > g a f ] < d'4-$upbow e4 'bes4 > |
+       < [ a f > g a f ] < d'4-\upbow e4 'bes4 > |
 %%15
-       < c'4-$downbow f4 'a4 > [ bes( )a g a ] |
+       < c'4-\downbow f4 'a4 > [ bes( )a g a ] |
 %%16
        [ f( e )f a-. g-. bes-. ] |
 %%17
@@ -79,7 +79,7 @@ ii_menuetto = \melodic{
 %%18
        < { [ c'( )bes c' a ] } { [ es ] } > fis4 |
 %%19
-       < d'4-downbow g4 'bes4 > < c'4-upbow g4 c4 > < [ bes d > a ] |
+       < d'4-\downbow g4 'bes4 > < c'4-\upbow g4 c4 > < [ bes d > a ] |
 %%20
        < { [ c'( bes a )bes g( )bes ] } { [ d ] } { [ g ] } > |
 %%21
@@ -96,7 +96,7 @@ ii_menuetto = \melodic{
 }
 
 \score{
-       \staff{ melodicregs $ii_menuetto }
+       \staff{ melodicregs ii_menuetto }
        \paper{
                \width 195\mm
                \unitspace 9\mm  % to get lily to use only three lines
index 847a3c323c4d5407f62891a4c691033829bc58da..4514ff8788ddca843ebd141b30e02884b42a60c4 100644 (file)
@@ -108,7 +108,6 @@ melodie = \melodic{
 %%36
        < a2. fis2. > |
 %#%\volta2
-%#%:|
 %%37
        [ a8. a16 ] [ cis'8. cis'16 ] [ e'8. e'16 ] |
 %%38
@@ -181,7 +180,6 @@ begeleiding = \melodic{
 
 %%4
        ''a r4 |
-%#%:|
 %%5
 \duration  8 ;
        < \multivoice { \stem  1 ; [ 'f 'a d 'a d 'a ] }
@@ -265,7 +263,6 @@ begeleiding = \melodic{
 %%36
        [ 'd 'fis 'a 'fis 'a 'fis ] |
 %#%\volta2
-%#%:|
 %%37
        [ ''a 'e 'g 'e ''bes^> 'e ] |
 %%38
index b023a4000cd940cb60f537bd05a4609cf6361348..5bff42ebc0060ff9b9b7a1f511cbd027e5bc62cb 100644 (file)
@@ -4,6 +4,8 @@
 %
 %      Public Domain -- typed by by HWN
 %
+\version "0.0.50";
+
  global = \melodic{
        \meter 4/4 ;
        \grouping 2*2; 
index 180baf170be87d21e05858ff2d415b512b846293..f87385c4280b384a92738e1021c964fbc9fb0f3f 100644 (file)
@@ -26,6 +26,7 @@ public:
     String location_str()const;
     Input(Source_file*, char const*);
     Input();
+    Input( Input const& );
 };
 
 #endif // INPUT_HH
index a3bb0ea6504b542724cc9468d8935292c98ef0aa..93a395e794f370e7bb7d89b9868b950b7808a2f0 100644 (file)
@@ -1,6 +1,6 @@
 MAJOR_VERSION = 0
 MINOR_VERSION = 0
-PATCH_LEVEL = 48
+PATCH_LEVEL = 49
 # use to send patches, always empty for released version:
 # include separator: ".postfix", "-pl" makes rpm barf
 
index a20e859e23a03cefda2226205432aa672d5e7553..389226fa7158a8e09e97923ad3e4f9918c16b1d5 100644 (file)
@@ -30,7 +30,7 @@ struct Stem_info {
 Stem_info::Stem_info(Stem const *s)
 {
     x = s->hindex();
-    int dir = s->dir;
+    int dir = s->dir_i_;
     idealy  = max(dir*s->top, dir*s->bot);
     miny = max(dir*s->minnote, dir*s-> maxnote);
     assert(miny <= idealy);
@@ -74,7 +74,7 @@ Beam::set_default_dir()
     }
     dir_i_ =  (dirs[0] > dirs[1]) ? -1 : 1;
     for (iter_top(stems,i); i.ok(); i++) {
-       i->dir = dir_i_;
+       i->dir_i_ = dir_i_;
     }
 }
 
@@ -190,7 +190,7 @@ Beam::do_pre_processing()
 
 
 Interval
-Beam::width() const
+Beam::do_width() const
 {
     Beam * me = (Beam*) this;  // ugh
     return Interval( (*me->stems.top()) ->hindex(),
index fc1aef825b00ad80e76e6d03eed287d6822a6a78..f5687a166503e6a74592d62995bde7145e06a044 100644 (file)
@@ -50,7 +50,7 @@ Clef_register::read_req(Clef_change_req*c_l)
 void
 Clef_register::acknowledge_element(Staff_elem_info info)
 {
-    if (info.elem_p_->name() == Bar::static_name()) {
+    if (info.elem_l_->name() == Bar::static_name()) {
        if (!clef_p_){
            create_clef();
            clef_p_->change = false;
index e8a36e29a8de635d276bb0dd3913853ae736abdc..4583bdae2f9dd396dfadcbb7f7cf84b640617b0f 100644 (file)
 #include "lookup.hh"
 #include "paper-def.hh"
 #include "debug.hh"
-Crescendo::Crescendo(int s)
+
+Crescendo::Crescendo()
+    : Staff_side(this)
 {
-    staff_size_i_ = s;
     grow_dir_i_ =0;
     dir_i_ = -1 ;
     left_dyn_b_ = right_dyn_b_ =false;
@@ -47,9 +48,7 @@ Crescendo::brew_molecule_p() const return m_p ;
     }
     Symbol s( paper()->lookup_l()->hairpin(w_dim, grow_dir_i_ < 0) );
     m_p->add(Atom(s));
-    int pos = (dir_i_ >0) ? staff_size_i_ + 4 : - 4 ;
-    if(dir_i_<0 )              // should do something better anyway.
-       m_p->translate(Offset(0, -m_p->extent().y.left ));
+    int pos = get_position_i();
     m_p->translate(Offset(x_off_dim,pos * paper()->internote()));
 }
 
index e0e38a7a595fc950559b74754ab6e103199f02e3..4088a3be704102ef3b3529c769bc3b6ff9ff2448 100644 (file)
@@ -13,6 +13,7 @@
 #include "lookup.hh"
 #include "paper-def.hh"
 #include "score-column.hh"
+#include "staff-sym.hh"
 
 Dynamic_register::Dynamic_register()
 {
@@ -55,7 +56,7 @@ Dynamic_register::process_requests()
 
            assert (!dynamic_p_) ; // TODO
                
-           dynamic_p_ = new Text_item(td_p, 10 ); // TODO!
+           dynamic_p_ = new Text_item(td_p);
            announce_element(Staff_elem_info(dynamic_p_, dreq_l));
        } else if (dreq_l->span_dynamic()) {
 
@@ -71,7 +72,7 @@ Dynamic_register::process_requests()
            } else if (span_l->spantype == Span_req::START) {
                cresc_req_l_ = span_l;
                assert(!new_cresc_p);
-               new_cresc_p  = new Crescendo(10);
+               new_cresc_p  = new Crescendo;
                new_cresc_p->grow_dir_i_ = span_l->dynamic_dir_i_;
                announce_element(Staff_elem_info(new_cresc_p, span_l));
            }
@@ -90,7 +91,9 @@ Dynamic_register::process_requests()
 void
 Dynamic_register::pre_move_processing()
 {
+    Staff_symbol* s_l = get_staff_info().staff_sym_l_;
     if (dynamic_p_) {
+       dynamic_p_->set_staffsym(s_l);
        typeset_element(dynamic_p_);
        dynamic_p_ = 0;
     }
@@ -99,7 +102,7 @@ Dynamic_register::pre_move_processing()
            to_end_cresc_p_->right_dyn_b_=true;
        
        to_end_cresc_p_->right_col_l_ = get_staff_info().musical_l()->pcol_l_;
+       to_end_cresc_p_->set_staffsym(s_l);
        typeset_element(to_end_cresc_p_);
        to_end_cresc_p_ = 0;
     }
index 207cc16c556a92ede8d1abba3fcca254f09c1100..3451ca5270a231fc51d18c95cb5ee251d2fb1528 100644 (file)
@@ -6,6 +6,8 @@
   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
 */
 
+#include "proto.hh"
+#include "plist.hh"
 #include "input-register.hh"
 #include "debug.hh"
 #include "register.hh"
index 318ed3a60725bc619fad8e3dd9c08b8ceb87d48e..2d551cdd2cf37cda4dfc839002053fe4e8a75718 100644 (file)
@@ -3,9 +3,9 @@
 
   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
 */
-#include "rest.hh"
+
 #include "notehead.hh"
-#include "headreg.hh"
+#include "head-reg.hh"
 #include "paper-def.hh"
 #include "complex-walker.hh"
 #include "musical-request.hh"
@@ -40,20 +40,21 @@ Notehead_register::process_requests()
     if (!note_req_l_)
        return;
     
+    Notehead*n_p = new Notehead(8);    // ugh
+    note_p_ = n_p;
+    n_p->set_rhythmic(note_req_l_->rhythmic());
 
     if (note_req_l_->note()) {
-       Notehead*n_p = new Notehead(8); // ugh
-       note_p_ = n_p;
-       n_p->set_rhythmic(note_req_l_->rhythmic());
        n_p->position = note_req_l_->note()->height() +
            *get_staff_info().c0_position_i_l_;
-    } else {
-       note_p_ = new Rest ( note_req_l_->rhythmic()->duration_);
+    } else if (note_req_l_->rest()) {
+       n_p->rest_b_ = true;
        if (note_req_l_->rhythmic()->duration_.type_i_ <= 2)
            note_p_->translate(
                Offset(0,
                       6 * paper()->internote()));
     }
+    
     Staff_elem_info itinf(note_p_,note_req_l_);
     announce_element(itinf);
 }
@@ -62,8 +63,9 @@ void
 Notehead_register::pre_move_processing()
 {
     if (note_p_) {
-       if (dir_i_ && note_p_->name() == Rest::static_name())
-           note_p_->translate(Offset(0, 4*dir_i_ * paper()->internote()));
+       if (dir_i_ && note_p_->rest_b_ && note_p_->balltype <= 2) {
+           note_p_->position +=4*dir_i_ ;
+       }
        typeset_element(note_p_);
        note_p_ = 0;
     }
index 8eb2f148b557b2af4a50357362d6f473aa1ea9b8..a85858bad82c9c62d78ca0b0056c2778c9a61118 100644 (file)
@@ -25,7 +25,7 @@ struct Beam:  public Directional_spanner {
     /* *************** */
 NAME_MEMBERS(Beam);
     
-    virtual Interval width()const;    
+    virtual Interval do_width()const;    
     Offset center() const;
     Spanner *do_break_at(PCol *,  PCol *) const;
     Beam();
index cb6b159ad770c9545a1447d3ed4a16ab4cd6911d..915094e1dc83625f905fb8137e6e72f127e22542 100644 (file)
 #ifndef CRESCENDO_HH
 #define CRESCENDO_HH
 
+#include "staff-side.hh"
 #include "spanner.hh"
 /**
   The hairpin symbol. (cresc)
  */
-class Crescendo : public Spanner {
-    int staff_size_i_;
+class Crescendo : public Spanner , public Staff_side {
+
 public:
     int grow_dir_i_;
-    int dir_i_;
-    /// if there is a dynamic at the end, make the sign smaller.
+    
+/// if there is a dynamic at the end, make the sign smaller.
     bool right_dyn_b_;
 
     /// if there is a dynamic at the end, make the sign smaller.
     bool left_dyn_b_;
-    Crescendo(int staff_size_i);
+    Crescendo();
 private:
     Spanner* do_break_at( PCol*, PCol*) const;
     Molecule*brew_molecule_p()const;
index 164ac6af3d927cd56de1df460f2584bf1083e770..8b39f4fe11dbb6afcfeaac2bfeb5a11bcc0c076e 100644 (file)
@@ -12,7 +12,7 @@
 
 #include "register.hh"
 
-struct Dynamic_register : Request_register {
+class Dynamic_register : public Request_register {
     int dir_i_;
     Text_item * dynamic_p_;
     Crescendo * to_end_cresc_p_;
@@ -20,15 +20,17 @@ struct Dynamic_register : Request_register {
     Span_dynamic_req * cresc_req_l_;
     Array<Dynamic_req*> dynamic_req_l_arr_;
     /* ************** */
+public:
     Dynamic_register();
     ~Dynamic_register();
+    NAME_MEMBERS(Dynamic_register);
+protected:
     virtual bool try_request(Request *req_l);
     virtual void process_requests();
     virtual void pre_move_processing();
     virtual void post_move_processing();
     virtual bool acceptable_request_b(Request*) const;
     virtual void set_feature(Features);
-    NAME_MEMBERS(Dynamic_register);
 };
 
 #endif // DYNAMIC_REG_HH
index d5eb6fa5cd2f0764d1949b25112d64176da91da7..188db10a26ec04b49f2f873fbc39628964c23d71 100644 (file)
 #include "register.hh"
 
 struct Notehead_register : Request_register {
-    Item* note_p_;
+    Notehead* note_p_;
+    Rhythmic_req * note_req_l_;
     int dir_i_;
+    
     /* *************** */
-    Notehead_register(Complex_walker*);
+    Notehead_register();
     virtual bool try_request(Request *req_l) ;
-    virtual void process_request();
-    virtual void do_pre_move_process();
-    void set_dir(int);
+    virtual void process_requests();
+    virtual void pre_move_processing();
+    virtual void post_move_processing();
+    void set_feature(Features);
+    NAME_MEMBERS(Notehead_register);
 };
 
 
diff --git a/lily/include/headreg.hh b/lily/include/headreg.hh
deleted file mode 100644 (file)
index eaa2d6f..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
-  headreg.hh -- part of LilyPond
-
-  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
-*/
-
-
-#ifndef HEADREG_HH
-#define HEADREG_HH
-#include "register.hh"
-
-struct Notehead_register : Request_register {
-    Item* note_p_;
-    Rhythmic_req * note_req_l_;
-    int dir_i_;
-    
-    /* *************** */
-    Notehead_register();
-    virtual bool try_request(Request *req_l) ;
-    virtual void process_requests();
-    virtual void pre_move_processing();
-    virtual void post_move_processing();
-    void set_feature(Features);
-    NAME_MEMBERS(Notehead_register);
-};
-
-
-#endif // HEADREG_HH
index d1fc8c8bfa7985288772b7f201d54e894ac42b43..3a1efa36c752b199c85dc0479de57b8186065e43 100644 (file)
@@ -16,7 +16,8 @@
   spacing calculation. 
   
 */
-struct Item : Staff_elem {
+class Item : public Staff_elem {
+public:
     /// indirection to the column it is in
     PCol * pcol_l_;
 
index cbffa1e8f7d33562ab83268c99afff77302cbae2..38885f4a18969250da1822c2920f4b8fa82a64df 100644 (file)
@@ -16,7 +16,7 @@ class Octave_key {
 public:
     Array<int> accidental_i_arr_;
  
-    Key();
+    Octave_key();
     void set(int i, int acc);
     int acc(int i)const { return accidental_i_arr_[i]; }
 };
index ff9e0fea4f87ad7f91978c7e16c8cba9ebcda906..abe556db86a6aba7d9303558b7b4cbc759050fe2 100644 (file)
@@ -52,5 +52,9 @@ struct Stem_req;
 struct Terminate_voice_req;
 struct Text_req;
 struct Timing_req;
+struct Note_column_register;
+struct Note_column;
+struct Staff_side;
+struct Staff_symbol;
 
 #endif // LILY_PROTO_HH
index 1da7940b692ef945eed776b67a0858fff1d15e6c..cd27e9b574f2c14ac19389742cae3f9653015c6c 100644 (file)
@@ -62,10 +62,12 @@ public:
     void set_debug();
     void set_yydebug(bool);
     void print_declarations();
+    bool ignore_version_b_;
 public:
     void parse_file ( String init_str, String file_str);
     My_lily_parser(Sources * sources_l);
     ~My_lily_parser();
+    void set_version_check(bool ignore);
 };
 
 #endif // MY_LILY_PARSER_HH
diff --git a/lily/include/note-column-reg.hh b/lily/include/note-column-reg.hh
new file mode 100644 (file)
index 0000000..01a8609
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+  note-column-reg.hh -- declare Note_column_register
+
+  source file of the LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef NOTE_COLUMN_REG_HH
+#define NOTE_COLUMN_REG_HH
+
+#include "register.hh"
+
+class Note_column_register :public Request_register {
+    Note_column *ncol_p_;
+    /* *************** */
+    bool acceptable_elem_b(Staff_elem const*)const;
+protected:
+    virtual void acknowledge_element(Staff_elem_info);
+    virtual void pre_move_processing();
+
+public:
+    Note_column_register();
+    NAME_MEMBERS(Note_column_register);
+};
+#endif // NOTE_COLUMN_REG_HH
diff --git a/lily/include/note-column.hh b/lily/include/note-column.hh
new file mode 100644 (file)
index 0000000..b5d7179
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+  note-column.hh -- declare Note_column
+
+  source file of the LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef NOTE_COLUMN_HH
+#define NOTE_COLUMN_HH
+#include "item.hh"
+
+/** 
+  a struct for treating a group of noteheads (noteheads, stem, scripts )
+  as a single entity.  
+  */
+class Note_column : public Item {
+    Stem * stem_l_;
+    Array<Notehead*> head_l_arr_;
+    Array<Script *> script_l_arr_;
+    
+protected:
+    virtual void translate(Offset);
+    virtual  Interval do_height()const;
+    virtual void do_print() const ;
+    virtual void do_pre_processing();
+    virtual Interval do_width()const;
+public:
+    
+    NAME_MEMBERS(Note_column);
+    Note_column();
+    void add(Notehead *);
+    void add(Stem *);
+    void add(Script *);
+};
+#endif // NOTE_COLUMN_HH
index d7a68e7798884bf6850f3f4b184037ab202ac1f2..5d9c1d012d4a45fa2e07ae082936945af9076b96 100644 (file)
@@ -6,20 +6,23 @@
 
 #ifndef NOTEHEAD_HH
 #define NOTEHEAD_HH
+
 #include "item.hh"
 
-/**
- ball at the end of the stem
-takes care of:
+/** ball at the end of the stem takes care of:
 
   * help lines  
   * proper placing of dots 
 
+  It also is the item for a Rest
+  
   */
 
-struct Notehead : Item {
+class Notehead : public Item {
+public:
     NAME_MEMBERS(Notehead);
 
+    bool rest_b_;
     int position;
     /// -1 = lowest, 0 = inside, 1 = top
     int extremal;
@@ -37,9 +40,10 @@ struct Notehead : Item {
       position of top line (5 linestaff: 8)
       */
     Notehead(int staff_size);
-    void do_print()const;
     static int compare(Notehead * const &a, Notehead *const &b) ;
-    Molecule* brew_molecule_p()const;
+protected:
+    virtual    void do_print()const;
+    virtual    Molecule* brew_molecule_p()const;
 };
 #endif // NOTEHEAD_HH
 
index 4ac81c61e460f978cbd9ed2f4064f29842d23849..3978c797272d36ccc32ff63201bd506e5987b3f0 100644 (file)
@@ -7,7 +7,7 @@
 #ifndef REGISTER_HH
 #define REGISTER_HH
 
-#include "proto.hh"
+#include "lily-proto.hh"
 #include "varray.hh"
 #include "request.hh"
 #include "staff-elem-info.hh"
@@ -24,6 +24,7 @@ class Request_register {
      */
     Request_register(const Request_register&){}
 protected:
+    
 
     /// utility
     virtual Paper_def * paper() const;
diff --git a/lily/include/rest.hh b/lily/include/rest.hh
deleted file mode 100644 (file)
index 90e5f51..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
-  rest.hh -- part of LilyPond
-
-  (c) 1996,97 Han-Wen Nienhuys
-*/
-
-#ifndef REST_HH
-#define REST_HH
-#include "item.hh"
-
-/** typeset a Rest. A "vanilla" item.
- */
-struct Rest : Item {
-
-    int dots;
-    int balltype;
-    
-    /// rests can be translated up and down.
-    int pos_i_;
-    /* *************** */
-
-
-    Rest(Duration);
-    void do_print()const;
-NAME_MEMBERS(Rest);
-    Molecule* brew_molecule_p()const;
-};
-#endif 
-
index 8d9528b45a95a2e7f4df48db885d6856241a5280..9af312bfa4361ae8bf772ac27f8e5b10547f6809 100644 (file)
@@ -8,17 +8,30 @@
 #define SCRIPTDEF_HH
 #include "string.hh"
 
-struct Script_def{
-    int stemdir;
-    int staffdir;
+/** The characteristics of a certain kind of accent. It is not the
+  accent itself.  */
+struct Script_def {
 
-    bool invertsym;
+    /// on the other side of the stem?
+    int rel_stem_dir_i_;
+
+    /// below or above staff?
+    int staff_dir_i_;
+
+    /// how close to the note do we want to be?
+    int priority_i_;
+    
+    /// follow the ball inside staff?
+    bool inside_staff_b_;
+
+    /// invert if below staff?
+    bool invertsym_b_;
     String symidx;
 
     /* *************** */
     int compare(Script_def const &);
     void print() const;
-    Script_def(String, int, int ,bool);
+    Script_def(String, bool, int, int ,bool);
 };
 
 
index 33592cae0332a229f950f66ee1d58f54b777726a..034140baeb4e25613025e3f4170aa6fed20279d3 100644 (file)
 #include "register.hh"
 
 
-struct Script_register : Request_register {
-    Script * script_p_;
-    Script_req * script_req_l_;
-    int dir_i_;
+class Script_register : public Request_register {
+    Array<Script *> script_p_arr_;
+    Array<Script_req *> script_req_l_arr_;
+
     /* *************** */
-    void set_feature(Features dir_i_);
+    bool acceptable_elem_b(Staff_elem*);
+public:
+    NAME_MEMBERS(Script_register);
     Script_register();
+protected:
+    virtual    void set_feature(Features dir_i_);
     virtual bool try_request(Request*);
     virtual void process_requests();
     virtual void acknowledge_element(Staff_elem_info);
     virtual void pre_move_processing();
     virtual void post_move_processing();
-    NAME_MEMBERS(Script_register);
+
 };
 
 #endif // SCRIPTREG_HH
index df408f04354b54c9b0550792a8882da0419f5b0b..5ad74821cc37fb02d4b75dccec844c5f9c5b16ff 100644 (file)
@@ -7,33 +7,41 @@
 #ifndef SCRIPT_HH
 #define SCRIPT_HH
 
+#include "staff-side.hh"
 #include "script-def.hh"
 #include "item.hh"
   
-struct Script : Item {
-    int dir;
-    int symdir;
-    int pos;
-    int staffsize;
+/**
+  Accents that are put over a note-group.
+ */
+class Script : public Item, public Staff_side {
+     /**
+      Vertical dir of symbol. -1 means invert the symbol.
+     */
+    int symdir_i_;
+    
+    int pos_i_;
+    
     Script_def *specs_l_;
     Stem *stem_l_;
-    Array<Item *> support;
 
     /* *************** */
-    NAME_MEMBERS(Script);
+protected:
     Molecule *brew_molecule_p()const;
     virtual void do_post_processing();
     virtual void do_pre_processing();
-    Script(Script_req*, int staffsize);
-    void set_support(Item*);
-    void set_stem(Stem*);
-    Interval support_height()const;
-    virtual Interval width() const;
+    virtual Interval do_width() const;
 private:
     void set_symdir();
     void set_default_dir();
     void set_default_index();
     Symbol symbol()const;
+public:
+    static int compare(Script  *const&, Script *const&) ;
+    Script(Script_req*);
+    void set_stem(Stem*);
+    NAME_MEMBERS(Script);
+
 };
 
 
index 3bb547b528e1898401a8049128fa1b05e684cc6d..d3ca04af5e7ab50bba73506a9628017b2fb18fe6 100644 (file)
 #include "staff-elem.hh"
 
 
-/** a symbol which is attached between two columns. A spanner is a symbol which spans across several columns, so its
-  final appearance can only be calculated after the breaking problem
-  is solved.
+/** a symbol which is attached between two columns. A spanner is a
+  symbol which spans across several columns, so its final appearance
+  can only be calculated after the breaking problem is solved.
 
   Examples
 
-  - (de)crescendo
-  - slur
-  - beam
-  - bracket
+  \begin{itemize}
+  \item (de)crescendo
+  \item slur
+  \item beam
+  \item bracket
+  \end{itemize}
   
 
   Spanner should know about the items which it should consider:
-    e.g. slurs should be steep enough to "enclose" all those items. This
-    is absolutely necessary for beams, since they have to adjust the
-    length of stems of notes they encompass.
+  e.g. slurs should be steep enough to "enclose" all those items. This
+  is absolutely necessary for beams, since they have to adjust the
+  length of stems of notes they encompass.
 
     */
-struct Spanner:Staff_elem {
+class Spanner:public Staff_elem {
+public:
     PCol *left_col_l_, *right_col_l_;
 
     
     /* *************** */
-    
+    NAME_MEMBERS(Spanner);
+    virtual Spanner* spanner() { return this; }    
     Spanner();
-    virtual Interval width()const;
-    void do_print()const;
-
     Spanner *broken_at(PCol *c1,  PCol *c2) const;
-    virtual Spanner* spanner() { return this; }
 protected:
 
+    virtual Interval do_width()const;
+    void do_print()const;
+
+
     /**
-  clone a piece of  this spanner.
-    PRE
-    c1 >= start, c2  <= stop
+      clone a piece of  this spanner.
+      PRE
+      c1 >= start, c2  <= stop
     */
     virtual Spanner *do_break_at( PCol *c1,  PCol *c2) const=0;
-    NAME_MEMBERS(Spanner);
 };
 #endif
index 24e09501e360ed3f35f8ff9d7bdba51e22837c6a..25b8281ebd7039871bc5502204eb77d06e747681 100644 (file)
@@ -15,7 +15,7 @@
 
 /// data container.
 struct Staff_elem_info {
-    Staff_elem * elem_p_;
+    Staff_elem * elem_l_;
     Request*req_l_;
     Voice const * voice_l_;
     Array<Request_register*> origin_reg_l_arr_;
index a604385cff466692e07ef72887f8f503a3e6d0e8..c47cd024dc528709c0cf2f6a410cc216738c5447 100644 (file)
@@ -56,7 +56,12 @@ public:
     virtual ~Staff_elem();
     Staff_elem();
     NAME_MEMBERS(Staff_elem);    
-    void translate(Offset);
+
+    /**
+      translate the symbol. The symbol does not have to be created yet. 
+      Overridable, since this staff-elem might act as a pseudo-list.
+     */
+    virtual void translate(Offset);
     void add_processing();
     void pre_processing();
     void post_processing();
@@ -64,15 +69,19 @@ public:
     
     virtual Spanner* spanner()  { return 0; }
     virtual Item * item() { return 0; }
+    /**
+      add a dependency. It may be the 0 pointer, in which case, it is ignored.
+     */
     void add_dependency(Staff_elem* );    
     void substitute_dependency(Staff_elem* old, Staff_elem * newdep);
     
 protected:
-    
+    virtual  Interval do_height()const;
+    virtual Interval do_width()const;
     /// do printing of derived info.
-    virtual void do_print() const=0;
+    virtual void do_print() const {}
     /// generate the molecule    
-    virtual Molecule* brew_molecule_p()const=0;
+    virtual Molecule* brew_molecule_p()const;
     ///executed directly after the item is added to the PScore
     virtual void do_add_processing();
     /// do calculations before determining horizontal spacing
index 2229c99ab0e81f1b88774094bf76b60ee67dc1d2..2fc4fd79265696b7a0351d4d0bb2594b0bdc787b 100644 (file)
@@ -14,7 +14,7 @@
 struct Staff_info {
     int *c0_position_i_l_;
     Staff_walker *walk_l_;
-    
+    Staff_symbol*staff_sym_l_;
     
     /// when is now?
     Time_description const *time_C_;
index 344659dff3e1c1307e0c9d0cf6a034c117c0aa70..88c41f89991dbb12d91adb46d05eea2299df495d 100644 (file)
@@ -20,7 +20,12 @@ class Staff_registers : public Register_group_register {
     Input_register const *ireg_C_;
     int base_position_i_;
     Array<Voice_group_registers*> group_l_arr_;
+    Staff_symbol * staff_sym_l_;
+protected:
+    virtual bool try_request(Request * r);
+    virtual Staff_info get_staff_info();
+    virtual bool acceptable_request_b(Request*) const ;
+    virtual void acknowledge_element(Staff_elem_info);
 public:
     
     /* *************** */
@@ -30,10 +35,7 @@ public:
                      Voice_group_registers * old_group);
     Voice_group_registers * get_group(String id);
     void terminate_register(Request_register * reg);
-    virtual bool try_request(Request * r);
-    virtual Staff_info get_staff_info();
     Staff_registers(Input_register const*);
-    virtual bool acceptable_request_b(Request*) const ;
 };
 
 #endif // STAFF_REGS_HH
diff --git a/lily/include/staff-side.hh b/lily/include/staff-side.hh
new file mode 100644 (file)
index 0000000..bd29c53
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+  staff-side.hh -- declare Staff_side
+
+  source file of the LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef STAFF_SIDE_HH
+#define STAFF_SIDE_HH
+
+#include "staff-elem.hh"
+
+/// A symbol which sits along  the staff
+class Staff_side  {
+    Array<Staff_elem*> support_l_arr_;
+
+    Staff_symbol * staff_sym_l_;
+    Staff_elem * elem_l_;
+    Interval support_height()const;
+public:
+       /**
+      Vertical dir of symbol relative to staff. -1 = below staff?
+      */
+    int dir_i_;
+    
+    /// follow the support inside the staff?
+    bool inside_staff_b_;
+
+    void set_staffsym(Staff_symbol*);
+  
+    Staff_side(Staff_elem*);
+    void add_support(Staff_elem*);
+    
+protected:
+    int get_position_i()const;
+};
+#endif // STAFF_SIDE_HH
index 24bd2c7abb8afe4f92fe78e5839893dd144b6b8a..7ca370dd616e404c68945951330d23508e85f690 100644 (file)
@@ -19,9 +19,11 @@ class Staff_sym_register : public Request_register {
     Staff_symbol *span_p_;
     Moment last_mom_;
 public:
-    ~Staff_sym_register();
     Staff_sym_register();
     NAME_MEMBERS(Staff_sym_register);
+protected:
+    virtual void process_requests();
+    ~Staff_sym_register();
     virtual void pre_move_processing();
     virtual void post_move_processing();
 };
index bcec2bfaff803f148b48fb1e6ac6ba8e16debd39..852771b79e17fa9524360e72e085b8f84ba9ffba 100644 (file)
 #ifndef STAFFSYM_HH
 #define STAFFSYM_HH
 #include "spanner.hh"
+
 /**
   This spanner draws the lines of a pstaff.
   The bottom line is position 0.
   */
 class Staff_symbol : public Spanner
 {
-public:
     /// this many lines.
     int no_lines_i_;
+public:
 
+    void set_extent(PCol* p1, PCol* p2);
     NAME_MEMBERS(Staff_symbol);
     Staff_symbol(int lines);
+    Real inter_note_f()const;
+    int steps_i()const;
+protected:
     virtual Molecule* brew_molecule_p() const;
-    void set_extent(PCol* p1, PCol* p2);
     virtual void do_print()const;
     virtual Spanner *do_break_at( PCol *c1,  PCol *c2) const;
 };
index 34776ea49cec6b45965221871b18e516d3d28f0a..e64aafdd6958cd6ca5e4f0c6b9626732ae478f95 100644 (file)
@@ -51,7 +51,7 @@ struct Stem : Item {
        -1 stem points down, +1: stem points up
        */
 
-    int dir;
+    int dir_i_;
     Real stem_xoffset;
     
     Array<Notehead*> heads;
@@ -74,7 +74,7 @@ struct Stem : Item {
     void set_noteheads();
     void do_pre_processing();
 
-    Interval width() const;
+    virtual Interval do_width() const;
 
     Molecule* brew_molecule_p() const;
 };
index ba81fce47497de81ae4b8acd3cce6445f587c016..85ff171d6d08b1587548fe664cbca796c3bbb232 100644 (file)
@@ -9,18 +9,18 @@
 
 #include "text-def.hh"
 #include "item.hh"
+#include "staff-side.hh"
 
 /**
   print a fixed width text above or below the staff.
  */
-class Text_item : public Item {
-    void init(Text_def* tdef_l,int staffsize_i); 
+class Text_item : public Item ,public Staff_side{
+    void init(Text_def* tdef_l); 
     Text_def* tdef_p_;
+
 public:
     Text_def * tdef_l();
     int pos_i_;
-    int staffsize_i_;
-    int dir_i_;
         
     /* ***************/
 
@@ -28,8 +28,8 @@ public:
     virtual void set_default_index();
     Molecule* brew_molecule_p() const;
     void do_pre_processing();
-    Text_item(Text_def*,int);
-    Text_item(Text_req*,int);
+    Text_item(Text_def*);
+    Text_item(Text_req*);
     ~Text_item();
 };
 
index 0694a3b83f3fefc007d4dc7fc45ae1ce2e849703..dbff99f0a11334750e4678d340241491bb8edf85 100644 (file)
@@ -44,7 +44,7 @@ Key_register::acknowledge_element(Staff_elem_info info)
        change_key_b_ = true;
     }
     
-    if (info.elem_p_->name() == Bar::static_name()) 
+    if (info.elem_l_->name() == Bar::static_name()) 
        default_key_b_ = true;
 
 }
index 00180d66a0abfc5cbd7cee9d48d2e2fdccf463ee..cdb62a8717fdde6e83e7c20867bae24c3fefdfc2 100644 (file)
@@ -226,7 +226,7 @@ include           {
 <*>{WHITE}+    {
        
 }
-<notes>.       {
+<INITIAL,notes>.       {
        return yylval.c = YYText()[0];
 }
 <INITIAL,lyrics,notes>\\. {
index 389178bbc3bf14a2d78ed971701da28c86ac137e..03f605394de9ca9937a71fc6b168b2e350c8dec8 100644 (file)
@@ -1,7 +1,7 @@
 #include "version.hh"
 #include <stdio.h>
 
-static char *s = "LilyPond " MAJOR_VERSION "." MINOR_VERSION "."  PATCH_LEVEL MY_PATCH_LEVEL " #%d";
+static char *s = "GNU LilyPond " MAJOR_VERSION "." MINOR_VERSION "."  PATCH_LEVEL MY_PATCH_LEVEL " #%d";
 
 static const int build=
 #include ".build"
index caf3e524a66e8539a790e0a60a2074526f510caf..6af18c1c8b4c5e5f347aa08bd1a5fbe73da254d9 100644 (file)
@@ -36,7 +36,7 @@ Local_key_register::acknowledge_element(Staff_elem_info info)
        if( note_l_->forceacc_b_ ||
            local_key_.oct(note_l_->octave_i_).acc(note_l_->notename_i_)
            != note_l_->accidental_i_) {
-           Item * support_l_ = info.elem_p_->item();
+           Item * support_l_ = info.elem_l_->item();
        
 
            if (!key_item_p_) {
@@ -48,7 +48,7 @@ Local_key_register::acknowledge_element(Staff_elem_info info)
            local_key_.oct(note_l_->octave_i_)
                .set(note_l_->notename_i_, note_l_->accidental_i_);
        }
-    } else if (info.elem_p_->name()==Key_item::static_name()) { 
+    } else if (info.elem_l_->name()==Key_item::static_name()) { 
        Key_register * key_reg_l =
            (Key_register*)info.origin_reg_l_arr_[0];
        key_C_ = &key_reg_l->key_;
index 8bca62e9c939ddf7ba4f97d726157e1f30a9cdad..318652393775c40f5e70089b2132af744b2f7469 100644 (file)
@@ -10,7 +10,7 @@
 #include "debug.hh"
 
 Lyric_item::Lyric_item(Lyric_req* lreq_l, int voice_count_i)
-    : Text_item(lreq_l,0)
+    : Text_item(lreq_l)
 {
     pos_i_ = -voice_count_i * 4 ;      // 4 fontsize dependant. TODO
     dir_i_ = -1;
index ab0aced86008bd3f8267d1bf6e16914855b1f8b6..d14272f41b2d500755d4613104ca64e81ed0c7ad 100644 (file)
 
 Sources* source_l_g = 0;
 bool only_midi = false;
+bool version_ignore_b_ = false;
 
+void destill_inname( String &name_str_r);
 
-void
-destill_inname( String &name_str_r);
 Long_option_init theopts[] = {
     {1, "output", 'o'},
     {0, "warranty", 'w'},
@@ -33,6 +33,7 @@ Long_option_init theopts[] = {
     {1, "init", 'i'},
     {1, "include", 'I'},
     {0, "midi", 'M'},
+    {0, "ignore-version", 'V'},
     {0,0,0}
 };
 
@@ -44,13 +45,14 @@ usage()
        "Typeset and or produce midi output from mudela-file or stdin\n"
        "\n"
        "Options:\n"
-       "  -d, --debug         enable debugging output\n"
-        "  -I, --include=DIR   add DIR to search path\n"
-       "  -i, --init=FILE     use FILE as init file\n"
-       "  -h, --help          this help\n"
-       "  -w, --warranty      show warranty and copyright\n"
-       "  -o, --output=FILE   set FILE as default output\n"
-       "  -M, --midi          produce midi output only\n"
+       "  -d, --debug            enable debugging output\n"
+        "  -I, --include=DIR      add DIR to search path\n"
+       "  -i, --init=FILE        use FILE as init file\n"
+       "  -h, --help             this help\n"
+       "  -w, --warranty         show warranty and copyright\n"
+       "  -o, --output=FILE      set FILE as default output\n"
+       "  -M, --midi             produce midi output only\n"
+       "  -V, --ignore-version   ignore mudela version\n"
        "\n"
        "LilyPond was compiled with the following settings:\n"
 #ifdef NDEBUG
@@ -105,6 +107,7 @@ do_one_file(String init_str, String file_str)
     source_l_g->set_path(path_l);
     {
        My_lily_parser parser(source_l_g);
+       parser.set_version_check(version_ignore_b_);
        parser.parse_file(init_str, file_str);
     }
     do_scores();
@@ -147,6 +150,9 @@ main (int argc, char **argv)
            usage();
            exit(0);
            break;
+       case 'V':
+           version_ignore_b_ = false;
+           break;
        case 'd':
            set_debug(true);
            break;
index 28505097c045e5db9e9119ecf89834da8968d24e..1a274f92d9c1426b963b563ff4b801552f333f4a 100644 (file)
@@ -63,6 +63,7 @@ static Keyword_ent the_key_tab[]={
     {"transpose", TRANSPOSE},
     {"unitspace", UNITSPACE},
     {"width", WIDTH},
+    {"version", VERSION},
     {"grouping", GROUPING},
     {0,0}
 };
index b46d6dd1a0e943d405c09d3e83199b1bb15b3814..ce375484ed5bea779538e8157eaba2f27e52a8e2 100644 (file)
@@ -20,7 +20,11 @@ My_lily_parser::clear_notenames()
 {
     lexer_p_->clear_notenames();
 }
-
+void
+My_lily_parser::set_version_check(bool ig)
+{
+    ignore_version_b_ = ig;
+}
 void
 My_lily_parser::set_debug()
 {
diff --git a/lily/note-column-reg.cc b/lily/note-column-reg.cc
new file mode 100644 (file)
index 0000000..1263ca1
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+  note-column-reg.cc -- implement Note_column_register
+
+  source file of the LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "note-column-reg.hh"
+#include "notehead.hh"
+#include "stem.hh"
+#include "note-column.hh"
+#include "script.hh"
+
+bool
+Note_column_register::acceptable_elem_b(Staff_elem const*elem_C)const
+{
+    char const*nC = elem_C->name();
+    return (nC == Script::static_name() || nC == Notehead::static_name() 
+           || nC == Stem::static_name());
+}
+
+void
+Note_column_register::acknowledge_element(Staff_elem_info i)
+{
+    if (!acceptable_elem_b(i.elem_l_))
+       return;
+
+    if (!ncol_p_)
+       ncol_p_ = new Note_column;
+
+    char const*nC = i.elem_l_->name();
+
+    if (nC == Script::static_name())
+       ncol_p_->add((Script*)i.elem_l_);
+    else if (nC == Notehead::static_name())
+       ncol_p_->add((Notehead*)i.elem_l_);
+    else if (nC == Stem::static_name())
+       ncol_p_->add((Stem*)i.elem_l_);
+}
+
+void
+Note_column_register::pre_move_processing()
+{
+    if (ncol_p_) {
+       typeset_element(ncol_p_);
+       ncol_p_ =0;
+    }
+}
+Note_column_register::Note_column_register()
+{
+    ncol_p_=0;
+}
+IMPLEMENT_STATIC_NAME(Note_column_register);
+ADD_THIS_REGISTER(Note_column_register);
diff --git a/lily/note-column.cc b/lily/note-column.cc
new file mode 100644 (file)
index 0000000..f71d61b
--- /dev/null
@@ -0,0 +1,135 @@
+/*
+  note-column.cc -- implement Note_column
+
+  source file of the LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "note-column.hh"
+#include "debug.hh"
+#include "script.hh"
+#include "notehead.hh"
+#include "stem.hh"
+
+IMPLEMENT_STATIC_NAME(Note_column);
+
+
+void
+Note_column::add(Stem*stem_l)
+{
+    assert(!stem_l_);
+    stem_l_ = stem_l;
+    add_dependency(stem_l);
+}
+
+void
+Note_column::add(Notehead* n_l)
+{
+    head_l_arr_.push(n_l);
+    add_dependency(n_l);
+}
+
+void
+Note_column::add(Script*s_l)
+{
+    script_l_arr_.push(s_l);
+    add_dependency(s_l);
+}
+
+void
+Note_column::translate(Offset o)
+{
+    for (int i=0; i < head_l_arr_.size(); i++)
+       head_l_arr_[i]->translate(o);
+    for (int i=0; i < script_l_arr_.size(); i++) 
+       script_l_arr_[i]->translate(o);
+    if (stem_l_)
+       stem_l_->translate(o);
+}
+
+
+void
+Note_column::do_print()const
+{
+    mtor << "heads: " << head_l_arr_.size() << '\n'; 
+    mtor << "scripts: " << script_l_arr_.size() << '\n'; 
+}
+
+Interval
+Note_column::do_height()const return r
+{
+    if (stem_l_)
+        r.unite(stem_l_->height());
+    for (int i=0; i < head_l_arr_.size(); i++)
+       r.unite(head_l_arr_[i]->height());
+    for (int i=0; i < script_l_arr_.size(); i++) 
+       r.unite(script_l_arr_[i]->height());
+}
+
+Interval
+Note_column::do_width()const return r;
+{
+    if (stem_l_)
+        r.unite(stem_l_->width());
+    for (int i=0; i < head_l_arr_.size(); i++)
+       r.unite(head_l_arr_[i]->width());
+    for (int i=0; i < script_l_arr_.size(); i++) 
+       r.unite(script_l_arr_[i]->width());
+}
+
+void
+Note_column::do_pre_processing()
+{
+    if (!script_l_arr_.size()) 
+       return;
+
+    Array<Script*> placed_l_arr_a[4];
+    for (int i=0; i < script_l_arr_.size(); i++) {
+       Script*s_l = script_l_arr_[i];
+       int j = (s_l->dir_i_ >0) ? 0 : 2;
+       if (!s_l->inside_staff_b_) 
+           j ++;
+       
+       placed_l_arr_a[j].push(s_l);
+    }
+    for (int j =0; j <4; j++) {
+       placed_l_arr_a[j].sort( Script::compare);
+    }
+    
+    Notehead *top_head_l=0;
+    Notehead *bot_head_l=0;
+    for (int i=0; i< head_l_arr_.size(); i++) {
+       if (head_l_arr_[i]->extremal == -1)
+           bot_head_l = head_l_arr_[i];
+       else if (head_l_arr_[i]->extremal == 1)
+           top_head_l = head_l_arr_[i];
+    }
+    /* argh. This sux. */
+    if (!top_head_l) 
+       top_head_l = bot_head_l;
+    if (!bot_head_l) 
+       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(); j++) {
+           placed_l_arr_a[j][i]->add_support(support_l);
+           support_l = placed_l_arr_a[j][i];
+       }
+    }
+    
+    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);
+           support_l = placed_l_arr_a[j][i];
+       }
+    }
+}
+Note_column::Note_column()
+{
+    stem_l_ =0;
+}
+    
index 528460f6f19925355f8a286f93fa7af26400f2bd..85132fe55e9cede48d0980640e142b8d1e92ca09 100644 (file)
@@ -17,6 +17,7 @@ Notehead::Notehead(int ss)
     balltype = 0;
     dots = 0;
     extremal = 0;
+    rest_b_ = false;
 }
 
 void
@@ -32,6 +33,8 @@ void
 Notehead::do_print()const
 {
 #ifndef NPRINT
+    if (rest_b_)
+       mtor << "REST! ";
     mtor << "balltype "<< balltype << ", position = "<< position
         << "dots " << dots;
 #endif
@@ -50,7 +53,11 @@ Notehead::brew_molecule_p() const return out;
     Paper_def *p = paper();
 
     Real dy = p->internote();
-    Symbol s = p->lookup_l()->ball(balltype);
+    Symbol s;
+    if (!rest_b_)
+       s = p->lookup_l()->ball(balltype);
+    else 
+       s = p->lookup_l()->rest(balltype);
     
     out = new Molecule(Atom(s));
     if (dots) {
index fd81c4f08fae871a71742061a3c32a992feabce4..7af1f3325d35ad80ce06903346427866bca8d497 100644 (file)
@@ -1,6 +1,7 @@
 %{ // -*-Fundamental-*-
 #include <iostream.h>
 
+#define MUDELA_VERSION "0.0.50"
 
 #include "script-def.hh"
 #include "symtable.hh"
@@ -138,6 +139,7 @@ yylex(YYSTYPE *s,  void * v_l)
 %token TITLE
 %token UNITSPACE
 %token WIDTH
+%token VERSION
 
 /* escaped */
 %token E_EXCLAMATION E_SMALLER E_BIGGER E_CHAR
@@ -211,9 +213,23 @@ mudela:    /* empty */
        }
        | mudela add_declaration { }
        | mudela error
+       | mudela check_version { } 
        | mudela add_notenames { }
        ;
 
+check_version:
+       VERSION STRING ';'              {
+               if (*$2 != MUDELA_VERSION) {
+                       if (THIS->ignore_version_b_) {
+                               THIS->here_input().error("Incorrect mudela version");
+                       } else {
+                               THIS->fatal_error_i_ = 1;
+                               THIS->parser_error("Incorrect mudela version");
+                       }
+               }
+       }
+       ;
+
 add_notenames:
        NOTENAMES '{' notenames_body '}'
        ;
@@ -788,8 +804,8 @@ script_definition:
        ;
 
 script_body:
-       STRING int int int              {
-               $$ = new Script_def(*$1,$2, $3,$4);
+       STRING int int int int          {
+               $$ = new Script_def(*$1,$2, $3,$4,$5);
                delete $1;
        }       
        ;
index 18be472825ab366b1d7a76b27f2725e24149faf4..a7573332007163f0bba98f4bf95a94b4c7ebbc7b 100644 (file)
@@ -57,7 +57,8 @@ Register_group_register::post_move_processing()
 void
 Register_group_register::acknowledge_element(Staff_elem_info info)
 {
-    if (!contains_b(info.origin_reg_l_arr_[0]))
+    Request_register* origin = info.origin_reg_l_arr_[0];
+    if (!contains_b(origin) && !origin->contains_b(this))
        return;
     
     for (iter_top(reg_list_, i); i.ok(); i++) 
index 2c3f2ec1af3b9d2c9077d925d02ef031d1433105..ed84c42c9b91a99daa8f162d29c8f456bd821a5c 100644 (file)
@@ -16,7 +16,6 @@
 #include "register-group.hh"
 #include "debug.hh"
 
-
 bool
 Request_register::try_request(Request*)
 {
diff --git a/lily/rest.cc b/lily/rest.cc
deleted file mode 100644 (file)
index 3e58251..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
-  rest.cc -- implement Rest
-
-  source file of the LilyPond music typesetter
-
-  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
-*/
-#include "duration.hh"
-#include "rest.hh"
-#include "dimen.hh" 
-#include "debug.hh"
-#include "paper-def.hh"
-#include "lookup.hh"
-#include "molecule.hh"
-#include "rest.hh"
-
-Rest::Rest(Duration d)
-{
-    balltype = d.type_i_;
-    dots = d.dots_i_;
-    pos_i_ = 0;
-}
-
-
-IMPLEMENT_STATIC_NAME(Rest);
-
-void
-Rest::do_print()const
-{
-#ifndef NPRINT
-    mtor << "Rest "<<balltype<< "dots " << dots;
-    Item::print();
-#endif
-}
-
-Molecule*
-Rest::brew_molecule_p()const
-{
-    Paper_def *p =paper();
-
-    Symbol s;
-    s = p->lookup_l()->rest(balltype);
-    
-    Molecule *m = new Molecule(Atom(s));
-    if (dots) {
-       Symbol d =p->lookup_l()->dots(dots);
-       Molecule dm;
-       dm.add(Atom(d));
-       m->add_right(dm);
-    }
-    m->translate(Offset(0,pos_i_ * paper()->internote()));
-    return m;
-}
-
index 53bdd121efa41af4c2d7e87fc84c5e2c5a11e683..2ec888ef6525ef3b60e75fe0d90cfab51848f253 100644 (file)
@@ -1,24 +1,27 @@
 #include "debug.hh"
 #include "script-def.hh"
 
-Script_def::Script_def(String idx,  int stem, int staff ,bool invert)
+Script_def::Script_def(String idx,  bool follow, int stem, int staff ,bool invert)
 {
+    inside_staff_b_ = follow;
     symidx = idx ;
-    stemdir =stem;
-    staffdir = staff;
-    invertsym = invert;
+    rel_stem_dir_i_ =stem;
+    staff_dir_i_ = staff;
+    invertsym_b_ = invert;
+    priority_i_ =0;
 }
+
 void
 Script_def::print() const
 {
     mtor << "Script_def{ idx: " << symidx 
-        << " direction, stem: " << stemdir << " staff : " << staffdir << "}\n";
+        << " direction, stem: " << rel_stem_dir_i_ << " staff : " << staff_dir_i_ << "}\n";
 }
 int
 Script_def::compare(Script_def const & c)
 {
     return !(symidx == c.symidx &&
-       stemdir == c.stemdir&&
-       staffdir == c.staffdir&&
-       invertsym == c.invertsym);
+       rel_stem_dir_i_ == c.rel_stem_dir_i_&&
+       staff_dir_i_ == c.staff_dir_i_&&
+       invertsym_b_ == c.invertsym_b_);
 }
index cd7b0814297cfa106d81ea349397697fec6d75e8..5fd12bc9f6605303193c2d00542313e59a1697af 100644 (file)
@@ -9,10 +9,10 @@
 #include "musical-request.hh"
 #include "complex-walker.hh"
 #include "stem.hh"
+#include "staff-sym.hh"
 
 Script_register::Script_register()
 {
-    script_p_ = 0;
     post_move_processing();
 }
 
@@ -21,13 +21,12 @@ Script_register::try_request(Request *r_l)
 {
     if (!r_l->script())
        return false ;
-
-    if (script_req_l_
-       && Script_req::compare(*script_req_l_, *r_l->script()))
+    for (int i=0; i < script_req_l_arr_.size(); i++)
+       if ( !Script_req::compare(*script_req_l_arr_[i], *r_l->script())) {
+           return true;
+       }
        
-       return false;
-
-    script_req_l_ = r_l->script();
+    script_req_l_arr_.push( r_l->script());
     
     return true;
 }
@@ -35,44 +34,58 @@ Script_register::try_request(Request *r_l)
 void
 Script_register::process_requests()
 {
-    if (script_req_l_) {
-       script_p_ = new Script(script_req_l_, 10);
-       announce_element(
-           Staff_elem_info(script_p_, script_req_l_));
+    for (int i=0; i < script_req_l_arr_.size(); i++){
+       Script_req* l=script_req_l_arr_[i];
+       Script *p =new Script( l);
+       script_p_arr_.push(p);
+       announce_element(Staff_elem_info(p, l));
     }
 }
 
+bool
+Script_register::acceptable_elem_b(Staff_elem*s_l)
+{
+    char const *nC = s_l->name();
+    return (nC == Stem::static_name());
+}
+
 void
 Script_register::acknowledge_element(Staff_elem_info info)
 {
-    if (!script_p_)
+    Staff_elem *elem_l = info.elem_l_;
+    if (!acceptable_elem_b(elem_l))
        return;
-    if (info.elem_p_->name() == Stem::static_name())
-       script_p_->set_stem((Stem*)info.elem_p_);
-    else if (info.req_l_->rhythmic())
-       script_p_->set_support(info.elem_p_->item());
+    
+    for (int i=0; i < script_p_arr_.size(); i++) {
+       Script*script_l = script_p_arr_[i];
+       if (elem_l->name() == Stem::static_name())
+           script_l->set_stem((Stem*)elem_l);
+    }
 }
 
 void
 Script_register::pre_move_processing()
 {
-    if (script_p_){
-       script_p_->dir = dir_i_;
-       typeset_element(script_p_);
-       script_p_ = 0;
+    Staff_symbol* s_l = get_staff_info().staff_sym_l_;
+    for (int i=0; i < script_p_arr_.size(); i++) {
+       
+       Script*script_p = script_p_arr_[i];
+       script_p->set_staffsym( s_l);
+       typeset_element(script_p);
     }
+    script_p_arr_.set_size(0);
 }
 void
 Script_register::post_move_processing()
 {
-    script_req_l_ = 0;
+    script_req_l_arr_.set_size(0);
 }
 
 void
-Script_register::set_feature(Features i)
+Script_register::set_feature(Features )
 {
-    if (i.direction_i_|| i.initialiser_b_)
-       dir_i_ = i.direction_i_;
+//    if (i.direction_i_|| i.initialiser_b_)
+    //dir_i_ = i.direction_i_;
 }
 IMPLEMENT_STATIC_NAME(Script_register);
 ADD_THIS_REGISTER(Script_register);
index b92892de6fde6f1c71d8077f5962a795f22a7db9..2f471e6ef2344f416b22b5954e2c8091feb17702 100644 (file)
@@ -1,3 +1,11 @@
+/*
+  script.cc -- implement Script
+
+  source file of the LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
 #include "musical-request.hh"
 #include "paper-def.hh"
 #include "script.hh"
@@ -11,89 +19,47 @@ void
 Script::set_stem(Stem*st_l)
 {
     stem_l_ = st_l;
-    add_dependency(st_l);
+    add_support(st_l);
 }
 
-void
-Script::set_support(Item*i)
-{
-    support.push(i);
-    add_dependency(i);
-}
 
-Script::Script(Script_req* rq, int staflen)
+Script::Script(Script_req* rq)
+    :Staff_side(this)
 {    
-    staffsize =staflen;
     specs_l_ = rq->scriptdef_p_;
+    inside_staff_b_ = specs_l_->inside_staff_b_;
     stem_l_ = 0;
-    pos = 0;
-    symdir=1;
-    dir =rq->dir_i_;
+    pos_i_ = 0;
+    symdir_i_=1;
+    dir_i_ =rq->dir_i_;
 }
 
 void
 Script::set_symdir()
 {
-    if (specs_l_->invertsym)
-       symdir = (dir < 0) ? -1:1;
+    if (specs_l_->invertsym_b_)
+       symdir_i_ = (dir_i_ < 0) ? -1:1;
 }
 
 void
 Script::set_default_dir()
 {
-    if (specs_l_->stemdir) {
-       if (!stem_l_)
-           dir = 1;
-       else
-           dir = stem_l_->dir * specs_l_->stemdir;
+    int s_i=specs_l_->rel_stem_dir_i_;
+    if (s_i && stem_l_)
+       dir_i_ = stem_l_->dir_i_ * s_i;
+    else {
+       dir_i_ =specs_l_->staff_dir_i_;
     }
 }
 
-Interval
-Script::support_height() const return r;
-{
-    for (int i=0; i < support.size(); i++)
-       r.unite(support[i]->height());
-}
-
 void
 Script::set_default_index()
 {
-    Real inter_f= paper()->internote();
-    Interval dy = symbol().dim.y;
-    
-    int d = specs_l_->staffdir;
-    Real y  ;
-    if (!d) {
-       Interval v= support_height();
-       y = v[dir]  -dy[-dir] + 2*dir*inter_f;
-    } else {
-       y  = (d > 0) ? staffsize + 2: -2; // ug
-       y *=inter_f;
-       Interval v= support_height();
-
-       if (d > 0) {
-           y = y >? v.max();
-       } else if (d < 0) {
-           y = y <? v.min();
-       }
-    }
-    
-    if (stem_l_) {
-       Interval v= stem_l_->height();
-
-       if (d > 0 || (!d && dir > 0)) {
-           y = y >? v.max();
-       }else if (d < 0 || (!d && dir < 0)) {
-           y = y <? v.min();
-       }
-    }
-    
-    pos = int(rint(Real(y)/inter_f));
+    pos_i_ = get_position_i();
 }
 
 Interval
-Script::width() const
+Script::do_width() const
 {
     return symbol().dim.x;
 }
@@ -101,7 +67,7 @@ Script::width() const
 Symbol
 Script::symbol()const
 {
-    String preidx_str = (symdir < 0) ?"-" :"";
+    String preidx_str = (symdir_i_ < 0) ?"-" :"";
     return paper()->lookup_l()->script(preidx_str + specs_l_->symidx);
 }
 
@@ -124,7 +90,14 @@ Script::brew_molecule_p() const
     Real dy = paper()->internote();
     
     Molecule*out = new Molecule(Atom(symbol()));
-    out->translate(Offset(0,dy * pos));
+    out->translate(Offset(0,dy * pos_i_));
     return out;
 }
 IMPLEMENT_STATIC_NAME(Script);
+
+int 
+Script::compare(Script  *const&l1, Script *const&l2) 
+{
+    return l1->specs_l_->priority_i_ - l2->specs_l_->priority_i_;
+}
+    
index 8acf6a1fec944100ff2276340d20ccd8c84498f2..0921ef27f077b0507de63433fcb8fbdd62b1fdb0 100644 (file)
@@ -37,8 +37,8 @@ Slur_register::try_request(Request *req_l)
 void
 Slur_register::acknowledge_element(Staff_elem_info info)
 {
-    if (info.elem_p_->name() == Notehead::static_name()) { 
-       Notehead *head_p =(Notehead*) info.elem_p_ ;// ugh
+    if (info.elem_l_->name() == Notehead::static_name()) { 
+       Notehead *head_p =(Notehead*) info.elem_l_ ;// ugh
        for (int i = 0; i < slur_l_stack_.size(); i++)
            slur_l_stack_[i]->add(head_p );
        for (int i = 0; i < end_slur_l_arr_.size(); i++)
index d2a8c2bc756a59224670a4155cdc7d1cb033f895..c640b2927e726ad4230ecdb5c80ed091340e6ca1 100644 (file)
@@ -35,7 +35,7 @@ Spanner::Spanner()
 
 
 Interval
-Spanner::width()const
+Spanner::do_width()const
 {
     Real r = right_col_l_->hpos;
     Real l = left_col_l_->hpos;
index 1bb9db32d4224379d12ad0726c99e38f7d133413..c0465584928437002d577e9ee2f01a4c6a1b682c 100644 (file)
 
 Staff_elem_info::Staff_elem_info(Staff_elem*s_l, Request*r_l)
 {
-    elem_p_ = s_l;
+    elem_l_ = s_l;
     voice_l_ =  (r_l)?r_l->voice_l():0;
     req_l_ = r_l;
 }
 
 Staff_elem_info::Staff_elem_info()
 {
-    elem_p_ = 0;
+    elem_l_ = 0;
     voice_l_ = 0;
 
     req_l_ = 0;
index 4db170e0853f87d14f3fd286c6b16737fb58f102..14a4f63ef40d7591d88352baec7908fca809763e 100644 (file)
@@ -1,3 +1,13 @@
+/*
+  staff-elem.cc -- implement Staff_elem
+
+  source file of the LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "paper-def.hh"
+#include "lookup.hh"
 #include "p-score.hh"
 #include "symbol.hh"
 #include "p-staff.hh"
@@ -23,6 +33,7 @@ Staff_elem::Staff_elem(Staff_elem const&s)
     pstaff_l_ = s.pstaff_l_;
     offset_ = Offset(0,0);
 }
+
 /**
   TODO:
   If deleted, then remove dependant_l_arr_ depency!
@@ -37,35 +48,44 @@ Staff_elem::translate(Offset O)
 {
     offset_ += O;
 }
+
 Interval
-Staff_elem::width() const
+Staff_elem::do_width() const return r;
 {
-    Interval r;
-
+    
     if (!output){
-       Molecule*m      = brew_molecule_p();
+       Molecule*m = brew_molecule_p();
        r = m->extent().x;
        delete m;
     } else
        r = output->extent().x;
-  
+}
+Interval
+Staff_elem::width() const
+{
+    Interval r=do_width();
+
     if (!r.empty_b()) // float exception on DEC Alpha
        r+=offset_.x;
 
     return r;
 }
 Interval
-Staff_elem::height() const
+Staff_elem::do_height() const return r
 {
-    Interval r;
-
     if (!output){
        Molecule*m      = brew_molecule_p();
        r = m->extent().y;
        delete m;
     } else
        r = output->extent().y;
-    
+}
+
+Interval
+Staff_elem::height() const
+{
+    Interval r=do_height();
+
     if (!r.empty_b())
        r+=offset_.y;
 
@@ -199,3 +219,10 @@ Staff_elem::add_dependency(Staff_elem * p)
     p->dependant_l_arr_.push(p);
 }
 IMPLEMENT_STATIC_NAME(Staff_elem);
+
+Molecule*
+Staff_elem::brew_molecule_p()const
+{
+    Atom a(paper()->lookup_l()->fill(Box(Interval(0,0), Interval(0,0))));
+    return new Molecule (a);
+}
index b6fb13d347cdddaf69bb8efbb0da4aaf2b8289e2..b2b1e7250443255da7e706835f1f195722b85bb7 100644 (file)
@@ -4,8 +4,9 @@
   source file of the LilyPond music typesetter
   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
 */
-#include "staff.hh"
 #include "proto.hh"
+#include "plist.hh"
+#include "staff.hh"
 #include "staff-info.hh"
 #include "score-column.hh"
 #include "complex-walker.hh"
index e22d32873c93a6c4688d158f2f015e516130cfff..983c6a6d2e8a2ce1357bede9081f54e29d0115fa 100644 (file)
@@ -18,11 +18,13 @@ Staff_info
 Staff_registers::get_staff_info() return inf;
 {
     inf = Request_register::get_staff_info();
+    inf.staff_sym_l_=staff_sym_l_;
     inf.c0_position_i_l_ = &c0_position_i_;
 }
 
 Staff_registers::Staff_registers(Input_register const*ireg_C)
 {
+    staff_sym_l_ =0;
     c0_position_i_ = 0;
     base_position_i_ =0;
     add( ireg_C->get_nongroup_p_arr());
@@ -116,3 +118,10 @@ Staff_registers::acceptable_request_b(Request*r)const
        (r->command() && r->command()->groupchange());
 }
 
+void
+Staff_registers::acknowledge_element(Staff_elem_info i)
+{
+    Register_group_register::acknowledge_element(i);
+    if ( i.elem_l_->name() == Staff_symbol::static_name())
+       staff_sym_l_ = (Staff_symbol*)i.elem_l_;
+}
diff --git a/lily/staff-side.cc b/lily/staff-side.cc
new file mode 100644 (file)
index 0000000..92b7917
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+  staff-side.cc -- implement Staff_side
+
+  source file of the LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "staff-side.hh"
+#include "staff-sym.hh"
+
+void
+Staff_side::set_staffsym(Staff_symbol* s_l)
+{
+    staff_sym_l_ = s_l;
+}
+
+Staff_side::Staff_side(Staff_elem * elem_l)
+{
+    elem_l_ = elem_l;
+    dir_i_ =0;
+    staff_sym_l_ =0;
+    inside_staff_b_ =false;
+}
+
+
+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());
+}
+
+void
+Staff_side::add_support(Staff_elem*i)
+{
+    support_l_arr_.push(i);
+    elem_l_->add_dependency(i);
+}
+
+int
+Staff_side::get_position_i()const
+{
+    if (!staff_sym_l_)
+       return 0;
+    
+    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;
+       Interval v= support_height();
+
+       if (dir_i_ > 0) {
+           y = y >? (v.max() + 2*inter_f);
+       } else if (dir_i_ < 0) {
+           y = y <? (v.min() - 2*inter_f);
+       }
+    } else {
+       Interval v= support_height();
+       y = v[dir_i_]  + 2*dir_i_*inter_f;      // ugh
+    }
+    return int(rint(Real(y)/inter_f));
+}
index 34a53a552ba96d582e5cceb239e508595d59a786..e201edb6e311ed53babb11caa13d95eedcd7788e 100644 (file)
@@ -32,6 +32,11 @@ Staff_sym_register::post_move_processing()
     }
 }
 
+void
+Staff_sym_register::process_requests()
+{
+    announce_element(Staff_elem_info(span_p_, 0));
+}
 
 void
 Staff_sym_register::pre_move_processing()
index 9eb0e76899b8ed66b0e86b34ce7cf670c47d9f06..9eb4d6d2ac5d9306875f25d96fda9cd49e41790a 100644 (file)
@@ -46,3 +46,15 @@ Staff_symbol::set_extent(PCol*p1, PCol*p2)
     left_col_l_ = p1;
     right_col_l_ = p2;
 }
+
+Real
+Staff_symbol::inter_note_f()const
+{
+    return paper()->internote();
+}
+
+int
+Staff_symbol::steps_i() const
+{
+    return no_lines_i_*2;
+}
index 773f0ac1e0bf363036793fc340766fd781339468..50131835dae5b6b59f4aa1643f5f452fabf89eab 100644 (file)
@@ -107,18 +107,19 @@ Stem_beam_register::acknowledge_element(Staff_elem_info info)
     if (!stem_p_)
        return;
 
-    if (info.elem_p_->name() == Notehead::static_name() &&
-       stem_req_l_->duration() == info.req_l_->rhythmic()->duration())
-       
-       stem_p_->add((Notehead*)info.elem_p_);
+    if (info.elem_l_->name() == Notehead::static_name() &&
+       stem_req_l_->duration() == info.req_l_->rhythmic()->duration()){
+       Notehead * n_l= (Notehead*)info.elem_l_;
+       if (!n_l->rest_b_)
+           stem_p_->add((Notehead*)info.elem_l_);
+    }
 }
-
 void
 Stem_beam_register::pre_move_processing()
 {
     if (stem_p_) {
        if (default_dir_i_)
-           stem_p_->dir = default_dir_i_;
+           stem_p_->dir_i_ = default_dir_i_;
        
        typeset_element(stem_p_);
        stem_p_ = 0;
index 047aec7b9f21a86516d4997ead7d38d34f9c116e..01d33597d6401dc1df3168be1518fab061335516 100644 (file)
@@ -19,7 +19,7 @@ Stem::Stem(int c) //, Moment len)
     maxnote = -1000;
     bot = top = 0;
     flag = 4;
-    dir =0;
+    dir_i_ =0;
     staff_center=c;
     stemlen=0;
     print_flag=true;
@@ -41,12 +41,12 @@ Stem::set_stemend(Real se)
 {
 
     // todo: margins
-    if (!  ((dir > 0 && se >= maxnote) || (se <= minnote && dir <0))  )        
+    if (!  ((dir_i_ > 0 && se >= maxnote) || (se <= minnote && dir_i_ <0))  )  
        warning("Weird stem size; check for narrow beams");
     
-    top = (dir < 0) ? maxnote           : se;
-    bot = (dir < 0) ? se  : minnote;
-    flag = dir*abs(flag);
+    top = (dir_i_ < 0) ? maxnote           : se;
+    bot = (dir_i_ < 0) ? se  : minnote;
+    flag = dir_i_*abs(flag);
 }
 
 void
@@ -69,8 +69,8 @@ Stem::add(Notehead *n)
 int
 Stem::get_default_dir()
 {
-    if (dir)
-       return dir;
+    if (dir_i_)
+       return dir_i_;
     Real mean = (minnote+maxnote)/2;
     return (mean > staff_center) ? -1: 1;
 }
@@ -78,23 +78,23 @@ Stem::get_default_dir()
 void
 Stem::set_default_dir()
 {
-    dir = get_default_dir();
+    dir_i_ = get_default_dir();
 }
 
 void
 Stem::set_default_stemlen()
 {
-    if (!dir)
+    if (!dir_i_)
        set_default_dir();
 
     int stafftop = 2*staff_center;
     stemlen = STEMLEN  + (maxnote - minnote);
     
     // uhh... how about non 5-line staffs?
-    if (maxnote < -2 && dir == 1){
+    if (maxnote < -2 && dir_i_ == 1){
        int t = staff_center - staff_center/2; 
        stemlen = t - minnote +2;
-    } else if (minnote > stafftop + 2 && dir == -1) {
+    } else if (minnote > stafftop + 2 && dir_i_ == -1) {
        int t = staff_center + staff_center/2;
        stemlen = maxnote -t +2;
     }
@@ -115,8 +115,8 @@ Stem::set_default_extents()
     if (!stemlen)
        set_default_stemlen();
 
-    set_stemend((dir< 0) ? maxnote-stemlen: minnote +stemlen);
-    if (dir > 0){      
+    set_stemend((dir_i_< 0) ? maxnote-stemlen: minnote +stemlen);
+    if (dir_i_ > 0){   
        stem_xoffset = paper()->note_width()-paper()->rule_thickness();
     } else
        stem_xoffset = 0;
@@ -155,7 +155,7 @@ Stem::do_pre_processing()
 
 
 Interval
-Stem::width()const
+Stem::do_width()const
 {
     if (!print_flag || abs(flag) <= 4)
        return Interval(0,0);   // TODO!
index 817dc6a3b72f36f681469b05c9b91edb0b02d1c6..ee10d5e873b393749176d872fc75338038ce899d 100644 (file)
 #include "molecule.hh"
 #include "lookup.hh"
 
-Text_item::Text_item(Text_def *tdef_l, int staffsize_i)
+Text_item::Text_item(Text_def *tdef_l)
+    : Staff_side(this)
 {
     dir_i_ =-1;
-    init(tdef_l, staffsize_i);  
+    init(tdef_l);  
 }
 
 Text_def*
@@ -32,15 +33,15 @@ Text_item::~Text_item()
 }
 
 void
-Text_item::init(Text_def *tdef_l, int staffsize_i)
+Text_item::init(Text_def *tdef_l)
 {
-    staffsize_i_ = staffsize_i;
     tdef_p_ = new Text_def (*tdef_l);
 }
 
-Text_item::Text_item(Text_req* treq_l, int staffsize_i)
+Text_item::Text_item(Text_req* treq_l)
+    : Staff_side(this)
 {
-    init(treq_l->tdef_p_, staffsize_i);
+    init(treq_l->tdef_p_);
     dir_i_ = treq_l->dir_i_;
     if (!dir_i_)
        dir_i_ = -1;
@@ -49,7 +50,7 @@ Text_item::Text_item(Text_req* treq_l, int staffsize_i)
 void
 Text_item::set_default_index()
 {
-    pos_i_  = (dir_i_ > 0) ? staffsize_i_ + 4: -4;
+    pos_i_  = get_position_i();
 }
 
 void
index 5c61f6179dcc97e0451ae291efaec10b29fa1705..6c86fad828fc1c4be60b43cdc1e7bab83fa04802 100644 (file)
@@ -32,9 +32,8 @@ Text_register::try_request(Request*req_l)
 void
 Text_register::process_requests()
 {
-    
     if (text_req_l_) {
-       text_p_ = new Text_item(text_req_l_, 10); // UGH
+       text_p_ = new Text_item(text_req_l_); // UGH
        announce_element(Staff_elem_info(text_p_, text_req_l_));
     }
 }
@@ -43,7 +42,10 @@ Text_register::pre_move_processing()
 {
     if (text_p_) {
        text_p_->dir_i_ = dir_i_;
+       Staff_symbol* s_l = get_staff_info().staff_sym_l_;
+       text_p_->set_staffsym(s_l);
        typeset_element(text_p_);
+           
        text_p_ = 0;
     }
 }
index e0221462e793d430711379f25befa4a578287d72..17e63918fe19bcd0c83fcf89ed104252b0b11728 100644 (file)
@@ -30,7 +30,7 @@ Walker_registers::Walker_registers(Complex_walker *w)
 void
 Walker_registers::announce_element(Staff_elem_info info)
 {
-    if (info.elem_p_->name() == Bar::static_name()) {
+    if (info.elem_l_->name() == Bar::static_name()) {
        walk_l_->allow_break();
     }
     announce_info_arr_.push(info);
@@ -48,6 +48,7 @@ Walker_registers::do_announces()
     Request dummy_req;
     for (int i = 0; i < announce_info_arr_.size(); i++){
        Staff_elem_info info = announce_info_arr_[i];
+       mtor << "Announcing " << info.elem_l_->name()<<"\n";
 
        if (!info.req_l_)
            info.req_l_ = &dummy_req;
index 21f29567fe16df3376984268fae62c55821e78c2..fe1d98c47ca855e31baffe10edd57450f559079e 100644 (file)
@@ -5,7 +5,7 @@
 INSTALL = @INSTALL@
 USER_CXXFLAGS = @CXXFLAGS@ @CPPFLAGS@
 
-#CXX = @CXX@
+CXX = @CXX@
 libdir = @libdir@
 prefix = @prefix@
 TEXPREFIX = @TEXPREFIX@
index 5ed24ca44eb0eb49a34c2053c6a953aac9dd16c7..e5fae4e8f0a87d883531816e3831b7dae2abef09 100644 (file)
@@ -18,15 +18,10 @@ include ./$(depth)/.version
 #
 include ./$(depth)/make/out/Configure_variables.make
 
-# ugh, for win32 make
-# leave me up here, or i won-t work
-export CXX
-
 ifeq (0,${MAKELEVEL})
 MAKE:=$(MAKE) --no-builtin-rules
 endif
 
-
 # directory names:
 #
 outdir = out# "objects" won-t do, used for libs and deps as well