]> git.donarmstrong.com Git - lilypond.git/commitdiff
release: 0.0.45 release/0.0.45
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 25 Mar 1997 12:26:42 +0000 (13:26 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 25 Mar 1997 12:26:42 +0000 (13:26 +0100)
129 files changed:
.dstreamrc
.version
Documentation/INSTALL.pod
Documentation/Makefile
Documentation/index.pod
Documentation/lilygut.pod
Documentation/lilyinput-pre-0.1.pod
Documentation/lilypond.pod
Documentation/mudela.pod
INSTALL.text
Makefile [deleted file]
NEWS
TODO
configure
configure.in
flower/Makefile
flower/NEWS
flower/matrix.cc
init/dutch.ini
init/swedish.ini
input/cadenza.ly
input/coriolan-alto.ly
input/error.ly
input/fugue1.midi.ly
input/kortjakje.ly
input/maartje.ly
input/martien.ly
input/midi.ly
input/mlalt.ly
input/mlcello.ly
input/mlvio1.ly
input/mlvio2.ly
input/plet.ly
input/pre1.midi.ly
input/rhythm.ly
input/scales.ly
input/scsii-menuetto.ly
input/standchen.ly
input/twinkle.ly
input/wohltemperirt.ly
lib/duration-convert.cc
lib/duration.cc
lib/include/duration-convert.hh
lily/.version
lily/bar-reg.cc
lily/bar.cc
lily/beam.cc
lily/clef-item.cc
lily/clef-reg.cc
lily/command-request.cc
lily/crescendo.cc
lily/dynamic-reg.cc
lily/headreg.cc
lily/include/class-name.hh
lily/include/command-request.hh
lily/include/input-music.hh
lily/include/p-col.hh
lily/include/register-group.hh [new file with mode: 0644]
lily/include/register.hh
lily/include/registergroup.hh [deleted file]
lily/include/rest.hh
lily/include/score.hh
lily/include/staff-elem-info.hh
lily/include/voice-element.hh
lily/include/voice-group-regs.hh
lily/include/voice-regs.hh
lily/include/voice.hh
lily/include/walk-regs.hh
lily/input-music.cc
lily/item.cc
lily/key-item.cc
lily/key-reg.cc
lily/lexer.l
lily/local-key-item.cc
lily/local-key-reg.cc
lily/main.cc
lily/meter-reg.cc
lily/meter.cc
lily/midi-output.cc
lily/midi-walker.cc
lily/musical-request.cc
lily/my-lily-lexer.cc
lily/my-lily-parser.cc
lily/notehead.cc
lily/p-col.cc
lily/p-score.cc
lily/parser.y
lily/qlpsolve.cc
lily/register-group.cc [new file with mode: 0644]
lily/register.cc
lily/registergroup.cc [deleted file]
lily/rest.cc
lily/score.cc
lily/script-reg.cc
lily/script.cc
lily/slur-reg.cc
lily/slur.cc
lily/spanner.cc
lily/staff-elem.cc
lily/staff.cc
lily/staffsym.cc
lily/stem-beam-reg.cc
lily/stem.cc
lily/text-item.cc
lily/text-reg.cc
lily/text-spanner.cc
lily/voice-elt.cc
lily/voice-group-regs.cc
lily/voice-regs.cc
lily/voice.cc
make/Configure_variables.make.in
make/Makefile
make/Rules.make
make/Targets.make
make/Toplevel.make.in [new file with mode: 0644]
make/Variables.make
mi2mu/.version
mi2mu/include/midi-event.hh
mi2mu/include/midi-global.hh
mi2mu/include/my-midi-lexer.hh
mi2mu/main.cc
mi2mu/midi-event.cc
mi2mu/midi-lexer.l
mi2mu/midi-parser.y
mi2mu/midi-score.cc
mi2mu/midi-track.cc
mi2mu/midi-voice.cc
mi2mu/my-midi-lexer.cc
mi2mu/my-midi-parser.cc

index 63a0a94456b0738a0a33abf28585a1332c562ad4..5a6d7a577fd82216d3c3073aa9cd40476b66992b 100644 (file)
@@ -33,8 +33,8 @@ Staff_commands                1
 Stem                   1
 Staff                  1
 Score                  1
-Voice                  1
-Voice_element          1
+Voice                  0
+Voice_element          0
 Input_cursor           1
 Commands_at            1
 Input_command          1
index 18dcdc6982c043ffb8c84480ae532d10077ec596..da73d6405edc57c6f7c58c5139db73a24c21f64a 100644 (file)
--- a/.version
+++ b/.version
@@ -1,6 +1,6 @@
 TOPLEVEL_MAJOR_VERSION = 0
 TOPLEVEL_MINOR_VERSION = 0
-TOPLEVEL_PATCH_LEVEL = 44
+TOPLEVEL_PATCH_LEVEL = 45
 # use to send patches, always empty for released version:
 # include separator: ".postfix", "-pl" makes rpm barf
 
index 4615b850f2d1b83b16c12ab7cf3d93f7067a5e03..3c1b07819baf253307446aa931ca9b43c373e398 100644 (file)
@@ -35,7 +35,7 @@ AT&T CC.
 
 =item *
 Bash. Most scripts will continue to work with a stock sh, but they
-will generate (harmless) syntax errors
+might generate (harmless) syntax errors
 
 =item *
 GNU make. 
index 272ea0d2799c04d09fc1dc1e09e9200f12deaa52..817fbeb423c5e76e29570b95643cddedfce4ea2b 100644 (file)
@@ -51,9 +51,11 @@ include ./$(depth)/make/Rules.make
 localclean:
        rm -f $(TEXTFILES) $(HTMLFILES) $(GROFFFILES)
 
-localinstall: $(outdir)/lilypond.1
+localinstall: $(outdir)/lilypond.1 $(outdir)/mudela.5
+       $(INSTALL) -d $(mandir)/man5
        $(INSTALL) -d $(mandir)/man1
-       $(INSTALL) -m 755 $< $(mandir)/man1
-
+       $(INSTALL) -m 755 $(outdir)/lilypond.1 $(mandir)/man1
+       $(INSTALL) -m 755 $(outdir)/mudela.5 $(mandir)/man5
 localuninstall:
        rm -f $(mandir)/man1/lilypond.1
index ce39a3e5b8ccd96a6cdcc66e7d71384a481445fb..d1e05d00e7639117d9b00cc996108a64a04b5a70 100644 (file)
@@ -11,9 +11,9 @@ Excuse me for this poor page. I don't really have time for doing this..
 =head1 DOCUMENTATION
 
 =item *
-<a href=README.html
+<a href=lilypond.html
 >
-README
+The manual page
 </a
 >
 
@@ -25,16 +25,16 @@ internal structures.
 >
 
 =item *
-<a href=lilyinput.html
+<a href=mudela.html
 >
-notes on the input format
+Mudela, the input format
 </a
 >
 
 =item *
 <a href=faq.html
 >
-FAQ
+FAQs
 </a
 >
 
@@ -46,15 +46,22 @@ errors
 >
 
 =item *
-<a href=lelie_logo.png
+<a href=lelieblond.png
 >
-The lilypond logo (in PNG format)
+The lilypond logo (Big)
+</a
+>
+
+=item *
+<a href=lelie_logo.gif
+>
+The lilypond logo (in gif format)
 </a
 >
 
 
 =item *
-<a href=wohltemperirt.ly
+<a href=wohltemperirt.ly.txt
 >
 An example inputfile: from Bach's WTK: c-minor fugue
 </a
index b4d2f078137e5303e7664df8821fa05d8784c186..93a89b9eb73daa525be9cb00b1b8d057d81498c2 100644 (file)
@@ -47,79 +47,6 @@ Very simple, just walk all Line_of_* and follow the links over there
 
 =back
 
-=head1 REQUESTS
-
-[see F<request.hh>]
-
-Any Voice_element can do a number of requests. A request is done
-to the C<Staff> which contains the C<Voice_element>. 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) 
-
-Please refer to the documentation of the Child classes of
-C<Request> for explanation of each request type.
-
-The result of a request will be an C<Item> or a C<Spanner>, which
-will be put on a C<PStaff>. Note that the C<PStaff> and the original
-C<Staff> need not have anything in common. For example, the
-``double'' piano Staff could interpret commands which juggle
-melodies across the left and right hand, and may put the result in
-two five-line PStaffs (maybe with extra PStaffs to carry the dynamic
-signs and any lyric.
-
-The class C<Staff> should be thought as a container for the
-C<Voice>s, and an interpreter for C<Request>s and C<Command>s.
-Different staffs can produce different outputs; a melodious voice
-which is put into a percussion-Staff, will be typeset as the rythm of
-that voice.
-
-After C<Staff> made up her mind, the resultant items and
-spanners are put on the PScore.
-
-=over 5
-
-=item C<Barcheck_req>
-
-Checks during music processing if start of this voice element
-coincides with the start of a measure. Handy to check if you left out
-some voice elts.
-
-=item C<Note_req>
-
-Staff has to decide if the ball should be hanging left or right. This
-influences the horizontal dimensions of a column, and this  is why
-request processing should be done before horizontal spacing.
-
-Other voices' frivolities may cause the need for accidentals, so this
-is also for the  C<Staff> to decide. The  C<Staff> can decide on positioning
-based on ottava commands and the appropriate clef.
-
-=item C<Rest_req>
-
-Why a request? It might be a good idea to not typeset the rest, if the
-paper is too crowded.
-
-=item C<Span_req>
-
-This type of request typically results in the creation of a C<Spanner>
-
-=item C<Beam_req>
-
-Staff has to combine this request with the stem_request, since the
-number of flags that a stem wants to carry will determine the
-number of beams.
-
-=item  C<Dynamic>
-
-Each dynamic is bound to one note (a crescendo spanning multiple
-notes is thought to be made of two "dynamics": a start and a stop).
-Dynamic changes can occur in a smaller time than the length of its
-note, therefore fore each  C<Dynamic> request carries a time, measured
-from the start of its note.
-
-This subfield would come in handy, if LilyPond  was adapted for midi
-support.
 
 =back
 
@@ -130,10 +57,10 @@ this only solves one half of the problem. The other half is
 deciding which requests should be honored, which should merged with
 other requests, and which should be ignored. Consider this (pseudo)input
 
-       { % chord
+       < % chord
                \music { [c() c] }
                \music { [e() e] }
-       }
+       >
 
 Both the c and e are part of a chord (they are in the same
 Voice_group), so they should share the beams, and the two [ ] pairs
index 885b3033069fdffd915b64e1d76b38352e8f02ba..1e04b19df074907a489d76a4594fb37fab6cbdb4 100644 (file)
@@ -69,3 +69,82 @@ Not really crystallized; you can use '#' or '%' as line comment
 
 LilyPond first reads 'symbol.ini', which contains declarations crucial
 to proper operation of LilyPond (symbol tables, note names).
+
+This language looks a lot like Rayce's (Rayce is a raytracer that I've
+written as a hobby project. I used as a practice program for writing
+(among others) C++ and Yacc. It also gave me RSI :-( ) which in turn
+owes a lot to the POVRay raytracer. Now, I know, musictypesetting and
+Raytracing do not necessarily require the same input format, but I was
+just to lazy to make up a new and/or better input format. Suggestions
+appreciated.
+=head1 NAME
+
+LilyInput -  LilyPond input format
+
+=head1 DESCRIPTION
+
+This page globally documents the the LilyPond input format, mudela.
+To get a better impression, please study some examples.
+
+=head2 Overview
+
+General format of a construct:
+
+       BLOCKNAME {  <info to go with this block>   }
+
+Some types allow declarations:
+
+       IDENTIFIER = BLOCKNAME {
+               <info to go with this block>
+       }
+
+       ..
+
+       BLOCKNAME {
+               IDENTIFIER
+               ...
+       }
+
+
+In musicmode, eg,
+
+       ''!c8.-"text"_v
+
+and in lyricmode, eg,
+
+       Twin- kle, twin- kle lit- tle star,2
+
+a lot of characters parse differently
+than in "command" mode, eg,
+
+       identifier = score { .. }
+
+So you have to signal this to the tokenizer. This is done with
+'$'. '$' is a delimiter, which used by the tokenizer only. The same
+goes for lyrics, it has a '@' delimiter.
+
+=item *
+musicmode: The brace still is used to group grammatical groups.
+
+=item *
+musicmode: "word" are preceded by a '\' (backslash)
+
+This means you can write some stuff in a zillion ways:
+
+=item 1.
+       $\var = \blockname { ... } $
+
+=item 2.
+       var = blockname { $ ... $ } 
+
+=item 3.
+       var = $ $ $\blockname {  ... $ } 
+
+=head2 Comments
+
+Not really crystallized; you can use '#' or '%' as line comment
+
+=head2 other
+
+LilyPond first reads 'symbol.ini', which contains declarations crucial
+to proper operation of LilyPond (symbol tables, note names).
index bc02a126176c79538da0bc1a116ca1db0130574d..f4dd08b08c7c5e2796a9f618c9ca428a377f4884 100644 (file)
@@ -184,7 +184,7 @@ Han-Wen Nienhuys <hanwen@stack.nl>, Main author
 
 Jan Nieuwenhuizen <jan@digicash.com>, Context errors, Lyrics,
 mi2mu, MIDI stuff, make structure, bits of FlowerLib, general
-comments.
+comments, Mudela design.
 
 =item *
 
index 02f06aeffbce35be1fef7ef2265146143b6f810b..abce9ee643f32254b34faf860300c2869b9062a6 100644 (file)
@@ -6,7 +6,7 @@ Mudela -  LilyPond input format 0.1
 
 This document describes the the LilyPond input format, which is an
 effective language for definining music.  We call this language
-(rather arrogantly) The Musical Definition Language (S<Mudela 2>).
+(rather arrogantly) The Musical Definition Language (S<Mudela 0.1>).
 
 The first aim of Mudela is to define a piece of music, 
 being complete from both from a musical typesetting, 
@@ -127,12 +127,18 @@ Identifiers in their normal form consist start with a alpha character,
 followed by alpha-numerics. Identifiers can contain any characters
 (except whitespace, C<$> and C<%>), if you use this construct:
 
-       $Id_with###@weird92chars = 
+       $i'm_a_weird###identifier
+
+(which is the identifier with the name
+C<i'm_a_weird###identifier> ). C<$> Takes any sequence of
+characters which are not whitespace, C<$> and C<%>.
+
+       \$i'm_a_weird###escaped_word
 
 =head2 Nesting characters
 
 Mudela uses the brace (C<{> and C<}>) for hierarchical structures. To
-aid the eye in reading, for chords the C<<> and the C<>> are used as
+aid the eye in reading, for chords the < and the > are used as
 nesting braces.
 
 =head2 Identifiers
@@ -154,7 +160,7 @@ at top level. Currently declarations can only be done at top level)
 
 Most instantiations that use an IDENTIFIER are specified as follows:
 
-       \TYPE { IDENTIFIER [...] }
+       \TYPE{ IDENTIFIER [...] }
 
 Some exceptions on this rule have been made to prevent inputting
 Mudela becoming tedious
@@ -424,8 +430,128 @@ Examples are included with the LilyPond distribution. For the sake of
 maintenance no long examples are included in this document.
 
 
+=head1 INTERNALS
+
+This chapter deals with the internals of Mudela. In the end Mudela
+converted to Voice, which contain Voice_elements which (in turn)
+contain Requests. The former 2 types are basically containers.
+Consider the following simple mudela
+
+       \music { c4 <e4 g4> }
+
+After the parsing, this is converted to: (from the debug output)
+
+       Voice { start: 0
+         voice_element { dur :1/4
+           Stem_req {duration { 4}}
+           Note_req {notename: 0 acc: 0 oct: -1 
+             duration { 4}}
+           Group_change_req {}
+           }
+         voice_element { dur :0
+           Terminate_voice_req {}
+           }
+         }
+
+       Voice { start: 1/4
+         voice_element { dur :1/4
+           Stem_req {duration { 4}}
+           Note_req {notename: 2 acc: 0 oct: -1 
+             duration { 4}}
+           Group_change_req {}
+           }
+         voice_element { dur :0
+           Terminate_voice_req {}
+           }
+         }
+
+       Voice { start: 1/4
+         voice_element { dur :1/4
+           Stem_req {duration { 4}}
+           Note_req {notename: 4 acc: 0 oct: -1 
+             duration { 4}}
+           Group_change_req {}
+           }
+         voice_element { dur :0
+           Terminate_voice_req {}
+           }
+         }
+
+
 =head2 Requests
 
+As you can see, most information is stored in the form of a request. 
+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<Staff> which contains the C<Voice_element>. 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)
+
+Please refer to the documentation of the Child classes of
+C<Request> for explanation of each request type.
+
+The result of a request will be an C<Item> or a C<Spanner>, which
+will be put on a C<PStaff>. Note that the C<PStaff> and the original
+C<Staff> need not have anything in common. For example, the
+``double'' piano Staff could interpret commands which juggle
+melodies across the left and right hand, and may put the result in
+two five-line PStaffs (maybe with extra PStaffs to carry the dynamic
+signs and any lyric.
+
+The class C<Staff> should be thought as a container for the
+C<Voice>s, and an interpreter for C<Request>s and C<Command>s.
+Different staffs can produce different outputs; a melodious voice
+which is put into a percussion-Staff, will be typeset as the rythm of
+that voice.
+
+After C<Staff> made up her mind, the resultant items and
+spanners are put on the PScore.
+
+=over 5
+
+=item C<Barcheck_req>
+
+Checks during music processing if start of this voice element
+coincides with the start of a measure. Handy to check if you left out
+some voice elts.
+
+=item C<Note_req>
+
+Staff has to decide if the ball should be hanging left or right. This
+influences the horizontal dimensions of a column, and this  is why
+request processing should be done before horizontal spacing.
+
+Other voices' frivolities may cause the need for accidentals, so this
+is also for the  C<Staff> to decide. The  C<Staff> can decide on positioning
+based on ottava commands and the appropriate clef.
+
+=item C<Rest_req>
+
+Why a request? It might be a good idea to not typeset the rest, if the
+paper is too crowded.
+
+=item C<Span_req>
+
+This type of request typically results in the creation of a C<Spanner>
+
+=item C<Beam_req>
+
+Staff has to combine this request with the stem_request, since the
+number of flags that a stem wants to carry will determine the
+number of beams.
+
+=item  C<Dynamic>
+
+Each dynamic is bound to one note (a crescendo spanning multiple
+notes is thought to be made of two "dynamics": a start and a stop).
+Dynamic changes can occur in a smaller time than the length of its
+note, therefore fore each  C<Dynamic> request carries a time, measured
+from the start of its note.
+
 =head2 Voice
 
 =head2 Voice_element
index a42ca956da71b0fed4785a312d9c1788aa8ad326..66e6a45bce7bf9b4a8542ce0d08e47b381e3f6c8 100644 (file)
@@ -34,7 +34,7 @@ P\bP\bP\bPR\bR\bR\bRE\bE\bE\bER\bR\bR\bRE\bE\bE\bEQ\bQ\bQ\bQU\bU\bU\bUI\bI\bI\bIS\bS\bS\bSI\bI\bI\bIT\bT\bT\bTE\bE
             it will not compile with AT&T CC.
 
        +\bo Bash. Most scripts will continue to work with a stock
-            sh, but they will generate (harmless) syntax errors
+            sh, but they might generate (harmless) syntax errors
 
        +\bo GNU make.
 
@@ -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
 
 
 
-24/Mar/97                LilyPond 0.0.44                        1
+25/Mar/97                LilyPond 0.0.45                        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
 
 
 
-24/Mar/97                LilyPond 0.0.44                        2
+25/Mar/97                LilyPond 0.0.45                        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
 
 
 
-24/Mar/97                LilyPond 0.0.44                        3
+25/Mar/97                LilyPond 0.0.45                        3
 
 
diff --git a/Makefile b/Makefile
deleted file mode 100644 (file)
index 7ac03e3..0000000
--- a/Makefile
+++ /dev/null
@@ -1,63 +0,0 @@
-#
-# project  LilyPond -- the musical typesetter
-# title           top level makefile for LilyPond  
-# file    Makefile 
-#
-# Copyright (c) 1997 by    
-#      Jan Nieuwenhuizen <jan@digicash.com>
-#      Han-Wen Nienhuys <hanwen@stack.nl>
-#              ...your sort order here, or how to comment-out a comment
-
-# subdir level:
-#
-depth = .
-#
-
-# identify module:
-#
-NAME = lilypond
-include .version
-include ./$(depth)/make/Version.make
-
-# generic variables:
-#
-include ./$(depth)/make/Variables.make 
-#
-
-# descent order into subdirectories:
-#
-SUBDIRS = flower lib lily mi2mu \
-       Documentation bin init input tex make
-#
-
-# list of distribution files:
-#
-# SYMLINKS = # naah, configure
-SCRIPTS = configure configure.in install-sh
-README_FILES = ANNOUNCE COPYING NEWS README TODO INSTALL.text
-EXTRA_DISTFILES=  .dstreamrc .version $(README_FILES) $(SCRIPTS) $(SYMLINKS)
-#
-
-
-# generic targets and rules:
-#
-include ./$(depth)/make/Targets.make
-include ./$(depth)/make/Rules.make
-#
-
-localdist: configure
-
-# ugh. I know dep is not quite what is really needed.
-INSTALL.text: check-doc-deps
-       rm -f INSTALL.text
-       ln `find -name INSTALL.text|head -1` .
-
-localclean:
-       rm -f $(allexe) core config.cache config.log config.status 
-
-localinstall: all
-       $(INSTALL) -d $(bindir)
-       $(INSTALL) -m 755 $(allexe) $(bindir)
-
-localuninstall:
-       for i in $(allexe); do rm -f $(bindir)/`basename $$i`; done
\ No newline at end of file
diff --git a/NEWS b/NEWS
index 7b7354de36a56aa0bdaeb362fe813f564a5a733b..ea2ae1e6dfa9ac6fe6f79c5ec26f023e86919f90 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,33 @@
+pl 45
+       - Removing unused Voice_regs & Voice_groups
+       - -O2 bugfix
+
+pl 44.jcn1
+       - merged 42.3 42.jcn4 code trees (see stuff below)
+       - moving towards Mudela 0.1 (again)
+           * keyword "music" dropped for horizontal music
+           * keywords "\lyric" "\melodic" introduced, e.g.:
+               melody = \melodic { c c | g g }
+           * removed level of indirection:
+               - staff initialisable with music identifier list: 
+                   \staff{ global melody }
+               - \score and staffs alike
+       - gnu standard(?) help texts
+       - configure "creates" toplevel Makefile from make/Toplevel.make
+
+Bugfix
+       - fixed mi2mu
+       - write meter to track0 too...
+       - default octave
+       - new Sources in My_midi_lexer: sourcefile_p_ = get_file_l(): oeps.
+         (ain-t hungarian grand?)
+
+Examples
+       - updated for mudela 0.1
+
 ******
 pl 44
+       - naming: _c_l -> _C
        - pure parser, My_lily_parser
        - ''a iso ``a
        - Includable_lexer
@@ -18,13 +46,27 @@ pl 43
        - declaration used check.
        -
 
+pl 42.jcn4
+       - lily writes midi meter/key changes from requests
+       - mi2mu: 
+         + write mudela 0.1
+         + write bar change requests
+         + more tunable quantisation
+
+Examples
+       - half-new-menuetto.ly converted to mudela -almost- 0.1
+       - new mi2mu of bach's wtk pre1/fugue1
+
+pl 42.3 (jcn version)
+        - oeps, branched source tree
+
 pl 42.hwn3
        - const naming change (T const <-> const T)
        - Mudela 0.1 (roughly the same as below..)
 
 pl 42.3
        - moving towards Mudela 0.1:
-           * (almost) all keywords must be preceded by backslash '\'
+           * all keywords must be preceded by backslash '\'
            * explicit lexer switches '$' and '@' dropped
            * keyword "music" dropped for horizontal music
            * keywords "\lyric" " introduced, e.g.:
diff --git a/TODO b/TODO
index 5e14b414d877084fd0d1574940a2abd2ecd24686..95fbfc684534d660bed863e3fd60476513e00ec5 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,7 +1,5 @@
 before 0.1
        
-       * fix -O2 -NDEBUG compile
-
        * remove spurious/outdated comments in .ly, debug .ly
 
        * pushgroup, popgroup.
@@ -40,8 +38,6 @@ BUGS
 
        * cis ( | ) cis
 
-       * Group_feature at start of music. 
-
        * parser error handling (can you say Segfault?)
 
 SEVERELY LACKING:
@@ -78,6 +74,8 @@ INPUTLANGUAGE
 SMALLISH PROJECTS
 
        * key transposition
+       
+       * caching breakpoints / saving them. 
 
        * key { C } 
        
@@ -87,6 +85,9 @@ SMALLISH PROJECTS
 
        * use tors feature in lily
 
+       * do conventional keys (C G A, F B E, a e fis, d as des, etc ), 
+         besides lists of flats/sharps
+
        * midi esp.: use I32 iso int where 32 bits are needed (or assumed...)
 
        * fix Staff_elem::width() derivs to use offset_
index 3c13edc01f633432aaf07ea057df91dfcbb7fb92..ad504fd23df85b1ce6000e48527e8fd726e81102 100755 (executable)
--- a/configure
+++ b/configure
@@ -539,41 +539,51 @@ ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
 ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
 cross_compiling=$ac_cv_prog_cxx_cross
 
-
+printing_b=no
+checking_b=yes
+debug_b=yes
+optimise_b=no
+profile_b=no
+    
 # Check whether --enable-printing or --disable-printing was given.
 if test "${enable_printing+set}" = set; then
   enableval="$enable_printing"
-  :
-else
-  DEFINES="$DEFINES -DNPRINT=1"
+  printing_b=$enableval
 fi
 
+
+       
 # Check whether --enable-checking or --disable-checking was given.
 if test "${enable_checking+set}" = set; then
   enableval="$enable_checking"
-  DEFINES="$DEFINES -DNDEBUG=1"
+  checking_b=$enableval 
 fi
 
+
+
+
 # Check whether --enable-debug or --disable-debug was given.
 if test "${enable_debug+set}" = set; then
   enableval="$enable_debug"
-  :
-else
-  DEFINES="$DEFINES -g"
+  debug_b=$enableval
 fi
 
+
 # Check whether --enable-optimise or --disable-optimise was given.
 if test "${enable_optimise+set}" = set; then
   enableval="$enable_optimise"
-  DEFINES="$DEFINES -O2 -DSTRING_UTILS_INLINED"
+  optimise_b=$enableval
 fi
 
+    
+   
 # Check whether --enable-profiling or --disable-profiling was given.
 if test "${enable_profiling+set}" = set; then
   enableval="$enable_profiling"
-  DEFINES="$DEFINES -pg"
+  profile_b=$enableval
 fi
 
+    
 # Check whether --enable-texprefix or --disable-texprefix was given.
 if test "${enable_texprefix+set}" = set; then
   enableval="$enable_texprefix"
@@ -582,7 +592,26 @@ else
   TEXPREFIX=auto 
 fi
 
+   
+if test $profile_b = yes; then
+    EXTRA_LIBES="-pg"
+    DEFINES="$DEFINES -pg"
+fi
+    
+if test $printing_b = no; then
+    DEFINES="$DEFINES -DNPRINT=1"
+fi
+    
+if test $debug_b = yes; then   
+    DEFINES="$DEFINES -g"
+fi
+if test $checking_b = no; then
+    DEFINES="$DEFINES -DNDEBUG=1"
+fi
 
+if test $optimise_b = yes; then
+    DEFINES="$DEFINES -O2 -DSTRING_UTILS_INLINED"
+fi
 AUTOHEADER="This file was automatically generated by configure"
 CXXFLAGS=${CXXFLAGS:-""}       # we don't want -g -O junk
 for ac_prog in $CCC c++ g++ gcc CC cxx cc++
@@ -590,7 +619,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:594: checking for $ac_word" >&5
+echo "configure:623: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -621,7 +650,7 @@ test -n "$CXX" || CXX="gcc"
 
 
 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:625: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:654: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
 
 ac_ext=C
 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -631,11 +660,11 @@ ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $L
 cross_compiling=$ac_cv_prog_cxx_cross
 
 cat > conftest.$ac_ext <<EOF
-#line 635 "configure"
+#line 664 "configure"
 #include "confdefs.h"
 main(){return(0);}
 EOF
-if { (eval echo configure:639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   ac_cv_prog_cxx_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -655,12 +684,12 @@ if test $ac_cv_prog_cxx_works = no; then
   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:659: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:688: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
 cross_compiling=$ac_cv_prog_cxx_cross
 
 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
-echo "configure:664: checking whether we are using GNU C++" >&5
+echo "configure:693: checking whether we are using GNU C++" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -669,7 +698,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:673: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gxx=yes
 else
   ac_cv_prog_gxx=no
@@ -684,7 +713,7 @@ if test $ac_cv_prog_gxx = yes; then
   ac_save_CXXFLAGS="$CXXFLAGS"
   CXXFLAGS=
   echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
-echo "configure:688: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:717: checking whether ${CXX-g++} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -714,7 +743,7 @@ fi
 # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:718: checking for $ac_word" >&5
+echo "configure:747: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -770,7 +799,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:774: checking for a BSD compatible install" >&5
+echo "configure:803: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -824,7 +853,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:828: checking for $ac_word" >&5
+echo "configure:857: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_FIND'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -871,7 +900,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:875: checking for $ac_word" >&5
+echo "configure:904: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -905,7 +934,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:909: checking for $ac_word" >&5
+echo "configure:938: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -939,7 +968,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:943: checking for $ac_word" >&5
+echo "configure:972: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_MAKE'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -973,7 +1002,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:977: checking for $ac_word" >&5
+echo "configure:1006: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_PODMAN'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1009,7 +1038,7 @@ if test $TEXPREFIX = auto ; then
     # do something sensible if root hasn't specced dir yet attempts install
 
     echo $ac_n "checking TeX installation directory""... $ac_c" 1>&6
-echo "configure:1013: checking TeX installation directory" >&5
+echo "configure:1042: checking TeX installation directory" >&5
 
     ac_tmp_prefix=$prefix
     test "x$ac_tmp_prefix" = xNONE && ac_tmp_prefix=$ac_default_prefix
@@ -1041,7 +1070,7 @@ if test $MAKE = "error"
 then
        { echo "configure: error: Please install GNU make" 1>&2; exit 1; }
 else
-       $MAKE -v| grep -q GNU
+       $MAKE -v| grep GNU >& /dev/null
        if test "$?" = 1
        then
                echo "configure: warning: Please install *GNU* make" 1>&2
@@ -1064,7 +1093,7 @@ then
        echo "configure: warning: can't find flex. Please install Flex (2.5 or better)" 1>&2
 fi
 
-if $CXX --version | grep -q '2\.7'
+if $CXX --version | grep '2\.7' >& /dev/null
 then
        true
 else
@@ -1072,7 +1101,7 @@ else
 fi
 
 echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
-echo "configure:1076: checking how to run the C++ preprocessor" >&5
+echo "configure:1105: checking how to run the C++ preprocessor" >&5
 if test -z "$CXXCPP"; then
 if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1085,12 +1114,12 @@ ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $L
 cross_compiling=$ac_cv_prog_cxx_cross
   CXXCPP="${CXX-g++} -E"
   cat > conftest.$ac_ext <<EOF
-#line 1089 "configure"
+#line 1118 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   :
@@ -1110,17 +1139,17 @@ echo "$ac_t""$CXXCPP" 1>&6
 
 ac_safe=`echo "FlexLexer.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for FlexLexer.h""... $ac_c" 1>&6
-echo "configure:1114: checking for FlexLexer.h" >&5
+echo "configure:1143: checking for FlexLexer.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1119 "configure"
+#line 1148 "configure"
 #include "confdefs.h"
 #include <FlexLexer.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1153: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1139,7 +1168,7 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   true
 else
   echo "$ac_t""no" 1>&6
-{ echo "configure: error: can't find flex header. Please install Flex headers correctly" 1>&2; exit 1; }
+echo "configure: warning: can't find flex header. Please install Flex headers correctly" 1>&2
 fi
 
 subdirs="flower"
@@ -1257,7 +1286,9 @@ done
 ac_given_srcdir=$srcdir
 ac_given_INSTALL="$INSTALL"
 
-trap 'rm -fr `echo "make/out/Configure_variables.make:make/Configure_variables.make.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "make/out/Configure_variables.make:make/Configure_variables.make.in
+    Makefile:make/Toplevel.make.in
+    " | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
 EOF
 cat >> $CONFIG_STATUS <<EOF
 
@@ -1298,6 +1329,7 @@ s%@AUTOHEADER@%$AUTOHEADER%g
 s%@BISON@%$BISON%g
 s%@FLEX@%$FLEX%g
 s%@TEXPREFIX@%$TEXPREFIX%g
+s%@EXTRA_LIBES@%$EXTRA_LIBES%g
 s%@MAKE@%$MAKE%g
 s%@PODMAN@%$PODMAN%g
 s%@CXXCPP@%$CXXCPP%g
@@ -1343,7 +1375,9 @@ EOF
 
 cat >> $CONFIG_STATUS <<EOF
 
-CONFIG_FILES=\${CONFIG_FILES-"make/out/Configure_variables.make:make/Configure_variables.make.in"}
+CONFIG_FILES=\${CONFIG_FILES-"make/out/Configure_variables.make:make/Configure_variables.make.in
+    Makefile:make/Toplevel.make.in
+    "}
 EOF
 cat >> $CONFIG_STATUS <<\EOF
 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
@@ -1517,7 +1551,7 @@ fi
 eval "DIR_DATADIR=$datadir"
 DIR_DATADIR="$DIR_DATADIR/lilypond"
 echo $ac_n "checking ""... $ac_c" 1>&6
-echo "configure:1521: checking " >&5
+echo "configure:1555: checking " >&5
 
 cat << EOF > lib/out/config.hh
 
@@ -1541,8 +1575,8 @@ sed 's/TOPLEVEL_//g' <  .version >  lily/.version
 )
  (cd flower;
 )
-cat << END
 
+cat << END
 Finished configuring. For making everything, do:
 
        make all
index 309488cae9181f8de5d1345e9a61a99de1552d27..f3837945ae1154a4aaf15b08e40242e50bfb7f5f 100644 (file)
@@ -38,30 +38,60 @@ AC_INIT(flower/choleski.cc)
 
 
 AC_LANG_CPLUSPLUS
-
+printing_b=no
+checking_b=yes
+debug_b=yes
+optimise_b=no
+profile_b=no
+    
 AC_ARG_ENABLE(printing,
-       [  enable-printing        set debug printing],
-       [],
-       [DEFINES="$DEFINES -DNPRINT=1"])
+    [  enable-printing        set debug printing],
+    [printing_b=$enableval])
+
+       
 AC_ARG_ENABLE(checking,
-       [  disable-checking       set runtime checks],
-       [DEFINES="$DEFINES -DNDEBUG=1"],
-       [])
+    [  disable-checking       set runtime checks],
+    [checking_b=$enableval] )
+
+
+
 AC_ARG_ENABLE(debug,
-       [  disable-debug          set debug info],
-       [],
-       [DEFINES="$DEFINES -g"])
+    [  disable-debug          set debug info],
+    [debug_b=$enableval])
+
 AC_ARG_ENABLE(optimise,
-       [  enable-optimise       use maximal speed optimisations],
-       [DEFINES="$DEFINES -O2 -DSTRING_UTILS_INLINED"])
-AC_ARG_ENABLE(profiling,
-       [  enable-profiling      compile with gprof support],
-       [DEFINES="$DEFINES -pg"])
+    [  enable-optimise       use maximal speed optimisations],
+    [optimise_b=$enableval])
+    
+   
+AC_ARG_ENABLE(profiling, 
+    [  enable-profiling      compile with gprof support],
+    [profile_b=$enableval])
+    
 AC_ARG_ENABLE(texprefix,
-       [  texprefix=DIR  set the tex-directory to put the lilypond subdir in.],
-       [TEXPREFIX=$enableval],
-       [TEXPREFIX=auto] )
+    [  texprefix=DIR  set the tex-directory to put the lilypond subdir in.],
+    [TEXPREFIX=$enableval],
+    [TEXPREFIX=auto] )
+   
+if test $profile_b = yes; then
+    EXTRA_LIBES="-pg"
+    DEFINES="$DEFINES -pg"
+fi
+    
+if test $printing_b = no; then
+    DEFINES="$DEFINES -DNPRINT=1"
+fi
+    
+if test $debug_b = yes; then   
+    DEFINES="$DEFINES -g"
+fi
+if test $checking_b = no; then
+    DEFINES="$DEFINES -DNDEBUG=1"
+fi
 
+if test $optimise_b = yes; then
+    DEFINES="$DEFINES -O2 -DSTRING_UTILS_INLINED"
+fi
 dnl COMPILEINFO="$HOST $host $TARGET $target"
 AUTOHEADER="This file was automatically generated by configure"
 CXXFLAGS=${CXXFLAGS:-""}       # we don't want -g -O junk
@@ -81,7 +111,7 @@ AC_SUBST(AUTOHEADER)
 AC_SUBST(BISON)
 AC_SUBST(FLEX)
 AC_SUBST(TEXPREFIX)
-
+AC_SUBST(EXTRA_LIBES)
 
 AC_CHECK_PROGS(BISON, bison, error)
 AC_CHECK_PROGS(FLEX, flex, error)
@@ -96,7 +126,7 @@ if test $MAKE = "error"
 then
        AC_MSG_ERROR(Please install GNU make)
 else
-       $MAKE -v| grep -q GNU
+       $MAKE -v| grep GNU >& /dev/null
        if test "$?" = 1
        then
                AC_MSG_WARN(Please install *GNU* make)
@@ -119,7 +149,7 @@ then
        AC_MSG_WARN(can't find flex. Please install Flex (2.5 or better))
 fi
 
-if $CXX --version | grep -q '2\.7'
+if $CXX --version | grep '2\.7' >& /dev/null
 then
        true
 else
@@ -127,9 +157,11 @@ else
 fi
 
 AC_CHECK_HEADER(FlexLexer.h, true,
-       AC_MSG_ERROR(can't find flex header. Please install Flex headers correctly))
+       AC_MSG_WARN(can't find flex header. Please install Flex headers correctly))
 AC_CONFIG_SUBDIRS(flower)
-AC_OUTPUT(make/out/Configure_variables.make:make/Configure_variables.make.in)
+AC_OUTPUT(make/out/Configure_variables.make:make/Configure_variables.make.in
+    Makefile:make/Toplevel.make.in
+    )
 
 
 
@@ -158,13 +190,11 @@ dnl    echo 0 > out/.build
 # rgu
 sed 's/TOPLEVEL_//g' <  .version >  lily/.version
 (cd lily; CXX="$ac_cv_prog_CXX" ../bin/make_version > out/version.hh
-dnl    echo 0 > out/.build
 )
  (cd flower;
-dnl    echo 0 > out/.build
 )
-cat << END
 
+cat << END
 Finished configuring. For making everything, do:
 
        make all
index f24e0f3d24f766dc441e64ab058120c060ce61c3..3e04a983620e7c52e6b854e2ff2825a791885eb8 100644 (file)
@@ -52,3 +52,6 @@ include ./$(depth)/make/Rules.make
 #
 
 localdist: configure
+
+-include /dev/null $(DEPFILES)
+#
index 3ee8480d71e7b1f2cf7a562c7172e86de6d3b97e..5a62d17bd0169adfebbec2bbaf8edc746c79398d 100644 (file)
@@ -8,7 +8,7 @@ pl 1.1.8
 pl 1.1.7
        - PQueue blondification.
        - String_convert::i2hex_str fix, unsigned eqvs introduced
-       - long long deprecioated, now named I64
+       - long long depreciated, now named I64
        - type I32 introduced. should be used iso int where 32 bits are 
          needed(or, brr, assumed...)
 
index 9d229c0ae128c2deb53a7d0c72ff315f18aee64c..885d69f683c7a133e67dc7017c80ab1e122323a9 100644 (file)
@@ -201,9 +201,10 @@ Matrix::set_product(Matrix const &m1, Matrix const &m2)
 void
 Matrix::insert_row(Vector v, int k)
 {
+    int c = cols();
     assert(v.dim()==cols());
     dat->insert_row(k);
-    for (int j=0; j < cols(); j++)
+    for (int j=0; j < c; j++)
        dat->elem(k,j)=v(j);
 }
 
@@ -212,7 +213,8 @@ void
 Matrix::swap_columns(int c1, int c2)
 {
     assert(c1>=0&& c1 < cols()&&c2 < cols() && c2 >=0);
-    for (int i=0; i< rows(); i++) {
+    int r = rows();
+    for (int i=0; i< r; i++) {
        Real r=dat->elem(i,c1);
        dat->elem(i,c1) = dat->elem(i,c2);
        dat->elem(i,c2)=r;
@@ -223,7 +225,8 @@ void
 Matrix::swap_rows(int c1, int c2)
 {
     assert(c1>=0&& c1 < rows()&&c2 < rows() && c2 >=0);
-    for (int i=0; i< cols(); i++) {
+    int c = cols();
+    for (int i=0; i< c; i++) {
        Real r=dat->elem(c1,i);
        dat->elem(c1,i) = dat->elem(c2,i);
        dat->elem(c2,i)=r;
index 8aed19fa95a5d640eafa4c866aa724435079fe2d..84e24a0f73b5ba9449097a10e3a66e37b23673c2 100644 (file)
@@ -2,41 +2,47 @@
 % common dutch names for notes. "es" means flat, "is" means sharp
 %
 
-ceses  = \melodic { -1 0 -2 }
-ces    = \melodic { -1 0 -1 }
-c      = \melodic { -1 0 0 }
-cis    = \melodic { -1 0 1 }
-cisis  = \melodic { -1 0 2 }
-deses  = \melodic { -1 1 -2 }
-des    = \melodic { -1 1 -1 }
-d      = \melodic { -1 1 0 }
-dis    = \melodic { -1 1 1 }
-disis  = \melodic { -1 1 2 }
-eses   = \melodic { -1 2 -2 }
-es     = \melodic { -1 2 -1 }
-e      = \melodic { -1 2 0 }
-eis    = \melodic { -1 2 1 }
-eisis  = \melodic { -1 2 2 }
-feses  = \melodic { -1 3 -2 }
-fes    = \melodic { -1 3 -1 }
-f      = \melodic { -1 3 0 }
-fis    = \melodic { -1 3 1 }
-fisis  = \melodic { -1 3 2 }
-geses  = \melodic { -1 4 -2 }
-ges    = \melodic { -1 4 -1 }
-g      = \melodic { -1 4 0 }
-gis    = \melodic { -1 4 1 }
-gisis  = \melodic { -1 4 2 }
-ases   = \melodic { -1 5 -2 }
-as     = \melodic { -1 5 -1 }
-a      = \melodic { -1 5 0 }
-ais    = \melodic { -1 5 1 }
-aisis  = \melodic { -1 5 2 }
-beses  = \melodic { -1 6 -2 }
-bes    = \melodic { -1 6 -1 }
-b      = \melodic { -1 6 0 }
-bis    = \melodic { -1 6 1 }
-bisis  = \melodic { -1 6 2 }
+
+%
+% Please note that, while these names are used to enter *notes*, they
+% actually are *melodic*s, i.e. they represent a pitch solely. Notes
+% have a rhythmic part too. This is the reason that we don't write 'note { .. }'
+%
+ceses  = \melodic_request { -1 0 -2 }
+ces    = \melodic_request { -1 0 -1 }
+c      = \melodic_request { -1 0 0 }
+cis    = \melodic_request { -1 0 1 }
+cisis  = \melodic_request { -1 0 2 }
+deses  = \melodic_request { -1 1 -2 }
+des    = \melodic_request { -1 1 -1 }
+d      = \melodic_request { -1 1 0 }
+dis    = \melodic_request { -1 1 1 }
+disis  = \melodic_request { -1 1 2 }
+eses   = \melodic_request { -1 2 -2 }
+es     = \melodic_request { -1 2 -1 }
+e      = \melodic_request { -1 2 0 }
+eis    = \melodic_request { -1 2 1 }
+eisis  = \melodic_request { -1 2 2 }
+feses  = \melodic_request { -1 3 -2 }
+fes    = \melodic_request { -1 3 -1 }
+f      = \melodic_request { -1 3 0 }
+fis    = \melodic_request { -1 3 1 }
+fisis  = \melodic_request { -1 3 2 }
+geses  = \melodic_request { -1 4 -2 }
+ges    = \melodic_request { -1 4 -1 }
+g      = \melodic_request { -1 4 0 }
+gis    = \melodic_request { -1 4 1 }
+gisis  = \melodic_request { -1 4 2 }
+ases   = \melodic_request { -1 5 -2 }
+as     = \melodic_request { -1 5 -1 }
+a      = \melodic_request { -1 5 0 }
+ais    = \melodic_request { -1 5 1 }
+aisis  = \melodic_request { -1 5 2 }
+beses  = \melodic_request { -1 6 -2 }
+bes    = \melodic_request { -1 6 -1 }
+b      = \melodic_request { -1 6 0 }
+bis    = \melodic_request { -1 6 1 }
+bisis  = \melodic_request { -1 6 2 }
 
 
 %
@@ -44,40 +50,40 @@ bisis       = \melodic { -1 6 2 }
 %
 
 
-Ceses  = \melodic { -2 0 -2 }
-Ces    = \melodic { -2 0 -1 }
-C      = \melodic { -2 0 0 }
-Cis    = \melodic { -2 0 1 }
-Cisis  = \melodic { -2 0 2 }
-Deses  = \melodic { -2 1 -2 }
-Des    = \melodic { -2 1 -1 }
-D      = \melodic { -2 1 0 }
-Dis    = \melodic { -2 1 1 }
-Disis  = \melodic { -2 1 2 }
-Eses   = \melodic { -2 2 -2 }
-Es     = \melodic { -2 2 -1 }
-E      = \melodic { -2 2 0 }
-Eis    = \melodic { -2 2 1 }
-Eisis  = \melodic { -2 2 2 }
-Feses  = \melodic { -2 3 -2 }
-Fes    = \melodic { -2 3 -1 }
-F      = \melodic { -2 3 0 }
-Fis    = \melodic { -2 3 1 }
-Fisis  = \melodic { -2 3 2 }
-Geses  = \melodic { -2 4 -2 }
-Ges    = \melodic { -2 4 -1 }
-G      = \melodic { -2 4 0 }
-Gis    = \melodic { -2 4 1 }
-Gisis  = \melodic { -2 4 2 }
-Ases   = \melodic { -2 5 -2 }
-As     = \melodic { -2 5 -1 }
-A      = \melodic { -2 5 0 }
-Ais    = \melodic { -2 5 1 }
-Aisis  = \melodic { -2 5 2 }
-Beses  = \melodic { -2 6 -2 }
-Bes    = \melodic { -2 6 -1 }
-B      = \melodic { -2 6 0 }
-Bis    = \melodic { -2 6 1 }
-Bisis  = \melodic { -2 6 2 }
+Ceses  = \melodic_request { -2 0 -2 }
+Ces    = \melodic_request { -2 0 -1 }
+C      = \melodic_request { -2 0 0 }
+Cis    = \melodic_request { -2 0 1 }
+Cisis  = \melodic_request { -2 0 2 }
+Deses  = \melodic_request { -2 1 -2 }
+Des    = \melodic_request { -2 1 -1 }
+D      = \melodic_request { -2 1 0 }
+Dis    = \melodic_request { -2 1 1 }
+Disis  = \melodic_request { -2 1 2 }
+Eses   = \melodic_request { -2 2 -2 }
+Es     = \melodic_request { -2 2 -1 }
+E      = \melodic_request { -2 2 0 }
+Eis    = \melodic_request { -2 2 1 }
+Eisis  = \melodic_request { -2 2 2 }
+Feses  = \melodic_request { -2 3 -2 }
+Fes    = \melodic_request { -2 3 -1 }
+F      = \melodic_request { -2 3 0 }
+Fis    = \melodic_request { -2 3 1 }
+Fisis  = \melodic_request { -2 3 2 }
+Geses  = \melodic_request { -2 4 -2 }
+Ges    = \melodic_request { -2 4 -1 }
+G      = \melodic_request { -2 4 0 }
+Gis    = \melodic_request { -2 4 1 }
+Gisis  = \melodic_request { -2 4 2 }
+Ases   = \melodic_request { -2 5 -2 }
+As     = \melodic_request { -2 5 -1 }
+A      = \melodic_request { -2 5 0 }
+Ais    = \melodic_request { -2 5 1 }
+Aisis  = \melodic_request { -2 5 2 }
+Beses  = \melodic_request { -2 6 -2 }
+Bes    = \melodic_request { -2 6 -1 }
+B      = \melodic_request { -2 6 0 }
+Bis    = \melodic_request { -2 6 1 }
+Bisis  = \melodic_request { -2 6 2 }
 
 
index fd7333a3ad439e3f7d171eac8de1d5ecb7a9b9d7..d9c170fb4d3908f39c28dcced6c6683cf0f6b793 100644 (file)
@@ -1,41 +1,44 @@
-%
+%%
+% Please note that, while these names are used to enter *notes*, they
+% actually are *melodic*s, i.e. they represent a pitch solely. Notes
+% have a rhythmic part too. This is the reason that we don't write 'note
 % common Swedish names for notes. "-ess" means flat, "-iss" means sharp
 %
 % by Mats Bengtsson.
 
 
-cessess        = \melodic { 0 0 -2 }
-cess   = \melodic { 0 0 -1 }
-c      = \melodic { 0 0 0 }
-ciss   = \melodic { 0 0 1 }
-cississ        = \melodic { 0 0 2 }
-dessess        = \melodic { 0 1 -2 }
-dess   = \melodic { 0 1 -1 }
-d      = \melodic { 0 1 0 }
-diss   = \melodic { 0 1 1 }
-dississ        = \melodic { 0 1 2 }
-essess         = \melodic { 0 2 -2 }
-ess    = \melodic { 0 2 -1 }
-e      = \melodic { 0 2 0 }
-eiss   = \melodic { 0 2 1 }
-eississ        = \melodic { 0 2 2 }
-fessess        = \melodic { 0 3 -2 }
-fess   = \melodic { 0 3 -1 }
-f      = \melodic { 0 3 0 }
-fiss   = \melodic { 0 3 1 }
-fississ        = \melodic { 0 3 2 }
-gessess        = \melodic { 0 4 -2 }
-gess   = \melodic { 0 4 -1 }
-g      = \melodic { 0 4 0 }
-giss   = \melodic { 0 4 1 }
-gississ        = \melodic { 0 4 2 }
-assess         = \melodic { 0 5 -2 }
-ass    = \melodic { 0 5 -1 }
-a      = \melodic { 0 5 0 }
-aiss   = \melodic { 0 5 1 }
-aississ        = \melodic { 0 5 2 }
-hessess        = \melodic { 0 6 -2 }
-b      = \melodic { 0 6 -1 }
-h      = \melodic { 0 6 0 }
-hiss   = \melodic { 0 6 1 }
-hississ        = \melodic { 0 6 2 }
+cessess        = \melodic_request { 0 0 -2 }
+cess   = \melodic_request { 0 0 -1 }
+c      = \melodic_request { 0 0 0 }
+ciss   = \melodic_request { 0 0 1 }
+cississ        = \melodic_request { 0 0 2 }
+dessess        = \melodic_request { 0 1 -2 }
+dess   = \melodic_request { 0 1 -1 }
+d      = \melodic_request { 0 1 0 }
+diss   = \melodic_request { 0 1 1 }
+dississ        = \melodic_request { 0 1 2 }
+essess         = \melodic_request { 0 2 -2 }
+ess    = \melodic_request { 0 2 -1 }
+e      = \melodic_request { 0 2 0 }
+eiss   = \melodic_request { 0 2 1 }
+eississ        = \melodic_request { 0 2 2 }
+fessess        = \melodic_request { 0 3 -2 }
+fess   = \melodic_request { 0 3 -1 }
+f      = \melodic_request { 0 3 0 }
+fiss   = \melodic_request { 0 3 1 }
+fississ        = \melodic_request { 0 3 2 }
+gessess        = \melodic_request { 0 4 -2 }
+gess   = \melodic_request { 0 4 -1 }
+g      = \melodic_request { 0 4 0 }
+giss   = \melodic_request { 0 4 1 }
+gississ        = \melodic_request { 0 4 2 }
+assess         = \melodic_request { 0 5 -2 }
+ass    = \melodic_request { 0 5 -1 }
+a      = \melodic_request { 0 5 0 }
+aiss   = \melodic_request { 0 5 1 }
+aississ        = \melodic_request { 0 5 2 }
+hessess        = \melodic_request { 0 6 -2 }
+b      = \melodic_request { 0 6 -1 }
+h      = \melodic_request { 0 6 0 }
+hiss   = \melodic_request { 0 6 1 }
+hississ        = \melodic_request { 0 6 2 }
index 8e8b5e8c73c78e682f2327d82488f1f0aa896406..0acc9d037a46a690eeea72c949a39172bf3aa413 100644 (file)
@@ -4,7 +4,7 @@
 % author: unknown. Copyright: none
 %
 
-cad = \music 
+cad = \melodic
                \cadenza {1}
                \grouping{1*4}\duration { 8}
        \textstyle "italic"
@@ -47,10 +47,7 @@ cad = \music {
        }
 
 \score {
-       \staff { \melodic
-               \music { cad }
-       }
-       
+       \staff { cad }
        \paper {}
        \midi { \tempo 4:90 }
 }
index eed877bb8c3bee518425c53127ecea395676ee23..55f2bbb575fac307b089304f6f03cd45586fe5d7 100644 (file)
@@ -11,7 +11,7 @@
 % (maybe even sooner :-)
 %
 
-alto = \music 
+alto = \melodic
        
                \meter {4/4} \grouping {4*4}
        \duration{ 8 }
@@ -70,11 +70,9 @@ alto = \music {
        
 }
 
-\score {
-       \staff { \melodic \music { alto }}
-
-       
-       \paper { 
+\score{
+       \staff{ alto }
+       \paper{ 
                \unitspace 14\mm
                \geometric 1.4
        }
index 9a432233b0a7885a8c1283e9c4f46f7b1bf3da40..d63164147efa1fc9dcf13321369d54ba450a2405 100644 (file)
@@ -1,6 +1,7 @@
 include "this-is-hopefully-a-nonexisting-file"
 
-mwa = \music {
+
+mwa = \melodic{
        \meter{3/4}
        [ a8 a8 a8 a8 a8 ]      % 
        [ a8 ]  % 
@@ -23,17 +24,17 @@ mwa = \music {
        
 }
 
-bla = \lyric{
+bla = \lyric{
        These Gates will open just like windows. % ok; warning
 }
 
 
+% Setting up music ...lilypond: ../flower/include/cursor.inl:98: class Cursor<void *> Cursor<void *>::operator ++(int): Assertion 'pointer_' failed.
+%IOT trap/Abort
+% als geen music in staff
+
 include "this-is-hopefully-a-nonexisting-file"
-\score {
-       \staff { 
-               lyric \music { bla }
-       }
-       \staff { 
-               \melodic \music { mwa }
-       }
+\score{
+       \staff{ bla }
+       \staff{ mwa }
 }
index 7ebb6970f4b9505865145b264d1696ef7da6c547..c4ac8dfeb2111a6310a473ee6f97f12a0fcf2013 100644 (file)
-% Creator: This is mi2mu 0.0.11.2 #14/FlowerLib 1.1.7 #1 of Mar 12 1997 02:11:21
-% Automatically generated, at Wed Mar 12 02:22:22 1997
-% from input file: fugue1.\midi
+% Creator: This is mi2mu 0.0.12.1 #5/FlowerLib 1.1.9 #0 of Mar 24 1997 21:30:32
+% Automatically generated, at Mon Mar 24 23:39:09 1997
+% from input file: fugue1.midi
 
-track0 = \music { 
-       % \midi copyright:
+track0 = \melodic{
+       % midi copyright:
        % instrument:
+       % 1
+       
+       % 26:2.
+       |
+       % 27
        
 } % track0
 
-track1 = \music { 
-       % \midi copyright:
+track1 = \melodic{
+       % midi copyright:
        % instrument:
-       g8 a8 b8 c'8. { \music{ d'16 } } { \music{ c'16 } } 
-       { \music{ b8 } } e'8 a8 { \music{ d'8. } } e'16 
-       d'16 c'16 b16 g16 a16 b16 c'16 b16 c'16 d'16 e'16 
-       d'16 e'16 fis'16 g'8 b8 c'8 a8 d'16 c'16 b16 a16 { 
-       \music{ g8. } } g16 f16 e16 f16 g16 a16 g16 a16 b16 
-       c'2 b4 c'8 d'8 e'8 f'8. { \music{ f'16 } \music{ 
-       g'16 } } e'8 a'8 d'8 g'8. a'16 g'16 f'16 e'8 a'8. 
-       b'16 a'16 g'16 f'2 e'8. fis'16 g'2 fis'4 g'16 f'16 
-       e'16 d'16 c'16 d'16 c'16 b16 a16 c'16 b16 a16 c'16 
-       a16 gis8 e'8 d'8 c'16 b16 a16 gis16 a16 b16 c'16 
-       fis16 gis16 a16 b8 a16 b16 c'8 f'8 e'8 d'4 c'16 b16 
-       { \music{ c'16 } } { \music{ b16 } } { \music{ b16 
-       b16 } \music{ c'16 c'16 } \music{ b16 } \music{ 
-       c'16 c'16 } } { } { \music{ b16 } } { \music{ a16 } 
-       } a4 g8 a8 b8 c'8. { \music{ d'16 } } { \music{ 
-       c'16 } } { \music{ b8 } } c'8 d'8 e'8 f'8. { \music{
-        g'16 } } { \music{ f'16 } } { \music{ e'8 } } a'8 
-       d'8 g'8. a'16 g'16 f'16 e'8 a'8 d'8 ais'8 a'8 g'16 
-       f'16 g'16 f'16 g'16 e'16 f'16 { \music{ g'16 } } { 
-       \music{ g'16 } } { \music{ a'16 } } { \music{ g'16 }
-        } { } { } { \music{ f'16 } } { \music{ g'16 } } { 
-       \music{ a'16 } } cis'16 d'16 g'16 { \music{ f'16 } 
-       } { \music{ e'16 } } { \music{ f'16 } } { \music{ 
-       e'16 } } { } { \music{ f'16 } } { } { } { } { 
-       \music{ e'8 } } { } d'16 d'8 g8 a8 b8 c'8 d'16 { 
-       \music{ c'16 } } { \music{ b8 } } e'8 a8 { \music{ 
-       d'8. } } e'16 d'16 c'16 b16 c'16 d'16 e'16 f'16 
-       g'16 a'16 g'16 f'16 e'16 d'16 c'16 { \music{ c'16 } 
-       } { \music{ b16 } } { \music{ c'16 } } { } { } { 
-       \music{ b8. } } c'8 d'8 g8 { \music{ c'4 } } b8 c'4 
-       b8 ais8 a8 { \music{ d'4 } } c'8 d'8 e'8 f'4 a'16 { 
-       \music{ g'16 } } f'16 e'16 { \music{ f'16 } } { 
-       \music{ e'16 } } d'16 c'2 g16 { \music{ a16 } } b16 
-       c'16 d'16 e'16 { \music{ f'8. } } { \music{ d'16 } 
-       \music{ c'16 e'16 } } f'16 { \music{ g'16 } } { 
-       \music{ a'8. } } b'16 c''2 
+       % 1
+       
+       % 2:4*5/32
+       g8 a8 b8 c'8. 
+       % 3:4*5/128
+       < { d'16 } > < { c'16 } > < { b8 } > e'8 a8 < { 
+       d'8. } > e'16 d'16 c'16 b16 g16 a16 b16 c'16 b16 
+       c'16 d'16 e'16 d'16 e'16 fis'16 g'8 b8 c'8 a8 d'16 
+       c'16 b16 a16 
+       % 5:4*47/384
+       < { g8. } > g16 f16 e16 f16 g16 a16 g16 a16 b16 c'2 
+       b4 |
+       % 7
+       c'8 d'8 e'8 f'8. < { f'16 } { g'16 } > e'8 a'8 d'8 
+       g'8. a'16 g'16 f'16 e'8 a'8. b'16 a'16 g'16 f'2 
+       e'8. fis'16 g'2 fis'4 g'16 f'16 e'16 d'16 c'16 d'16 
+       c'16 b16 a16 c'16 b16 a16 
+       % 11:4
+       c'16 a16 gis8 e'8 d'8 c'16 b16 a16 gis16 a16 b16 
+       c'16 fis16 gis16 a16 b8 a16 b16 c'8 f'8 e'8 d'4 
+       c'16 b16 
+       % 13:4*45/256
+       < { c'16 } > < { b16 } > < { b16 b16 } { c'16 c'16 }
+        { b16 } { c'16 c'16 } > < > < { b16 } > < { a16 } 
+       > |
+       % 14
+       a4 
+       % 15:4*5/32
+       g8 a8 b8 c'8. 
+       % 16:4*5/128
+       < { d'16 } > < { c'16 } > < { b8 } > c'8 d'8 e'8 
+       f'8. < { g'16 } > < { f'16 } > |
+       % 17
+       < { e'8 } > a'8 d'8 g'8. a'16 g'16 f'16 e'8 a'8 d'8 
+       ais'8 a'8 g'16 f'16 g'16 f'16 g'16 e'16 f'16 
+       % 18:4*155/768
+       < { g'16 } > < { g'16 } > < { a'16 } > < { g'16 } > 
+       < > < > < { f'16 } > < { g'16 } > |
+       % 19
+       < { a'16 } > cis'16 d'16 g'16 < { f'16 } > < { e'16 
+       } > < { f'16 } > < { e'16 } > < > < { f'16 } > < > 
+       < > < > < { e'8 } > < > d'16 d'8 
+       % 20:4*7/32
+       g8 a8 b8 
+       % 21:4
+       c'8 d'16 < { c'16 } > < { b8 } > e'8 a8 < { d'8. } 
+       > 
+       % 22:4*5/384
+       e'16 d'16 c'16 b16 c'16 d'16 e'16 f'16 g'16 a'16 
+       g'16 f'16 e'16 d'16 c'16 < { c'16 } > < { b16 } > < 
+       { c'16 } > |
+       % 23
+       < > < > < { b8. } > c'8 d'8 g8 < { c'4 } > b8 c'4 
+       b8 ais8 a8 
+       % 24:4*59/384
+       < { d'4 } > c'8 d'8 e'8 
+       % 25:4
+       f'4 a'16 < { g'16 } > f'16 e'16 < { f'16 } > < { 
+       e'16 } > d'16 |
+       % 26
+       c'2 g16 < { a16 } > b16 c'16 d'16 e'16 < { f'8. } > 
+       |
+       % 27
+       < { d'16 } { c'16 e'16 } > f'16 < { g'16 } > < { 
+       a'8. } > b'16 c''2 
 } % track1
 
-track2 = \music { 
-       % \midi copyright:
+track2 = \melodic{
+       % midi copyright:
        % instrument:
-       c8 d8 e8 f8. { \music{ g16 } } { \music{ f16 } } { 
-       \music{ e8 } } a8 d8 { \music{ g8. } } a16 g16 f16 
-       e16 f16 e16 d16 c16 d16 c16 'b16 'a8 fis8 { \music{ 
-       g4. } } f16 e16 f8 d8 g8 f8 e8 d8 g4 f16 e16 f4 f16 
-       e8 d4 c8 f8 g16 f16 e16 f8 d8 g4.. g8 a8 b8 { 
-       \music{ c'8. } } { \music{ d'16 } } { \music{ c'16 }
-        } { \music{ b8 } } e'8 a8 { \music{ d'8. } } e'16 
-       d'16 c'16 b8 d8 e8 fis8 { \music{ g8. } } { \music{ 
-       a16 } } { \music{ g16 } } { \music{ f8 } } b8 e8 
-       a8. b16 a16 gis16 fis8 f8 e8 d8. e16 fis16 gis16 
-       a16 gis16 a16 b16 gis16 fis16 gis16 a16 b8 c8 d8 e8 
-       { \music{ f8. } } { \music{ g16 } } { \music{ f16 } 
-       } { \music{ e8 } } a8 d8 g8. a16 g16 f16 e16 e16 
-       fis16 g4 fis8 gis8 { \music{ a4 } } g8 a8 b8 { 
-       \music{ c'8. } } { \music{ d'16 } } { \music{ c'16 }
-        } { \music{ b8 } } e'8 a8 d'8. e'16 d'16 c'16 b8 
-       g'8 cis'8 d'8 e'8 cis'8 d'8 e'8 a8 e8 fis8 g8 { 
-       \music{ a8. } } { \music{ b16 } } { \music{ a16 } } 
-       { \music{ g8 } } c'8 fis8 { \music{ b8. } } c'16 
-       b16 a16 g16 fis16 e16 d16 e4 d4 a16 g16 f16 e16 g16 
-       f16 a16 g4 a16 ais8 { \music{ c'4 } } d'8 g8 { 
-       \music{ g4. } } f4 e8 d4 e16 a4 g4 f8 g8 a8 { 
-       \music{ ais8. } } { \music{ c'16 } } { \music{ 
-       ais16 } } { \music{ a8 } } d'8 g8 { \music{ c'8. } 
-       } d'16 c'16 ais16 a16 ais16 a16 g16 f16 g16 f16 e16 
-       g16 a4 f'16 d'8 { \music{ e'2 } \music{ g'2 } } 
+       % 1
+       c8 d8 e8 f8. < { g16 } > < { f16 } > < { e8 } > a8 
+       d8 
+       % 2:4*107/3840
+       < { g8. } > a16 g16 f16 e16 f16 e16 d16 c16 d16 c16 
+       'b16 'a8 fis8 
+       % 3:4*203/3840
+       < { g4. } > f16 e16 f8 d8 g8 f8 e8 d8 
+       % 4:2
+       g4 f16 e16 
+       % 5:4
+       f4 f16 e8 d4 c8 f8 
+       % 6:4
+       g16 f16 e16 f8 d8 g2 
+       % 7:4*241/3840
+       
+       % 9:8
+       g8 a8 b8 < { c'8. } > < { d'16 } > < { c'16 } > < { 
+       b8 } > e'8 a8 
+       % 10:4*13/480
+       < { d'8. } > e'16 d'16 c'16 b8 d8 e8 fis8 
+       % 11:4*23/384
+       < { g8. } > < { a16 } > < { g16 } > < { f8 } > b8 
+       e8 a8. b16 a16 gis16 fis8 f8 e8 d8. e16 fis16 gis16 
+       a16 gis16 a16 b16 gis16 fis16 gis16 a16 b8 
+       % 13:4*5/32
+       
+       % 14:8
+       c8 d8 e8 < { f8. } > < { g16 } > < { f16 } > < { e8 
+       } > a8 d8 g8. a16 g16 f16 
+       % 15:2
+       e16 e16 fis16 g4 
+       % 16:4*91/3840
+       fis8 gis8 < { a4 } > g8 a8 b8 < { c'8. } > |
+       % 17
+       < { d'16 } > < { c'16 } > < { b8 } > e'8 a8 d'8. 
+       e'16 d'16 c'16 b8 g'8 cis'8 d'8 e'8 cis'8 d'8 e'8 
+       a8 
+       % 19:8
+       e8 fis8 g8 < { a8. } > < { b16 } > < { a16 } > |
+       % 20
+       < { g8 } > c'8 fis8 < { b8. } > c'16 b16 a16 g16 
+       fis16 e16 d16 e4 
+       % 21:4
+       d4 a16 g16 f16 e16 g16 f16 a16 |
+       % 22
+       g4 a16 ais8 < { c'4 } > d'8 g8 < { g4. } > |
+       % 23
+       f4 e8 d4 |
+       % 24
+       e16 a4 g4 f8 g8 a8 < { ais8. } > |
+       % 25
+       < { c'16 } > < { ais16 } > < { a8 } > d'8 g8 < { 
+       c'8. } > d'16 c'16 ais16 a16 ais16 a16 g16 f16 g16 
+       f16 e16 
+       % 26:2
+       g16 a4 
+       % 27:4
+       f'16 d'8 < { e'2 } { g'2 } > 
 } % track2
 
-track3 = \music { 
-       % \midi copyright:
+track3 = \melodic{
+       % midi copyright:
        % instrument:
-       'g8 'a8 'b8 c8. { \music{ d16 } } { \music{ c16 } } 
-       { \music{ 'b8 } } e8 'a8 { \music{ d8. } } e16 d16 
-       c16 'b8 c4 'ais8 'a8 d8 'g8 c8 'a16 'b16 c16 d4 'g4 
-       'g8 'a8 'b8 c8. { \music{ d16 } } { \music{ c16 } } 
-       { } 'b8 e8 'a8 d8. e16 d16 c16 'b8 e4. d4 'b16 c16 
-       'a16 e16 d16 c16 'b16 c16 'a16 'b16 c16 d16 c16 
-       'b16 'a16 'g4 'e8 'fis8 'gis8 'a8. { \music{ 'b16 } 
-       } { \music{ 'a16 } } { \music{ 'g8 } } c8 'fis8 
-       'b8. c16 'b16 'a16 'gis8 { \music{ 'a4 } } 'gis8 
-       'a4 'g8 'a8 'b8 c8. { \music{ d16 } } { \music{ c16 
-       } } { \music{ 'b8 } } e8 'a8 d4 'g8 d4 c8 'a8 e4 d8 
-       'a8 'b8 cis8 d8. { \music{ e16 } } { \music{ d16 } 
-       } { \music{ c8 } } f8 'b8 e8. f16 e16 d16 cis8 'a8 
-       'b8 cis8 d8. { \music{ e16 } } { \music{ d16 } } { 
-       \music{ c8 } } fis8 'b8 e8. fis16 e16 d16 c4.. d16 
-       c16 'b16 'a16 'g16 'a16 'fis16 'g8 'b8 c8 { \music{ 
-       d8 } } e8. { \music{ f16 } } { \music{ e16 } } { 
-       \music{ d8 } } g8 c8 f8. g16 f16 e16 d4 e8 d4 { 
-       \music{ 'g8 } } 'g4. 'c8 'd8 'e8 'f8. { \music{ 
-       'g16 } } { \music{ 'f16 } } { \music{ 'e8 } } 'a8 
-       'd8 { \music{ 'g8. } } 'a16 'g16 'f16 'e16 'd16 
-       'e16 'f16 'g16 'a16 'ais16 'g16 'a16 'e16 'f16 'g16 
-       'a16 'b16 c16 { \music{ 'a16 } \music{ d2 } } c1 
+       % 1
+       
+       % 4:8
+       'g8 'a8 'b8 c8. < { d16 } > < { c16 } > < { 'b8 } > 
+       e8 'a8 
+       % 5:4*11/384
+       < { d8. } > e16 d16 c16 'b8 c4 'ais8 'a8 d8 'g8 c8 
+       % 6:2
+       'a16 'b16 c16 d4 'g4 
+       % 7:4
+       'g8 'a8 'b8 c8. < { d16 } > < { c16 } > < > |
+       % 8
+       'b8 e8 'a8 d8. e16 d16 c16 'b8 e4. d4 
+       % 9:2
+       'b16 c16 'a16 e16 d16 c16 'b16 c16 'a16 'b16 c16 
+       d16 c16 'b16 'a16 'g4 
+       % 10:2.
+       
+       % 12:8
+       'e8 'fis8 'gis8 'a8. < { 'b16 } > < { 'a16 } > < { 
+       'g8 } > c8 'fis8 'b8. c16 'b16 'a16 
+       % 13:2
+       'gis8 < { 'a4 } > 'gis8 'a4 
+       % 14:4
+       'g8 'a8 'b8 c8. < { d16 } > < { c16 } > |
+       % 15
+       < { 'b8 } > e8 'a8 d4 'g8 d4 c8 'a8 e4 d8 
+       % 16:4*5/32
+       
+       % 17:8
+       'a8 'b8 cis8 d8. < { e16 } > < { d16 } > < { c8 } > 
+       f8 'b8 e8. f16 e16 d16 cis8 
+       % 18:4*5/32
+       
+       % 19:8
+       'a8 'b8 cis8 d8. < { e16 } > < { d16 } > < { c8 } > 
+       fis8 'b8 e8. fis16 e16 d16 
+       % 20:2
+       c2 d16 c16 'b16 'a16 'g16 'a16 'fis16 
+       % 21:2
+       'g8 'b8 c8 < { d8 } > e8. 
+       % 22:4*5/128
+       < { f16 } > < { e16 } > < { d8 } > g8 c8 f8. g16 
+       f16 e16 d4 e8 d4 
+       % 23:4*59/384
+       < { 'g8 } > 'g4. 'c8 'd8 'e8 'f8. 
+       % 24:4*21/128
+       < { 'g16 } > < { 'f16 } > < { 'e8 } > 'a8 'd8 
+       % 25:4*11/384
+       < { 'g8. } > 'a16 'g16 'f16 'e16 'd16 'e16 'f16 
+       'g16 'a16 'ais16 'g16 'a16 'e16 'f16 'g16 'a16 'b16 
+       c16 
+       % 26:4*7/64
+       < { 'a16 } { d2 } > |
+       % 27
+       c1 
 } % track3
 
-track4 = \music { 
-       % \midi copyright:
+track4 = \melodic{
+       % midi copyright:
        % instrument:
-       'c8 'd8 'e8 'f8. { \music{ 'g16 } } { \music{ 'f16 }
-        } { \music{ 'e8 } } 'a8 'd8 { \music{ 'g8. } } 
-       'a16 'g16 'f16 'e16 'f16 'e16 'd16 'c16 'd16 'c16 
-       ''b16 ''a8 'd8 'a8 'fis8 'g16 'a16 'ais16 'g16 
-       'cis8 'd8 'a4 'e4 'a16 'b16 c16 d16 c16 'b16 'a16 
-       'g16 c8 ''g8 ''a8 ''b8 'c8. { \music{ 'd16 } } { 
-       \music{ 'c16 } } { \music{ ''b8 } } 'e8 ''a8 'd8. 
-       'e16 'd16 'c16 { \music{ ''b8 } } 'e4 'd8 'c8 'f4 
-       'e4 'd4 'e8 'f8 'e16 'd16 'e4 ''a4 ''g8 ''a8 ''b8 
-       'c8. { \music{ 'd16 } } { \music{ 'c16 } } { \music{
-        ''b8 } } 'e8 ''a8 'd8. 'e16 'd16 'c16 ''b8 ai''s8 
-       ''a8 ''g8 ''a8 'fis8 'g8 'e8 'd4 'e8 'f8 'g8. { 
-       \music{ 'a16 } } { \music{ 'g16 } } { \music{ 'f8 } 
-       } 'ais8 'e8 'a8. 'b16 { \music{ 'a16 } } 'g16 'f16 
-       'e16 'f16 'd16 'g8 'a8 'd4.. 'e16 'd16 'c16 ''b16 
-       ''a16 ''g16 fi''s16 ''e8 'e8 'fis8 'g4 'a16 'g16 
-       'fis8 'd8 'g1 'a4 'b8 c8 'f16 'a16 'g16 'f16 'e16 
-       'd16 'c16 ''b16 'c16 'd16 'e16 'f16 'g8 ''g8 'b2 
+       % 1
+       
+       % 5:4*5/32
+       'c8 'd8 'e8 'f8. 
+       % 6:4*5/128
+       < { 'g16 } > < { 'f16 } > < { 'e8 } > 'a8 'd8 < { 
+       'g8. } > 'a16 'g16 'f16 'e16 'f16 'e16 'd16 'c16 
+       'd16 'c16 ''b16 ''a8 'd8 'a8 'fis8 'g16 'a16 'ais16 
+       'g16 'cis8 'd8 'a4 'e4 'a16 'b16 c16 d16 c16 'b16 
+       'a16 'g16 c8 
+       % 9:4*5/32
+       
+       % 10:4*5/32
+       ''g8 ''a8 ''b8 'c8. 
+       % 11:4*5/128
+       < { 'd16 } > < { 'c16 } > < { ''b8 } > 'e8 ''a8 
+       'd8. 'e16 'd16 'c16 < { ''b8 } > |
+       % 12
+       'e4 'd8 'c8 'f4 'e4 'd4 'e8 'f8 'e16 'd16 'e4 ''a4 
+       % 14:4
+       
+       % 15:8
+       ''g8 ''a8 ''b8 'c8. < { 'd16 } > < { 'c16 } > < { 
+       ''b8 } > 'e8 ''a8 'd8. 'e16 'd16 'c16 ''b8 ''ais8 
+       ''a8 ''g8 ''a8 'fis8 'g8 'e8 'd4 'e8 'f8 'g8. 
+       % 18:4*5/128
+       < { 'a16 } > < { 'g16 } > < { 'f8 } > 'ais8 'e8 
+       'a8. 'b16 < { 'a16 } > 'g16 'f16 'e16 'f16 'd16 'g8 
+       'a8 
+       % 19:2
+       'd2 'e16 'd16 'c16 ''b16 ''a16 ''g16 ''fis16 ''e8 
+       'e8 'fis8 'g4 'a16 'g16 'fis8 'd8 'g1 'a4 'b8 c8 
+       'f16 'a16 'g16 'f16 'e16 'd16 'c16 ''b16 'c16 'd16 
+       'e16 'f16 'g8 ''g8 |
+       % 24
+       
+       % 26:2
+       'b2 |
+       % 27
+       
 } % track4
 
-score {
-       \staff { \melodic \music { track0 } }
-       \staff { \melodic \music { track1 } }
-       \staff { \melodic \music { track2 } }
-       \staff { \melodic \music { track3 } }
-       \staff { \melodic \music { track4 } }
-
-       \midi {
+\score{
+       \staff{ track0 }
+       \staff{ track1 }
+       \staff{ track2 }
+       \staff{ track3 }
+       \staff{ track4 }
+       
+       \paper{
+               \unitspace 20\mm
+       }\midi{
                \tempo 4:60 
        }
 }
index 36cfbb124688b5aab0230e5d39053f5cfa6d6ad4..9bc116a99cf3f86a81f44e560829159c3973edd9 100644 (file)
@@ -7,12 +7,13 @@
 %
 % copyright: None
 %
-% declare \music (which will be in *one* \staff ) for the lead \voice
+% declare melody (which will be in *one* staff ) for the lead voice
 
-melodie = \music {
+melodie = \melodic{
                                % switch Lilypond in note-mode
        \clef\violin
-       \octave {}              % set the default \octave
+       \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.
@@ -32,16 +33,13 @@ melodie = \music {
 }
 
                                % more of this.
-begeleiding =
-%      \clef bass              % bass-\clef
-%      \music {                % as you can see, the  sign obliges 
-                               % you to precede \keyword by a backslash: \
-       \music { 
+begeleiding = \melodic{
        \clef "bass"
-       \octave { ' }           % default \octave: 1 below the first \octave.
+       \meter{ 2/4 }
+       \octave{ c' }           % default octave: 1 below the first octave.
 
        %%% theme
-       'c                      % ' means one \octave lower.
+       'c                      % ' means one octave lower.
                                % Similarly: ' means one higher.
           c    e c     f c     e c     d 'b    c 'a    'f 'g   'c2
        \octave { ' }
@@ -51,27 +49,10 @@ begeleiding =
        r8 d8()'b       r8 c8()'a       r8 'a8()'f      r8 'e8()'c
 }
 
-
-% create a \staff named bstaf
-bstaf = \staff {
-       \melodic
-       \music { begeleiding }  % use the declared \music
-       \music { \meter {2/4 }  }
-       }
-
-% another one
-vstaf = \staff {
-       \melodic
-               \music { melodie }
-                               % default \clef is violin \clef
-               \music { \meter {2/4 } }
-       }
-
-
-\score {
-       \staff { vstaf }
-       \staff { bstaf }
-       \paper {
+\score{
+       \staff{ melodie }
+       \staff{ begeleiding }
+       \paper{
                \unitspace 2.5\cm       % a whole note takes 2.5 \cm ideally.
        }
 }
index 64fa7166ecd805ab4278f7e487848658346444e2..daaa42bffb18b2834fb25668772762fc69974a71 100644 (file)
@@ -3,7 +3,7 @@
 % COPYRIGHT: GPL
 %
 %
-globals=\music{
+globals=\melodic{
                \meter {4/ 4}
                \partial {8}
                \skip {1*8}
@@ -13,30 +13,27 @@ globals=\music{
                \meter {2/4}
 }
 
-ritme = \staff {
-       rhythmic
-       \music{globals}
-       \music {
-       c8
-       |[a8() a8. a8 a16 a16 a16] c4.
-               
-       %[c8( )a'8() c8 c8]% BUG!
-       |c2 c2
-       
-       |[fis16 dis'16( fis16 dis'16 ][fis16) dis'16 fis16 dis'16]
-       | r32 r32 r16 r8 r4 r2
-       |[c8. c16] [c16 c8.] [c16 c16 c8] [c16 c8 c16]
-
-        c2 c2 c2 c2 c2 c2 c2 c2 c2 c2
-
-       }
+ritme = \staff{
+       globals
+% rhythmic broken for  now
+%      \rhytmic{
+%      c8
+%      |[a8() a8. a8 a16 a16 a16] c4.
+%              
+%      %[c8( )a'8() c8 c8]% BUG!
+%      |c2 c2
+%      
+%      |[fis16 dis'16( fis16 dis'16 ][fis16) dis'16 fis16 dis'16]
+%      | r32 r32 r16 r8 r4 r2
+%      |[c8. c16] [c16 c8.] [c16 c16 c8] [c16 c8 c16]
+% 
+%       c2 c2 c2 c2 c2 c2 c2 c2 c2 c2
+%      }
 }
 
-melody=
-\staff {
-       \melodic
-       \music { globals }
-       \music{
+melody= \staff{
+       globals
+       \melodic{
        c8\key{fis cis gis}
        |r4 r4 r4 r4
        |cis'2..        r8
@@ -64,16 +61,12 @@ melody=
 
 }
 
-\score {
-       \paper {
+\score{
+       \paper{
                \geometric 1.4
                \unitspace 3.0 \cm
        }
-%      \staff { ritme } % broken for now
-       \staff { melody }
-       
+       ritme
+       melody
 }
 
-
-
-
index 56340bddab9ae216362627f0aaeeec9102760925..b3917c6209437fe647da42bde316a2e08117e8c3 100644 (file)
@@ -17,7 +17,7 @@
 % \barnumbering5
 % \barnumberstyle\boxed
 
-globalmusic= \music {
+globalmusic= \melodic{
                \meter {2/4}
 %              \key fis
                \skip {56*2}
@@ -35,33 +35,17 @@ include "mlvio1.ly"
 include "mlvio2.ly"
 include "mlcello.ly"
 
-\score {
-       \staff { 
-               \melodic 
-               \music { alto }
-               \music { globalmusic }
-       }
-       \staff { 
-               \melodic 
-               \music { violinI }
-               \music { globalmusic }
-       }
-       \staff { 
-               \melodic 
-               \music { violinII }
-               \music { globalmusic }
-       } 
-       \staff { 
-               \melodic 
-               \music { cello }
-               \music { globalmusic }
-       } 
-       \paper {
+\score{
+       \staff{ globalmusic alto }
+       \staff{ globalmusic violinI }
+       \staff{ globalmusic violinII }
+       \staff{ globalmusic cello }
+       \paper{
                \unitspace 24\mm
                \width 195\mm
                \output "martien.out"
        }
-       \midi 
+       \midi{ 
                \tempo 4:80
        }
 }
index 08c6ce475568b2f06a269787e441a54b90f55260..330b732414ff3f0bd98e5b76d71b7c51ad9e1696 100644 (file)
@@ -1,39 +1,27 @@
 % \midi.ly
 % test source for lilypond-s \midi \output
 
-melodie = \music {
+melodie = \melodic{
        \clef\violin
+       \meter{ 2/4 }
        c c | g g | a a | g2 
        f f | e e | d d8.( e16 | )c2 | % :|
        
 }
 
-begeleiding = \music {
-       
-       \clef \bass
-       \octave{-1}
+begeleiding = \melodic{
+       \clef\bass
+       \meter{ 2/4 }
+       \octave{'c}
        c c' | e' c' | f' c' | e' c' 
        d' b | c' a | f g | c2 | 
        
 }
 
-mstaf = \staff {
-       \melodic
-       \music { melodie }
-}
-
-bass_staf = \staff {
-       \melodic        
-       \music { begeleiding }
-}
-
-score {
-       \staff { mstaf }
-       \staff { bass_staf }
-       \co\mmands {
-               \meter { 2 * 4}
-       }
-       \midi {
+\score{
+       \staff{ melodie }
+       \staff{ begeleiding }
+       \midi{
                \tempo 4:120
        }
 }
index 3e0e419e4a2f585a1658a186711249ab211bd993..0e78987584628cb5994b9049313470616601d1a6 100644 (file)
 % The purpose of this file is to demonstrate features of LilyPond;
 % respect the copyright.
 %
-alto = \music { 
-       
+alto = \melodic{ 
        \duration{16}
        \clef\alto
-       \octave{}
+       \octave{c}
        \key{fis}
 %1
         [ 'b8. 'a ] [ 'g8 'b c ] |
index 76d9519123b7b9a5446be41b7bbfa68a61397932..ad9f3126b657f2b79d96cf497564bfe4cf5b581d 100644 (file)
@@ -11,9 +11,9 @@
 % The purpose of this file is to demonstrate features of LilyPond;
 % respect the copyright.
 %
-cello = \music 
-       
-\clef"bass"    \octave{'}
+cello = \melodic
+       \clef"bass"
+       \octave{'c}
        \duration{4}
        \key{fis}
 %%1
index 0ef0d07821912cb3a9eea0560beef7a2e31d315d..bd0aea34ab411c24b0658f1d0b620ae3d902862f 100644 (file)
 % The purpose of this file is to demonstrate features of LilyPond;
 % respect the copyright.
 %
-violinI = \music { 
-       
+violinI = \melodic{ 
        \clef "violin"
-       \octave{}
+       \octave{c}
        \duration{4}
        \key{fis}
 %1
index 9f87985537f694a2ed591e5ba6f1aa182012da2d..33a376e9204b86b628900b1445817d2156e8d63c 100644 (file)
@@ -11,9 +11,9 @@
 % The purpose of this file is to demonstrate features of LilyPond;
 % respect the copyright.
 %
-violinII = \music 
-       
-\clef "violin" \octave{}
+violinII = \melodic
+       \clef "violin"
+       \octave{c}
        \duration{4}
        \key{fis}
 %1
index d309296ddac2055c03351849719093728800d6c4..255ee658a1ab1424ac330a3ac87c2b0c8df248cb 100644 (file)
@@ -1,18 +1,18 @@
 
-melanie = \music {
-       
+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 ] { \music{ [ c d e ]2/3 } \music{ [ f g a ]2/3 } } |
+       [c d ] < { [ c d e ]2/3 } { [ f g a ]2/3 } > |
        [ c d ] [ d c ] |
         
 }
 
-michelle = \music {
-       
+michelle = \melodic{
+       \meter{2/4}
        \duration{8}
        [ c c c c ] |
        [ c c c c ] |
@@ -20,11 +20,10 @@ michelle = \music {
        [ c c c c ] |
        [ c c c c ] |
        [ c c c c ] |
-       
 }
 
-mireille = \music {
-       @
+mireille = \lyric{
+       \meter{2/4}
        \duration{8}
        o o o o |
        o o [ o o o ]2/3 |
@@ -32,14 +31,11 @@ mireille = \music {
        [ o o o o o o]4/6 |
        o o [ o o o ]2/3 |
        o o o o |
-       @
 }
 
-score {
-       \staff { lyric \music { mireille } }
-       \staff { \melodic \music { melanie } }
-       \staff { \melodic \music { michelle } }
-       \co\mmands{ 
-               \meter {2*4}
-       }
+\score{
+       \staff{ mireille }
+       \staff{ melanie }
+       \staff{ michelle }
+       \paper{}
 }
index 132410ba9a27a377a2c785560567eb3e6ed858f5..8a59b1626959b9ef37bfe8527cc5b48bb950914a 100644 (file)
-% Creator: This is mi2mu 0.0.11.2 #14/FlowerLib 1.1.7 #1 of Mar 12 1997 02:05:36
-% Automatically generated, at Wed Mar 12 02:09:07 1997
-% from input file: pre1.\midi
-% jcn: using option -n
+% Creator: This is mi2mu 0.0.12.1 #5/FlowerLib 1.1.9 #0 of Mar 24 1997 21:30:32
+% Automatically generated, at Mon Mar 24 23:24:05 1997
+% from input file: pre1.midi
 
-track0 = \music { 
-       % \midi copyright:
+track0 = \melodic{
+       % midi copyright:
        % instrument:
-       { } { } { } { } { } { } { } { } 
+       % 1
+       
+       % 34:8
+       |
+       % 35
+       
 } % track0
 
-track1 = \music { 
-       % \midi copyright:
+track1 = \melodic{
+       % midi copyright:
        % instrument:
-       { \music{ g16 c'16 e'16 g16 c'16 e'16 } } { \music{ 
-       g16 c'16 e'16 g16 c'16 e'16 } } { \music{ a16 d'16 
-       f'16 a16 d'16 f'16 } } { \music{ a16 d'16 f'16 a16 
-       d'16 f'16 } } { \music{ g16 d'16 f'16 g16 d'16 f'16 
-       } } { \music{ g16 d'16 f'16 g16 d'16 f'16 } } { 
-       \music{ g16 c'16 e'16 g16 c'16 e'16 } } { \music{ 
-       g16 c'16 e'16 g16 c'16 e'16 } } { \music{ a16 e'16 
-       a'16 a16 e'16 a'16 } } { \music{ a16 e'16 a'16 a16 
-       e'16 a'16 } } { \music{ fis16 a16 d'16 fis16 a16 
-       d'16 } } { \music{ fis16 a16 d'16 fis16 a16 d'16 } 
-       } { \music{ g16 d'16 g'16 g16 d'16 g'16 } } { 
-       \music{ g16 d'16 g'16 g16 d'16 g'16 } } { \music{ 
-       e16 g16 c'16 e16 g16 c'16 } } { \music{ e16 g16 
-       c'16 e16 g16 c'16 } } { \music{ e16 g16 c'16 e16 
-       g16 c'16 } } { \music{ e16 g16 c'16 e16 g16 c'16 } 
-       } { \music{ d16 fis16 c'16 d16 fis16 c'16 } } { 
-       \music{ d16 fis16 c'16 d16 fis16 c'16 } } { \music{ 
-       d16 g16 b16 d16 g16 b16 } } { \music{ d16 g16 b16 
-       d16 g16 b16 } } { \music{ e16 g16 cis'16 e16 g16 
-       cis'16 } } { \music{ e16 g16 cis'16 e16 g16 cis'16 }
-        } { \music{ d16 a16 d'16 d16 a16 d'16 } } { \music{
-        d16 a16 d'16 d16 a16 d'16 } } { \music{ d16 f16 
-       b16 d16 f16 b16 } } { \music{ d16 f16 b16 d16 f16 
-       b16 } } { \music{ c16 g16 c'16 c16 g16 c'16 } } { 
-       \music{ c16 g16 c'16 c16 g16 c'16 } } { \music{ 
-       'a16 c16 f16 'a16 c16 f16 } } { \music{ 'a16 c16 
-       f16 'a16 c16 f16 } } { \music{ 'a16 c16 f16 'a16 
-       c16 f16 } } { \music{ 'a16 c16 f16 'a16 c16 f16 } } 
-       { \music{ 'g16 'b16 f16 'g16 'b16 f16 } } { \music{ 
-       'g16 'b16 f16 'g16 'b16 f16 } } { \music{ 'g16 c16 
-       e16 'g16 c16 e16 } } { \music{ 'g16 c16 e16 'g16 
-       c16 e16 } } { \music{ 'ais16 c16 e16 'ais16 c16 e16 
-       } } { \music{ 'ais16 c16 e16 'ais16 c16 e16 } } { 
-       \music{ 'a16 c16 e16 'a16 c16 e16 } } { \music{ 
-       'a16 c16 e16 'a16 c16 e16 } } { \music{ 'a16 c16 
-       dis16 'a16 c16 dis16 } } { \music{ 'a16 c16 dis16 
-       'a16 c16 dis16 } } { \music{ 'b16 c16 d16 'b16 c16 
-       d16 } } { \music{ 'b16 c16 d16 'b16 c16 d16 } } { 
-       \music{ 'g16 'b16 d16 'g16 'b16 d16 } } { \music{ 
-       'g16 'b16 d16 'g16 'b16 d16 } } { \music{ 'g16 c16 
-       e16 'g16 c16 e16 } } { \music{ 'g16 c16 e16 'g16 
-       c16 e16 } } { \music{ 'g16 c16 f16 'g16 c16 f16 } } 
-       { \music{ 'g16 c16 f16 'g16 c16 f16 } } { \music{ 
-       'g16 'b16 f16 'g16 'b16 f16 } } { \music{ 'g16 'b16 
-       f16 'g16 'b16 f16 } } { \music{ 'a16 c16 fis16 'a16 
-       c16 fis16 } } { \music{ 'a16 c16 fis16 'a16 c16 
-       fis16 } } { \music{ 'g16 c16 g16 'g16 c16 g16 } } { 
-       \music{ 'g16 c16 g16 'g16 c16 g16 } } { \music{ 
-       'g16 c16 f16 'g16 c16 f16 } } { \music{ 'g16 c16 
-       f16 'g16 c16 f16 } } { \music{ 'g16 'b16 f16 'g16 
-       'b16 f16 } } { \music{ 'g16 'b16 f16 'g16 'b16 f16 }
-        } { \music{ 'g16 'ais16 e16 'g16 'ais16 e16 } } { 
-       \music{ 'g16 'ais16 e16 'g16 'ais16 e16 } } { 
-       \music{ 'f16 'a16 c16 f16 c16 'a16 c16 'a16 'f16 
-       'a16 'f16 'd16 'f16 'd16 } } { \music{ g16 b16 d'16 
-       f'16 d'16 b16 d'16 b16 g16 b16 d16 f16 e64 } } { 
-       \music{ f64 } } { } { \music{ e32 } } { \music{ d16 
-       } } { \music{ c'1 } \music{ g1 } \music{ e1 } } 
+       % 1
+       g16 c'16 e'16 g16 c'16 e'16 g16 c'16 e'16 g16 c'16 
+       e'16 |
+       % 2
+       a16 d'16 f'16 a16 d'16 f'16 a16 d'16 f'16 a16 d'16 
+       f'16 |
+       % 3
+       g16 d'16 f'16 g16 d'16 f'16 g16 d'16 f'16 g16 d'16 
+       f'16 |
+       % 4
+       g16 c'16 e'16 g16 c'16 e'16 g16 c'16 e'16 g16 c'16 
+       e'16 |
+       % 5
+       a16 e'16 a'16 a16 e'16 a'16 a16 e'16 a'16 a16 e'16 
+       a'16 |
+       % 6
+       fis16 a16 d'16 fis16 a16 d'16 fis16 a16 d'16 fis16 
+       a16 d'16 |
+       % 7
+       g16 d'16 g'16 g16 d'16 g'16 g16 d'16 g'16 g16 d'16 
+       g'16 |
+       % 8
+       e16 g16 c'16 e16 g16 c'16 e16 g16 c'16 e16 g16 c'16 
+       |
+       % 9
+       e16 g16 c'16 e16 g16 c'16 e16 g16 c'16 e16 g16 c'16 
+       |
+       % 10
+       d16 fis16 c'16 d16 fis16 c'16 d16 fis16 c'16 d16 
+       fis16 c'16 |
+       % 11
+       d16 g16 b16 d16 g16 b16 d16 g16 b16 d16 g16 b16 |
+       % 12
+       e16 g16 cis'16 e16 g16 cis'16 e16 g16 cis'16 e16 
+       g16 cis'16 |
+       % 13
+       d16 a16 d'16 d16 a16 d'16 d16 a16 d'16 d16 a16 d'16 
+       |
+       % 14
+       d16 f16 b16 d16 f16 b16 d16 f16 b16 d16 f16 b16 |
+       % 15
+       c16 g16 c'16 c16 g16 c'16 c16 g16 c'16 c16 g16 c'16 
+       |
+       % 16
+       'a16 c16 f16 'a16 c16 f16 'a16 c16 f16 'a16 c16 f16 
+       |
+       % 17
+       'a16 c16 f16 'a16 c16 f16 'a16 c16 f16 'a16 c16 f16 
+       |
+       % 18
+       'g16 'b16 f16 'g16 'b16 f16 'g16 'b16 f16 'g16 'b16 
+       f16 |
+       % 19
+       'g16 c16 e16 'g16 c16 e16 'g16 c16 e16 'g16 c16 e16 
+       |
+       % 20
+       'ais16 c16 e16 'ais16 c16 e16 'ais16 c16 e16 'ais16 
+       c16 e16 |
+       % 21
+       'a16 c16 e16 'a16 c16 e16 'a16 c16 e16 'a16 c16 e16 
+       |
+       % 22
+       'a16 c16 dis16 'a16 c16 dis16 'a16 c16 dis16 'a16 
+       c16 dis16 |
+       % 23
+       'b16 c16 d16 'b16 c16 d16 'b16 c16 d16 'b16 c16 d16 
+       |
+       % 24
+       'g16 'b16 d16 'g16 'b16 d16 'g16 'b16 d16 'g16 'b16 
+       d16 |
+       % 25
+       'g16 c16 e16 'g16 c16 e16 'g16 c16 e16 'g16 c16 e16 
+       |
+       % 26
+       'g16 c16 f16 'g16 c16 f16 'g16 c16 f16 'g16 c16 f16 
+       |
+       % 27
+       'g16 'b16 f16 'g16 'b16 f16 'g16 'b16 f16 'g16 'b16 
+       f16 |
+       % 28
+       'a16 c16 fis16 'a16 c16 fis16 'a16 c16 fis16 'a16 
+       c16 fis16 |
+       % 29
+       'g16 c16 g16 'g16 c16 g16 'g16 c16 g16 'g16 c16 g16 
+       |
+       % 30
+       'g16 c16 f16 'g16 c16 f16 'g16 c16 f16 'g16 c16 f16 
+       |
+       % 31
+       'g16 'b16 f16 'g16 'b16 f16 'g16 'b16 f16 'g16 'b16 
+       f16 |
+       % 32
+       'g16 'ais16 e16 'g16 'ais16 e16 'g16 'ais16 e16 
+       'g16 'ais16 e16 |
+       % 33
+       'f16 'a16 c16 f16 c16 'a16 c16 'a16 'f16 'a16 'f16 
+       'd16 'f16 'd16 |
+       % 34
+       g16 b16 d'16 f'16 d'16 b16 d'16 b16 g16 b16 d16 f16 
+       < { e16 } > < { f16 } > < { e16 } > < > < > d16 |
+       % 35
+       < { c'1 } { g1 } { e1 } > 
 } % track1
 
-% jcn: substituted some "2" \durations to "4."
-track2 = \music { 
-       % \midi copyright:
+track2 = \melodic{
+       % midi copyright:
        % instrument:
-       { \music{ e4. } } { \music{ e4. } } { \music{ d4. } 
-       } { \music{ d4. } } { \music{ d4. } } { \music{ d4. 
-       } } { \music{ e4. } } { \music{ e4. } } { \music{ 
-       e4. } } { \music{ e4. } } { \music{ d4. } } { 
-       \music{ d4. } } { \music{ d4. } } { \music{ d4. } } 
-       { \music{ c4. } } { \music{ c4. } } { \music{ c4. } 
-       } { \music{ c4. } } { \music{ 'a4. } } { \music{ 
-       'a4. } } { \music{ 'b4. } } { \music{ 'b4. } } { 
-       \music{ 'ais4. } } { \music{ 'ais4. } } { \music{ 
-       'a4. } } { \music{ 'a4. } } { \music{ 'gis4. } } { 
-       \music{ 'gis4. } } { \music{ 'g4. } } { \music{ 
-       'g4. } } { \music{ 'f4. } } { \music{ 'f4. } } { 
-       \music{ 'f4. } } { \music{ 'f4. } } { \music{ 'd4. }
-        } { \music{ 'd4. } } { \music{ 'e4. } } { \music{ 
-       'e4. } } { \music{ 'g4. } } { \music{ 'c4. } } { } { 
-       } { \music{ 'g4. } } { } { \music{ ''f4. } } { 
-       \music{ 'f4. } } { \music{ ''f4. } } { \music{ 'f4. }
-        } { \music{ fi''s4. } } { \music{ fi''s4. } \music{ 
-       'c4. } } { } { \music{ 'c4. } } { \music{ gi''s4. } } 
-       { \music{ gi''s4. } \music{ 'f4. } } { } { \music{ 
-       'f4. } } { \music{ ''g4. } } { \music{ ''g4. } \music{
-        'f4. } } { } { \music{ 'f4. } } { \music{ ''g4. } } 
-       { \music{ ''g4. } \music{ 'e4. } } { } { \music{ ''g4. 
-       } \music{ 'e4. } } { } { \music{ ''g4. } \music{ 
-       'd4. } } { } { \music{ ''g4. } \music{ 'd4. } } { } { 
-       \music{ 'd4. } } { \music{ ''g4. } } { \music{ ''g4. }
-        \music{ 'd4. } } { } { \music{ 'dis4. } } { \music{
-        ''g4. } } { \music{ 'dis4. } } { \music{ ''g4. } } { 
-       \music{ 'e4. } } { \music{ ''g4. } } { \music{ 'e4. }
-        } { \music{ ''g4. } } { \music{ 'd4. } } { \music{ 
-       ''g4. } } { \music{ 'd4. } } { \music{ ''g4. } } { 
-       \music{ 'd4. } } { \music{ ''g4. } } { \music{ 'd4. }
-        } { \music{ ''c4. } } { \music{ 'c4. } } { \music{ 
-       ''c4. } } { \music{ 'c4. } } { \music{ ''c1 } } { 
-       \music{ 'c1 } } { \music{ ''c1 } \music{ ''b1 } } { 
-       } { } { } { \music{ ''c1 } \music{ 'c1 } } 
-} % track4.
+       % 1
+       e4. e4. 
+       % 2:4*89/3840
+       d4. d4. 
+       % 3:4*3/128
+       d4. d4. 
+       % 4:4*89/3840
+       e4. e4. 
+       % 5:4*29/1280
+       e4. e4. 
+       % 6:4*29/1920
+       d4. d4. 
+       % 7:4*79/3840
+       d4. d4. 
+       % 8:4*83/3840
+       c4. c4. 
+       % 9:4*29/1280
+       c4. c4. 
+       % 10:4*5/192
+       'a4. 'a4. 
+       % 11:4*91/3840
+       'b4. 'b4. 
+       % 12:4*103/3840
+       'ais4. 'ais4. 
+       % 13:4*83/3840
+       'a4. 'a4. 
+       % 14:4*53/1920
+       'gis4. 'gis4. 
+       % 15:4*1/40
+       'g4. 'g4. 
+       % 16:4*91/3840
+       'f4. 'f4. 
+       % 17:4*23/960
+       'f4. 'f4. 
+       % 18:4*113/3840
+       'd4. 'd4. 
+       % 19:4*91/3840
+       'e4. 'e4. 
+       % 20:4*33/1280
+       'g4. < { 'c2 } > < { 'g4. } > ''f2 
+       % 21:4*11/384
+       < { 'f4. } > ''f2 < { 'f4. } > ''fis2 
+       % 22:4*7/3840
+       < { ''fis2 } { 'c2 } > < { 'c4. } > ''gis2 
+       % 23:4*39/1280
+       < { ''gis2 } { 'f4. } > < { 'f4. } > ''g2 
+       % 24:4*59/1920
+       < { ''g2 } { 'f4. } > < { 'f4. } > ''g2 
+       % 25:4*17/3840
+       < { ''g2 } { 'e2 } > < { ''g2 } { 'e4. } > 
+       % 26:4*19/640
+       < { ''g2 } { 'd4. } > < { ''g2 } { 'd2 } > 
+       % 27:4*1/1280
+       < { 'd4. } > ''g2 < { ''g2 } { 'd4. } > 
+       % 28:4*101/3840
+       < { 'dis4. } > ''g2 < { 'dis4. } > ''g2 
+       % 29:4*17/640
+       < { 'e4. } > ''g2 < { 'e4. } > ''g2 
+       % 30:4*3/128
+       < { 'd4. } > ''g2 < { 'd4. } > ''g2 
+       % 31:4*101/3840
+       < { 'd4. } > ''g2 < { 'd4. } > ''c2 
+       % 32:4*47/1920
+       < { 'c4. } > ''c2 < { 'c4. } > ''c1 < { 'c1 } > 
+       % 33:4*113/480
+       < { ''c1 } { ''b1 } > < > 
+       % 34:4*113/480
+       |
+       % 35
+       < { ''c1 } { 'c1 } > 
+} % track2
 
-score {
-       \staff { \melodic \music { track0 } }
-       \staff { \melodic \music { track1 } }
-       \staff { \melodic \music { track2 } }
-
-       \co\mmands {
-               \meter { 4*4 } 
-       }
-       \midi {
+\score{
+       \staff{ track0 }
+       \staff{ track1 }
+       \staff{ track2 }
+       
+       \paper{
+               \unitspace 20\mm
+       }\midi{
                \tempo 4:60 
        }
 }
index a3f64906ae680636535f73b5e6a874d49670aa3a..d61b04f883d7515e292b28490dee9345b750d737 100644 (file)
@@ -4,9 +4,7 @@
 % add any impressive examples here, please
 
 ritme = \staff {
-       \melodic
-
-       \music { 
+       \rhythmic{ 
        \partial {1*8}  % doesnt' have to be here. 
                \meter{ 4/4}
        c8                                      |
@@ -39,26 +37,24 @@ ritme = \staff {
 
        
 }
-another = \staff {
-       \melodic
-       \music { \meter{ 4/4} 
+another = \staff{
+       \melodic{ \meter{ 4/4} 
                c1 c1 c1 c4 c4 c4 c4  \meter{ 4/4} c1 c1 c1
         }
 }
 
-yanother = \staff {
-       \melodic
-       \music { \meter{ 4/4} 
+yanother = \staff{
+       \melodic{ \meter{ 4/4} 
                c1 c1 c1 c4 c4 c4 c4  c1 c1 c1
         }
 }
 
-\score {
-       \staff{ritme}
-       \staff { another }
-       \staff { yanother }
+\score{
+       ritme
+       another
+       yanother
        
-       \paper {
+       \paper{
                \unitspace 2\cm
                \geometric 1.3
        }
index d31118d0bd880b605454c6e234a76eadeeb65b64..0c210cbf778bd8701ad6bc4656a71d46d98e6d5a 100644 (file)
@@ -1,9 +1,8 @@
 
-blah =
-\staff {\melodic\music{    \meter {6/8}
+blah = \staff{\melodic{    \meter {6/8}
                 \skip {36*8}
                \meter {4/4}}
-       \music{         
+       \melodic{       
 \duration { 8 }
                        \octave{ }
                         |[ a a a a a a a a a ]6/9 
@@ -45,11 +44,9 @@ c1
        }
 }
 
-\score {
-       \staff {
+\score{
        blah
-       }
-       \paper {
+       \paper{
                \symboltables {table_sixteen}
                \unitspace 1.5 \cm
                \geometric 1.4
index f53ff15fefad485614fcb358e92bed27de8a7e1d..85c6a8e1e1df341b09fa54d37322ac5a62177471 100644 (file)
 % (there is an accompanying LaTeX file, scsii-menuetto.tex)
 %
 
+%% Stuff from MPP version
 % \lefttitle{Menuetto}
 % \tempo{Moderato}
 % \metron{4=120}
 %
-% \meter{3/4}
 % \key\F               % \key is F ( f-major )
-% \clef\alto           % use alto \clef
-% \duration8           % default \duration is eight' note
 %
-% \verb{\no\barnumbers}        % issue MusiXTeX \co\mmand
-% \barnumbering0
 % \slope{30}           % Fool MusiXTeX into 30 / 10 steeper beam
 % \stemlength3         % shorter \stemlength
 %              % because piece is set very tightly
-%%1            % double co\mments are included in .tex file
-ii_menuetto = \music {
-       \clef"alto"\meter{3/4}
+
+ii_menuetto = \melodic{
+       \clef"alto"
+       \meter{3/4}
        \key {bes}
-       \octave{1}
+       \octave{c}
+
        \duration{8}
        < a2 f2 d2 df > bes4-.  |
 %%2
@@ -95,17 +93,15 @@ ii_menuetto = \music {
        
 }
 
-\score {
-       \staff { 
-               \melodic \music { $ii_menuetto }
-       }
-       \paper {
+\score{
+       \staff{ $ii_menuetto }
+       \paper{
                \width 195\mm
                \unitspace 9\mm  % to get lily to use only three lines
                \geometric 1.4
                \output "scsii-menuetto.out"
        }
-       \midi 
+       \midi{ 
                \tempo 4:120
                \output "scsii-menuetto.midi"
        }
index 0fae878df93f9a15acdfc9b7f046bca782fe364d..bd98824b164f6faa8dd90c8a4ea85981b1cb1fdb 100644 (file)
 % (except for grace notes) are printed
 %
 %%1
-melodie = \music {  \clef\violin\octave{1}
-       \key{bes}
-       \meter{3/4}\duration{ 8 }
+melodie = \melodic{  
+       \meter{ 3/4 }
+       \clef\violin
+       \key{ bes }
+       \octave{ c }
+       \duration{ 8 }
        r pp < [ d 'a-| > f-| < d 'a-| > f-| < d 'a-| ] > |
 %%2
        r < [ d 'bes-| > f-| < d 'bes-| > f-| < d 'bes-| ] > |
@@ -161,11 +164,13 @@ melodie = \music {  \clef\violin\octave{1}
 %%58
        < a2.^\fermata fis2. > |
 %#%\tighten
- }
+}
 
-begeleiding = \music 
-       \key{bes}\meter{3/4}
+begeleiding = \melodic
+       \meter{3/4}
        \clef\bass
+       \key{bes}
+       \octave{ c }
        \duration{2}
        'd r4 |
 %%2
@@ -310,8 +315,8 @@ begeleiding = \music {
  }
 
 
-tekstI = \lyric{
-       \meter{3/4}
+tekstI = \lyric{
+       \meter{ 3/4 }
        \duration{4}
        _ _ _
        _ _ _
@@ -377,7 +382,7 @@ tekstI = \lyrics {
        
 }
 
-tekstII= \lyrics {
+tekstII = \lyric{
         \meter{3/4}
        \duration{4}
        _ _ _
@@ -441,24 +446,12 @@ tekstII= \lyrics {
        
 }
 
-\score {
-       \staff { 
-               lyric 
-       \music { tekstI }
-       \music { tekstII }
-       }
-% Setting up music ...lilypond: ../flower/include/cursor.inl:98: class Cursor<void *> Cursor<void *>::operator ++(int): Assertion 'pointer_' failed.
-%IOT trap/Abort
-% als geen music in staff
-       \staff { 
-               \melodic 
-               \music { melodie }
-       }
-       \staff { 
-               \melodic 
-               \music { begeleiding }
-       }
-       \paper {
+\score{
+       \staff{ lyric % this sux el grandioso. What about \lyricstaff, \melodicstaff etc. 
+               tekstI tekstII }
+       \staff{ melodie }
+       \staff{ begeleiding }
+       \paper{
                \width 195\mm
 
                % on two pages...
@@ -466,7 +459,7 @@ tekstII= \lyrics {
                \geometric 1.2
                \output "standchen.out"
        }
-       \midi {
+       \midi{
                \tempo 4:54
        }
 }
index 6a2bf0dd9d4337adeda4c81ea06f8974d40c7a7b..8bcad352ec99e4cd9cee5563e55c2de1fe2ea84b 100644 (file)
@@ -4,7 +4,7 @@
 % 
 % Copyright: none
 
-melodie = \music {
+melody = \melodic{
        \clef\violin
        c4 c | g g | a a | g g |
        f f | e e | d d8.( e16 | )c2 | % :|
@@ -15,12 +15,11 @@ melodie = \music {
        c c | g g | a a | g g |
        f f | e e | d d8.( e16 | )c2 % :|
        \bar ":|"
-       
 }
 
-begeleiding = \music {
+accompany = \melodic{
        \clef \bass
-       \octave{-1}
+       \octave{'c}
        c c' | e' c' | f' c' | e' c' | 
        d' b | c' a | f g | c2 | 
 
@@ -30,14 +29,15 @@ begeleiding = \music {
        c c' | e' c' | f' c' | e' c' | 
        d' b | c' a | f g | c2 
        \bar ":|"
-       
 }
-globalmusic=\music{
+
+global = \melodic{
                \meter {2 / 4}
                \skip {24*2}
 %              \bar "||"
        }
-tekst = \lyrics { 
+
+tekst = \lyric{ 
        Al- tijd is Kort- jak- je ziek,2
        midden in_de week maar s'_zon- dags niet.2
        s'_Zon- dags gaat ze naar de kerk,2
@@ -46,7 +46,7 @@ tekst = \lyrics {
        midden in_de week maar s'_zon- dags niet.2
 }
 
-hegedraagjetekst = \lyric
+hegedraagjetekst = \lyric{ 
        Al- tijd zuigt Bill Gates mijn piek,2
        "\TeX" is slecht- ser dan mu- ziek.2
        s'_Zon- dags gaat het door een raam,2
@@ -55,7 +55,7 @@ hegedraagjetekst = \lyrics {
        "\TeX" is slecht- ser dan mu- ziek.2
 }
 
-texte = \lyric
+texte = \lyric{ 
         
        \textstyle "italic" 
        Ah! vous dir- ai_- je ma man2
@@ -67,7 +67,7 @@ texte = \lyrics {
        
 }
 
-textI = \lyrics {
+texti = \lyric{
        
        \textstyle "roman"
        Twin- kle, twin- kle, lit- tle star,2
@@ -78,7 +78,7 @@ textI = \lyrics {
        How I won- der what you are!2
 }
 
-textII = \lyrics {
+textii = \lyric{
        \textstyle "roman"
        When the bla- zing sun is gone,2
        When he no- thing shines up- on,2
@@ -89,7 +89,7 @@ textII = \lyrics {
        
 }
 
-textIII = \lyrics{
+textiii = \lyric{
        
        \textstyle "roman"
        Then the tra- veler in the dark2
@@ -101,59 +101,16 @@ textIII = \lyrics{
        
 }
 
-mstaf = \staff {
-       \melodic
-       \music { melodie }
-       \music { globalmusic }
-}
-
-bassstaf = \staff {
-       \melodic        
-       \music { begeleiding }
-       \music { globalmusic }
-}
-
-
-dutchstaf = \staff {
-       lyric 
-       \music { tekst }
-       \music {hegedraagjetekst}
-       \music { globalmusic }
-}
-
-frenchstaf = \staff {
-       lyric 
-       \music { texte }
-       \music { globalmusic }
-}
-
-englishstaf = \staff {
-       lyric 
-       \music { textI }
-       \music { textII }
-       \music { textIII }
-       \music { globalmusic }
-}
-
-tstaf = \staff { 
-       lyric 
-       \music { tekst }
-       \music { texte }
-       \music { globalmusic }
-}
-
-
-\score {
-       \staff { mstaf }
-       \staff { dutchstaf }
-       \staff { frenchstaf }
-       \staff { englishstaf }
-       \staff { bassstaf }
-       \paper {
+\score{
+       \staff{ global melody }
+       \staff{ global tekst hegedraagjetekst }
+       \staff{ global texte }
+       \staff{ global texti textii textiii }
+       \staff{ accompany }
+       \paper{
                \unitspace 2.5\cm
        }
-       
-       \midi { 
+       \midi{ 
                \tempo 4:120 
        }
 }
index 9e3389a370ea302da1d3d1c1114f27a376fd532e..24888841b7aa1fee953428850e825518dc789337 100644 (file)
@@ -4,15 +4,17 @@
 %
 %      Public Domain -- typed by by HWN
 %
-global=\music{\meter {4/4}
-               \grouping {2*2}
-               \key {bes es as}
+ global = \melodic{
+       \meter{ 4/4 }
+       \grouping{ 2*2 }
+       \key{ bes es as }
+  }
+  
+ dux = \melodic{ 
+       \clef\violin
+       \octave{ c }
+       \duration{ \last }
 
-}
-
-dux = \music { 
-       \clef \violin\octave{1}
-       \duration { \last }
        \stem{-1}
         r8-"dux"       
        [c'16 b] [c'8 g] [as c'16 b] [c'8 d'] |
@@ -25,8 +27,9 @@ dux = \music {
        r8 [as g f] [g f16 es] [f8 d] | 
 }
 
-comes = \music { 
-       \octave {2}\stem{1}
+comes = \melodic{ 
+       \octave{ c' }
+       \stem{1}
        r1 |
        r1 |
        r8-"comes" [g16 fis] [g8 c] [es g16 f] [g8 a]|
@@ -38,9 +41,9 @@ comes = \music {
        
 }
 
-bassdux = \music 
+bassdux = \melodic
        \clef \bass
-       \octave {1}
+       \octave{ c }
        r1 |
        r |
        r |
@@ -51,23 +54,14 @@ bassdux = \music {
        [G c16 B] [c8 d] [F16 G] As4 [G16 F] | 
 }
 
-trebstaf = \staff { \melodic
-               % every "\music {} " in a \staff has its own "\voicegroup"
-               \music { dux }
-               \music { comes }
-       \music{global}  
-       }
+% every "melody" declared in a staff has its own "voicegroup"
+trebstaf = \staff{ global dux comes }  
 
-basstaf = \staff { \melodic
-       \music { bassdux }
-       \music{global}  
-}
-\score {
-       \staff { trebstaf }
-       \staff { basstaf }
-       
-       \paper {}
-       \midi {
+\score{
+       trebstaf
+       \staff{ bassdux global }
+       \paper{}
+       \midi{
                \tempo 4:90
        }
 }
index bb4d4fe400dbfa37c0349c7793075bd5268c7716..80141d17d5598a18ab9a4e39092580debfc03b36 100644 (file)
@@ -10,7 +10,8 @@
 #include "debug.hh"
 
 // statics Duration_convert
-bool Duration_convert::be_blonde_b_s = false;
+bool const Duration_convert::midi_as_plet_b_s = true;
+bool Duration_convert::no_quantify_b_s = false;
 bool Duration_convert::no_double_dots_b_s = false;
 bool Duration_convert::no_triplets_b_s = false;
 int Duration_convert::no_smaller_than_i_s = 0;
@@ -80,9 +81,36 @@ Duration_convert::i2_mom( int time_i, int division_1_i )
 }
 #endif
 
-#if 0
 Duration
 Duration_convert::mom2_dur( Moment mom )
+{
+       /* this is cute, 
+          but filling an array using Duration_iterator
+          might speed things up, a little
+          */
+       Duration_iterator iter_dur;
+       assert( iter_dur );
+       while ( iter_dur ) {
+               Duration dur = iter_dur++;
+               if ( mom == dur2_mom( dur ) )
+                       return dur;
+       }
+       if ( midi_as_plet_b_s ) {
+               Moment mom_4 = mom / Moment( 4 );
+               long num = mom_4.numerator().as_long();
+               long den = mom_4.denominator().as_long();
+               Duration dur( 4, 0 );
+               dur.set_plet( num, den );
+               return dur;
+       }
+       assert( 0 );
+       // no can do
+       Duration dur( 0 );
+       return dur;
+}
+
+Duration
+Duration_convert::mom2standardised_dur( Moment mom )
 {
        /* this is cute, 
           but filling an array using Duration_iterator
@@ -91,28 +119,20 @@ Duration_convert::mom2_dur( Moment mom )
        Duration_iterator iter_dur;
        assert( iter_dur );
        while ( iter_dur ) {
-               Duration lower_dur = iter_dur++;
-               Duration upper_dur( 0 );
-               if ( iter_dur )
-                       upper_dur = iter_dur();
-               Moment lower_mom = dur2_mom( lower_dur );
-               Moment upper_mom = dur2_mom( upper_dur );
-               if ( mom == lower_mom )
+               Duration lower_dur = iter_dur++;
+               Duration upper_dur( 0 );
+               if ( iter_dur )
+                       upper_dur = iter_dur();
+               Moment lower_mom = dur2_mom( lower_dur );
+               Moment upper_mom = dur2_mom( upper_dur );
+               if ( mom < lower_mom )
                        return lower_dur;
-               if ( mom == upper_mom ) // don-t miss last (sic)
-                       return upper_dur;
-               if ( ( mom >= lower_mom ) && ( mom <= upper_mom ) ) {
-                       warning( String( "duration not exact: " ) + String( (Real)mom ) , 0 );
-                       if ( abs( mom - lower_mom ) < abs( mom - upper_mom ) )
-                               return lower_dur;
-                       else
-                               return upper_dur;
-               }
-               lower_dur = upper_dur;
+               if ( mom == lower_mom )
+                       return lower_dur;
        }
-       return Duration( 0 );
+       return iter_dur();
 }
-#endif
+
 
 Moment
 Duration_convert::plet_factor_mom( Duration dur )
@@ -133,6 +153,7 @@ Duration_convert::ticks2_dur( int ticks_i )
           but filling an array using Duration_iterator
           might speed things up, a little
           */
+       // should use mom2_dur
        Moment mom( ticks_i, Duration::division_1_i_s );
        Duration_iterator iter_dur;
        assert( iter_dur );
@@ -141,6 +162,11 @@ Duration_convert::ticks2_dur( int ticks_i )
                if ( mom == dur2_mom( dur ) )
                        return dur;
        }
+       if ( midi_as_plet_b_s ) {
+               Duration dur( 4, 0 );
+               dur.set_plet( ticks_i, Duration::division_1_i_s / 4 ); 
+               return dur;
+       }
        Duration dur( 0 );
        dur.set_ticks( ticks_i );
        return dur;
@@ -153,6 +179,7 @@ Duration_convert::ticks2standardised_dur( int ticks_i )
           but filling an array using Duration_iterator
           might speed things up, a little
           */
+       // should use mom2standardised_dur
        Moment mom( ticks_i, Duration::division_1_i_s );
        Duration_iterator iter_dur;
        assert( iter_dur );
@@ -187,7 +214,7 @@ Duration_iterator::Duration_iterator()
        cursor_dur_.type_i_ = 128;
        if ( Duration_convert::no_smaller_than_i_s )
                cursor_dur_.type_i_ = Duration_convert::no_smaller_than_i_s;
-       cursor_dur_.set_plet( 0,1 ); // ugh?
+//     cursor_dur_.set_plet( 1, 1 );
 }
 
 Duration 
@@ -240,13 +267,13 @@ Duration_iterator::forward_dur()
                assert( !cursor_dur_.plet_b() );
                cursor_dur_.dots_i_ = 0;
                cursor_dur_.type_i_ /= 4;
-               cursor_dur_.set_plet( 2, 3  );
+               cursor_dur_.set_plet( 2, 3 );
        }
        else if ( cursor_dur_.plet_b() 
                && ( cursor_dur_.plet_.iso_i_ == 2 )
                && ( cursor_dur_.plet_.type_i_ == 3 ) ) {
                assert( !cursor_dur_.dots_i_ );
-               cursor_dur_.set_plet( 0,1 );
+               cursor_dur_.set_plet( 1, 1 );
                cursor_dur_.type_i_ *= 2;
                cursor_dur_.dots_i_ = 1;
        }
index e341d75831895155db2a1b09f1bb49b0ebe73278..48e07059a13e61452038db89683b3c862736d2e0 100644 (file)
@@ -29,6 +29,13 @@ Duration::Duration( int type_i, int dots_i = 0)
        dots_i_ = dots_i;
        ticks_i_ = 0;
 }
+
+Moment
+Duration::length() const
+{
+    return Duration_convert::dur2_mom(*this);
+}
+
 void
 Duration::set_plet(int i, int t)
 {
@@ -36,11 +43,6 @@ Duration::set_plet(int i, int t)
     plet_.type_i_ = t;
 }
 
-Moment
-Duration::length() const
-{
-    return Duration_convert::dur2_mom(*this);
-}
 void
 Duration::set_ticks( int ticks_i )
 {
@@ -48,34 +50,40 @@ Duration::set_ticks( int ticks_i )
        assert( !dots_i_ );
        ticks_i_ = ticks_i;
 }
+
 String
 Duration::str()const
 {
     return Duration_convert::dur2_str(*this);
 }
+
+Plet::Plet()
+{
+    type_i_ = 1;
+    iso_i_ = 1;
+}
+
 Plet::Plet( int iso_i, int type_i )
 {
        iso_i_ = iso_i;
        type_i_ = type_i;
 }
+
 Moment
 Plet::mom()const
 {
     return  Moment( iso_i_, type_i_ );
 }
 
-Plet::Plet()
+bool
+Duration::plet_b()
 {
-    type_i_ = 1;
-    iso_i_ = 1;
+    return !plet_.unit_b();
 }
+
 bool
 Plet::unit_b()const
 {
     return type_i_ == 1 && iso_i_ == 1;
 }
-bool
-Duration::plet_b()
-{
-    return !plet_.unit_b();
-}
+
index 9c8b53d709d818c9b498f67e6349ead8b66d9c1d..ef80462f787add5a8af77fc1a96d32b389be3bb7 100644 (file)
@@ -29,7 +29,8 @@ struct Duration_convert {
        
     /* Urgh. statics.
      */
-    static bool be_blonde_b_s; // cute, but not informative. everythiing is blonde, right? HW
+    static bool const midi_as_plet_b_s = true;
+    static bool no_quantify_b_s;
     static bool no_double_dots_b_s;
     static bool no_triplets_b_s;
     static int no_smaller_than_i_s;
@@ -55,6 +56,12 @@ struct Duration_convert {
 //     /// Return Moment (fraction of whole) representation, best guess.
 //     static Duration mom2_dur( Moment mom );
 
+    /// Return duration from Moment (fraction of whole) representation.
+    static Duration mom2_dur( Moment mom );
+
+    /// Return standardised duration, best guess if not exact.
+    static Duration mom2standardised_dur( Moment mom );
+  
     /// Return plet factor (not a Moment: should use Rational?).
     static Moment plet_factor_mom( Duration dur );
 
index c74b79390bea349843bc063cfd81e3cd44a2d377..5cb028566e039ed4a6e1957a1a5e6fce2ef6f3b8 100644 (file)
@@ -1,8 +1,7 @@
 MAJOR_VERSION = 0
 MINOR_VERSION = 0
-PATCH_LEVEL = 44
+PATCH_LEVEL = 45
 # use to send patches, always empty for released version:
 # include separator: ".postfix", "-pl" makes rpm barf
 
 MY_PATCH_LEVEL =
-#
index c28443df62571a5884d0aaf2a0e53b8d51fc5b25..93334497cf6c1a23b3ad1028b9e275e65dd5c508 100644 (file)
@@ -23,9 +23,11 @@ Bar_register::try_request(Request*r_l)
     Command_req* c_l = r_l->command();
     if (!c_l|| !c_l->bar()) 
        return false;
-
-    assert(!bar_req_l_);
-    bar_req_l_ = c_l->bar();
+    Bar_req  * b= c_l->bar();
+    if (bar_req_l_ && bar_req_l_->compare(*b))
+       return false;
+    
+    bar_req_l_ = b;
 
     return true;
 }
@@ -44,6 +46,8 @@ Bar_register::process_requests()
     }
 }
 
+
+
 void
 Bar_register::split_bar(Bar *& pre, Bar * no, Bar * &post)
 {
@@ -77,3 +81,7 @@ Bar_register::post_move_processing()
     bar_req_l_ = 0;
     bar_p_ =0;
 }
+
+IMPLEMENT_STATIC_NAME(Bar_register);
+
+
index 8b831d206abb23b98558f03060a860e95fa06c29..f0afa9b402307142c43d8e9ff417908a8885f0cc 100644 (file)
@@ -12,6 +12,8 @@ Bar::Bar( String t)
     type = t;
 }
 
+IMPLEMENT_STATIC_NAME(Bar);
+
 void
 Bar::do_print()const
 {
index 9a07bcc6142979e35ba484c9cb0b3fa63e5ee86d..c4d62b54d2faf83dbefb8e4b27bc5ec2ba8ce884 100644 (file)
@@ -281,6 +281,8 @@ Beam::brew_molecule_p() const return out;
     out->translate(Offset(x0 - left->hpos,0));
 }
 
+IMPLEMENT_STATIC_NAME(Beam);
+
 void
 Beam::do_print()const
 {
index 72328b0954e9617b8280bb59899011ede0aed5b1..a95c54d454f1206995d619d9868ee2f373d42af3 100644 (file)
@@ -52,3 +52,4 @@ Clef_item::brew_molecule_p()const
     return output;
 }
 
+IMPLEMENT_STATIC_NAME(Clef_item);
index 2492703cdf9ae90b5576f5f4bbe714f913cdea05..403dabb25047ac4674029d9e45fd4a777fffa277 100644 (file)
@@ -105,3 +105,4 @@ Clef_register::post_move_processing()
        set_type("violin");
     }
 }
+IMPLEMENT_STATIC_NAME(Clef_register);
index 92e7097c4351d2433a3f9526496751a8ef9d20d1..7d95dd980dbb3fd5b2d759462ee6f9fbe6d0d13b 100644 (file)
@@ -11,6 +11,8 @@
 #include "musical-request.hh"
 
 
+IMPLEMENT_STATIC_NAME(Cadenza_req);
+
 void
 Cadenza_req::do_print()const
 {
@@ -30,6 +32,8 @@ Bar_req::compare(Bar_req const &c1)const
     return type_str_ == c1.type_str_;
 }
 
+IMPLEMENT_STATIC_NAME(Bar_req);
+
 void
 Bar_req::do_print() const
 {
@@ -46,28 +50,25 @@ Partial_measure_req::Partial_measure_req(Moment m)
     duration_ =m;
 }
 /* *************** */
-Meter_change_req::Meter_change_req()
-{
-    beats_i_ = 0;
-    one_beat_i_ =0;
-}
-void
-Meter_change_req::set(int b,int o)
-{
-    beats_i_=b;
-    one_beat_i_=o;
-}
+
+IMPLEMENT_STATIC_NAME(Timing_req);
 
 void
 Timing_req::do_print()const{}
 
+IMPLEMENT_STATIC_NAME(Command_req);
+
 void
 Command_req::do_print()const{}
 /* *************** */
+IMPLEMENT_STATIC_NAME(Barcheck_req);
+
 void
 Barcheck_req::do_print() const{}
 
 /* *************** */
+IMPLEMENT_STATIC_NAME(Clef_change_req);
+
 void
 Clef_change_req::do_print() const
 {
@@ -79,6 +80,8 @@ Clef_change_req::Clef_change_req(String s)
     clef_str_ = s;
 }
 /* *************** */
+IMPLEMENT_STATIC_NAME(Group_feature_req);
+
 void
 Group_feature_req::do_print() const
 {
@@ -90,32 +93,61 @@ Group_feature_req::Group_feature_req()
     stemdir_i_ = 0;
 }
 
+IMPLEMENT_STATIC_NAME(Group_change_req);
+
 void
 Group_change_req::do_print()const
 {
     mtor << "id : " << newgroup_str_;
 }
 /* *************** */
+IMPLEMENT_STATIC_NAME(Terminate_voice_req);
+
 void
 Terminate_voice_req::do_print()const
 {
 }
 
 /* *************** */
+IMPLEMENT_STATIC_NAME(Partial_measure_req);
+
 void
 Partial_measure_req::do_print() const
 {
     mtor << duration_;
 }
 
+IMPLEMENT_STATIC_NAME(Meter_change_req);
+
 void
 Meter_change_req::do_print() const
 {
-    mtor << beats_i_ << "*" << one_beat_i_;
+    mtor << beats_i_ << "/" << one_beat_i_;
+}
+
+int
+Meter_change_req::compare(Meter_change_req const &m)
+{
+    return m.beats_i_ == beats_i_ && one_beat_i_ == m.one_beat_i_;
+}
+
+Meter_change_req::Meter_change_req()
+{
+    beats_i_ = 0;
+    one_beat_i_ =0;
+}
+
+void
+Meter_change_req::set(int b,int o)
+{
+    beats_i_=b;
+    one_beat_i_=o;
 }
 
 /* *************** */
 
+IMPLEMENT_STATIC_NAME(Measure_grouping_req);
+
 void
 Measure_grouping_req::do_print() const
 {
@@ -134,6 +166,8 @@ Key_change_req::transpose(Melodic_req const & d)const
     }
 }
 
+IMPLEMENT_STATIC_NAME(Key_change_req);
+
 void
 Key_change_req::do_print() const
 {
@@ -144,16 +178,51 @@ Key_change_req::do_print() const
 
 Key_change_req::Key_change_req()
 {
+       minor_b_ = false;
 }
+
 Key_change_req::Key_change_req(Key_change_req const&c)
 {
-    for (int i=0; i < c.melodic_p_arr_.size(); i++) {
-       melodic_p_arr_.push( c.melodic_p_arr_[i]->clone()->melodic() );
-    }
+       for (int i=0; i < c.melodic_p_arr_.size(); i++) 
+               melodic_p_arr_.push( c.melodic_p_arr_[i]->clone()->melodic() );
+       minor_b_ = c.minor_b_;
 }
 
 Key_change_req::~Key_change_req()
 {
-    for (int i=0; i < melodic_p_arr_.size(); i++)
-       delete melodic_p_arr_[i];
+       for (int i=0; i < melodic_p_arr_.size(); i++)
+               delete melodic_p_arr_[i];
+}
+
+int
+Key_change_req::flats_i()
+{
+       int flats_i = 0;
+       for ( int i = 0; i < melodic_p_arr_.size(); i++ ) {
+               Melodic_req* mel_l = melodic_p_arr_[i]->melodic();
+               assert( mel_l );
+               if ( mel_l->accidental_i_ < 0 )
+                       flats_i++;
+       }
+       return flats_i;
+}
+
+int
+Key_change_req::minor_b()
+{
+       return minor_b_;        
 }
+
+int
+Key_change_req::sharps_i()
+{
+       int sharps_i = 0;
+       for ( int i = 0; i < melodic_p_arr_.size(); i++ ) {
+               Melodic_req* mel_l = melodic_p_arr_[i]->melodic();
+               assert( mel_l );
+               if ( mel_l->accidental_i_ > 0 )
+                       sharps_i++;
+       }
+       return sharps_i;
+}
+
index 9b2a1696312401366ab082fa2386c943dbec85c1..29aa3ab84176b1e0f2105a157b47f627ec8bfb96 100644 (file)
@@ -34,3 +34,5 @@ Crescendo::brew_molecule_p() const return m_p ;
     int pos = (dir_i_ >0) ? staff_size_i_ + 4 : - 4 ;
     m_p->translate(Offset(0,pos * paper()->internote()));
 }
+
+IMPLEMENT_STATIC_NAME(Crescendo);
index 0ea23ac689c86f908dd625caa0d712cf1d6ebeef..5f137035fa20907cea8ac36566006157cfaf7b36 100644 (file)
@@ -77,3 +77,5 @@ Dynamic_register::set_feature(Features i)
 {
     dir_i_ = i.direction_i_;
 }
+
+IMPLEMENT_STATIC_NAME(Dynamic_register);
index 93ea9b2d08e5ca8c1bc9492d500b773d08a1070c..61232d25b8ca9779ee3cee9037722a7de259040c 100644 (file)
@@ -73,3 +73,5 @@ Notehead_register::post_move_processing()
 {
     note_req_l_ = 0;
 }
+
+IMPLEMENT_STATIC_NAME(Notehead_register);
index 643959d620b17bb69cfc7747b0b32532480bcff4..14ebf4c927435096e0e5265a51b1070ff0d6d48c 100644 (file)
 #ifndef CLASS_NAME_HH
 #define CLASS_NAME_HH
 
-/// a macro to declare the classes name as a static and virtual function.
+/** a macro to declare the classes name as a static and virtual function.
+  The static_name() can *not* be inlined (this might have the effect that 
+  s->name() != S::static_name(). Overlapping strings need not be merged in C++
+ */
 #define NAME_MEMBERS(c)        \
-static char const *static_name(){ return #c; }\
+static char const *static_name();\
 virtual char const *name() const{ return c::static_name(); } \
 int a_stupid_nonexistent_function_to_allow_the_semicolon_come_out()
+
+#define IMPLEMENT_STATIC_NAME(c)\
+    char const *c::static_name() { return #c; } 
     
 #endif // CLASS-NAME_HH
index f32dbea2fdb35f1146f191c2cffa666cd0e40d91..488728d2d9143f3df50045a7126dfdffed267086 100644 (file)
@@ -49,6 +49,7 @@ struct Partial_measure_req : Timing_req {
 struct Meter_change_req : Timing_req {
     int beats_i_, one_beat_i_;
 
+    int compare(Meter_change_req const&);
     Meter_change_req();
     void set(int,int);
     REQUESTMETHODS(Meter_change_req, meterchange);
@@ -99,13 +100,29 @@ struct Group_feature_req : Command_req {
 };
 
 
+/**
+    Handle key changes.
+    Routines for sharps and flats are separated, 
+    so that caller may identify non-conventional keys.
+*/
 struct Key_change_req : Command_req {
     Array<Melodic_req*> melodic_p_arr_;
-    virtual void transpose(Melodic_req const &)const;
+    bool minor_b_;
+  
     Key_change_req();
     Key_change_req(Key_change_req const&);
     ~Key_change_req();
     REQUESTMETHODS(Key_change_req, keychange);
+
+    /// return number of flats in key
+    int flats_i();
+
+    /// return number of sharps in key
+    int sharps_i();
+
+    void transpose(Melodic_req const & d) const;
+    /// is minor key?
+    int minor_b();
 };
 
 struct Clef_change_req : Command_req {
index 36ca215f67521d1852e0a45d66b69f9a3a96c679..49e41d572956a50575e22a9a8252fc12920b5f47 100644 (file)
@@ -35,7 +35,7 @@ struct Input_music {
     virtual ~Input_music(){}
     virtual void print() const =0;
     virtual void set_default_group(String)=0;
-    virtual bool find_plet_start_bo(char c, Moment& moment_r) = 0;
+    virtual bool find_plet_start_b(char c, Moment& moment_r) = 0;
     virtual void set_plet_backwards(Moment& now_moment_r, Moment until_moment, int num_i, int den_i) = 0;
     virtual void transpose(Melodic_req const&) const =0;
     
@@ -58,7 +58,7 @@ struct Simple_music : Input_music {
     virtual Voice_list convert()const;
     virtual void translate_time(Moment dt);
     virtual void print() const;
-    virtual bool find_plet_start_bo(char c, Moment& moment_r);
+    virtual bool find_plet_start_b(char c, Moment& moment_r);
     virtual void set_plet_backwards(Moment& now_moment_r, Moment until_moment, int num_i, int den_i);
     virtual Input_music *clone() const {
        return new Simple_music(*this);
@@ -76,7 +76,7 @@ struct Complex_music : Input_music {
     Complex_music(Complex_music const &);
     virtual void print() const ;
     void concatenate(Complex_music*);
-    virtual bool find_plet_start_bo(char c, Moment& moment_r);
+    virtual bool find_plet_start_b(char c, Moment& moment_r);
     virtual void set_plet_backwards(Moment& now_moment_r, Moment until_moment, int num_i, int den_i);
 };
 
index 48d6c62a1958e7c01287d9ff25336e0bc02d2890..2a2dd92afc5d322a3ba9ac5b6327661f737d4e59 100644 (file)
     \end{itemize}
   */
 
-struct PCol { 
+class PCol { 
+public:
     PointerList<Item const *> its;
     PointerList<Spanner const *> stoppers, starters;
     
-
-
     /** prebreak is put before end of line.
     if broken here, then (*this) column is discarded, and prebreak
     is put at end of line, owned by Col
@@ -42,8 +41,10 @@ struct PCol {
     /// if lines are broken then this column is in #line#
     Line_of_score const *line_l_;
 
-    /// if lines are broken then this column x-coord #hpos#
-    Real hpos;
+    /** if lines are broken then this column x-coord #hpos# if not
+      known, then hpos == -1.(ugh?)  */
+
+    Real hpos;                 // should use ptr?
 
     PScore * pscore_l_;
 
@@ -68,13 +69,20 @@ struct PCol {
       signed compare on columns.
 
       @return < 0 if c1 < c2.
-    */static int compare(const PCol &c1, const PCol &c2);
-    
+    */
+    static int compare(const PCol &c1, const PCol &c2);
+    void set_rank(int);
 
     void OK() const;
     void set_breakable();
     void print()const;
 private:
+    
+    /**
+      The ranking: left is smaller than right 
+      -1 is uninitialised.
+     */
+    int rank_i_;
     PCol(PCol const&){}
 };
 
diff --git a/lily/include/register-group.hh b/lily/include/register-group.hh
new file mode 100644 (file)
index 0000000..278d150
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+  registergroup.hh -- declare 
+
+  source file of the LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef REGISTERGROUP_HH
+#define REGISTERGROUP_HH
+
+
+#include "plist.hh"
+#include "staff-elem-info.hh"
+#include "register.hh"
+
+/**
+  Group a number of registers. Usually delegates everything to its contents.
+  Postfix: group
+  */
+class Register_group_register : public Request_register {
+protected:
+    IPointerList<Request_register*> reg_list_;
+    virtual void do_print()const;
+public:
+
+    /**
+      Junk #reg_l#.
+
+      Pre:
+        #reg_l# is in #reg_list_#
+     */
+    virtual void terminate_register(Request_register * reg_l);
+    
+   NAME_MEMBERS(Register_group_register);
+    
+    /**
+      Remove #reg_l# from the list, and return it.
+     */
+    Request_register * get_register_p(Request_register*reg_l);
+    virtual void set_feature(Features i);
+    virtual bool acceptable_request_b(Request*);
+    virtual void pre_move_processing();
+    virtual void post_move_processing();
+    virtual void acknowledge_element(Staff_elem_info info);
+    virtual bool try_request(Request*);
+    virtual void process_requests();
+    virtual ~Register_group_register();
+    virtual void add(Request_register* reg_p);
+    virtual bool contains_b(Request_register*);
+};
+
+#endif // REGISTERGROUP_HH
+
+
index da80db38fe4efc1a053dc0b864ba0e91a0688a3a..808b28d05c80a9396216b77cc2a1bf74b6dd838b 100644 (file)
@@ -90,6 +90,7 @@ protected:
       */
     virtual Staff_info get_staff_info();
     
+    
     virtual void do_print()const;  
 public:
     /** Every Request_register (except for the 'top' which is directly
diff --git a/lily/include/registergroup.hh b/lily/include/registergroup.hh
deleted file mode 100644 (file)
index 6d6e76a..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
-  registergroup.hh -- declare 
-
-  source file of the LilyPond music typesetter
-
-  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
-*/
-
-
-#ifndef REGISTERGROUP_HH
-#define REGISTERGROUP_HH
-
-
-#include "plist.hh"
-#include "staff-elem-info.hh"
-#include "register.hh"
-
-/**
-  Group a number of registers. Usually delegates everything to its contents.
-  Postfix: group
-  */
-class Register_group_register : public Request_register {
-protected:
-    IPointerList<Request_register*> reg_list_;
-    virtual void do_print()const;
-public:
-
-    /**
-      Junk #reg_l#.
-
-      Pre:
-        #reg_l# is in #reg_list_#
-     */
-    virtual void terminate_register(Request_register * reg_l);
-    
-    /**
-      Remove #reg_l# from the list, and return it.
-     */
-    Request_register * get_register_p(Request_register*reg_l);
-    virtual void set_feature(Features i);
-    virtual bool acceptable_request_b(Request*);
-    virtual void pre_move_processing();
-    virtual void post_move_processing();
-    virtual void acknowledge_element(Staff_elem_info info);
-    virtual bool try_request(Request*);
-    virtual void process_requests();
-    virtual ~Register_group_register();
-    virtual void add(Request_register* reg_p);
-    virtual bool contains_b(Request_register*);
-};
-
-#endif // REGISTERGROUP_HH
-
-
index 67ca259f545429bcfb35fea1fe7ec6f26cfd0520..90e5f518a342760aacc8080a6bb72810c7bd1ff6 100644 (file)
@@ -8,6 +8,8 @@
 #define REST_HH
 #include "item.hh"
 
+/** typeset a Rest. A "vanilla" item.
+ */
 struct Rest : Item {
 
     int dots;
index 293801a98e499420e0a3348bc6e046fa188159b4..cf86ad342a7a8ca4f28cf12398b98ccae8aa9dbf 100644 (file)
@@ -71,7 +71,7 @@ private:
     void paper();
 
     // utils:
-    PCursor<Score_column*> create_cols(Moment);
+    PCursor<Score_column*> create_cols(Moment, PCursor<Score_column*> &last);
 
     Score(Score const&){}
 
index 2dcbc845a94ebf1e5e254c704c6196e8ae306a74..2d58add6fb4de6f580eb66667c7e7ae479c85b42 100644 (file)
@@ -25,9 +25,12 @@ struct Staff_elem_info {
     Staff_elem_info();
 };
 
+/// struct to pass staff info along a Request_register hierarchy.
 struct Staff_info {
     int *c0_position_i_;
     Staff_walker *walk_l_;
+
+    /// when is now?
     Time_description const *time_C_;
     Rhythmic_grouping const *rhythmic_C_;
     bool break_allowed_b_;
index 0b606f1301a0a31c7d58294916f22068c793b979..aa72fb8122db55fd57cec9e8cffa004f7487fd36 100644 (file)
 /** one horizontal bit.  Voice_element is nothing but a container for
     *the requests, */
 struct Voice_element {
-    Moment duration;
+    /** the duration of the element.  This can be 0; The duration is
+      determined from rhythmical requests contained in this
+      Voice_element */
+    Moment duration_;
     char const* defined_ch_C_;
     Voice const *voice_l_;
     IPointerList<Request*> reqs;
@@ -28,7 +31,7 @@ struct Voice_element {
     Voice_element(Voice_element const & src );
 
     void add(Request*);
-    bool find_plet_start_bo(char c, Moment& moment_r);
+    bool find_plet_start_b(char c, Moment& moment_r);
     void print ()const;
     void set_default_group(String id);
     void set_plet_backwards(Moment& now_moment_r, Moment until_moment, int num_i, int den_i);
index 7c1b4ed78aa1499b2695d56591424ea0f576b96e..5f17d8fa8ba7464896aacfa835958800b1b80dd7 100644 (file)
 #ifndef VOICEGROUPREGS_HH
 #define VOICEGROUPREGS_HH
 
-#include "registergroup.hh"
+#include "register-group.hh"
 
 struct Voice_group_registers  : Register_group_register {
     String group_id_str_;
     Array<Voice_registers*> voice_regs_l_;
+    Moment termination_mom_;
     
     /* *************** */
     
@@ -22,6 +23,7 @@ struct Voice_group_registers  : Register_group_register {
     static bool static_acceptable_request_b(Request*);
     virtual void terminate_register(Request_register*);
     virtual void do_print() const;
+    virtual void post_move_processing();
     virtual void add(Request_register*);
     Voice_group_registers(String id);
     virtual bool try_request(Request*);
index 82070a704e352e2f7351930643752ef6ff43ddd5..70735ff10f27697b7fb87487c2030fd2f7f540f9 100644 (file)
 #ifndef VOICEREGS_HH
 #define VOICEREGS_HH
 
-#include "registergroup.hh"
+#include "register-group.hh"
 
 class Voice_registers : public Register_group_register {
 
-
 public:
     Voice *voice_l_;
     /* *************** */
index 4e7e615693e7ed4bf8ca9010b95c7b55883feed0..f5a950a2c9f024fb2127c0b105a7c953a9446613 100644 (file)
@@ -15,6 +15,9 @@
     */
 
 struct Voice {
+    /** the elements, earliest first.
+      Please use the member #add()# to add a new element
+      */
     IPointerList<Voice_element *> elts;
     Moment start;
 
@@ -26,7 +29,7 @@ struct Voice {
     Moment last() const;
     void transpose(Melodic_req const &)const;
     void add(Voice_element*);
-    bool find_plet_start_bo(char c, Moment& moment_r);
+    bool find_plet_start_b(char c, Moment& moment_r);
     void print() const;
     void set_default_group(String id);
     void set_plet_backwards(Moment& now_moment_r, Moment until_moment, int num_i, int den_i);
index 643ce57605430b60935559236e07ec52054b0361..daa4690932c437f3099df2bf2f823dc33777c589 100644 (file)
@@ -11,7 +11,7 @@
 #define WALKREGS_HH
 
 
-#include "registergroup.hh"
+#include "register-group.hh"
 
 /**
   Top level registers: the interface to Complex_walker.
index 26377e7f531893569fc44e704fcee20a5ea4e78c..e407c87dd567b4711a10c00e72977e6040b9eac5 100644 (file)
@@ -2,6 +2,7 @@
 #include "input-music.hh"
 #include "voice.hh"
 #include "musical-request.hh"
+#include "command-request.hh"
 #include "voice-element.hh"
 
 void
@@ -10,7 +11,7 @@ Input_music::check_plet(Voice_element* velt_l)
     for (iter_top(velt_l->reqs,i); i.ok(); i++)
        if ( i->plet() ) {
            Moment start_moment = 0;
-           if ( !find_plet_start_bo( i->plet()->type_c_, start_moment ) ) {
+           if ( !find_plet_start_b( i->plet()->type_c_, start_moment ) ) {
                error( "begin of plet not found", i->defined_ch_C_ );
                break;
            }
@@ -48,7 +49,15 @@ Voice_list
 Simple_music::convert()const
 {
     Voice_list l;
-    l.bottom().add(new Voice(voice_));
+    Voice * v_p = new Voice(voice_);
+    PCursor<Voice_element*> i= v_p->elts.bottom();
+       // need-to-have, otherwise memory will be filled up with regs. 
+    if (!i.ok() || i->duration_) {
+       v_p->add ( new Voice_element);
+       i=v_p->elts.bottom();
+    }
+    i->add(new Terminate_voice_req); 
+    l.bottom().add(v_p);
     return l;
 }
 
@@ -56,17 +65,20 @@ Simple_music::convert()const
 void
 Simple_music::print() const
 {
+#ifndef NPRINT
     mtor << "Simple_music {";
     voice_.print();
     mtor << "}\n";
+#endif
 }
 bool
-Simple_music::find_plet_start_bo(char c, Moment& moment_r)
+Simple_music::find_plet_start_b(char c, Moment& moment_r)
 {
-    return voice_.find_plet_start_bo(c, moment_r);
+    return voice_.find_plet_start_b(c, moment_r);
 }
 void 
-Simple_music::set_plet_backwards(Moment& now_moment_r, Moment until_moment, int num_i, int den_i)
+Simple_music::set_plet_backwards(Moment& now_moment_r, Moment until_moment, 
+                                int num_i, int den_i)
 {
     voice_.set_plet_backwards(now_moment_r, until_moment, num_i, den_i);
 }
@@ -115,10 +127,10 @@ Complex_music::set_default_group(String g)
            i->set_default_group(g);
 }
 bool
-Complex_music::find_plet_start_bo(char c, Moment& moment_r)
+Complex_music::find_plet_start_b(char c, Moment& moment_r)
 {
     for (iter_bot(elts,i); i.ok(); i--) {
-        if ( i->find_plet_start_bo(c, moment_r) )
+        if ( i->find_plet_start_b(c, moment_r) )
            return true;
     }
     return false;
index e653c46ac6dfdd74387abe4f260323a3eb9914e2..f9adbba73c7d47c8cf4f19415d7eca87c209d34a 100644 (file)
@@ -8,6 +8,8 @@ Item::Item()
     pcol_l_ = 0;
 }
 
+IMPLEMENT_STATIC_NAME(Item);
+
 void
 Item::do_print() const
 {
index 726af8cb3065c2d959546121406cfebade8d9982..7cc9fcbfa90cf698213323db867e35ac2a666cd9 100644 (file)
@@ -68,3 +68,4 @@ Key_item::brew_molecule_p()const
     output->add_right(m);
     return output;
 }
+IMPLEMENT_STATIC_NAME(Key_item);
index 8b8b2373b3dc1fd5a7e303654bb4ff9613638ba8..83fb84c0cdd7db4ee4a799a084532d396c0975c5 100644 (file)
@@ -97,3 +97,4 @@ Key_register::post_move_processing()
     default_key_b_ = false;
     kit_p_ = 0;
 }
+IMPLEMENT_STATIC_NAME(Key_register);
index 21ce7aa06ba0e6747d1e99849cc5dfac045db606..560b49da11b83544a0905e22da60c47f96abd340 100644 (file)
@@ -86,7 +86,7 @@ include           {
        mtor << "rest:"<< yylval.string;
        return RESTNAME;
 }
-<INITIAL,lyrics,notes>\$\\{BLACK}*{WHITE}      {
+<INITIAL,lyrics,notes>\\\${BLACK}*{WHITE}      {
        String s=YYText() + 2;
        s=s.left_str(s.length_i() - 1);
        return scan_escaped_word(s);
index ff0814f21694b1d4919f9a9858f83476f252e1fc..6a658b64c27b7937c0fe76f02fd07245d1981928 100644 (file)
@@ -91,3 +91,4 @@ Local_acc::compare(Local_acc&a, Local_acc&b)
     
     assert(false);
 };
+IMPLEMENT_STATIC_NAME(Local_key_item);
index 0ce36e955c1d4d9cd6039bec008880dc32860374..ea7e66b7d7af42a4d8dba74cdf09b1f1bbf3ef57 100644 (file)
@@ -67,3 +67,4 @@ Local_key_register::process_requests()
            warning ("Help me! can't figure  current key", 0);
     }
 }
+IMPLEMENT_STATIC_NAME(Local_key_register);
index 85a6bd923bbe8b404cd11a5fbc3fe6dff023fbcc..dd38e5cad5604a3072e3f2729ad477911464174f 100644 (file)
@@ -38,16 +38,20 @@ Long_option_init theopts[] = {
 };
 
 void
-help()
+usage()
 {
     cout <<
-       "--help, -h             This help\n"
-       "--warranty, -w         show warranty & copyright\n"
-       "--output, -o           set default output\n"
-       "--debug, -d            enable debug output\n"
-       "--init, -i             set init file\n"
-        "--include, -I         add to file search path.\n"
-       "--midi, -M             midi output only\n"
+       "Usage: lilypond [options] [mudela-file]\n"
+       "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"
        "\n"
        "LilyPond was compiled with the following settings:\n"
 #ifdef NDEBUG
@@ -139,7 +143,7 @@ main (int argc, char **argv)
            init_str = oparser.optarg;
            break;
        case 'h':
-           help();
+           usage();
            exit(0);
            break;
        case 'd':
index f15e5ddb0928b9206dd5e1b7fc4c927538645a60..3c500e6042733a8a6ef03dba3ceb6a9acea64d18 100644 (file)
@@ -11,7 +11,6 @@
 #include "command-request.hh"
 
 Meter_register::Meter_register()
-
 {
     post_move_processing();
 }
@@ -22,10 +21,11 @@ Meter_register::try_request(Request*r_l)
     Command_req* creq_l= r_l->command();
      if (!creq_l || !creq_l->meterchange()) 
        return false;
-
-    assert(!meter_req_l_);
-    meter_req_l_ = r_l->command()->meterchange();
-
+     Meter_change_req *m = creq_l->meterchange();
+     if (meter_req_l_ && meter_req_l_->compare(*m))
+        return false;
+     
+    meter_req_l_ = m;
     return true;
 }
 
@@ -62,3 +62,4 @@ Meter_register::post_move_processing()
     meter_req_l_ = 0;
     meter_p_ =0;
 }
+IMPLEMENT_STATIC_NAME(Meter_register);
index c16d5d3d3f30c7c5843af322fa96c562e16df70d..4e45b61185215136792dc76de20b61323f270c4a 100644 (file)
@@ -16,3 +16,4 @@ Meter::brew_molecule_p()const
     return new Molecule(Atom(s));
 }
 
+IMPLEMENT_STATIC_NAME(Meter);
index 73d0260c2b2cefd8f1e737fa648e99c678aac1de..5992cf9505e05d71cdbc904e7e1e5660811b938d 100644 (file)
@@ -55,20 +55,9 @@ Midi_output::do_staff(Staff*st_l,int track_i)
     Midi_text instrument_name( Midi_text::INSTRUMENT_NAME, "piano" );
     midi_track.add( Moment( 0 ), &instrument_name );
 
-    // set key, help, where to get key, where to get major/minor?
-    int accidentals_i = 0;
-    int minor_i = 0;
-
-
-    Midi_key midi_key( accidentals_i, minor_i ); 
-    midi_track.add( Moment( 0 ), &midi_key );
-
     Midi_tempo midi_tempo( midi_l_->get_tempo_i( Moment( 1, 4 ) ) );
     midi_track.add( Moment( 0 ), &midi_tempo );
 
-    Midi_time midi_time( Midi_def::num_i_s, Midi_def::den_i_s, 18 );
-    midi_track.add( Moment( 0 ), &midi_time );
-
     for (Midi_walker w (st_l, &midi_track); w.ok(); w++)
        w.process_requests();
 
@@ -106,6 +95,12 @@ Midi_output::header()
     // set track name
     Midi_text track_name( Midi_text::TRACK_NAME, "Track " + String_convert::i2dec_str( 0, 0, '0' ) );
     midi_track.add( Moment( 0 ), &track_name );
+
+    // ugh, to please lily when reparsing mi2mu output.
+    // lily currently barfs when no meter present.
+    Midi_time midi_time( 4, 4, 18 );
+    midi_track.add( Moment( 0.0 ), &midi_time );
+
     *midi_stream_l_  << midi_track;
 }
 
index 88cd6b724d5e88b1aab9659ecbcb708c9aebed9f..ef1ea8382a4d3bf6e4746b89af67388a5a4cae36 100644 (file)
@@ -6,6 +6,7 @@
   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>, Jan Nieuwenhuizen <jan@digicash.com>
 */
 
+#include "command-request.hh"
 #include "musical-request.hh"
 #include "p-score.hh"
 #include "staff.hh"
@@ -76,6 +77,22 @@ void
 Midi_walker::process_requests()
 {
     do_stop_notes(ptr()->when());
+
+    for ( int i = 0; i < ptr()->commandreq_l_arr_.size(); i++ )  {
+       Command_req *c_l = ptr()->commandreq_l_arr_[i]->command();
+       Meter_change_req* meter_l = c_l->meterchange();
+       if ( meter_l )
+           output_event( Midi_time( meter_l->beats_i_, meter_l->one_beat_i_, 18 ), 0 );
+       Key_change_req* key_l = c_l->keychange();
+       if ( key_l ) {
+           int sharps_i = key_l->sharps_i();
+           int flats_i = key_l->flats_i();
+           // midi cannot handle non-conventional keys
+           if ( !( flats_i && sharps_i ) )
+               output_event( Midi_key( sharps_i - flats_i, key_l->minor_b() ), 0 );
+       }
+    }
+
     for ( int i = 0; i < ptr()->musicalreq_l_arr_.size(); i++ )  {
 
        Rhythmic_req *n = ptr()->musicalreq_l_arr_[i]->rhythmic();
index e90be35ba3ccf2638acd318ad1885796b090686a..c7a848a18f071a584c703bb8ef188e05a6daf837 100644 (file)
@@ -14,6 +14,7 @@
 #include "voice.hh"
 #include "voice-element.hh"
 
+IMPLEMENT_STATIC_NAME(Stem_req);
 void
 Stem_req::do_print() const
 {
@@ -29,7 +30,12 @@ Stem_req::Stem_req()
 }
 
 /* ************** */
-void Musical_req::do_print()const{}
+IMPLEMENT_STATIC_NAME(Musical_req);
+void
+Musical_req::do_print()const{}
+
+IMPLEMENT_STATIC_NAME(Request);
+
 void Request::do_print() const{}
 
 /* *************** */
@@ -46,6 +52,8 @@ Request::print() const
      
 
 
+IMPLEMENT_STATIC_NAME(Span_req);
+
 void
 Span_req::do_print() const    
 {
@@ -71,6 +79,8 @@ Spacing_req::Spacing_req()
     distance = 0;
     strength = 0;
 }
+IMPLEMENT_STATIC_NAME(Spacing_req);
+
 void
 Spacing_req::do_print()const
 {
@@ -79,6 +89,8 @@ Spacing_req::do_print()const
 #endif
 }
 
+IMPLEMENT_STATIC_NAME(Blank_req);
+
 void
 Blank_req::do_print()const
 {
@@ -108,6 +120,8 @@ Melodic_req::transpose(Melodic_req const & delta)
     }
 }
 
+IMPLEMENT_STATIC_NAME(Melodic_req);
+
 void
 Melodic_req::do_print() const
 {
@@ -140,6 +154,8 @@ Plet_req::Plet_req()
     type_i_ = 1;
 }
 
+IMPLEMENT_STATIC_NAME(Plet_req);
+
 void
 Plet_req::do_print() const
 {
@@ -165,11 +181,13 @@ Rhythmic_req::Rhythmic_req()
 {
 }
 
+IMPLEMENT_STATIC_NAME(Rhythmic_req);
+
 void
 Rhythmic_req::do_print() const
 {
 #ifndef NPRINT
-    mtor << duration_.str();
+    mtor << "duration { " <<duration_.str() << "}";
 #endif
 }
 
@@ -187,6 +205,8 @@ Lyric_req::Lyric_req(Text_def* def_p)
     dir_i_ = -1;               // lyrics below (invisible) staff
 }
 
+IMPLEMENT_STATIC_NAME(Lyric_req);
+
 void
 Lyric_req::do_print() const
 {    
@@ -199,16 +219,22 @@ Note_req::Note_req()
 {
     forceacc_b_ = false;
 }
+IMPLEMENT_STATIC_NAME(Note_req);
+
 void
 Note_req::do_print() const
 {
 #ifndef NPRINT
     Melodic_req::do_print();
-    mtor << " forceacc_b_ " << forceacc_b_ << '\n';
+    if (forceacc_b_) {
+       mtor << " force accidental\n";
+    }
     Rhythmic_req::do_print();
 #endif
 }
 /* *************** */
+IMPLEMENT_STATIC_NAME(Rest_req);
+
 void
 Rest_req::do_print() const
 {
@@ -220,10 +246,13 @@ Beam_req::Beam_req()
 {
     nplet = 0;
 }
-
-void Beam_req::do_print()const{}
+IMPLEMENT_STATIC_NAME(Beam_req);
+void
+Beam_req::do_print()const{}
 /* *************** */
-void Slur_req::do_print()const{}
+IMPLEMENT_STATIC_NAME(Slur_req);
+void
+Slur_req::do_print()const{}
 /* *************** */
 int
 Span_req:: compare(Span_req const &r1, Span_req const &r2)
@@ -257,6 +286,8 @@ Script_req::Script_req(Script_req const &s)
     scriptdef_p_ = new Script_def(*s.scriptdef_p_);
 }
 
+IMPLEMENT_STATIC_NAME(Script_req);
+
 void
 Script_req::do_print() const
 {
@@ -295,6 +326,8 @@ Text_req::Text_req(int dir_i, Text_def* tdef_p)
     tdef_p_ = tdef_p;
 }
 
+IMPLEMENT_STATIC_NAME(Text_req);
+
 void
 Text_req::do_print() const
 {
@@ -313,6 +346,8 @@ Skip_req::duration() const
     return duration_;
 }
 
+IMPLEMENT_STATIC_NAME(Skip_req);
+
 void
 Skip_req::do_print() const
 {
@@ -332,6 +367,8 @@ Request::voice_l()
 }
 /* *************** */
 
+IMPLEMENT_STATIC_NAME(Subtle_req);
+
 void
 Subtle_req::do_print() const
 {
@@ -340,17 +377,21 @@ Subtle_req::do_print() const
 #endif
 }
 
+IMPLEMENT_STATIC_NAME(Dynamic_req);
+
 void
 Dynamic_req::do_print() const
 {
     Subtle_req::do_print();
 }
 
+IMPLEMENT_STATIC_NAME(Absolute_dynamic_req);
+
 void
 Absolute_dynamic_req::do_print() const
 {
     Dynamic_req::do_print();
-    mtor << " loudness_" <<loudness_;
+    mtor << " loudness " <<loudness_;
 }
 
 String
@@ -381,6 +422,8 @@ Span_dynamic_req::Span_dynamic_req()
     dynamic_dir_i_  = 0;
 }
 
+IMPLEMENT_STATIC_NAME(Span_dynamic_req);
+
 void
 Span_dynamic_req::do_print()const
 {
index cdbfd35b785da9624948664f38e721dee9f978dd..57909e87086413edc856c826600e7ab32b0f5e8c 100644 (file)
@@ -29,13 +29,15 @@ static Keyword_ent the_key_tab[]={
     "dynamic", DYNAMIC,
     "geometric", GEOMETRIC,
     "in", IN_T,
-    "lyrics", LYRICS,
+    "lyric", LYRIC,
     "key", KEY,
     "melodic" , MELODIC,
+    "melodic_request", MELODIC_REQUEST,
     "meter", METER,
     "midi", MIDI,
     "mm", MM_T,
     "multivoice", MULTIVOICE,
+    "note", NOTE,
     "octave", OCTAVECOMMAND,
     "output", OUTPUT,
     "partial", PARTIAL,
@@ -56,7 +58,6 @@ static Keyword_ent the_key_tab[]={
     "transpose", TRANSPOSE,
     "unitspace", UNITSPACE,
     "width", WIDTH,
-    "music", MUSIC,
     "grouping", GROUPING,
     0,0
 };
index 6340a918b844914ea771be91909b0381d7ee7770..9924a78a7e39f2405ff44c5c5d24c0c89abf962e 100644 (file)
@@ -109,8 +109,7 @@ My_lily_parser::get_word_element(Text_def* tdef_p, Duration * duration_p)
     Lyric_req* lreq_p = new Lyric_req(tdef_p);
 
     lreq_p->duration_ = *duration_p;
-    lreq_p->print();
-    lreq_p->defined_ch_C_ = here_ch_C();
+     lreq_p->defined_ch_C_ = here_ch_C();
 
     velt_p->add(lreq_p);
 
@@ -126,8 +125,7 @@ My_lily_parser::get_rest_element(String,  Duration * duration_p )
 
     Rest_req * rest_req_p = new Rest_req;
     rest_req_p->duration_ = *duration_p;
-    rest_req_p->print();
-    rest_req_p->defined_ch_C_ = here_ch_C();
+     rest_req_p->defined_ch_C_ = here_ch_C();
 
     velt_p->add(rest_req_p);
     delete duration_p;
@@ -210,7 +208,7 @@ My_lily_parser::My_lily_parser(Sources * source_l)
     source_l_ = source_l;
     lexer_p_ = 0;
     default_duration_.type_i_ = 4;
-    default_octave_i_=0;
+    default_octave_i_ = 3; // retain old default
     textstyle_str_="roman";            // in lexer?
     error_level_i_ = 0;
     last_duration_mode = false;
index b1f660ef171cc91afbab9ecd06dc75305632ecd8..528460f6f19925355f8a286f93fa7af26400f2bd 100644 (file)
@@ -26,6 +26,8 @@ Notehead::set_rhythmic(Rhythmic_req*r_req_l)
     dots = r_req_l->duration_.dots_i_;
 }
     
+IMPLEMENT_STATIC_NAME(Notehead);
+
 void
 Notehead::do_print()const
 {
index caaf26476697e8ca4489cd2569d9ee9bb4d46850..3ace8fba82341f3a0d35ffd87020385919d118f3 100644 (file)
@@ -18,6 +18,7 @@ PCol::width() const
 int
 PCol::rank() const
 {
+#if 0
     if(!pscore_l_)
        return -1;
     PCursor<PCol*> me=pscore_l_->find_col( (PCol*)this);
@@ -25,6 +26,19 @@ PCol::rank() const
        return -1;
     PCursor<PCol*> bot(pscore_l_->cols.top());
     return me - bot;
+#endif
+    assert(rank_i_ != -1);
+    return rank_i_;
+}
+
+void
+PCol::set_rank(int i)
+{
+    rank_i_ = i;
+    if (prebreak_p_)
+       prebreak_p_->rank_i_ = i;
+    if (postbreak_p_)
+       postbreak_p_->rank_i_ = i;
 }
 
 void
@@ -34,7 +48,7 @@ PCol::print() const
     mtor << "PCol {";
 
     if (rank() >= 0)
-       mtor << "rank: " << rank() << '\n';
+       mtor << "rank: " << rank_i_ << '\n';
 
     mtor << "# symbols: " << its.size() ;
     if (breakable_b()){
@@ -54,11 +68,7 @@ PCol::print() const
 int
 PCol::compare(PCol const &c1, PCol const &c2)
 {
-    PScore*ps_l = c1.pscore_l_;
-    PCursor<PCol*> ac(ps_l->find_col(&c1));
-    PCursor<PCol*> bc(ps_l->find_col(&c2));
-    assert(ac.ok() && bc.ok());
-    return ac - bc;
+    return c1.rank() - c2.rank();
 }
 
 void
index 9e31523da1d60b8cee95c7c82ae8193a65f34935..800d3287cf5292a26a7c9cb04d95365f693e0988 100644 (file)
@@ -26,11 +26,15 @@ PScore::get_spacing(PCol*l, PCol*r)
 void
 PScore::clean_cols()
 {
+    int rank_i = 0;
     for (iter_top(cols,c); c.ok(); )
        if (!c->used_b()) {
            delete c.remove_p();
-       } else
+       } else {
+           c->set_rank(rank_i++);
            c++;
+       }
+    
 }
 
 
@@ -248,6 +252,7 @@ void
 PScore::process()
 {
     clean_cols();
+    
     *mlog << "Preprocessing ... " <<flush;
     preprocess();
     *mlog << "\nCalculating column positions ... " <<flush;
index c379ade77021ba29c79086a80927c8802b78d44f..a4f0103fb4db89ac74cc82c48f8a77df0a23a664 100644 (file)
@@ -101,14 +101,15 @@ yylex(YYSTYPE *s,  void * v_l)
 %token GEOMETRIC
 %token GROUPING
 %token IN_T
-%token LYRICS
+%token LYRIC
 %token KEY
 %token MELODIC
+%token MELODIC_REQUEST
 %token METER
 %token MIDI
 %token MM_T
 %token MULTIVOICE
-%token MUSIC
+%token NOTE
 %token OCTAVECOMMAND
 %token OUTPUT
 %token PAPER
@@ -378,24 +379,29 @@ staff_block:
                $$ = $4; 
                $$-> defined_ch_C_ = THIS->define_spot_array_.pop();
        }
+       | { THIS->remember_spot(); }
+/*cont*/       STAFF_IDENTIFIER        { 
+               $$ = $2->staff(true); 
+               $$-> defined_ch_C_ = THIS->define_spot_array_.pop();
+       }
        ;
 
 
 
 staff_init:
-       STAFF_IDENTIFIER                { $$ = $1->staff(true); }
+       /* empty */ {
+               $$ = new Input_staff( "melodic" );
+       }
        | STRING                {
                $$ = new Input_staff(*$1);
                delete $1;
        }
-       | MELODIC {
-               $$ = new Input_staff("melodic");
-       }
        ;
 
 staff_body:
        staff_init
        | staff_body init_music {
+               $$ = $1;
                $2->set_default_group( "staff_music" + String($$->music_.size()));
                $$->add($2);
        }
@@ -410,22 +416,25 @@ init_music:
        init_music_voice        { $$ = $1; }
        | init_music_chord      { $$ = $1; }
        | init_lyrics_voice     { $$ = $1; }
+       | VOICE_IDENTIFIER      { 
+               $$ = $1->mvoice(true);
+       }
        ;
 
 init_lyrics_voice:
-       LYRICS { THIS->lexer_p_->push_lyric_state(); } 
+       LYRIC { THIS->lexer_p_->push_lyric_state(); } 
        music_voice { $$ = $3; THIS->lexer_p_->pop_state(); }
        ;
 
 init_music_voice:
-       MUSIC { THIS->lexer_p_->push_note_state(); } 
+       MELODIC { THIS->lexer_p_->push_note_state(); } 
        /* cont*/ music_voice
                { $$=$3; THIS->lexer_p_->pop_state(); }
        ;
 init_music_chord:
-       MUSIC { THIS->lexer_p_->push_note_state(); } 
+       { THIS->lexer_p_->push_note_state(); } 
        /* cont*/ music_chord
-                 { $$=$3; THIS->lexer_p_->pop_state(); }
+                 { $$=$2; THIS->lexer_p_->pop_state(); }
        ;
 /*
        MUSIC
@@ -470,7 +479,8 @@ music_voice_body:
        | music_voice_body '>' {
                THIS->fatal_error_i_ = 1;
                THIS->parser_error("Confused by errors: bailing out");
-       };
+       }
+       ;
 
 music_chord:  '<' music_chord_body '>' { $$ = $2; }
        ;
@@ -638,7 +648,7 @@ steno_note_req:
        ;
 
 melodic_request:
-       MELODIC '{' int int int '}'     {/* ugh */
+       MELODIC_REQUEST '{' int int int '}'     {/* ugh */
                $$ = new Melodic_req;
                $$->octave_i_ = $3;
                $$->notename_i_ = $4;
@@ -764,8 +774,10 @@ voice_command:
                THIS->default_duration_ = *$3;
                delete $3;
        }
-       | OCTAVECOMMAND '{' int '}'     {
-               THIS->default_octave_i_ = $3;
+       | OCTAVECOMMAND { THIS->default_octave_i_ = 2; }
+/* cont */
+       '{' steno_melodic_req '}'       {
+               THIS->default_octave_i_ = $4->octave_i_;
        }
        | TEXTSTYLE STRING      {
                THIS->textstyle_str_ = *$2;
index ebf71b724220796275a5d906301bbd3d4098ce57..8083200bcbdfd88777e89383701c859a08e38444 100644 (file)
@@ -25,7 +25,7 @@ Active_constraints::status() const
 void
 Active_constraints::OK()
 {
-    #ifndef NDEBUG
+#ifndef NDEBUG
     H.OK();
     A.OK();
     assert(active.size() +inactive.size() == opt->cons.size());
@@ -113,10 +113,10 @@ Active_constraints::drop(int k)
        A -= A*opt->quad*Matrix(a,a/q);
     }else
        WARN << "degenerate constraints";
-   #ifndef NDEBUG
+#ifndef NDEBUG
     Vector rem_row(A.row(q));
     assert(rem_row.norm() < EPS);
-   #endif
+#endif
      
     A.delete_row(q);
 }
diff --git a/lily/register-group.cc b/lily/register-group.cc
new file mode 100644 (file)
index 0000000..0725d6c
--- /dev/null
@@ -0,0 +1,133 @@
+/*
+  registergroup.cc -- implement Register_group_register
+
+  source file of the LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "proto.hh"
+#include "plist.hh"
+#include "register-group.hh"
+#include "register.hh"
+
+bool
+Register_group_register::acceptable_request_b(Request* r)
+{
+    for (iter_top(reg_list_, i); i.ok(); i++) {
+       if (i->acceptable_request_b(r))
+           return true;
+    }
+    return false;
+}
+
+void
+Register_group_register::set_feature(Features d)
+{
+    for (iter_top(reg_list_, i); i.ok(); i++) {
+       i->set_feature(d);
+    }
+}
+
+void
+Register_group_register::pre_move_processing()
+{
+    for (iter_top(reg_list_, i); i.ok(); i++) 
+       i->pre_move_processing();
+}
+
+void
+Register_group_register::process_requests()
+{
+    for (iter_top(reg_list_, i); i.ok(); i++) 
+       i->process_requests();
+}
+
+void
+Register_group_register::post_move_processing()
+{
+    iter_top(reg_list_, i);
+    while (i.ok()) {
+       // this construction to ensure clean deletion
+       Request_register *reg_l = i++; 
+       reg_l->post_move_processing();
+    }
+}
+
+void
+Register_group_register::acknowledge_element(Staff_elem_info info)
+{
+    if (!contains_b(info.origin_reg_l_arr_[0]))
+       return;
+    
+    for (iter_top(reg_list_, i); i.ok(); i++) 
+       i->acknowledge_element(info);
+}
+
+bool
+Register_group_register::contains_b(Request_register* reg_l)
+{
+    bool parent_b = Request_register::contains_b(reg_l);
+    
+    if (parent_b)
+       return true;
+    for (iter_top(reg_list_, j); j.ok(); j++)
+       if (j->contains_b(reg_l))
+           return true;
+    return false;
+}
+       
+
+
+bool
+Register_group_register::try_request(Request*req_l)
+{
+    iter_top(reg_list_, i); 
+    while (i.ok()) {
+
+
+       // this construction to ensure clean deletion
+       Request_register *reg_l = i++; 
+       if (reg_l->try_request( req_l ))
+           return true;
+    }
+    return false;
+}
+
+void
+Register_group_register::add(Request_register *reg_p)
+{
+    reg_list_.bottom().add(reg_p);
+    reg_p->daddy_reg_l_ = this;
+}
+
+
+Register_group_register::~Register_group_register()
+{
+    
+}
+
+Request_register *
+Register_group_register::get_register_p(Request_register*reg_l)
+{
+    iterator(reg_list_) reg_cur= reg_list_.find(reg_l);
+    assert(reg_cur.ok());
+    return reg_cur.remove_p();
+}
+
+void
+Register_group_register::terminate_register(Request_register*r_l)
+{
+    delete get_register_p(r_l);
+}
+
+IMPLEMENT_STATIC_NAME(Register_group_register);
+
+void
+Register_group_register::do_print()const
+{
+#ifndef NPRINT
+    for (iter_top(reg_list_, i); i.ok(); i++) 
+       i->print();
+#endif
+}
index dfaa3ce05b57bec7de44559aaa2ce2bfb3ead363..b9edcf9d584486528e01577396c45588977bf00b 100644 (file)
@@ -13,7 +13,7 @@
 #include "complex-walker.hh"
 #include "local-key-item.hh"
 #include "complex-staff.hh"
-#include "registergroup.hh"
+#include "register-group.hh"
 #include "debug.hh"
 
 
@@ -82,6 +82,8 @@ Request_register::print() const
 #endif
 }
 
+IMPLEMENT_STATIC_NAME(Request_register);
+
 void
 Request_register::do_print()const
 {
diff --git a/lily/registergroup.cc b/lily/registergroup.cc
deleted file mode 100644 (file)
index a94f145..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
-  registergroup.cc -- implement Register_group_register
-
-  source file of the LilyPond music typesetter
-
-  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
-*/
-
-#include "proto.hh"
-#include "plist.hh"
-#include "registergroup.hh"
-#include "register.hh"
-
-bool
-Register_group_register::acceptable_request_b(Request* r)
-{
-    for (iter_top(reg_list_, i); i.ok(); i++) {
-       if (i->acceptable_request_b(r))
-           return true;
-    }
-    return false;
-}
-
-void
-Register_group_register::set_feature(Features d)
-{
-    for (iter_top(reg_list_, i); i.ok(); i++) {
-       i->set_feature(d);
-    }
-}
-
-void
-Register_group_register::pre_move_processing()
-{
-    for (iter_top(reg_list_, i); i.ok(); i++) 
-       i->pre_move_processing();
-}
-
-void
-Register_group_register::process_requests()
-{
-    for (iter_top(reg_list_, i); i.ok(); i++) 
-       i->process_requests();
-}
-
-void
-Register_group_register::post_move_processing()
-{
-    for (iter_top(reg_list_, i); i.ok(); i++) 
-       i->post_move_processing();
-}
-
-void
-Register_group_register::acknowledge_element(Staff_elem_info info)
-{
-    if (!contains_b(info.origin_reg_l_arr_[0]))
-       return;
-    
-    for (iter_top(reg_list_, i); i.ok(); i++) 
-       i->acknowledge_element(info);
-}
-
-bool
-Register_group_register::contains_b(Request_register* reg_l)
-{
-    bool parent_b = Request_register::contains_b(reg_l);
-    
-    if (parent_b)
-       return true;
-    for (iter_top(reg_list_, j); j.ok(); j++)
-       if (j->contains_b(reg_l))
-           return true;
-    return false;
-}
-       
-
-
-bool
-Register_group_register::try_request(Request*req_l)
-{
-    for (iter_top(reg_list_, i); i.ok(); i++) 
-       if (i->try_request(req_l))
-           return true;
-    return false;
-}
-
-void
-Register_group_register::add(Request_register *reg_p)
-{
-    reg_list_.bottom().add(reg_p);
-    reg_p->daddy_reg_l_ = this;
-}
-
-
-Register_group_register::~Register_group_register()
-{
-    
-}
-
-Request_register *
-Register_group_register::get_register_p(Request_register*reg_l)
-{
-    iterator(reg_list_) reg_cur= reg_list_.find(reg_l);
-    assert(reg_cur.ok());
-    return reg_cur.remove_p();
-}
-
-void
-Register_group_register::terminate_register(Request_register*r_l)
-{
-    delete get_register_p(r_l);
-}
-
-void
-Register_group_register::do_print()const
-{
-#ifndef NPRINT
-    for (iter_top(reg_list_, i); i.ok(); i++) 
-       i->print();
-#endif
-}
index 97f91a6a6a44d5613fd268acb17ede3ef1a06d8f..3e582511e937d99b002faa49ca207c811288a6c6 100644 (file)
@@ -22,6 +22,8 @@ Rest::Rest(Duration d)
 }
 
 
+IMPLEMENT_STATIC_NAME(Rest);
+
 void
 Rest::do_print()const
 {
index 09b5439667a4cc62ad9755ec4b61c37455879f9c..b6a3f2cd839e2e54da79668ca8ddf5957a02cea2 100644 (file)
@@ -32,7 +32,6 @@ Score::setup_music()
 
     for (iter_top(staffs_,i); i.ok(); i++) {
        i->setup_staffcols();
-       i->OK();
     }
 }
 
@@ -104,26 +103,27 @@ Score::clean_cols()
     }
 }
 
-/**
-  Create columns at time #w#.
-  this sux.  We should have Score_column create the appropriate PCol.
-  Unfortunately, PCols don't know about their position.
+/** Create columns at time #w#.  This sux.  We should have
+  Score_column create the appropriate PCol.  Unfortunately, PCols
+  don't know about their position.
 
-  @return cursor pointing to the nonmusical (first) column
-  */
+  @return cursor pointing to the nonmusical (first) column */
 PCursor<Score_column*>
-Score::create_cols(Moment w)
+Score::create_cols(Moment w, PCursor<Score_column*> &i)
 {
     Score_column* c1 = new Score_column(w);
     Score_column* c2 = new Score_column(w);
     
     c1->musical_b_ = false;
     c2->musical_b_ = true;
-    
-    iter_top(cols_,i);
 
+    if (i.ok()) {
+       i --;
+    }
+    if ( !i.ok() ) {
+       i = cols_.top();
+    }
     for (; i.ok(); i++) {
-       assert(i->when() != w);
        if (i->when() > w)
            break;
     }
@@ -152,7 +152,7 @@ Score::find_col(Moment w, bool mus)
        if (i->when() > w)
            break;
     }
-    i = create_cols(w);
+    i = create_cols(w,i);
     if (mus)
        i++;
     return i;
@@ -247,7 +247,6 @@ Score::~Score()
 void
 Score::paper_output()
 {
-    OK();
     if (paper_p_->outfile=="")
        paper_p_->outfile = default_out_fn + ".out";
 
index 7ba3212e9216fdfe927e5cf58e1443adb64624dd..b782066c31453eb696fdb6e6362f903e27c4da4b 100644 (file)
@@ -74,3 +74,4 @@ Script_register::set_feature(Features i)
     if (i.direction_i_|| i.initialiser_b_)
        dir_i_ = i.direction_i_;
 }
+IMPLEMENT_STATIC_NAME(Script_register);
index 46c253588012d03c28ba660271eba8801de00602..b92892de6fde6f1c71d8077f5962a795f22a7db9 100644 (file)
@@ -127,3 +127,4 @@ Script::brew_molecule_p() const
     out->translate(Offset(0,dy * pos));
     return out;
 }
+IMPLEMENT_STATIC_NAME(Script);
index a076664dd73fc3f5daa654b242fa19d5f84b03d1..935a86468c82c001ed5c8bd076588a7de5bbabda 100644 (file)
@@ -98,3 +98,4 @@ Slur_register::~Slur_register()
        warning("unterminated slur", requests_arr_[i]->defined_ch_C_);
     }
 }
+IMPLEMENT_STATIC_NAME(Slur_register);
index 1d9bceade8f968b133cb2cd4634a0c6bf0b48921..8de13e023aeb59937b11f89a52c82cba23fc47b1 100644 (file)
@@ -133,3 +133,4 @@ Slur::brew_molecule_p() const
     return output;
 }
 
+IMPLEMENT_STATIC_NAME(Slur);
index d89301bc1086e89b5b5b5e093ddc7ff5ec3e3d6d..87a01078aa675e08e805cd2624610e63960ef980 100644 (file)
@@ -4,6 +4,8 @@
 
 
 
+IMPLEMENT_STATIC_NAME(Spanner);
+
 void
 Spanner::do_print()const
 {
index 0524f08b328b41c6d071483ae56d1f3e06a710da..d623d3b49a0518466791fd3c6e9d5d1397441396 100644 (file)
@@ -198,3 +198,4 @@ Staff_elem::add_dependency(Staff_elem * p)
     dependencies.push(p);
     p->dependants.push(p);
 }
+IMPLEMENT_STATIC_NAME(Staff_elem);
index 31cba7801f99e39c19b87fa420f69684bae4638b..b23f163d29fd8f8eb4886e93178d31de2be56628 100644 (file)
@@ -6,9 +6,6 @@
   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
 */
 
-
-
 #include "proto.hh"
 #include "plist.hh"
 #include "staff.hh"
@@ -23,6 +20,8 @@
 #include "command-request.hh" // todo
 #include "midi-stream.hh"
 #include "pqueue.hh"
+
+
 void
 Staff::add(PointerList<Voice*> const &l)
 {
@@ -94,9 +93,9 @@ void
 Staff::setup_staffcols()
 {
     PQueue<Subtle_req *, Moment> subtle_req_pq;
+       PCursor<Staff_column*> last(cols_);
     
     for (iter_top(voice_list_,i); i.ok(); i++) {
-       PCursor<Staff_column*> last(cols_);
        Moment now = i->start;
        iter_top(i->elts,j);
        while( j.ok()) {
@@ -113,14 +112,13 @@ Staff::setup_staffcols()
            }
            if(next == now) {
                s_l->add(j, subtle_req_pq); 
-               now += j->duration;
+               now += j->duration_;
                j++;
            }
        }
        
     }
-    PCursor<Staff_column*> last(cols_);
-    
+   last = cols_.top(); 
     while (subtle_req_pq.size()) {
        Moment front =subtle_req_pq.front_idx();
        Staff_column *s_l = get_col(front, &last);
@@ -128,7 +126,6 @@ Staff::setup_staffcols()
            s_l->setup_one_request(subtle_req_pq.get()); // ugh!
     }
        
-    OK();
 }
 
 void
index ad639e9c2d87f28a1c965b4b1671b4d003f9a449..0ad2411589351434d7b61e9e3954971811bfe6da 100644 (file)
@@ -17,6 +17,8 @@ Staff_symbol::Staff_symbol(int l)
     no_lines_i_ = l;
 }
 
+IMPLEMENT_STATIC_NAME(Staff_symbol);
+
 void
 Staff_symbol::do_print()const
 {
index ad947d2899f3e7ee24ab8bb1a8acec8324081a31..9169f785995d30ca0164cf3ee3217a33532cfa8b 100644 (file)
@@ -154,3 +154,5 @@ Stem_beam_register::set_feature(Features i)
 {
     default_dir_i_ = i.direction_i_;
 }
+
+IMPLEMENT_STATIC_NAME(Stem_beam_register);
index 4b141cb2e88e36029618913634949a3ebf178a4c..5e6592c482e4b5ce82ea99cc3d066cbf77d8baf9 100644 (file)
@@ -26,6 +26,8 @@ Stem::Stem(int c) //, Moment len)
     stem_xoffset=0;
 }
 
+IMPLEMENT_STATIC_NAME(Stem);
+
 void
 Stem::do_print() const
 {
index adadda663248a70f58701e06ee47a3c86f21114f..2171a81d240a794826872543a04adee6f1e14671 100644 (file)
@@ -70,3 +70,5 @@ Text_item::brew_molecule_p() const
     
     return mol_p;
 }
+
+IMPLEMENT_STATIC_NAME(Text_item);
index a15e47548ea9a6db1fad24d63e5b2c6cf0977631..fbe54a5db4e0f7e19769c581e1debde379c663e9 100644 (file)
@@ -57,3 +57,4 @@ Text_register::post_move_processing()
 {
     text_req_l_ = 0;
 }
+IMPLEMENT_STATIC_NAME(Text_register);
index 3f231223d880f94251381968bc445a2b4158455a..77ab800bdbd080e53c7e9f7771216c98e391808d 100644 (file)
@@ -19,6 +19,8 @@ Text_spanner::Text_spanner()
     support = 0;
 }
 
+IMPLEMENT_STATIC_NAME(Text_spanner);
+
 void
 Text_spanner::do_print() const
 {
index 4c1249b14072d7fb54f874b8f447ce84288a7057..4e334378864b6768ba164cb7f8ffa5d916cdc5ad 100644 (file)
@@ -27,7 +27,7 @@ void
 Voice_element::print() const
 {
 #ifndef NPRINT
-    mtor << "voice_element { dur :"<< duration <<"\n";
+    mtor << "voice_element { dur :"<< duration_ <<"\n";
     for (iter_top(reqs,rc); rc.ok(); rc++) {
        rc->print();
     }
@@ -39,8 +39,8 @@ void
 Voice_element::add(Request*r)
 {
     if (r->duration()) {
-       assert (!duration  || duration == r->duration());
-       duration = r->duration();
+       assert (!duration_  || duration_ == r->duration());
+       duration_ = r->duration();
     }
     
     r->elt_l_ = this;
@@ -51,7 +51,7 @@ Voice_element::add(Request*r)
 Voice_element::Voice_element()
 {
     voice_l_ = 0;
-    duration = 0;
+    duration_ = 0;
     defined_ch_C_ = 0;
 }
 
@@ -65,10 +65,10 @@ Voice_element::Voice_element(Voice_element const&src)
 
 }
 bool
-Voice_element::find_plet_start_bo(char c, Moment& moment_r)
+Voice_element::find_plet_start_b(char c, Moment& moment_r)
 {
     assert( c == ']' );
-    moment_r += duration;
+    moment_r += duration_;
     for ( PCursor<Request*> i( reqs.top() ); i.ok(); i++ ) {
        if (i->beam() && i->beam()->spantype == Span_req::START )
            return true;
@@ -91,7 +91,7 @@ void
 Voice_element::set_plet_backwards(Moment& now_moment_r,
                                  Moment until_moment, int num_i, int den_i)
 {
-    now_moment_r += duration;
+    now_moment_r += duration_;
     if ( now_moment_r > until_moment )
        return;
     for ( PCursor<Request*> i( reqs.top() ); i.ok(); i++ ) {
index 8a602a520152f282713e09afb331244f3d84d7a7..b9351bd8e8edb923abed6703947a64f4ad749ac0 100644 (file)
@@ -5,7 +5,7 @@
 
   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
 */
-
+#include "voice.hh"
 #include "proto.hh"
 #include "plist.hh"
 #include "musical-request.hh"
@@ -32,6 +32,7 @@ Voice_group_registers::Voice_group_registers(String id)
     if (id=="")                        // UGH
        id = __FUNCTION__ + String(temp_id_count++);
     group_id_str_ = id;
+    termination_mom_ = 0; 
 }
 
 bool
@@ -65,17 +66,21 @@ Voice_group_registers::terminate_register(Request_register*r_l)
        for (int i=0; i <voice_regs_l_.size(); i++) {
            if (r_l == voice_regs_l_[i])
                voice_regs_l_.del(i);
+           mtor << "Terminating voice_reg " ;
            Register_group_register::terminate_register(r_l);
            return;
        }
     }
     assert(false);
 }
+IMPLEMENT_STATIC_NAME(Voice_group_registers);
+
 void
 Voice_group_registers::do_print() const
 {
 #ifndef NPRINT
     mtor << "ID: " << group_id_str_<<"\n";
+    mtor << "stopping at " << termination_mom_ << "\n";
     Register_group_register::do_print();
 #endif
 }
@@ -83,6 +88,22 @@ void
 Voice_group_registers::add(Request_register*r_l)
 {
     Register_group_register::add(r_l);
-    if (r_l->name() == Voice_registers::static_name())
-       voice_regs_l_.push( (Voice_registers*)r_l );
+    if (r_l->name() == Voice_registers::static_name()) {
+       Voice_registers * vregs_l = (Voice_registers*)r_l;
+       voice_regs_l_.push( vregs_l );
+       Voice *v_l = vregs_l->voice_l_;
+       termination_mom_ = termination_mom_ >? v_l -> last();
+       mtor << "adding Voice_registers, now terminating at " << 
+           termination_mom_<< "\n";
+    }
+}
+
+void
+Voice_group_registers::post_move_processing()
+{
+    if ( get_staff_info().time_C_ ->when_ > termination_mom_ ){
+       mtor << "Terminating voice_group\n";
+       daddy_reg_l_->terminate_register(this);
+    }
+    Register_group_register::post_move_processing();
 }
index ca39524be0e0969bcec91cb0a3b79998db01546e..2aa7f18eb002d600d0f58cf2b6c127d943694815 100644 (file)
@@ -55,13 +55,17 @@ Voice_registers::try_request(Request*r_l)
 bool
 Voice_registers::acceptable_request_b(Request*r)
 {
-//    return (r->rest() || r->note() || r->slur() || r->groupchange());
-    return  r->groupchange()
+    Command_req *  c_l = r->command();
+    return  r->groupchange() || (c_l&&c_l->terminate())
        || Register_group_register::acceptable_request_b(r);
 }
+IMPLEMENT_STATIC_NAME(Voice_registers);
+
 void
 Voice_registers::do_print() const
 {
+#ifndef NPRINT
     mtor << "Voice= " << voice_l_<<'\n';
     Register_group_register::do_print();
+#endif
 }
index 2294d57b2ecb0d8f87ab4fb75c3eca91a3a9e4f7..d76b3ebe83f975e7f3e49e21ef8ccef1e9ae7b01 100644 (file)
@@ -30,10 +30,10 @@ Voice::set_default_group(String s)
 }
 
 bool
-Voice::find_plet_start_bo(char c, Moment& moment_r)
+Voice::find_plet_start_b(char c, Moment& moment_r)
 {
     for (iter_bot(elts, i); i.ok(); i--)
-       if ( i->find_plet_start_bo(c, moment_r) )
+       if ( i->find_plet_start_b(c, moment_r) )
            return true;
     return false;
 }
@@ -88,7 +88,7 @@ Voice::last() const
        l = start;
     
     for (iter_top(elts,i); i.ok(); i++)
-       l  += i->duration;
+       l  += i->duration_;
     return l;
 }
 
index e38c13d9b061d0e303b572fd86b3d2be406990e0..35f616267c66e0d1b97893003b8d0561c27e024f 100644 (file)
@@ -3,7 +3,8 @@
 # @configure_input@
 
 INSTALL = @INSTALL@
-USER_CXXFLAGS = @CXXFLAGS@
+USER_CXXFLAGS = @CXXFLAGS@ @CPPFLAGS@
+
 #CXX = @CXX@
 
 prefix = @prefix@
@@ -13,7 +14,7 @@ exec_prefix = @exec_prefix@
 bindir = @bindir@
 includedir = @includedir@
 datadir = @datadir@
-
+EXTRA_LIBES = @EXTRA_LIBES@
 RANLIB = @RANLIB@
 DEFS = @DEFS@
 #SET_MAKE = @SET_MAKE@
index 1f8f6ca8c7c54015bb1b543187012ab5c38f9ab3..0928f016e26c02b3bc6b55e57f9ffd44371bc283 100644 (file)
@@ -20,7 +20,7 @@ NAME = make
 
 # list of distribution files:
 #
-EXTRA_DISTFILES = Configure_variables.make.in lilypond.spec.in
+EXTRA_DISTFILES = Configure_variables.make.in lilypond.spec.in Toplevel.make.in
 #
 
 # generic variables:
index 3f3e5f86d1b2bcdbe2da06cce017099b52fa8731..b7ec413b65f1b2358eb53643c6bc0878f7916e28 100644 (file)
@@ -48,9 +48,13 @@ $(outdir)/%.text: $(outdir)/%.1
 $(depth)/%.text: $(outdir)/%.text
        cp $< $@
 
+$(outdir)/%.5: %.pod
+       $(pod2groff)
 $(outdir)/%.1: %.pod
-       pod2man --center="LilyPond documentation" --section="0"\
-               --release="LilyPond $(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL)" $< > $@
+       $(pod2groff)
+
+
+
 #
 
 # outdirs:
index 5ae0c4bdc537c8418594b318f77f416d9cfb46e6..de89f3d4173a427d0e1c325fad6b2b943fc863b2 100644 (file)
@@ -62,7 +62,7 @@ ifdef SUBDIRS
 endif
 
 distclean: clean
-       rm -rf  $(lily-version) $(flower-version) $(mi2mu-version) .b $(build) *~ $(allout) $(allgen)
+       rm -rf Makefile $(lily-version) $(flower-version) $(mi2mu-version) .b $(build) *~ $(allout) $(allgen)
 
 
 # configure:
diff --git a/make/Toplevel.make.in b/make/Toplevel.make.in
new file mode 100644 (file)
index 0000000..e9b0ef5
--- /dev/null
@@ -0,0 +1,68 @@
+# -*-Makefile-*-
+#
+# @configure_input@
+#
+# project  LilyPond -- the musical typesetter
+# title           top level makefile for LilyPond  
+# file    Makefile 
+#
+# Copyright (c) 1997 by    
+#      Jan Nieuwenhuizen <jan@digicash.com>
+#      Han-Wen Nienhuys <hanwen@stack.nl>
+#              ...your sort order here, or how to comment-out a comment
+
+# subdir level:
+#
+depth = .
+#
+
+# identify module:
+#
+NAME = lilypond
+include .version
+include ./$(depth)/make/Version.make
+
+# generic variables:
+#
+include ./$(depth)/make/Variables.make 
+#
+
+# descent order into subdirectories:
+#
+SUBDIRS = flower lib lily mi2mu \
+       Documentation bin init input tex make
+#
+
+# list of distribution files:
+#
+SCRIPTS = configure configure.in install-sh
+README_FILES = ANNOUNCE COPYING NEWS README TODO INSTALL.text
+EXTRA_DISTFILES=  .dstreamrc .version $(README_FILES) $(SCRIPTS) $(SYMLINKS)
+
+# do not dist ./Makefile (is copied from make/Toplevel.make)
+DISTFILES:=$(EXTRA_DISTFILES)# Makefile $(ALL_SOURCES)
+#
+
+
+# generic targets and rules:
+#
+include ./$(depth)/make/Targets.make
+include ./$(depth)/make/Rules.make
+#
+
+localdist: configure
+
+INSTALL.text: check-doc-deps
+       rm -f INSTALL.text
+       ln `find -name INSTALL.text|head -1` .
+
+localclean:
+       rm -f $(allexe) core config.cache config.log config.status 
+       rm -f $(outdir)/*.{class,html,gif}
+
+localinstall: all
+       $(INSTALL) -d $(bindir)
+       $(INSTALL) -m 755 $(allexe) $(bindir)
+
+localuninstall:
+       for i in $(allexe); do rm -f $(bindir)/`basename $$i`; done
index abe60c7a9a7dbbb8dfdcfa3a8abca5cda346b6c7..d1ca0485813e9a05f39b5a4f426a252f7e906cc1 100644 (file)
@@ -169,7 +169,9 @@ LIBRARY = $(LIB_PREFIX)$(NAME)$(LIB_SUFFIX)
 STRIPDEBUG=true #replace to do stripping of certain objects
 
 DISTFILES=$(EXTRA_DISTFILES) Makefile $(ALL_SOURCES)
-DOCDIR=$(depth)/doc++
+DOCDIR=$(depth)/$(outdir)
 
 
 progdocs=$(allhh) $(allcc) 
+pod2groff=pod2man --center="LilyPond documentation" --section="0"\
+       --release="LilyPond $(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL)" $< > $@
index 94361e906ec64ab26c34a076b0a53ffee70ba9a4..abebfdd4a7895570d3d1b20cc6475df96879f91f 100644 (file)
@@ -1,6 +1,6 @@
 MAJOR_VERSION = 0
 MINOR_VERSION = 0
-PATCH_LEVEL = 12
+PATCH_LEVEL = 13
 # use to send patches, always empty for released version:
-MY_PATCH_LEVEL = .1# include separator: "-1" or ".a"
+MY_PATCH_LEVEL = # include separator: "-1" or ".a"
 #
index df08ce5fed39bd00f9339e100bd259df01983b4c..2d57aa8336f5d7add2f5568440f82b322ecafab6 100644 (file)
@@ -45,7 +45,7 @@ public:
        virtual String mudela_str( bool command_mode_bo );
        
 private:
-       bool const simple_plet_bo_ = false;
+       static bool const simple_plet_b_s = false;
        Duration dur_;
        String name_str_;
 };
index 13ef7710670d2493bbcac8825e4343bc8c24de25..0941232c0d23ca495684d2c139e00ac036cee487 100644 (file)
 #define monitor_p_g &cout
 enum Verbose { QUIET_ver, BRIEF_ver, NORMAL_ver, VERBOSE_ver, DEBUG_ver };
 extern Verbose level_ver;
-#ifdef NPRINT
-#define dtor if ( 0 ) *monitor_p_g
-#define mtor if ( 0 ) *monitor_p_g
-#define vtor if ( level_ver >= VERBOSE_ver ) *monitor_p_g
-#define btor if ( level_ver >= BRIEF_ver ) *monitor_p_g
-#define qtor if ( level_ver >= QUIET_ver ) *monitor_p_g
+#if 0 // NPRINT
+       // not what i want, all output goes through tors.
+       // set verbosity level.
+       #define tor( threshold ) if ( 0 ) *monitor_p_g
 #else
-#define dtor if ( level_ver >= DEBUG_ver ) *monitor_p_g
-#define vtor if ( level_ver >= VERBOSE_ver ) *monitor_p_g
-#define mtor if ( level_ver >= NORMAL_ver ) *monitor_p_g
-#define btor if ( level_ver >= BRIEF_ver ) *monitor_p_g
-#define qtor if ( level_ver >= QUIET_ver ) *monitor_p_g
+       #define tor( threshold ) if ( level_ver >= threshold ) *monitor_p_g
 #endif
 
 extern Sources* source_l_g;
index 9db1c436144f12c7b1ecd0773c51658f674e6f5e..67b53e85307bdf9ec775daef7dda822e4dad90de 100644 (file)
@@ -26,7 +26,7 @@ public:
        char const* here_ch_C();
        static int varint2_i( String str );
        int yylex();
-    Source_file * source_file_p_ ;
+       Source_file * source_file_l_ ;
 private:
     int char_count_;
 public: // ugh
index 31dfe9e5e0a0731df835f45bed39a3aea5cc09d8..b8795395afaef95173aed5cc12cc521da2170781 100644 (file)
@@ -58,31 +58,38 @@ error( String message_str, char const* context_ch_C )
 }
 
 void
-help()
+usage()
 {
-    mtor <<
-       "--be-blonde, -b                use exact, blonde durations, e.g.: a[385]\n"
-       "--debug, -d            be really verbose\n"
-       "--help, -h             this help\n"
-        "--include=DIR, -I DIR add DIR to search path\n"
-        "--no-silly, -n                assume no triplets and no smaller than 16\n"
-       "--output=FILE, -o FILE set FILE as default output\n"
-       "--quiet, -q            be quiet\n"
-       "--verbose, -v          be verbose\n"
-       "--warranty, -w         show warranty & copyright\n"
+    tor( NORMAL_ver ) <<
+       "Usage: mi2mu [options] midi-file\n"
+       "Translate midi-file to mudela\n"
+       "\n"
+       "Options:\n"
+       "  -b, --no-quantify      write exact durations, e.g.: a4*385/384\n"
+       "  -d, --debug            print lots of debugging stuff\n"
+       "  -h, --help             this help\n"
+        "  -I, --include=DIR      add DIR to search path\n"
+        "  -n, --no-silly         assume no plets or double dots, smallest is 16\n"
+       "  -o, --output=FILE      set FILE as default output\n"
+       "  -p, --no-plets         assume no plets\n"
+       "  -q, --quiet            be quiet\n"
+       "  -s, --smallest=N       assume no shorter (reciprocal) durations than N\n"
+       "  -v, --verbose          be verbose\n"
+       "  -w, --warranty         show warranty and copyright\n"
+       "  -x, --no-double-dots   assume no double dotted notes\n"
        ;
 }
 
 void
 identify()
 {
-       mtor << mi2mu_version_str() << endl;
+       tor( NORMAL_ver ) << mi2mu_version_str() << endl;
 }
     
 void 
 notice()
 {
-    mtor <<
+    tor( NORMAL_ver ) <<
        "\n"
        "Mi2mu, translate midi to mudela.\n"
        "Copyright (C) 1997 by\n"
@@ -114,9 +121,12 @@ main( int argc_i, char* argv_sz_a[] )
                0, "help", 'h',
                0, "no-silly", 'n',
                1, "output", 'o',
+               1, "no-plets", 'p',
                0, "quiet", 'q',
+               1, "smallest", 's',
                0, "verbose", 'v',
                0, "warranty", 'w',
+               0, "no-double-dots", 'x',
                0,0,0
        };
        Getopt_long getopt_long( argc_i, argv_sz_a, long_option_init_a );
@@ -125,39 +135,57 @@ main( int argc_i, char* argv_sz_a[] )
        String output_str;
        while ( Long_option_init* long_option_init_p = getopt_long() )
                switch ( long_option_init_p->shortname ) {
-                       case 'b':
-                               Duration_convert::be_blonde_b_s = true;
-                               break;
-                       case 'd':
-                               level_ver = DEBUG_ver;
-                               break;
-                       case 'h':
-                               help();
-                               exit( 0 );
-                               break;
-                       case 'n':
-                               Duration_convert::no_double_dots_b_s = false;
-                               Duration_convert::no_triplets_b_s = true;
-                               Duration_convert::no_smaller_than_i_s = 16;
-                               break;
-                       case 'o':
-                               output_str = getopt_long.optarg;
-                               break;
-                       case 'q':
-                               level_ver = QUIET_ver;
-                               break;
-                       case 'v':
-                               level_ver = VERBOSE_ver;
-                               break;
-                       case 'w':
-                               notice();
-                               exit( 0 );
-                               break;
-                       default:
-                               assert( 0 );
-                               break;
-               }
-
+               case 'b':
+                       Duration_convert::no_quantify_b_s = true;
+                       break;
+               case 'd':
+                       level_ver = DEBUG_ver;
+                       break;
+               case 'h':
+                       usage();
+                       exit( 0 );
+                       break;
+//             case 'I':
+//                     path->push( getopt_long.optarg );
+//                     break;
+               case 'n':
+                       Duration_convert::no_double_dots_b_s = true;
+                       Duration_convert::no_triplets_b_s = true;
+                       Duration_convert::no_smaller_than_i_s = 16;
+                       break;
+               case 'o':
+                       output_str = getopt_long.optarg;
+                       break;
+               case 'p':
+                       Duration_convert::no_triplets_b_s = true;
+                       break;
+               case 'q':
+                       level_ver = QUIET_ver;
+                       break;
+               case 's': {
+                               int i = String_convert::dec2_i( getopt_long.optarg );
+                               if ( !i ) {
+                                       usage();
+                                       exit( 2 ); //usage
+                               }
+                               Duration_convert::no_smaller_than_i_s = i;
+                       }
+                       break;
+               case 'v':
+                       level_ver = VERBOSE_ver;
+                       break;
+               case 'w':
+                       notice();
+                       exit( 0 );
+                       break;
+               case 'x':
+                       Duration_convert::no_double_dots_b_s = false;
+                       break;
+               default:
+                       assert( 0 );
+                       break;
+               }
+  
        char* arg_sz = 0;
        while ( ( arg_sz = getopt_long.get_next_arg() ) ) {
                My_midi_parser midi_parser( arg_sz, & source );
index 4ab611cd4f1e2e8f076a390aa4fa899872e0155e..c909e07c7b1bf9de10ad9dff3080bcbb973cc242 100644 (file)
@@ -34,13 +34,13 @@ Midi_key::Midi_key( int accidentals_i, int minor_i )
 String
 Midi_key::mudela_str( bool command_mode_bo )
 {
-       String str = "key\\";
+       String str = "\\key\\";
        if ( !minor_i_ ) 
                str += String( (char)( ( key_i_ + 2 ) % 7 + 'A'  ) );
        else // heu, -2: should be - 1 1/2: A -> fis
                str += String( (char)( ( key_i_ + 2 - 2 ) % 7 + 'a'  ) );
-       if ( !command_mode_bo )
-           str =  String( '\\' ) + str;
+//     if ( !command_mode_bo )
+//         str =  String( '\\' ) + str;
        str = String( "%" ) + str + "\n"; // "\key\F" not supported yet...
        return str;
 }
@@ -73,13 +73,15 @@ Midi_key::notename_str( int pitch_i )
                else
                        notename_str += "es";
        accidental_i--;
-       String octave_str;
 
-       octave_str += String( '\'', ( pitch_i - Midi_note::c0_pitch_i_c_ ) / 12 );
-       octave_str += String( '`', ( Midi_note::c0_pitch_i_c_ + 11 - pitch_i ) / 12 );
-       return octave_str + notename_str;
+       String de_octavate_str = String( '\'', ( Midi_note::c0_pitch_i_c_ + 11 - pitch_i ) / 12 );
+       String octavate_str = String( '\'', ( pitch_i - Midi_note::c0_pitch_i_c_ ) / 12 );
+       return de_octavate_str + notename_str + octavate_str;
 }
 
+// statics Midi_note
+bool const Midi_note::simple_plet_b_s = false;
+
 Midi_note::Midi_note( String name_str, Duration dur )
 {
        // do i want pitch too?
@@ -91,9 +93,8 @@ String
 Midi_note::mudela_str( bool command_mode_bo )
 {
 //     assert( !command_mode_bo );
-// undefined ref to simple_plet_bo_ ??
-//     if ( simple_plet_bo_ )
-//             return name_str_ + Duration_convert::dur2_str( dur_ );
+       if ( simple_plet_b_s )
+               return name_str_ + Duration_convert::dur2_str( dur_ );
 
        //ugh
        String str;
@@ -134,7 +135,7 @@ Midi_tempo::mudela_str( bool command_mode_bo )
 //     assert( command_mode_bo );
        if ( !command_mode_bo )
                return "";
-       String str = "tempo 4:";
+       String str = "\\tempo 4:";
        str += String( get_tempo_i( Moment( 1, 4 ) ) );
        return str;
 }
@@ -206,11 +207,11 @@ Midi_time::num_i()
 String
 Midi_time::mudela_str( bool command_mode_bo )
 {
-       String str = "meter { "
-               + String( num_i_ ) + "*" + String( 1 << den_i_ ) 
+       String str = "\\meter{ "
+               + String( num_i_ ) + "/" + String( 1 << den_i_ ) 
                + " }";
-       if ( !command_mode_bo )
-           str =  String( '\\' ) + str;
+//     if ( !command_mode_bo )
+//         str =  String( '\\' ) + str;
        return str;
 }
 
index 6add2613c7e6d4d86c14e4f16d53d50262849aac..f61d2b4656dc9a1a464cf8cb98daacab61f416bb 100644 (file)
@@ -71,7 +71,7 @@ SSME          [\0x7f][\x03]
 %%
 
 {HEADER}/{INT32}       { // using /{INT32}; longer match than {INT32}
-       dtor << "lex: header" << endl;
+       tor( DEBUG_ver ) << "lex: header" << endl;
        yy_push_state( int16 ); 
        yy_push_state( int16 ); 
        yy_push_state( int16 ); 
@@ -80,7 +80,7 @@ SSME          [\0x7f][\x03]
 }
 
 {TRACK}/{INT32}        { // using /{INT32}; longer match than {INT32}
-       dtor << "lex: track" << endl;
+       tor( DEBUG_ver ) << "lex: track" << endl;
        yy_push_state( track ); 
        yy_push_state( int32 ); 
        return TRACK;
@@ -91,7 +91,7 @@ SSME          [\0x7f][\x03]
        exit( 1 );
 }
 <int32>{INT32} { // really signed? 
-       dtor << "lex: int32" << endl;
+       tor( DEBUG_ver ) << "lex: int32" << endl;
        assert( YYLeng() == 4 );
        String str( (Byte const*)YYText(), YYLeng() );
        yylval.i = String_convert::bin2_i( str );
@@ -99,7 +99,7 @@ SSME          [\0x7f][\x03]
        return INT32;
 }
 <int16>{INT16} { // really signed?
-       dtor << "lex: int16" << endl;
+       tor( DEBUG_ver ) << "lex: int16" << endl;
        assert( YYLeng() == 2 );
        String str( (Byte const*)YYText(), YYLeng() );
        yylval.i = String_convert::bin2_i( str );
@@ -107,7 +107,7 @@ SSME                [\0x7f][\x03]
        return INT16;
 }
 <i8>{I8}       {
-       dtor << "lex: i8" << endl;
+       tor( DEBUG_ver ) << "lex: i8" << endl;
        assert( YYLeng() == 1 );
 //     yylval.byte = *(signed char*)YYText();
        yylval.i = *(signed char*)YYText();
@@ -115,7 +115,7 @@ SSME                [\0x7f][\x03]
        return I8;
 }
 <u8>{U8}       {
-       dtor << "lex: u8" << endl;
+       tor( DEBUG_ver ) << "lex: u8" << endl;
        assert( YYLeng() == 1 );
 //     yylval.byte = *(Byte*)YYText();
        yylval.i = *(Byte*)YYText();
@@ -126,7 +126,7 @@ SSME                [\0x7f][\x03]
 <track>{VARINT} {
        String str( (Byte const*)YYText(), YYLeng() );
        yylval.i = My_midi_lexer::varint2_i( str );
-       dtor << String( "lex: track: varint(" ) 
+       tor( DEBUG_ver ) << String( "lex: track: varint(" ) 
                + String( yylval.i ) + "): "
                + String_convert::bin2hex_str( str ) << endl;
        yy_push_state( event ); 
@@ -140,7 +140,7 @@ SSME                [\0x7f][\x03]
 <event>{RUNNING_STATUS}        {
 //     yylval.byte = *(Byte*)YYText();
        yylval.i = *(Byte*)YYText();
-       dtor << String ( "lex: running status: " ) + String( yylval.i ) << endl;
+       tor( DEBUG_ver ) << String ( "lex: running status: " ) + String( yylval.i ) << endl;
        yy_pop_state(); 
 //     yy_push_state( u8 );
        yy_push_state( u8 );
@@ -149,23 +149,23 @@ SSME              [\0x7f][\x03]
 <event>{DATA_ENTRY}    {
 //     yylval.byte = *(Byte*)YYText();
        yylval.i = *(Byte*)YYText();
-       dtor << String ( "lex: undefined data entry: " ) + String( yylval.i ) << endl;
+       tor( DEBUG_ver ) << String ( "lex: undefined data entry: " ) + String( yylval.i ) << endl;
        yy_pop_state(); 
        yy_push_state( u8 );
        return DATA_ENTRY;
 }
 <event>{ALL_NOTES_OFF} {
-       dtor << "lex: all note off" << endl;
+       tor( DEBUG_ver ) << "lex: all note off" << endl;
 //     yylval.byte = *(Byte*)YYText();
        yylval.i = *(Byte*)YYText();
-       dtor << String ( "lex: all notes off: " ) + String( yylval.i ) << endl;
+       tor( DEBUG_ver ) << String ( "lex: all notes off: " ) + String( yylval.i ) << endl;
        yy_pop_state(); 
        yy_push_state( u8 );
        yy_push_state( u8 );
        return ALL_NOTES_OFF;
 }
 <event>{NOTE_OFF}      {
-       dtor << "lex: note off" << endl;
+       tor( DEBUG_ver ) << "lex: note off" << endl;
 //     yylval.byte = *(Byte*)YYText();
        yylval.i = *(Byte*)YYText();
        yy_pop_state(); 
@@ -174,7 +174,7 @@ SSME                [\0x7f][\x03]
        return NOTE_OFF;
 }
 <event>{NOTE_ON}       {
-       dtor << "lex: note on" << endl;
+       tor( DEBUG_ver ) << "lex: note on" << endl;
 //     yylval.byte = *(Byte*)YYText();
        yylval.i = *(Byte*)YYText();
        yy_pop_state(); 
@@ -183,7 +183,7 @@ SSME                [\0x7f][\x03]
        return NOTE_ON;
 }
 <event>{POLYPHONIC_AFTERTOUCH} {
-       dtor << "lex: polyphonic aftertouch" << endl;
+       tor( DEBUG_ver ) << "lex: polyphonic aftertouch" << endl;
 //     yylval.byte = *(Byte*)YYText();
        yylval.i = *(Byte*)YYText();
        yy_pop_state(); 
@@ -192,7 +192,7 @@ SSME                [\0x7f][\x03]
        return POLYPHONIC_AFTERTOUCH;
 }
 <event>{CONTROLMODE_CHANGE}    {
-       dtor << "lex: controlmode change" << endl;
+       tor( DEBUG_ver ) << "lex: controlmode change" << endl;
 //     yylval.byte = *(Byte*)YYText();
        yylval.i = *(Byte*)YYText();
        yy_pop_state(); 
@@ -201,7 +201,7 @@ SSME                [\0x7f][\x03]
        return CONTROLMODE_CHANGE;
 }
 <event>{PROGRAM_CHANGE}        {
-       dtor << "lex: program change" << endl;
+       tor( DEBUG_ver ) << "lex: program change" << endl;
 //     yylval.byte = *(Byte*)YYText();
        yylval.i = *(Byte*)YYText();
        yy_pop_state(); 
@@ -209,7 +209,7 @@ SSME                [\0x7f][\x03]
        return PROGRAM_CHANGE;
 }
 <event>{CHANNEL_AFTERTOUCH}    {
-       dtor << "lex: channel aftertouch" << endl;
+       tor( DEBUG_ver ) << "lex: channel aftertouch" << endl;
 //     yylval.byte = *(Byte*)YYText();
        yylval.i = *(Byte*)YYText();
        yy_pop_state(); 
@@ -218,7 +218,7 @@ SSME                [\0x7f][\x03]
        return CHANNEL_AFTERTOUCH;
 }
 <event>{PITCHWHEEL_RANGE} {
-       dtor << "lex: pitchwheel range" << endl;
+       tor( DEBUG_ver ) << "lex: pitchwheel range" << endl;
 //     yylval.byte = *(Byte*)YYText();
        yylval.i = *(Byte*)YYText();
        yy_pop_state(); 
@@ -227,20 +227,20 @@ SSME              [\0x7f][\x03]
        return PITCHWHEEL_RANGE;
 }
 <event>{SYSEX_EVENT1} {        // len data
-       dtor << "lex: sysex1" << endl;
+       tor( DEBUG_ver ) << "lex: sysex1" << endl;
        yy_pop_state(); 
        yy_push_state( data );
        return SYSEX_EVENT1;
 }
 <event>{SYSEX_EVENT2} {        // len data
-       dtor << "lex: sysex2" << endl;
+       tor( DEBUG_ver ) << "lex: sysex2" << endl;
        yy_pop_state(); 
 //     yy_push_state( u8 ); //?
        yy_push_state( data );
        return SYSEX_EVENT2;
 }
 <event>{META_EVENT}    {
-       dtor << "lex: meta" << endl;
+       tor( DEBUG_ver ) << "lex: meta" << endl;
        yy_push_state( meta_event );
        return META_EVENT;
 }
@@ -250,14 +250,14 @@ SSME              [\0x7f][\x03]
        exit( 1 );
 }
 <meta_event>{SEQUENCE} {       // ssss sequence number
-       dtor << "lex: sequence" << endl;
+       tor( DEBUG_ver ) << "lex: sequence" << endl;
        yy_pop_state();
        yy_pop_state();
        yy_push_state( int16 );
        return SEQUENCE;
 }
 <meta_event>{YYTEXT}   {               // len data
-       dtor << "lex: text" << endl;
+       tor( DEBUG_ver ) << "lex: text" << endl;
 //     yylval.byte = *(Byte*)YYText();
        yylval.i = *(Byte*)YYText();
        yy_pop_state();
@@ -266,7 +266,7 @@ SSME                [\0x7f][\x03]
        return YYTEXT;
 }
 <meta_event>{YYCOPYRIGHT}      {
-       dtor << "lex: copyright" << endl;
+       tor( DEBUG_ver ) << "lex: copyright" << endl;
 //     yylval.byte = *(Byte*)YYText();
        yylval.i = *(Byte*)YYText();
        yy_pop_state();
@@ -275,7 +275,7 @@ SSME                [\0x7f][\x03]
        return YYCOPYRIGHT;
 }
 <meta_event>{YYTRACK_NAME}     {
-       dtor << "lex: track name" << endl;
+       tor( DEBUG_ver ) << "lex: track name" << endl;
 //     yylval.byte = *(Byte*)YYText();
        yylval.i = *(Byte*)YYText();
        yy_pop_state();
@@ -284,7 +284,7 @@ SSME                [\0x7f][\x03]
        return YYTRACK_NAME;
 }
 <meta_event>{YYINSTRUMENT_NAME}        {
-       dtor << "lex: instrument name" << endl;
+       tor( DEBUG_ver ) << "lex: instrument name" << endl;
 //     yylval.byte = *(Byte*)YYText();
        yylval.i = *(Byte*)YYText();
        yy_pop_state();
@@ -293,7 +293,7 @@ SSME                [\0x7f][\x03]
        return YYINSTRUMENT_NAME;
 }
 <meta_event>{YYLYRIC}  {
-       dtor << "lex: lyric" << endl;
+       tor( DEBUG_ver ) << "lex: lyric" << endl;
 //     yylval.byte = *(Byte*)YYText();
        yylval.i = *(Byte*)YYText();
        yy_pop_state();
@@ -302,7 +302,7 @@ SSME                [\0x7f][\x03]
        return YYLYRIC;
 }
 <meta_event>{YYMARKER} {
-       dtor << "lex: marker" << endl;
+       tor( DEBUG_ver ) << "lex: marker" << endl;
 //     yylval.byte = *(Byte*)YYText();
        yylval.i = *(Byte*)YYText();
        yy_pop_state();
@@ -311,7 +311,7 @@ SSME                [\0x7f][\x03]
        return YYMARKER;
 }
 <meta_event>{YYCUE_POINT}      {
-       dtor << "lex: cue point" << endl;
+       tor( DEBUG_ver ) << "lex: cue point" << endl;
 //     yylval.byte = *(Byte*)YYText();
        yylval.i = *(Byte*)YYText();
        yy_pop_state();
@@ -320,7 +320,7 @@ SSME                [\0x7f][\x03]
        return YYCUE_POINT;
 }
 <meta_event>{TEMPO}    {       // tttttt usec
-       dtor << "lex: tempo" << endl;
+       tor( DEBUG_ver ) << "lex: tempo" << endl;
        yy_pop_state();
        yy_pop_state();
        yy_push_state( u8 );
@@ -329,7 +329,7 @@ SSME                [\0x7f][\x03]
        return TEMPO;
 }
 <meta_event>{SMPTE_OFFSET}     {               // hr mn se fr ff
-       dtor << "lex: smpte offset" << endl;
+       tor( DEBUG_ver ) << "lex: smpte offset" << endl;
        yy_pop_state();
        yy_pop_state();
        yy_push_state( u8 );
@@ -340,7 +340,7 @@ SSME                [\0x7f][\x03]
        return SMPTE_OFFSET;
 }
 <meta_event>{TIME}     {               // nn dd cc bb
-       dtor << "lex: time" << endl;
+       tor( DEBUG_ver ) << "lex: time" << endl;
        yy_pop_state();
        yy_pop_state();
        yy_push_state( u8 );
@@ -350,7 +350,7 @@ SSME                [\0x7f][\x03]
        return TIME;
 }
 <meta_event>{KEY}      {       // sf mi
-       dtor << "lex: key" << endl;
+       tor( DEBUG_ver ) << "lex: key" << endl;
        yy_pop_state();
        yy_pop_state();
        yy_push_state( i8 );
@@ -358,14 +358,14 @@ SSME              [\0x7f][\x03]
        return KEY;
 }
 <meta_event>{SSME}     {       // len data
-       dtor << "lex: smme" << endl;
+       tor( DEBUG_ver ) << "lex: smme" << endl;
        yy_pop_state();
        yy_pop_state();
        yy_push_state( data );
        return SSME;
 }
 <meta_event>{END_OF_TRACK} {
-       dtor << "lex: end of track" << endl;
+       tor( DEBUG_ver ) << "lex: end of track" << endl;
        yy_pop_state();
        yy_pop_state();
        yy_pop_state();
@@ -383,7 +383,7 @@ SSME                [\0x7f][\x03]
 }
 
 <data>{VARINT} {
-       dtor << "lex: data" << endl;
+       tor( DEBUG_ver ) << "lex: data" << endl;
        String str( (Byte const*)YYText(), YYLeng() );
        int i = My_midi_lexer::varint2_i( str );
        String* str_p = new String;
@@ -400,7 +400,7 @@ SSME                [\0x7f][\x03]
 }
 
 <<EOF>> {
-//     mtor << "<<EOF>>";
+//     tor( NORMAL_ver ) << "<<EOF>>";
 
        if ( !close_i() )
          yyterminate(); // can't move this, since it actually rets a YY_NULL
index 2402ee542e4214c785b317bd082290b87f55737e..7fab7a910d3454643e45ce0f341d44829819af39 100644 (file)
@@ -81,7 +81,7 @@ header:
 
 track: 
        TRACK INT32 {
-               mtor << "\ntrack " << midi_parser_l_g->track_i_ << ": " << flush;
+               tor( NORMAL_ver ) << "\ntrack " << midi_parser_l_g->track_i_ << ": " << flush;
                $$ = new Midi_track( midi_parser_l_g->track_i_++,
                        // silly, cause not set yet!
                        midi_parser_l_g->copyright_str_,
@@ -99,7 +99,7 @@ event:
                if ( $2 ) {
                        String str = $2->mudela_str( false );
                        if ( str.length_i() )
-                               dtor << str << " " << flush;
+                               tor( DEBUG_ver ) << str << " " << flush;
                }
        }
        ;
@@ -109,9 +109,10 @@ varint:
                midi_parser_l_g->forward( $1 );
                if ( $1 ) {
                        int bars_i = (int)( midi_parser_l_g->mom() / midi_parser_l_g->midi_time_p_->bar_mom() );
-                       if ( bars_i > midi_parser_l_g->bar_i_ )
-                               mtor << '[' << midi_parser_l_g->bar_i_++ 
-                                       << ']' << flush; 
+                       if ( bars_i > midi_parser_l_g->bar_i_ ) {
+                               tor( NORMAL_ver ) << '[' << midi_parser_l_g->bar_i_ << ']' << flush; 
+                       midi_parser_l_g->bar_i_ = bars_i;       
+                       }
                }
        }
        ;
@@ -158,7 +159,7 @@ the_meta_event:
                                $$ = new Midi_text( type, *$2 );
                                break;
                        }
-               dtor << *$2 << endl;
+               tor( DEBUG_ver ) << *$2 << endl;
                delete $2;
        }
        | END_OF_TRACK {
@@ -166,7 +167,7 @@ the_meta_event:
        }
        | TEMPO U8 U8 U8 { 
                $$ = new Midi_tempo( ( $2 << 16 ) + ( $3 << 8 ) + $4 );
-               dtor << $$->mudela_str( false ) << endl;
+               tor( DEBUG_ver ) << $$->mudela_str( false ) << endl;
                midi_parser_l_g->set_tempo( ( $2 << 16 ) + ( $3 << 8 ) + $4 );
        }
        | SMPTE_OFFSET U8 U8 U8 U8 U8 { 
@@ -174,7 +175,7 @@ the_meta_event:
        }
        | TIME U8 U8 U8 U8 { 
                $$ = new Midi_time( $2, $3, $4, $5 );
-               dtor << $$->mudela_str( true ) << endl;
+               tor( DEBUG_ver ) << $$->mudela_str( true ) << endl;
                midi_parser_l_g->set_time( $2, $3, $4, $5 );
        }
        | KEY I8 I8 { 
@@ -189,25 +190,25 @@ the_meta_event:
 
 text_event: 
        YYTEXT {
-               dtor << "\n% Text: ";
+               tor( DEBUG_ver ) << "\n% Text: ";
        }
        | YYCOPYRIGHT {
-               dtor << "\n% Copyright: ";
+               tor( DEBUG_ver ) << "\n% Copyright: ";
        }
        | YYTRACK_NAME {
-               dtor << "\n% Track  name: ";
+               tor( DEBUG_ver ) << "\n% Track  name: ";
        }
        | YYINSTRUMENT_NAME {
-               dtor << "\n% Instrument  name: ";
+               tor( DEBUG_ver ) << "\n% Instrument  name: ";
        }
        | YYLYRIC {
-               dtor << "\n% Lyric: ";
+               tor( DEBUG_ver ) << "\n% Lyric: ";
        }
        | YYMARKER {
-               dtor << "\n% Marker: ";
+               tor( DEBUG_ver ) << "\n% Marker: ";
        }
        | YYCUE_POINT {
-               dtor << "\n% Cue point: ";
+               tor( DEBUG_ver ) << "\n% Cue point: ";
        }
        ;
 
index bab5dfabb7c756cf197a8dd19abc20c357422ee1..0c0bb5098d89c9ce112743e36ec0f4ea7ed9e194 100644 (file)
@@ -25,36 +25,32 @@ Midi_score::add_track( Midi_track* midi_track_p )
 int
 Midi_score::output_mudela( String filename_str )
 {
-       mtor << "Lily output to " << filename_str << " ..." << endl;
+       tor( NORMAL_ver ) << "Lily output to " << filename_str << " ..." << endl;
 
        int track_i = 0;
        Lily_stream lily_stream( filename_str );
        for ( PCursor<Midi_track*> i( midi_track_p_list_.top() ); i.ok(); i++ ) {
-               mtor << "track " << track_i++ << ": " << flush;
+               tor( NORMAL_ver ) << "track " << track_i++ << ": " << flush;
                i->output_mudela( lily_stream );
                lily_stream.newline();
-               mtor << endl;
-       }
-
-       lily_stream << "score {";
-       lily_stream.newline();
-
-       for ( PCursor<Midi_track*> i( midi_track_p_list_.top() ); i.ok(); i++ ) {
-               lily_stream << "\tstaff { melodic music { ";
-               lily_stream << i->name_str();
-               lily_stream << " } }";
-               lily_stream.newline();
+               tor( NORMAL_ver ) << endl;
        }
 
+       lily_stream << "\\score{";
        lily_stream.indent();
-               lily_stream << "commands {";
-               lily_stream.indent();
-                       // not use silly 0 track
-                       midi_track_p_list_.bottom()->midi_time_p_->output_mudela( lily_stream, true );
+               for ( PCursor<Midi_track*> i( midi_track_p_list_.top() ); i.ok(); i++ ) {
+                       lily_stream << "\\staff{ ";
+                       lily_stream << i->name_str();
+                       lily_stream << " }";
+                       lily_stream.newline();
+               }
+               lily_stream.newline();
+               lily_stream << "\\paper{";
+                       lily_stream.indent();
+                       lily_stream << "\\unitspace 20\\mm";
                        lily_stream.tnedni();
                lily_stream << "}";
-               lily_stream.newline();
-               lily_stream << "midi {";
+               lily_stream << "\\midi{";
                        lily_stream.indent();
                        // not use silly 0 track
                        midi_track_p_list_.bottom()->midi_tempo_p_->output_mudela( lily_stream, true );
@@ -73,9 +69,9 @@ Midi_score::process()
 {
        int track_i = 0;
        for ( PCursor<Midi_track*> i( midi_track_p_list_.top() ); i.ok(); i++ )  {
-               mtor << "track " << track_i++ << ": " << flush;
+               tor( NORMAL_ver ) << "track " << track_i++ << ": " << flush;
                i->process();
-               mtor << endl;
+               tor( NORMAL_ver ) << endl;
        }
 }
 
index 6a20de9d208b4bbce08dd9820b3d5c41aa57c89c..18de844098b55da6ee090175ad65210f27c577cc 100644 (file)
@@ -30,7 +30,7 @@ Midi_track::add_begin_at( PointerList<Midi_voice*>& open_voices_r, Moment mom )
 {
        for ( PCursor<Midi_voice*> i( midi_voice_p_list_.top() ); i.ok(); i++ )
                if ( i->begin_mom() == mom ) {
-                       dtor << "open_voices (" << open_voices_r.size() << "): +1\n";
+                       tor( DEBUG_ver ) << "open_voices (" << open_voices_r.size() << "): +1\n";
                        open_voices_r.bottom().add( *i );
                }
 }
@@ -104,75 +104,92 @@ Midi_track::process()
        for ( PCursor<Track_column*> i( tcol_p_list_.top() ); i.ok(); i++ ) {
                int bars_i = (int)( i->mom() / bar_mom );
                if ( bars_i > bar_i )
-                       mtor << '[' << bar_i << flush; 
+                       tor( NORMAL_ver ) << '[' << bar_i << flush; 
                while ( i->midi_event_p_list_.size() ) 
-                       // shit, where has the T* PCursor::remove() gone??
-                       // i don-t want to get and delete, 
-                       // i want to (re)move!
-                       // is it renamed: get vs add/insert ?? (put/remove :-)  
                        get_free_midi_voice_l( i->mom() )->add_event( i->midi_event_p_list_.top().remove_p() );
                if ( bars_i > bar_i ) {
-                       bar_i++;
-                       mtor << ']' << flush; 
+                       bar_i = bars_i;
+                       tor( NORMAL_ver ) << ']' << flush; 
                }
        }
 
-       dtor << "ends: " << endl;
+       tor( DEBUG_ver ) << "ends: " << endl;
        int n = 0;
        for ( PCursor<Midi_voice*> i( midi_voice_p_list_.top() ); i.ok(); i++ ) 
-               vtor << "voice " << n++ << ": " << i->end_mom() << endl;
-       dtor << ":sdne" << endl;
+               tor( VERBOSE_ver ) << "voice " << n++ << ": " << i->end_mom() << endl;
+       tor( DEBUG_ver ) << ":sdne" << endl;
 }
 
 
 void
 Midi_track::output_mudela( Lily_stream& lily_stream_r )
 {
-       lily_stream_r << name_str_ << " = music { $";
+       lily_stream_r << name_str_ << " = \\melodic{";
        lily_stream_r.indent();
        lily_stream_r << "% midi copyright:" << copyright_str_;
        lily_stream_r.newline();
        lily_stream_r << "% instrument:" << instrument_str_;
        lily_stream_r.newline();
 
-       int bar_i = 1;
+       int bar_i = 0;
        Moment bar_mom = midi_time_p_->bar_mom();
 
        PointerList<Midi_voice*> open_voices;
        Moment now_mom = 0.0;
        Moment then_mom = 0.0;
        while ( now_mom < end_mom() ) {
-               int bars_i = (int)( now_mom / bar_mom );
+               int bars_i = (int)( now_mom / bar_mom ) + 1;
                if ( bars_i > bar_i )
-                       mtor << '[' << bar_i << flush; 
+                       tor( NORMAL_ver ) << '[' << flush; 
+
+               if ( bars_i > bar_i ) { 
+                       Moment into_bar_mom = now_mom - ( bars_i - 1 ) * bar_mom;
+                       if ( bars_i > 1 ) {
+                               if ( !into_bar_mom )
+                                       lily_stream_r << "|";
+                               lily_stream_r.newline();
+                       }
+                       lily_stream_r << "% " << String_convert::i2dec_str( bars_i, 0, ' ' );
+                       if ( into_bar_mom )
+                               lily_stream_r << ":" << Duration_convert::dur2_str( Duration_convert::mom2_dur( into_bar_mom ) );
+                       lily_stream_r.newline();
+               }
+
                add_begin_at( open_voices, now_mom );
 
                Moment begin_mom = next_begin_mom( now_mom ); 
+
+               if ( bars_i > bar_i )
+                       tor( NORMAL_ver ) << bars_i << flush; 
+
                Moment end_mom = next_end_mom( now_mom ); 
                if ( ( begin_mom > now_mom ) && ( begin_mom < end_mom ) )
                        then_mom = begin_mom;
                else 
                        then_mom = end_mom;
 
-               dtor << "begin: " << begin_mom << " end: " << end_mom << endl;
-               dtor << "slice: " << now_mom << ", " << then_mom << endl;
+               tor( DEBUG_ver ) << "begin: " << begin_mom << " end: " << end_mom << endl;
+               tor( DEBUG_ver ) << "slice: " << now_mom << ", " << then_mom << endl;
 
                if ( open_voices.size() > 1 )
-                       lily_stream_r << "{ ";
+                       lily_stream_r << "< ";
                for ( PCursor<Midi_voice*> i( open_voices.top() ); i.ok(); i++ )
                        lily_stream_r << i->mudela_str( now_mom, then_mom, open_voices.size() - 1 );
                if ( open_voices.size() > 1 )
-                       lily_stream_r << "} ";
+                       lily_stream_r << "> ";
                now_mom = then_mom;
 
                remove_end_at( open_voices, now_mom );
                if ( bars_i > bar_i ) {
-                       bar_i++;
-                       mtor << ']' << flush; 
+                       bar_i = bars_i;
+                       tor( NORMAL_ver ) << ']' << flush; 
                }
        }
+       bar_i++;
+       tor( NORMAL_ver ) << '[' << bar_i << ']' << flush; 
+
        lily_stream_r.tnedni();
-       lily_stream_r << "$} % " << name_str_;
+       lily_stream_r << "} % " << name_str_;
        lily_stream_r.newline();
 }
 
@@ -182,8 +199,8 @@ Midi_track::remove_end_at( PointerList<Midi_voice*>& open_voices_r, Moment mom )
        for ( PCursor<Midi_voice*> i( open_voices_r.top() ); i.ok(); i++ )
 //             if ( i->end_mom() == mom ) {
                if ( i->end_mom() <= mom ) {
-                       dtor << "open_voices (" << open_voices_r.size() << "): -1\n";
-                       i.remove_p();  // remove? // no delete; only a copy
+                       tor( DEBUG_ver ) << "open_voices (" << open_voices_r.size() << "): -1\n";
+                       i.remove_p();
                        if ( !i.ok() )
                                break;
                }
index e963be2f1c24bb7d83cfcdc6fcea2acbdb56f419..5d476ddcc5b79b53dbef5437cda66508693b29aa 100644 (file)
@@ -26,12 +26,12 @@ Moment
 Midi_voice::end_mom()
 {
        Moment now_mom = begin_mom_;
-       dtor << now_mom << ", ";
+       tor( DEBUG_ver ) << now_mom << ", ";
        for ( PCursor<Midi_event*> i( midi_event_p_list_.top() ); i.ok(); i++ ) {
-               dtor << now_mom << ", ";
+               tor( DEBUG_ver ) << now_mom << ", ";
                now_mom += i->mom();
        }
-       dtor << endl;
+       tor( DEBUG_ver ) << endl;
        return now_mom;
 }
 
@@ -56,7 +56,7 @@ Midi_voice::mudela_str( Moment from_mom, Moment to_mom, bool multiple_bo )
        }
        
        if ( str.length_i() && multiple_bo )
-               str = "\\music{ " + str + "} ";
+               str = "{ " + str + "} ";
        return str;
 }
 
index ba578d1dfc5bf21719fa8c515dedc3a311210db3..8893005c76758d5878d00c0d00791959fb765737 100644 (file)
@@ -15,21 +15,21 @@ My_midi_lexer* midi_lexer_l_g = 0;
 
 My_midi_lexer::My_midi_lexer( String &filename_str, Sources * sources )
 {
-    source_file_p_ =sources->get_file_l(filename_str);
-    switch_streams( source_file_p_->istream_l() );
+    source_file_l_ =sources->get_file_l(filename_str);
+    switch_streams( source_file_l_->istream_l() );
     errorlevel_i_ = 0;
     char_count_ = 0;
 }
 
 My_midi_lexer::~My_midi_lexer()
 {
-    delete source_file_p_;
+//    delete source_file_p_;
 }
 
 void
 My_midi_lexer::error( char const* sz_l )
 {
-    if ( !source_file_p_ ) {
+    if ( !source_file_l_ ) {
        cerr << "error at EOF" << sz_l << '\n';
     } else {
        char const* ch_C = here_ch_C();
@@ -47,7 +47,7 @@ My_midi_lexer::error( char const* sz_l )
 char const*
 My_midi_lexer::here_ch_C()
 {
-    return source_file_p_->ch_C() + char_count_ ;
+    return source_file_l_->ch_C() + char_count_ ;
 }
 
 int
index 9a7ece723b412c50676f1f86ee70e48a3538f26c..1530e36ac81d06fb1f7d52107ac2aef5c04c4b12 100644 (file)
@@ -113,7 +113,7 @@ My_midi_parser::note_end_midi_event_p( int channel_i, int pitch_i, int dyn_i )
 //     assert( start_i64 != -1 ); // did we start?
 
        Duration dur( 0 );
-       if ( Duration_convert::be_blonde_b_s )
+       if ( Duration_convert::no_quantify_b_s )
                dur = Duration_convert::ticks2_dur( (I64)now_i64_ - start_i64 );
        else
                dur = Duration_convert::ticks2standardised_dur( (I64)now_i64_ - start_i64 );
@@ -124,7 +124,7 @@ int
 My_midi_parser::output_mudela( String filename_str )
 {
        assert( midi_score_p_ );
-       mtor << "\nProcessing..." << endl;
+       tor( NORMAL_ver ) << "\nProcessing..." << endl;
        midi_score_p_->process();
        return midi_score_p_->output_mudela( filename_str );
 }
@@ -132,7 +132,7 @@ My_midi_parser::output_mudela( String filename_str )
 int
 My_midi_parser::parse()
 {
-       mtor << "\nParsing..." << flush;
+       tor( NORMAL_ver ) << "\nParsing..." << flush;
        return ::yyparse();
 }