]> git.donarmstrong.com Git - lilypond.git/commitdiff
release: 1.3.115 release/1.3.115
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 4 Dec 2000 16:42:18 +0000 (17:42 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 4 Dec 2000 16:42:18 +0000 (17:42 +0100)
===========

* Bugfix: convert-ly

* Bugfix: Included FAQ.txt in the top directory

* Allow for instrument names with multiple lines and font selection,
  see input/test/coriolan-margin.ly

* Added example for figured bass: input/test/figbass.ly

1.3.114.l

46 files changed:
CHANGES
Documentation/topdocs/FAQ.texi
Documentation/user/GNUmakefile
FAQ.txt [new file with mode: 0644]
VERSION
input/test/GNUmakefile
input/test/coriolan-margin.ly
input/test/figured-bass.ly [new file with mode: 0644]
input/test/time.ly
lily/all-font-metrics.cc
lily/auto-change-music.cc
lily/context-specced-music.cc
lily/grace-music.cc
lily/include/auto-change-music.hh
lily/include/context-specced-music.hh
lily/include/grace-music.hh
lily/include/lyric-combine-music.hh
lily/include/music-wrapper.hh
lily/include/music.hh
lily/include/part-combine-music.hh
lily/include/relative-music.hh
lily/include/repeated-music.hh
lily/include/time-scaled-music.hh
lily/include/transposed-music.hh
lily/instrument-name-engraver.cc
lily/lyric-combine-music.cc
lily/music-sequence.cc
lily/music-wrapper.cc
lily/music.cc
lily/parser.yy
lily/part-combine-music.cc
lily/relative-octave-music.cc
lily/repeated-music.cc
lily/request.cc
lily/tie-engraver.cc
lily/time-scaled-music.cc
lily/translator-group.cc
lily/transposed-music.cc
make/out/lilypond.lsm
make/out/lilypond.spec
make/toplevel.make.in
scm/lily.scm
scm/translator-description.scm
scm/translator-properties.scm
scripts/abc2ly.py
scripts/convert-ly.py

diff --git a/CHANGES b/CHANGES
index aa2ce1f6de7463d22b766079fbdceb12dfe8a70b..743168d42661544ef835cf30d95285b8bda7c10a 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,11 +1,54 @@
-1.3.114.jcn1
-============
 
-* Moved writing of \header strings feature from lilypond-book to lilypond.
 
-1.3.113.jcn2
+1.3.114.mb1
+===========
+
+* Bugfix: convert-ly
+
+* Bugfix: Included FAQ.txt in the top directory
+
+* Allow for instrument names with multiple lines and font selection,
+  see input/test/coriolan-margin.ly
+
+* Added example for figured bass: input/test/figbass.ly
+
+1.3.114.lec1
 ============
 
+* abc2ly fixes
+       * allow a g_8 clef to be specified by treble8
+
+       * allow full mode names, as well as 3 character abbreviations
+
+       * support breves and longas (no abc program that I know of has
+         longas, but a couple of them have breves, and one can always hope.)
+
+       * translate text annotations beginning with _ and ^ for above and 
+         below the staff.
+
+       * quote lyrics syllables with (
+
+       * handle real repeat syntax, for appropriately written ABC.
+
+       * %%LY slyrics now works for longer than one character lyric strings.
+
+       * N: fields are now in header.
+
+1.3.114.uu1
+===========
+
+* Prepare for Music type-unification: remove all args from Music
+constructor, and set everything in the parser.
+
+* Moved writing of \header strings feature from lilypond-book to lilypond. (1.3.114.jcn1)
+
+* Bugfix: tied chords.
+
+* Turn off .info creation by default.
+
+1.3.114
+=======
+
 * Moved all documentation from regtest to individual example files.
 
 * Added feature to lilypond-book to write out \header texidoc string.
index 4f9cf328468c669eb1764b5bb6206fd9aa714b7e..080ee097ede9302f8f573133cee2e246bc9878bc 100644 (file)
@@ -34,15 +34,6 @@ FAQs}.  Also, please look in the searchable mailinglist archives:
 If you are still at loss, send your questions to the @strong{mailing
 list}, and not to authors directly.
 
-@subsection My symbols are all messed up!
-
-After I upgraded, I get the wrong symbols and dvi-checksum errors!
-
-We obviously mucked with the fonts in the upgrade.  Remove @strong{all}
-previous fonts, including the @file{.pk} and @file{.tfm} fonts in
-@file{/var/lib/texmf} and your current directory.  A script automating
-this has been included, see @file{buildscripts/clean-fonts.sh}.
-
 @node Installation
 @section Installation
 
index bff671da11972201726a2c190da08e88d1a5a506..906ea48fb58a09f5fcd4cb8010e1ee6277ed5f7e 100644 (file)
@@ -18,7 +18,7 @@ PS_FILES = $(DVI_FILES:.dvi=.ps)  $(OUTDOC_FILES:.doc=.ps) $(OUTTEX_FILES:.tex=.
 
 PS_GZ_FILES= $(addsuffix .gz, $(PS_FILES))
 
-INFO_FILES = $(addprefix $(outdir)/, lilypond.info lilypond-internals.info)
+INFO_FILES = $(addprefix $(outdir)/, lilypond.info lilypond-internals.info)
 
 STEPMAKE_TEMPLATES=tex texinfo documentation
 LOCALSTEPMAKE_TEMPLATES=lilypond ly
@@ -32,11 +32,12 @@ ps: $(PS_FILES)
 # Cancel default info rule
 $(outdir)/%.info: $(outdir)/%.texi
 
+default: 
+
 # info is now built by default via texinfo-rules
 # we must build them by default, otherwise they get built during make install
 info: $(INFO_FILES)
 
-default: 
 
 DEEP_HTML_FILES = $(outdir)/lilypond/lilypond.html $(outdir)/lilypond-internals/lilypond-internals.html
 
diff --git a/FAQ.txt b/FAQ.txt
new file mode 100644 (file)
index 0000000..eee25e0
--- /dev/null
+++ b/FAQ.txt
@@ -0,0 +1,66 @@
+FAQ - GNU LilyPond Frequently Asked Questions
+*********************************************
+
+General
+=======
+
+I'm stuck, HELP!
+----------------
+
+   Please read the full online FAQs
+(http://appel.lilypond.org/wiki?LilyPondFaqs).  Also, please look in
+the searchable mailinglist archives:
+
+   * help-gnu-music (http://www.mail-archive.com/help-gnu-music@gnu.org)
+
+   * bug-gnu-music (http://www.mail-archive.com/bug-gnu-music@gnu.org)
+
+   * gnu-music-discuss
+     (http://www.mail-archive.com/gnu-music-discuss@gnu.org)
+
+   If you are still at loss, send your questions to the *mailing list*,
+and not to authors directly.
+
+Installation
+============
+
+Where is guile, libguileX, guile-config?
+----------------------------------------
+
+   RedHat users need to install guile-1.4 and guile-devel-1.4, Debian
+users need to get guile1.4, libguile9 and libguile9-dev.
+
+   If you're building from source, you need guile 1.3.4 or newer.
+Verify that the correct guile, guile-config, and libguile* in your PATH
+and LD_LIBRARY_PATH (or `/etc/ld.so.conf').
+
+I upgraded by applying a patch, and now my configure/build breaks.
+------------------------------------------------------------------
+
+   Patches don't include automatically generated files, i.e.
+`configure' and files generated by `configure'.  Regenerate them
+yourself:
+
+         autoconf
+         configure
+
+Is there an emacs mode?
+-----------------------
+
+   Yes.  It is included with the source archive as `lilypond-mode.el'
+and `lilypond-font-lock.el'.  If you have an RPM or .deb it is in
+`/usr/share/doc/lilypond-X/'.  You have to install it yourself.
+
+   Add this to your .emacs.el:
+         (load-library "lilypond-mode.el")
+         (setq auto-mode-alist
+          (append '(("\\.ly$" . LilyPond-mode) auto-mode-alist)))
+
+I downloaded the windows32 port, and it doesn't match the website!
+------------------------------------------------------------------
+
+   The website is usually made from the latest snapshots.  Binary
+releases, in particular the windows32 binaries, are only made every
+once in a while.  They may lag several versions behind the latest
+version.
+
diff --git a/VERSION b/VERSION
index 73a41db9ce3c2bcae240d39221c02934127d2b12..b94cd0f76c0ba9e25bff2be4e523826adde4381e 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,8 +1,8 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
-PATCH_LEVEL=114
-MY_PATCH_LEVEL=jcn1
+PATCH_LEVEL=115
+MY_PATCH_LEVEL=
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index f044715b2f7646b5fa418ce3d31717822c342bf2..d3df72fc77e907d2196960e72ee93c43ad579fbb 100644 (file)
@@ -4,5 +4,7 @@ depth = ../..
 examples=  font20  
 LOCALSTEPMAKE_TEMPLATES=mutopia
 
+EXTRA_DISTFILES=features.abc
+
 include $(depth)/make/stepmake.make 
 
index 30bb13b0809a646a8b2f477090908b51bfd82265..26bd470d44ee738408d6c784e29252d967065867 100644 (file)
@@ -1,3 +1,6 @@
+
+#(define raisedflat '((raise . 0.4) (music (named "accidentals--1"))))
+
 flauti = \notes \relative c' {
   \property Staff.instrument   = #"2 Flauti"
   \property Staff.instr                = #"Fl."
@@ -16,8 +19,8 @@ oboi = \notes \relative c' {
 }
 
 clarinetti = \notes \relative c' {
-  \property Staff.instrument   = #"2 Clarinetti\n(B\\textflat)"
-  \property Staff.instr                = #"Cl.\n(B\\textflat)"
+  \property Staff.instrument   = #`(lines "2 Clarinetti" (rows "(B" ,raisedflat ")"))
+  \property Staff.instr                = #`(lines "Cl." (rows "(B" ,raisedflat ")"))
 
   c1 c
 }
@@ -29,21 +32,21 @@ fagotti = \notes \relative c' {
 }
 
 corni = \notes \relative c' {
-  \property Staff.instrument   = #"2 Corni\n(E\\textflat)"
-  \property Staff.instr                = #"Cor.\n(E\\textflat)"
+  \property Staff.instrument   = #`(lines "2 Corni" (rows "(E" ,raisedflat ")"))
+  \property Staff.instr                = #`(lines "Cor." (rows "(E" ,raisedflat ")"))
 
   c1 c
 }
 
 trombe = \notes \relative c' {
-  \property Staff.instrument   = #"2 Trombe\n(C)"
-  \property Staff.instr                = #"Tbe.\n(C)"
+  \property Staff.instrument   = #'(lines "2 Trombe" "(C)")
+  \property Staff.instr                = #'(lines "Tbe." "(C)")
 
   c1 c
 }
 
 timpani = \notes \relative c' {
-  \property Staff.instrument   = #"Timpani\n(C-G)"
+  \property Staff.instrument   = #'(lines "Timpani" "(C-G)")
   \property Staff.instr                = #"Timp."
 
   c1 c
@@ -69,8 +72,8 @@ viola = \notes \relative c' {
 }
 
 violoncello = \notes \relative c' {
-  \property Staff.instrument   = #"Violoncello\ne\nContrabasso"
-  \property Staff.instr                = #"Vc.\nCb."
+  \property Staff.instrument   = #'(lines "Violoncello" "e" "Contrabasso")
+  \property Staff.instr                = #'(lines "Vc." "Cb.")
   c1 c
 }
 
diff --git a/input/test/figured-bass.ly b/input/test/figured-bass.ly
new file mode 100644 (file)
index 0000000..f019ea5
--- /dev/null
@@ -0,0 +1,26 @@
+% Example of figured bass, using text scripts.
+% (An alternative is to use a lyrics line if you want the figures
+% aligned vertically.)
+
+\version "1.3.112";
+
+% Scheme macros for accidentals. Note how they can be combined
+% with other strings, for example in: d^#`(rows ,sharp "4")
+
+#(define sharp '((raise . 0.2) (music (named "accidentals-1"))))
+#(define natural '((raise . 0.2) (music (named "accidentals-0"))))
+#(define flat '((raise . 0.2) (music (named "accidentals--1"))))
+
+
+\score{
+  \notes \relative c'{
+    \clef bass;
+
+      c^"5" d^#natural g,^"7 6" [a8 e] |
+      fis4^"7 6" [g8 d] e4^"7 6" [f?8 c] |
+      [d^#sharp d b g][c^"7" c^"5" a^"6" f] |
+      [bes^"7" bes^"5" g^"6" e] a4^#sharp d^"6" ~ |
+      d^#`(rows ,sharp "4") c^"6" d e^#sharp |
+  }
+}
+
index d97e700df666cfbf2bb11d8cdef159cf2c7c7f87..0731002786adf66b08b84ed429dae797b91a3edc 100644 (file)
 \score { 
   \context Voice \notes\relative c {
-    \property Staff.textEmptyDimension = 1
-       \property Voice.textEmptyDimension = 1
-       \property Staff.timeSignatureStyle = "C"
-       \time 1/1;
-       c''1^"timeSignatureStyle = \"C\"" 
-       \time 2/2
-       c1 
-       \time 2/4; 
-       c2 
-       \time 3/4; 
-       c2. 
-       \time 4/4; 
-       c1 
-       \time 5/4; 
-       c2. c2 
-       \time 6/4
-       c1. 
-       \time 3/2
-       c1
-       \time 7/4; 
-       c1 c2. 
-       \time 8/4; 
-       c\breve
-       \time 9/4; 
-       c2. c2. c2. 
-       \break
-       \property Staff.timeSignatureStyle = "old"
-       \time 1/1
-       c1^"timeSignatureStyle = \"old\"" 
-       \time 2/2
-       c1 
-       \time 2/4; 
-       c2 
-       \time 3/4; 
-       c2. 
-       \time 4/4; 
-       c1 
-       \time 5/4; 
-       c2. c2 
-       \time 6/4
-       c1. 
-       \time 3/2
-       c1
-       \time 7/4; 
-       c1 c2. 
-       \time 8/4; 
-       c\breve 
-       \time 9/4
-       c2. c2. c2. 
-       \time 6/8; 
-       c2
-       \time 9/8; 
-       c4. c4. c4. 
-       \break
-       \property Staff.timeSignatureStyle = ""
-       \time 1/1; 
-       c1^"timeSignatureStyle = \"\"" 
-       \time 2/2; 
-       c1
-       \time 2/4; 
-       c2 
-       \time 3/4; 
-       c2.
-       \time 4/4; 
-       c1
-       \time 5/4; 
-       c2. c2
-       \time 6/4; 
-       c1.
-       \time 3/2; 
-       c1.
-       \time 7/4; 
-       c1 c2.
-       \time 8/4; 
-       c\breve 
-       \time 9/4; 
-       c2. c2. c2.
-       \break
-       \property Staff.timeSignatureStyle = "1"
-       \time 1/1; 
-       c1^"timeSignatureStyle = \"1\""
-       \time 2/2; 
-       c1
-       \time 2/4; 
-       c2 
-       \time 3/4; 
-       c2.
-       \time 4/4; 
-       c1
-       \time 5/4; 
-       c2. c2
-       \time 6/4; 
-       c1.
-       \time 3/2; 
-       c1.
-       \time 7/4; 
-       c1 c2.
-       \time 8/4; 
-       c\breve 
-       \time 9/4; 
-       c2. c2. c2. 
-       \break
-       \property Staff.textalignment = \center
-       \property Staff.timeSignatureStyle = "old9/8"
-       \time 1/1; 
-       c1^"old9/8" 
-       \property Staff.timeSignatureStyle = "old6/8" 
-       \time 1/1; 
-       c1^"old6/8" 
-       \property Staff.timeSignatureStyle = "old6/8alt" 
-       \time 1/1; 
-       c1^"old6/8alt" 
-       \property Staff.timeSignatureStyle = "old9/4"
-       \time 1/1; 
-       c1^"old9/4" 
-       \property Staff.timeSignatureStyle = "old6/4" 
-       \time 1/1; 
-       c1^"old6/4" 
-       \property Staff.timeSignatureStyle = "old3/2"
-       \time 1/1; 
-       c1^"old3/2" 
-       \property Staff.timeSignatureStyle = "old4/4"
-       \time 1/1; 
-       c1^"old4/4" 
-       \property Staff.timeSignatureStyle = "old2/2"
-       \time 1/1; 
-       c1^"old2/2"
-       \property Staff.timeSignatureStyle = "old2/4"
-       \time 1/1; 
-       c1^"old2/4" 
-       \property Staff.timeSignatureStyle = "old4/8"
-       \time 1/1; 
-       c1^"old4/8"
-       \property Staff.timeSignatureStyle = "C4/4"
-       \time 1/1; 
-       c1^"C4/4" 
-       \property Staff.timeSignatureStyle = "C2/2"
-       \time 1/1; 
-       c1^"C2/2" 
-       
+    \property Staff.TimeSignature \override #'style = #'C
+    \time 1/1;
+    c''1^"TimeSignature style = \#'C" 
+    \time 2/2; 
+    c1 
+    \time 2/4
+    c2 
+    \time 3/4; 
+    c2. 
+    \time 4/4; 
+    c1 
+    \time 5/4; 
+    c2. c2 
+    \time 6/4; 
+    c1. 
+    \time 3/2
+    c1. 
+    \time 7/4
+    c1 c2
+    \time 8/4; 
+    c\breve
+    \time 9/4; 
+    c2. c2. c2. 
+    \break
+    \property Staff.TimeSignature \set #'style = #'old
+    \time 1/1; 
+    c1^"TimeSignature style = \#'old" 
+    \time 2/2
+    c1 
+    \time 2/4
+    c2 
+    \time 3/4; 
+    c2. 
+    \time 4/4; 
+    c1 
+    \time 5/4; 
+    c2. c2 
+    \time 6/4; 
+    c1. 
+    \time 3/2
+    c1. 
+    \time 7/4
+    c1 c2
+    \time 8/4; 
+    c\breve 
+    \time 9/4; 
+    c2. c2. c2. 
+    \time 6/8
+    c2. 
+    \time 9/8; 
+    c4. c4. c4
+    \break
+    % Lilypond doesn't understand 'default => it does what you want
+    \property Staff.TimeSignature \set #'style = #'default
+    \time 1/1; 
+    c1^"TimeSignature style = \#'default"
+    \time 2/2; 
+    c1
+    \time 2/4; 
+    c2 
+    \time 3/4; 
+    c2.
+    \time 4/4; 
+    c1
+    \time 5/4; 
+    c2. c2
+    \time 6/4; 
+    c1.
+    \time 3/2; 
+    c1.
+    \time 7/4; 
+    c1 c2.
+    \time 8/4; 
+    c\breve 
+    \time 9/4; 
+    c2. c2. c2.
+    \break
+    % If the style starts with a '1', you get this style
+    \property Staff.TimeSignature \set #'style = #'1style
+    \time 1/1; 
+    c1^"TimeSignature style = \#'1xxx"
+    \time 2/2; 
+    c1
+    \time 2/4; 
+    c2 
+    \time 3/4; 
+    c2.
+    \time 4/4; 
+    c1
+    \time 5/4; 
+    c2. c2
+    \time 6/4; 
+    c1.
+    \time 3/2; 
+    c1.
+    \time 7/4; 
+    c1 c2.
+    \time 8/4; 
+    c\breve 
+    \time 9/4; 
+    c2. c2. c2. 
+    \break
+    \property Staff.TextScript \override #'self-alignment-X = #1
+    \property Staff.TimeSignature \set #'style = #'old9/8
+    \time 1/1; 
+    c1^"old9/8" 
+    \property Staff.TimeSignature \set #'style = #'old6/8
+    \time 1/1; 
+    c1^"old6/8" 
+    \property Staff.TimeSignature \set #'style = #'old6/8alt
+    \time 1/1; 
+    c1^"old6/8alt" 
+    \property Staff.TimeSignature \set #'style = #'old9/4
+    \time 1/1; 
+    c1^"old9/4" 
+    \property Staff.TimeSignature \set #'style = #'old6/4
+    \time 1/1; 
+    c1^"old6/4" 
+    \property Staff.TimeSignature \set #'style = #'old3/2
+    \time 1/1; 
+    c1^"old3/2" 
+    \property Staff.TimeSignature \set #'style = #'old4/4
+    \time 1/1; 
+    c1^"old4/4" 
+    \property Staff.TimeSignature \set #'style = #'old2/2
+    \time 1/1; 
+    c1^"old2/2"
+    \property Staff.TimeSignature \set #'style = #'old2/4
+    \time 1/1; 
+    c1^"old2/4" 
+    \property Staff.TimeSignature \set #'style = #'old4/8
+    \time 1/1; 
+    c1^"old4/8"
+    \property Staff.TimeSignature \set #'style = #'C4/4
+    \time 1/1; 
+    c1^"C4/4" 
+    \property Staff.TimeSignature \set #'style = #'C2/2
+    \time 1/1; 
+    c1^"C2/2" 
+    
   }
   \paper { }  
   \midi { }
index fd34ea57a210a6aef74f2b7bf8495ebf13e06cd1..b678dc5adf2e2e2f0e1e4ddc22047dae7b2e6a51 100644 (file)
@@ -84,12 +84,12 @@ All_font_metrics::find_afm (String name)
 
       if (tfm->info_.checksum != afm->checksum_)
        {
-         String s = _("Font checksum mismatch");
+         String s = _f("Font checksum mismatch for font file `%s'", path.ch_C());
          s+= "\n";
          s += " TFM: " + to_str ((int) tfm->info_.checksum);
          s += " AFM: " + to_str ((int) afm->checksum_);
          s += "\n";
-         s += _(" Rebuild all AFM files, and remove all .pk and .tfm files");
+         s += _(" Rebuild all AFM files, and remove all .pk and .tfm files. Rerun with -V to show font paths.");
 
          error (s);
        }
index d98cd8ed29c29308a1593a65a91f7b81d42610ec..5af0524d964be0299d96e7465df6a35e5e26935d 100644 (file)
@@ -10,7 +10,7 @@
 #include "auto-change-music.hh"
 #include "auto-change-iterator.hh"
 
-Auto_change_music::Auto_change_music (Music * m)
+Auto_change_music::Auto_change_music (SCM m)
   : Music_wrapper (m)
 {
   set_mus_property ("iterator-ctor", Auto_change_iterator::constructor_cxx_function);
index 4c6cbfb47a6e5c1ef56f00b9d5aa91782f921e91..8350fcb098825f94e29d6c7ef88b1d1092c3465a 100644 (file)
@@ -7,7 +7,7 @@
   
  */
 #include "context-specced-music.hh"
-Context_specced_music::Context_specced_music(Music *m)
+Context_specced_music::Context_specced_music(SCM m)
   : Music_wrapper  (m)
 {
   set_mus_property ("type",
index e2928ad6ec4d61834e542ec48e7a7a1e13a7c1cc..a17842339c16c20dacddea893b6242f19bb07c73 100644 (file)
@@ -22,7 +22,7 @@ Grace_music::length_mom () const
   return 0;
 }
 
-Grace_music::Grace_music (Music *p)
+Grace_music::Grace_music (SCM p)
   : Music_wrapper (p)
 {
   set_mus_property ("iterator-ctor",
index f96a354fcb19a2729ce542ed4d83bd6b94c341aa..0451dd1fbaf9495c27514832bfe321c11234968e 100644 (file)
@@ -16,7 +16,7 @@
 class Auto_change_music : public Music_wrapper
 {
 public:
-  Auto_change_music (Music *);
+  Auto_change_music (SCM);
 
 };
 
index 0c293c8166598bbff5b7b5e6ee36b06e9d8b3019..719a37fffb3bec40634b552f1ad0803547cceedf 100644 (file)
@@ -15,7 +15,7 @@
 class Context_specced_music : public Music_wrapper
 {
 public:  
-  Context_specced_music (Music*);
+  Context_specced_music (SCM);
   VIRTUAL_COPY_CONS(Music);
 };
 #endif /* CONTEXT_SPECCED_MUSIC_HH */
index ed9ab73d9f7b498efaaca12fc673d1f5491c0e72..cc015b5c85c629274ef316cd4e0f5042534b8246 100644 (file)
@@ -16,7 +16,7 @@ class Grace_music : public Music_wrapper
 {
 public:
   VIRTUAL_COPY_CONS(Music);
-  Grace_music (Music*);
+  Grace_music (SCM);
 protected:
   virtual void compress (Moment);
   virtual Moment length_mom () const;
index d28a8c5fe38bbd8eb3b2fb07f28259d61ed2cfeb..78b18b0cb2e69a0b1c1db989fda7143e546368e9 100644 (file)
@@ -18,7 +18,7 @@ public:
   Music * music_l () const;
   Music * lyrics_l () const;
   
-  Lyric_combine_music (Music*, Music*);
+  Lyric_combine_music (SCM);
   virtual void transpose (Pitch);
 
   VIRTUAL_COPY_CONS(Music);
index 4f6546c40517c68d570090fb128509efcfcc7364..b5f274cad46c970d2e50cd1becfd41530e2ece04 100644 (file)
@@ -22,7 +22,7 @@
 class Music_wrapper : public Music
 {
 public:
-  Music_wrapper (Music*);
+  Music_wrapper (SCM);
   Music * element () const;
   virtual void transpose (Pitch);
 
index a139ae28d4af589a286a80b0a8576d433238f555..c6b5339e4f7db7dd80882bca9c7d8e0fb043b07b 100644 (file)
@@ -57,13 +57,11 @@ public:
   virtual void compress (Moment factor);
   VIRTUAL_COPY_CONS(Music);
   Music (Music const &m);
-  Music();
+  Music (SCM);
 protected:
-
   DECLARE_SMOBS(Music,);
   SCM immutable_property_alist_;
   SCM mutable_property_alist_;
 };
 
 
index ed0b560a9f8910758c7ef8715c72cd91b635a47e..4314b864717fd6bd398582e8a6d8486c58608bce 100644 (file)
@@ -17,7 +17,7 @@ class Part_combine_music : public Music
 {
 public:
   VIRTUAL_COPY_CONS (Music);
-  Part_combine_music (SCM what_str, Music*, Music*);
+  Part_combine_music (SCM l);
 
   Music * first_l () const;
   Music * second_l () const;
index 071b34152b420e6652cba95b80d18e69fcb65baf..5a07fbc8a1946932d307e73261667241d0f99b0b 100644 (file)
 class Relative_octave_music : public Music_wrapper
 {
 public:
-  Pitch last_pitch_;
-
-
-  Relative_octave_music (Music*, Pitch);
+  Relative_octave_music (SCM l);
   
   VIRTUAL_COPY_CONS(Music);
   virtual Pitch to_relative_octave (Pitch);
index b2deaee08fa4446f23769b0a9aff0c97aebfcf8b..b7ebb339d8c06ef1fa95dcf2af65b8179f29667a 100644 (file)
@@ -70,8 +70,7 @@ public:
   virtual void compress (Moment factor);
   VIRTUAL_COPY_CONS(Music);
 
-  Repeated_music (Music*, int , Music_sequence*);
-  Repeated_music (Repeated_music const&);
+  Repeated_music (SCM);
 };
 
 
index 21d8e70d87185753f3381fcc6c877a3daa7ac3a5..d184f395d1381ad38e1109c637bb530c26f18c02 100644 (file)
 class Time_scaled_music : public Music_wrapper
 {
 public:
-  int num_i_;
-  int den_i_;
-
-  Time_scaled_music (int, int, Music *);
+  Time_scaled_music (SCM);
   
   VIRTUAL_COPY_CONS(Music);
 };
index 55ff38ff8dcfb26358c5b9f979683cd59765ac0b..641c8a915be895d79beb68b11cd6963680a608f2 100644 (file)
@@ -16,7 +16,7 @@
 class Transposed_music : public Music_wrapper
 {
 public:
-  Transposed_music (Music*, Pitch);
+  Transposed_music (SCM);
   
   VIRTUAL_COPY_CONS(Music);
   virtual Pitch to_relative_octave (Pitch);
index cac8ec76d4e73c69fd9d582859d0613e637a2346..e903781f7e113003a1d65573bb81144c6cb0df86 100644 (file)
@@ -47,17 +47,26 @@ Instrument_name_engraver::stop_translation_timestep ()
     }
 }
 
+/*
+  FIXME: use different mechanics, and use a markup-p function?
+ */
 void
 Instrument_name_engraver::create_text (SCM txt)
 {
   if(!text_)
     {
       text_ = new Item (get_property ("InstrumentName"));
-      text_->set_grob_property ("text", txt);
-
+      if (txt != SCM_EOL)
+        {
+          text_->set_grob_property ("text", txt);
+        }
+      else if (text_->get_grob_property ("text") == SCM_EOL)
+        {
+          return;
+        }
       if (delim_)
-       text_->set_parent (delim_, Y_AXIS);
-
+        text_->set_parent (delim_, Y_AXIS);
+      
       announce_grob (text_,0);
     }
 }
@@ -72,10 +81,10 @@ Instrument_name_engraver::acknowledge_grob (Grob_info i)
       if (now_mom () > Moment (0))
        s = get_property ("instr");
 
-      if (gh_string_p (s))
-       {
+      //      if (gh_string_p (s))
+      //       {
          create_text (s);
-       }
+         //    }
     }
 
   if (Align_interface::has_interface (i.elem_l_)
index a91dcb5644d5c9a0116d29eaf6fe6ba939edc929..51e37f80f591d7ca57092924c25bb8f9c93d26b0 100644 (file)
 #include "lyric-combine-music-iterator.hh"
 #include "pitch.hh"
 
-Lyric_combine_music::Lyric_combine_music (Music * m, Music * l)
+Lyric_combine_music::Lyric_combine_music (SCM l)
+  : Music (l)
 {
-  set_mus_property ("music", m->self_scm ());
-  set_mus_property ("lyrics", l->self_scm ());  
-
   set_mus_property ("iterator-ctor",
                    Lyric_combine_music_iterator::constructor_cxx_function);
 }
index 5fd6206da358ab5120c9e7ee8d0cdf0083ad4b49..5ce5b1a8b9baeff18e7f72929cfe73471bfb2a41 100644 (file)
@@ -51,9 +51,9 @@ Music_sequence::append_music (Music *m)
   scm_unprotect_object (m->self_scm ());
 }
 
-Music_sequence::Music_sequence(SCM h)
+Music_sequence::Music_sequence(SCM l)
+  : Music (l)
 {
-  set_mus_property ("elements", h);
 }
 
 void
index 801af5b8e9c3390d9afea8411b94218380656bd4..c6f7f50b9a0514a7eedbecdce969803ba5e375b1 100644 (file)
@@ -21,10 +21,9 @@ Music_wrapper::transpose (Pitch p)
 }
 
 
-Music_wrapper::Music_wrapper(Music*p)
+Music_wrapper::Music_wrapper(SCM l)
+  : Music (l)
 {
-  set_mus_property ("element", p->self_scm ());
-  scm_unprotect_object (p->self_scm ());
 }
 
 Moment
index b807dec07e0b329f64ca19163eee1fdc3cf5fd84..d4b7d7b1662d1af5fbdf1fab7f303fb2d66ad2a2 100644 (file)
@@ -43,9 +43,9 @@ Music::Music (Music const &m)
 }
 
 
-Music::Music()
+Music::Music(SCM l)
 {
-  immutable_property_alist_ = SCM_EOL;
+  immutable_property_alist_ = l;
   mutable_property_alist_ = SCM_EOL;
   smobify_self ();
 }
index c39f5ecc3213085677164bf29120b8b0730c3165..5d6485132af54fa428aafb6f98db879f71bd7d8e 100644 (file)
@@ -663,13 +663,30 @@ Alternative_music:
 Repeated_music:
        REPEAT STRING bare_unsigned Music Alternative_music
        {
-               Music_sequence* m = dynamic_cast <Music_sequence*> ($5);
-               if (m && $3 < m->length_i ())
+               Music_sequence* alts = dynamic_cast <Music_sequence*> ($5);
+               if (alts && $3 < alts->length_i ())
                        $5->origin ()->warning (_ ("More alternatives than repeats.  Junking excess alternatives."));
+               Music *beg = $4;
+               int times = $3;
 
+               Repeated_music * r = new Repeated_music (SCM_EOL);
+
+               if (beg)
+                       {
+                       r-> set_mus_property ("body", beg->self_scm ());
+                       scm_unprotect_object (beg->self_scm ());
+                       }
+               r->set_mus_property ("repeat-count", gh_int2scm (times >? 1));
+
+               if (alts)
+                       {
+                       alts->truncate (times);
+                       r-> set_mus_property ("alternatives", alts->self_scm ());
+                       scm_unprotect_object (alts->self_scm ());  
+                       }
                SCM func = scm_eval2 (ly_symbol2scm ("repeat-name-to-ctor"), SCM_EOL);
                SCM result = gh_call1 (func, $2);
-               Repeated_music * r = new Repeated_music ($4, $3 >? 1, m);
+
                set_music_properties (r, result);
 
                r->set_spot (*$4->origin ());
@@ -678,25 +695,31 @@ Repeated_music:
        ;
 
 Music_sequence: '{' Music_list '}'     {
-               $$ = new Music_sequence (gh_car ($2));
+               $$ = new Music_sequence (SCM_EOL);
+               $$->set_mus_property ("elements", gh_car ($2));
        }
        ;
 
 Sequential_music:
        SEQUENTIAL '{' Music_list '}'           {
-               $$ = new Sequential_music (gh_car ($3));
+               $$ = new Sequential_music (SCM_EOL);
+               $$->set_mus_property ("elements", gh_car ($3));
        }
        | '{' Music_list '}'            {
-               $$ = new Sequential_music (gh_car ($2));
+               $$ = new Sequential_music (SCM_EOL);
+               $$->set_mus_property ("elements", gh_car ($2));
        }
        ;
 
 Simultaneous_music:
        SIMULTANEOUS '{' Music_list '}'{
-               $$ = new Simultaneous_music (gh_car ($3));
+               $$ = new Simultaneous_music (SCM_EOL);
+               $$->set_mus_property ("elements", gh_car ($3));
+
        }
        | '<' Music_list '>'    {
-               $$ = new Simultaneous_music (gh_car ($2));
+               $$ = new Simultaneous_music (SCM_EOL);
+               $$->set_mus_property ("elements", gh_car ($2));
        }
        ;
 
@@ -714,7 +737,7 @@ Simple_music:
                        THIS->parser_error (_("First argument must be a procedure taking 1 argument"));
                }
 
-         Music *m = new Music;
+         Music *m = new Music (SCM_EOL);
          m->set_mus_property ("predicate", pred);
          m->set_mus_property ("symbol", $3);
          m->set_mus_property ("value",  $5);
@@ -741,7 +764,9 @@ Simple_music:
 
 Composite_music:
        CONTEXT STRING Music    {
-               Context_specced_music *csm =  new Context_specced_music ($3);
+               Context_specced_music *csm =  new Context_specced_music (SCM_EOL);
+               csm->set_mus_property ("element", $3->self_scm ());
+               scm_unprotect_object ($3->self_scm ());
 
                csm->set_mus_property ("context-type",$2);
                csm->set_mus_property ("context-id", ly_str02scm (""));
@@ -749,17 +774,25 @@ Composite_music:
                $$ = csm;
        }
        | AUTOCHANGE STRING Music       {
-               Auto_change_music * chm = new Auto_change_music ($3);
+               Auto_change_music * chm = new Auto_change_music (SCM_EOL);
+               chm->set_mus_property ("element", $3->self_scm ());
+
+               scm_unprotect_object ($3->self_scm ());
                chm->set_mus_property ("what", $2); 
 
                $$ = chm;
                chm->set_spot (*$3->origin ());
        }
        | GRACE Music {
-               $$ = new Grace_music ($2);
+               $$ = new Grace_music (SCM_EOL);
+               $$->set_mus_property ("element", $2->self_scm ());
+               scm_unprotect_object ($2->self_scm ());
+
        }
        | CONTEXT STRING '=' STRING Music {
-               Context_specced_music *csm =  new Context_specced_music ($5);
+               Context_specced_music *csm =  new Context_specced_music (SCM_EOL);
+               csm->set_mus_property ("element", $5->self_scm ());
+               scm_unprotect_object ($5->self_scm ());
 
                csm->set_mus_property ("context-type", $2);
                csm->set_mus_property ("context-id", $4);
@@ -773,24 +806,47 @@ Composite_music:
                bare_unsigned '/' bare_unsigned Music   
 
        {
-               $$ = new Time_scaled_music ($3, $5, $6);
+               int n = $3; int d = $5;
+               Music *mp = $6;
+               $$ = new Time_scaled_music (SCM_EOL);
                $$->set_spot (THIS->pop_spot ());
+
+
+               $$->set_mus_property ("element", mp->self_scm ());
+               scm_unprotect_object (mp->self_scm ());
+               $$->set_mus_property ("numerator", gh_int2scm (n));
+               $$->set_mus_property ("denominator", gh_int2scm (d));
+               $$->compress (Moment (n,d));
+
        }
        | Repeated_music                { $$ = $1; }
        | Simultaneous_music            { $$ = $1; }
        | Sequential_music              { $$ = $1; }
        | TRANSPOSE musical_pitch Music {
-               $$ = new Transposed_music ($3, *unsmob_pitch ($2));
+               $$ = new Transposed_music (SCM_EOL);
+               Music *p = $3;
+               Pitch pit = *unsmob_pitch ($2);
+
+               p->transpose (pit);
+               $$->set_mus_property ("element", p->self_scm ());
+               scm_unprotect_object (p->self_scm ());
        }
        | TRANSPOSE steno_tonic_pitch Music {
-               $$ = new Transposed_music ($3, *unsmob_pitch ($2));
+               $$ = new Transposed_music (SCM_EOL);
+               Music *p = $3;
+               Pitch pit = *unsmob_pitch ($2);
+
+               p->transpose (pit);
+               $$->set_mus_property ("element", p->self_scm ());
+               scm_unprotect_object (p->self_scm ());
+       
        }
        | APPLY embedded_scm Music  {
                SCM ret = gh_call1 ($2, $3->self_scm ());
                Music *m = unsmob_music (ret);
                if (!m) {
                        THIS->parser_error ("\\apply must return a Music");
-                       m = new Music ();
+                       m = new Music (SCM_EOL);
                        }
                $$ = m;
        }
@@ -821,27 +877,48 @@ Composite_music:
 
 relative_music:
        RELATIVE absolute_musical_pitch Music {
-               $$ = new Relative_octave_music ($3, *unsmob_pitch ($2));
+               Music * p = $3;
+               Pitch pit = *unsmob_pitch ($2);
+               $$ = new Relative_octave_music (SCM_EOL);
+
+               $$->set_mus_property ("element", p->self_scm ());
+               scm_unprotect_object (p->self_scm ());
+
+               $$->set_mus_property ("last-pitch", p->to_relative_octave (pit).smobbed_copy ());
+
        }
        ;
 
 re_rhythmed_music:
        ADDLYRICS Music Music {
-               Lyric_combine_music * l = new Lyric_combine_music ($2, $3);
-               $$ = l;
+         Lyric_combine_music * l = new Lyric_combine_music (SCM_EOL);
+         l->set_mus_property ("music", $2->self_scm ());
+         l->set_mus_property ("lyrics", $3->self_scm ());
+         scm_unprotect_object ($3->self_scm ());
+         scm_unprotect_object ($2->self_scm ());
+         $$ = l;
        }
        ;
 
 part_combined_music:
        PARTCOMBINE STRING Music Music {
-               Part_combine_music * p = new Part_combine_music ($2, $3, $4);
+               Part_combine_music * p = new Part_combine_music (SCM_EOL);
+
+               p->set_mus_property ("what", $2);
+               p->set_mus_property ("one", $3->self_scm ());
+               p->set_mus_property ("two", $4->self_scm ());  
+
+               scm_unprotect_object ($3->self_scm());
+               scm_unprotect_object ($4->self_scm());  
+
+
                $$ = p;
        }
        ;
 
 translator_change:
        TRANSLATOR STRING '=' STRING  {
-               Music * t = new Music;
+               Music * t = new Music (SCM_EOL);
                t->set_mus_property ("iterator-ctor",
                        Change_iterator::constructor_cxx_function);
                t-> set_mus_property ("change-to-type", $2);
@@ -854,54 +931,66 @@ translator_change:
 
 property_def:
        PROPERTY STRING '.' STRING '='  scalar {
-               Music *t = new Music;
+               Music *t = new Music (SCM_EOL);
 
                t->set_mus_property ("iterator-ctor",
                        Property_iterator::constructor_cxx_function);
                t->set_mus_property ("symbol", scm_string_to_symbol ($4));
                t->set_mus_property ("value", $6);
 
-               Context_specced_music *csm = new Context_specced_music (t);
+               Context_specced_music *csm = new Context_specced_music (SCM_EOL);
+
+               csm->set_mus_property ("element", t->self_scm ());
+               scm_unprotect_object (t->self_scm ());
+
                $$ = csm;
                $$->set_spot (THIS->here_input ());
 
                csm-> set_mus_property ("context-type", $2);
        }
        | PROPERTY STRING '.' STRING SET embedded_scm '=' embedded_scm {
-               Music *t = new Music;
+               Music *t = new Music (SCM_EOL);
                t->set_mus_property ("iterator-ctor",
                        Push_property_iterator::constructor_cxx_function);
                t->set_mus_property ("symbols", scm_string_to_symbol ($4));
                t->set_mus_property ("pop-first", SCM_BOOL_T);
                t->set_mus_property ("grob-property", $6);
                t->set_mus_property ("grob-value", $8);
-               Context_specced_music *csm = new Context_specced_music (t);
+               Context_specced_music *csm = new Context_specced_music (SCM_EOL);
+               csm->set_mus_property ("element", t->self_scm ());
+               scm_unprotect_object (t->self_scm ());
                $$ = csm;
                $$->set_spot (THIS->here_input ());
 
                csm-> set_mus_property ("context-type", $2);
        }
        | PROPERTY STRING '.' STRING OVERRIDE embedded_scm '=' embedded_scm {
-               Music *t = new Music;
+               Music *t = new Music (SCM_EOL);
                t->set_mus_property ("iterator-ctor",
                        Push_property_iterator::constructor_cxx_function);
                t->set_mus_property ("symbols", scm_string_to_symbol ($4));
                t->set_mus_property ("grob-property", $6);
                t->set_mus_property ("grob-value", $8);
-               Context_specced_music *csm = new Context_specced_music (t);
+               Context_specced_music *csm = new Context_specced_music (SCM_EOL);
+               csm->set_mus_property ("element", t->self_scm ());
+               scm_unprotect_object (t->self_scm ());
+
                $$ = csm;
                $$->set_spot (THIS->here_input ());
 
                csm-> set_mus_property ("context-type", $2);
        }
        | PROPERTY STRING '.' STRING REVERT embedded_scm {
-               Music *t = new Music;
+               Music *t = new Music (SCM_EOL);
                t->set_mus_property ("iterator-ctor",
                        Pop_property_iterator::constructor_cxx_function);
                t->set_mus_property ("symbols", scm_string_to_symbol ($4));
                t->set_mus_property ("grob-property", $6);
 
-               Context_specced_music *csm = new Context_specced_music (t);
+               Context_specced_music *csm = new Context_specced_music (SCM_EOL);
+               csm->set_mus_property ("element", t->self_scm ());
+               scm_unprotect_object (t->self_scm ());
+
                $$ = csm;
                $$->set_spot (THIS->here_input ());
 
@@ -935,26 +1024,30 @@ request_chord:
 
 command_element:
        command_req {
-               $$ = new Request_chord (gh_cons ($1->self_scm (), SCM_EOL));
+               $$ = new Request_chord (SCM_EOL);
+               $$->set_mus_property ("elements", gh_cons ($1->self_scm (), SCM_EOL));
                $$-> set_spot (THIS->here_input ());
                $1-> set_spot (THIS->here_input ());
        }
        | BAR STRING ';'                        {
-               Music *t = new Music;
+               Music *t = new Music (SCM_EOL);
 
                t->set_mus_property ("iterator-ctor",
                        Property_iterator::constructor_cxx_function);
                t->set_mus_property ("symbol", ly_symbol2scm ("whichBar"));
                t->set_mus_property ("value", $2);
 
-               Context_specced_music *csm = new Context_specced_music (t);
+               Context_specced_music *csm = new Context_specced_music (SCM_EOL);
+               csm->set_mus_property ("element", t->self_scm ());
+               scm_unprotect_object (t->self_scm ());
+
                $$ = csm;
                $$->set_spot (THIS->here_input ());
 
                csm->set_mus_property ("context-type", ly_str02scm ("Score"));
        }
        | PARTIAL duration_length ';'   {
-               Music * p = new Music;
+               Music * p = new Music (SCM_EOL);
                p->set_mus_property ("symbol", ly_symbol2scm ( "measurePosition"));
                p->set_mus_property ("iterator-ctor",
                        Property_iterator::constructor_cxx_function);
@@ -962,7 +1055,10 @@ command_element:
                Moment m = - unsmob_duration($2)->length_mom ();
                p->set_mus_property ("value", m.smobbed_copy ());
 
-               Context_specced_music * sp = new Context_specced_music (p);
+               Context_specced_music * sp = new Context_specced_music (SCM_EOL);
+               sp->set_mus_property ("element", p->self_scm ());
+               scm_unprotect_object (p->self_scm ());
+
                $$ =sp ;
                sp-> set_mus_property ("context-type", ly_str02scm ( "Score"));
        }
@@ -972,19 +1068,23 @@ command_element:
 
                SCM l = SCM_EOL;
                for (SCM s = result ; gh_pair_p (s); s = gh_cdr (s)) {
-                       Music * p = new Music;
+                       Music * p = new Music (SCM_EOL);
                        set_music_properties(p, gh_car (s));
                        l = gh_cons (p->self_scm (), l);
                        scm_unprotect_object (p->self_scm ());
                }
-               Sequential_music * seq = new Sequential_music (l);
+               Sequential_music * seq = new Sequential_music (SCM_EOL);
+               seq->set_mus_property ("elements", l);
+
+               Context_specced_music * sp = new Context_specced_music (SCM_EOL);
+               sp->set_mus_property ("element", seq->self_scm ());
+               scm_unprotect_object (seq->self_scm ());
 
-               Context_specced_music * sp = new Context_specced_music (seq);
                $$ =sp ;
                sp-> set_mus_property("context-type", ly_str02scm("Staff"));
        }
        | TIME_T bare_unsigned '/' bare_unsigned ';' {
-               Music * p = new Music;
+               Music * p = new Music (SCM_EOL);
                p->set_mus_property ("symbol",
                        ly_symbol2scm ( "timeSignatureFraction"));
                p->set_mus_property ("iterator-ctor",
@@ -993,8 +1093,11 @@ command_element:
                p->set_mus_property ("value", gh_cons (gh_int2scm ($2),
                                                        gh_int2scm ($4)));
 
-               Context_specced_music * sp = new Context_specced_music (p);
-               $$ =sp ;
+               Context_specced_music * sp = new Context_specced_music (SCM_EOL);
+               sp->set_mus_property ("element", p->self_scm ());
+               scm_unprotect_object (p->self_scm ());
+
+               $$ = sp;
                sp-> set_mus_property ("context-type", ly_str02scm ( "Score"));
        }
        ;
@@ -1469,10 +1572,11 @@ simple_element:
                if ($2 % 2 || $3 % 2)
                        n->set_mus_property ("force-accidental", SCM_BOOL_T);
 
-               Simultaneous_music*v = new Request_chord (gh_list (n->self_scm (), SCM_UNDEFINED));
+               Simultaneous_music*v = new Request_chord (SCM_EOL);
+               v->set_mus_property ("elements", gh_list (n->self_scm (), SCM_UNDEFINED));
                
 /*
-FIXME
+FIXME: location is one off, since ptich & duration don't contain origin refs. 
 */
                v->set_spot (THIS->here_input ());
                n->set_spot (THIS->here_input ());
@@ -1497,7 +1601,8 @@ FIXME
                      rest_req_p->set_spot (THIS->here_input());
                        e = rest_req_p->self_scm ();
                    }
-                 Simultaneous_music* velt_p = new Request_chord (gh_list (e,SCM_UNDEFINED));
+                 Simultaneous_music* velt_p = new Request_chord (SCM_EOL);
+               velt_p-> set_mus_property ("elements", gh_list (e,SCM_UNDEFINED));
                  velt_p->set_spot (THIS->here_input());
 
 
@@ -1514,13 +1619,17 @@ FIXME
                sp1->set_mus_property ("span-type", r);
                sp2->set_mus_property ("span-type", r);
 
-               Request_chord * rqc1 = new Request_chord (gh_list (sp1->self_scm (), SCM_UNDEFINED));
-               Request_chord * rqc2 = new Request_chord (gh_list (sk->self_scm (), SCM_UNDEFINED));;
-               Request_chord * rqc3 = new Request_chord(gh_list (sp2->self_scm (), SCM_UNDEFINED));;
+               Request_chord * rqc1 = new Request_chord (SCM_EOL);
+               rqc1->set_mus_property ("elements", gh_list (sp1->self_scm (), SCM_UNDEFINED));
+               Request_chord * rqc2 = new Request_chord (SCM_EOL);
+               rqc2->set_mus_property ("elements", gh_list (sk->self_scm (), SCM_UNDEFINED));;
+               Request_chord * rqc3 = new Request_chord(SCM_EOL);
+               rqc2->set_mus_property ("elements", gh_list (sp2->self_scm (), SCM_UNDEFINED));;
 
                SCM ms = gh_list (rqc1->self_scm (), rqc2->self_scm (), rqc3->self_scm (), SCM_UNDEFINED);
 
-               $$ = new Sequential_music (ms);
+               $$ = new Sequential_music (SCM_EOL);
+               $$->set_mus_property ("elements", ms);
        }
        | STRING { 
                THIS->remember_spot ();
@@ -1538,7 +1647,8 @@ FIXME
                 lreq_p->set_mus_property ("text", $1);
                lreq_p->set_mus_property ("duration",$3);
                lreq_p->set_spot (THIS->here_input());
-               Simultaneous_music* velt_p = new Request_chord (gh_list (lreq_p->self_scm (), SCM_UNDEFINED));
+               Simultaneous_music* velt_p = new Request_chord (SCM_EOL);
+               velt_p->set_mus_property ("elements", gh_list (lreq_p->self_scm (), SCM_UNDEFINED));
 
 
                $$= velt_p;
index 27617f77e8e66e590c05d690473310fb63407e3d..7059eca24c49d2515b3edb4e907735ee17ce58d4 100644 (file)
 #include "part-combine-music-iterator.hh"
 #include "pitch.hh"
 
-Part_combine_music::Part_combine_music (SCM  what, Music * f, Music * s)
+Part_combine_music::Part_combine_music (SCM l)
+  : Music (l)
 {
-  assert (gh_string_p (what));
-  set_mus_property ("what", what);
-  set_mus_property ("one", f->self_scm ());
-  set_mus_property ("two", s->self_scm ());  
-
-  scm_unprotect_object (f->self_scm());
-  scm_unprotect_object (s->self_scm());  
-
   set_mus_property ("iterator-ctor",
                    Part_combine_music_iterator::constructor_cxx_function);
 }
index 33a85917bc5e524c2131a9535b97cdeb60050a85..ae6773a6b28b4ed2807eb063d2ecac9962f6f9c6 100644 (file)
@@ -17,10 +17,9 @@ Relative_octave_music::to_relative_octave (Pitch)
 }
 
 
-Relative_octave_music::Relative_octave_music(Music*p,Pitch def)
-  : Music_wrapper (p)
+Relative_octave_music::Relative_octave_music(SCM l)
+  : Music_wrapper (l)
 {
-  set_mus_property ("last-pitch", element ()->to_relative_octave (def).smobbed_copy ());
   set_mus_property ("type", ly_symbol2scm ("relative-octave-music"));  
 }
 
index fec8d7be73845d6da7907e3e6652bcebd16a489a..9ff853a9a64bb443cddec9076bf9c80dc18fafa6 100644 (file)
@@ -24,29 +24,12 @@ Repeated_music::alternatives ()const
   return dynamic_cast<Music_sequence*>  (unsmob_music (get_mus_property ("alternatives")));
 }
 
-Repeated_music::Repeated_music(Music *beg, int times, Music_sequence * alts)
+Repeated_music::Repeated_music(SCM l)
+  : Music (l)
 {
-  if (beg)
-    {
-      set_mus_property ("body", beg->self_scm ());
-      scm_unprotect_object (beg->self_scm ());
-    }
-  set_mus_property ("repeat-count", gh_int2scm (times));
-
-  if (alts)
-    {
-      alts->truncate (times);
-      set_mus_property ("alternatives", alts->self_scm ());
-      scm_unprotect_object (alts->self_scm ());  
-    }
   set_mus_property ("type", ly_symbol2scm ("repeated-music"));
 }
 
-Repeated_music::Repeated_music (Repeated_music const &s)
-  : Music (s)
-{
-}
-
 
 Pitch
 Repeated_music::to_relative_octave (Pitch p)
index d10693e898f88a1896afaed6dc7fcfe97a572521..e9f6427cd13a5a585206fd83768f0d9a87c07513 100644 (file)
@@ -25,6 +25,7 @@ Request::do_equal_b (Request const*) const
   
 
 Request::Request ()
+  : Music (SCM_EOL)
 {
   set_mus_property ("type", ly_symbol2scm ("request"));
 }
index 953bdb0ff321971d1cde16b3152f4b5209497bb1..57f9baad363f960829c85771d73305f11cc3dcac 100644 (file)
@@ -40,11 +40,11 @@ inline int compare (CHead_melodic_tuple const &a, CHead_melodic_tuple const &b)
    priority queue. If we have a Tie_req, connect the notes that finish
    just at this time, and note that start at this time.
 
-   TODO: junk the pq.
- */
+   TODO: junk the pq; the PQ is overkill if we assume that no
+   different durations occur in parallel.
+*/
 class Tie_engraver : public Engraver
 {
-  bool done_;
   PQueue<CHead_melodic_tuple> past_notes_pq_;
   Moment end_mom_;
   Moment next_end_mom_;
@@ -117,20 +117,10 @@ Tie_engraver::acknowledge_grob (Grob_info i)
     }
 }
 
+
 void
 Tie_engraver::create_grobs ()
 {
-  if (req_l_ && !done_)
-    {
-      Moment now = now_mom ();
-      stopped_heads_.clear ();
-      while (past_notes_pq_.size ()
-            && past_notes_pq_.front ().end_ == now)
-       stopped_heads_.push (past_notes_pq_.get ());
-      done_ = true;
-      return;
-    }
-
   if (req_l_)
     {
       now_heads_.sort (CHead_melodic_tuple::pitch_compare);
@@ -196,11 +186,7 @@ Tie_engraver::create_grobs ()
          announce_grob (p, req_l_);
        }
 
-      if (!tie_p_arr_.size ())
-       {
-         req_l_->origin ()->warning (_ ("No ties were created!"));
-       }
-      else if (tie_p_arr_.size () > 1 && !tie_column_p_)
+      if (tie_p_arr_.size () > 1 && !tie_column_p_)
        {
          tie_column_p_ = new Spanner (get_property ("TieColumn"));
          Tie_column::set_interface (tie_column_p_);
@@ -221,6 +207,11 @@ Tie_engraver::stop_translation_timestep ()
     }
   now_heads_.clear ();
 
+  if (req_l_ && !tie_p_arr_.size ())
+    {
+      req_l_->origin ()->warning (_ ("No ties were created!"));
+    }
+  
   for (int i=0; i<  tie_p_arr_.size (); i++)
    {
       typeset_tie (tie_p_arr_[i]);
@@ -263,10 +254,16 @@ Tie_engraver::start_translation_timestep ()
       set_melisma (false);
     }
   req_l_ = 0;
-  done_ = false;
   Moment now = now_mom ();
   while (past_notes_pq_.size () && past_notes_pq_.front ().end_ < now)
     past_notes_pq_.delmin ();
+
+
+  stopped_heads_.clear ();
+  while (past_notes_pq_.size ()
+        && past_notes_pq_.front ().end_ == now)
+    stopped_heads_.push (past_notes_pq_.get ());
+
 }
 
 ADD_THIS_TRANSLATOR(Tie_engraver);
@@ -286,6 +283,9 @@ CHead_melodic_tuple::CHead_melodic_tuple (Grob *h, Melodic_req*m, Moment mom)
   end_ = mom;
 }
 
+/*
+  signed compare, should use pitch<? 
+ */
 int
 CHead_melodic_tuple::pitch_compare (CHead_melodic_tuple const&h1,
                             CHead_melodic_tuple const &h2)
@@ -293,12 +293,13 @@ CHead_melodic_tuple::pitch_compare (CHead_melodic_tuple const&h1,
   SCM p1  = h1.req_l_->get_mus_property ("pitch");
   SCM p2  = h2.req_l_->get_mus_property ("pitch");
   
-  return Pitch::equal_p (p1,p2) == SCM_BOOL_T;
+  return Pitch::compare (*unsmob_pitch (p1),
+                        *unsmob_pitch (p2));
 }
 
 int
 CHead_melodic_tuple::time_compare (CHead_melodic_tuple const&h1,
-                            CHead_melodic_tuple const &h2)
+                                  CHead_melodic_tuple const &h2)
 {
   return (h1.end_ - h2.end_ ).sign ();
 }
index 74559e404a882f6b3723e7b827531f02974cca2c..ed3961b27e3d875ed11998063709900703bc075c 100644 (file)
 #include "time-scaled-music.hh"
 #include "time-scaled-music-iterator.hh"
 
-Time_scaled_music::Time_scaled_music (int n, int d,Music *mp)
-  : Music_wrapper (mp)
+Time_scaled_music::Time_scaled_music (SCM l)
+  : Music_wrapper (l)
 {
-  set_mus_property ("numerator", gh_int2scm (n));
-  set_mus_property ("denominator", gh_int2scm (d));
   set_mus_property ("iterator-ctor",
                    Time_scaled_music_iterator::constructor_cxx_function);
   
-  compress (Moment (n,d));
 }
 
 
index 5b16536e949dfa34b9adf518ae30faa78acb25c3..4bf75074a0af581446c34edda713c1ce2ec2758c 100644 (file)
@@ -426,3 +426,41 @@ type_check_assignment (SCM val, SCM sym,  SCM type_symbol)
     }
   return ok;
 }
+
+SCM
+ly_get_trans_property (SCM context, SCM name)
+{
+  Translator *t = unsmob_translator (context);
+  Translator_group* tr=   dynamic_cast<Translator_group*> (t);
+  if (!t || !tr)
+    {
+      warning ("ly-get-trans-property: expecting a Translator_group argument");
+      return SCM_EOL;
+    }
+  return tr->get_property (name);
+  
+}
+SCM
+ly_set_trans_property (SCM context, SCM name, SCM val)
+{
+
+  Translator *t = unsmob_translator (context);
+  Translator_group* tr=   dynamic_cast<Translator_group*> (t);
+  if (tr)
+    {
+      tr->set_property (name, val);
+    }
+  return SCM_UNSPECIFIED;
+}
+
+
+
+
+void
+add_trans_scm_funcs ()
+{
+  scm_make_gsubr ("ly-get-trans-property", 2, 0, 0, (Scheme_function_unknown)ly_get_trans_property);
+  scm_make_gsubr ("ly-get-trans-property", 3, 0, 0, (Scheme_function_unknown)ly_get_trans_property);
+}
+
+ADD_SCM_INIT_FUNC(trans_scm, add_trans_scm_funcs);
index 166f68c9688e17ff75fa3603cb6cc12e201411c5..a059b2b5bdf1c5a4a5522c775ce9c86eb0373bac 100644 (file)
 #include "transposed-music.hh"
 #include "debug.hh"
 
-Transposed_music::Transposed_music (Music *p, Pitch pit)
-  : Music_wrapper (p)
+Transposed_music::Transposed_music (SCM l)
+  : Music_wrapper (l)
 {
-  p->transpose (pit);
   set_mus_property ("type", ly_symbol2scm ("transposed-music"));
 }
 
index a31d8622a87a06fb5f2017c40f5c26d0c56f047d..173a3f2ae859209f608a1e2c759ea4dc6ae6c81a 100644 (file)
@@ -1,15 +1,15 @@
 Begin3
 Title: LilyPond
-Version: 1.3.114
-Entered-date: 01DEC00
+Version: 1.3.115
+Entered-date: 04DEC00
 Description: 
 Keywords: music notation typesetting midi fonts engraving
 Author: hanwen@cs.uu.nl (Han-Wen Nienhuys)
        janneke@gnu.org (Jan Nieuwenhuizen)
 Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
 Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert
-       1000k lilypond-1.3.114.tar.gz 
+       1000k lilypond-1.3.115.tar.gz 
 Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
-       1000k lilypond-1.3.114.tar.gz 
+       1000k lilypond-1.3.115.tar.gz 
 Copying-policy: GPL
 End
index 7da1afd806c99b43aa215ced7c8e596a53f73754..f99faf6c030373e8efebab619a8dbe3054fc2186 100644 (file)
@@ -1,11 +1,11 @@
 %define info yes
 
 Name: lilypond
-Version: 1.3.114
+Version: 1.3.115
 Release: 1
 License: GPL
 Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.114.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.115.tar.gz
 Summary: A program for printing sheet music.
 URL: http://www.cs.uu.nl/~hanwen/lilypond
 # Icon: lilypond-icon.gif
index db72f683ceb09af36113b52e71da415e1781e232..37ac56142a4ea32bcd71b5b843db3594a1aa473b 100644 (file)
@@ -15,7 +15,7 @@ SUBDIRS =  buildscripts scripts  flower lily mf midi2ly po debian \
 
 SCRIPTS = configure aclocal.m4
 README_FILES =  DEDICATION COPYING NEWS CHANGES ROADMAP
-README_TXT_FILES = AUTHORS.txt README.txt INSTALL.txt 
+README_TXT_FILES = AUTHORS.txt README.txt INSTALL.txt FAQ.txt
 IN_FILES := $(wildcard *.in)
 EXTRA_DIST_FILES = lilypond-font-lock.el lilypond-mode.el vimrc VERSION $(README_FILES)  $(SCRIPTS) $(IN_FILES) 
 NON_ESSENTIAL_DIST_FILES = $(README_TXT_FILES)
index 7243adeae80daba5c32d5c2e8627bd8aa141eb50..228c6d3a786c4190f3d4f1ebb902bbc22f3a0f60 100644 (file)
@@ -27,6 +27,7 @@
   (and (pair? x) (number? (car x)) (number? (cdr x))))
 (define (boolean-or-symbol? x) (or boolean? x) (or symbol? x))
 (define (number-or-string? x) (or (number? x) (string? x)))
+(define (list-or-string? x) (or (list? x) (string? x)))
 (define markup?
   (lambda (x) (or (string? x) (list? x))))
 
index 3f2816cd8ba041096d3081af736704e48c48d316..879b4ff09037fd16a426b4f0577975a8a75a0e2c 100644 (file)
     'Stem_engraver
     (engraver-description
      "Stem_engraver"
-     "Create stems and single-stem tremolos"
+     "Create stems and single-stem tremolos.  It also works together with
+the beam engraver for overriding beaming."
      '(Stem StemTremolo)
-     '(
-      tremoloFlags
+     '(tremoloFlags
       stemLeftBeamCount
       stemRightBeamCount    
       )))
@@ -149,11 +149,14 @@ interesting items (ie. note heads, lyric syllables and normal rests)"
       )))
 
    (cons
-    'Auto_beam_engraver
+   'Auto_beam_engraver
     (engraver-description
      "Auto_beam_engraver"
-     "Generate beams based on measure characteristics and observed Stems.
-Uses beatLength, measureLength and measurePosition to decide when to start and stop a beam.
+     "Generate beams based on measure characteristics and observed
+Stems.  Uses beatLength, measureLength and measurePosition to decide
+when to start and stop a beam.  Overriding beaming is done through
+@ref{Stem_engraver} properties stemLeftBeamCount and
+stemRightBeamCount.
 "
      '(
        Beam)
index dec53c590565619a1257edb135514d8a63952203..751081619adaf81ef5cc0e87099ea700e7a931c7 100644 (file)
@@ -125,8 +125,8 @@ remembered for the duration of a measure.
 ")
 (translator-property-description 'graceAccidentalSpace number? "amount space to alot for an accidental")
 (translator-property-description 'graceAlignPosition dir? "put the grace note before or after the main note?")
-(translator-property-description 'instr string? "see @code{instrument}")
-(translator-property-description 'instrument string? " If @code{Instrument_name_engraver}
+(translator-property-description 'instr list-or-string? "see @code{instrument}")
+(translator-property-description 'instrument list-or-string? " If @code{Instrument_name_engraver}
 @cindex Instrument_name_engraver
  is
     added to the Staff translator, then the @code{instrument} property
index b31a56bc3c914048f6192478ea8d44a33e3bc846..8cab59b86ab8b7013433e1a42996b7e28d40bab1 100644 (file)
@@ -30,7 +30,8 @@
 #
 # Barring now preserved between ABC and lilypond
 # the default placement for text in abc is above the staff.
-# %%LY now supported.                                          
+# %%LY now supported.
+# \breve and \longa supported.
                        
 # Limitations
 #
@@ -67,10 +68,12 @@ UNDEF = 255
 state = UNDEF
 voice_idx_dict = {}
 header = {}
+header['footnotes'] = ''
 lyrics = []
 slyrics = []
 voices = []
 state_list = []
+repeat_state = [0] * 8
 current_voice_idx = -1
 current_lyric_idx = -1
 lyric_idx = -1
@@ -87,7 +90,14 @@ HSPACE=' \t'
 def check_clef(s):
       if not s:
               return ''
-      if re.match('^treble', s):
+      if re.match('-8va', s) or re.match('treble8', s):
+             # treble8 is used by abctab2ps; -8va is used by barfly,
+             # and by my patch to abc2ps. If there's ever a standard
+             # about this we'll support that.
+             s = s[4:]
+             state.base_octave = -1
+             voices_append("\\clef \"G_8\";\n")
+      elif re.match('^treble', s):
               s = s[6:]
               if re.match ('^-8', s):
                       s = s[2:]
@@ -96,10 +106,6 @@ def check_clef(s):
               else:
                       state.base_octave = 0
                       voices_append("\\clef treble;\n")
-      elif re.match('^-8va', s):
-             s = s[4:]
-             state.base_octave = -1
-             voices_append("\\clef \"G_8\";\n")
       elif re.match('^alto', s):
               s = s[4:]
               state.base_octave = -1
@@ -172,12 +178,20 @@ def dump_slyrics (outf):
                        outf.write ("\n}")
 
 def dump_voices (outf):
+       global doing_alternative, in_repeat
        ks = voice_idx_dict.keys()
        ks.sort ()
        for k in ks:
                outf.write ("\nvoice%s = \\notes {" % k)
                dump_default_bar(outf)
+               if repeat_state[voice_idx_dict[k]]:
+                       outf.write("\n\\repeat volta 2 {")
                outf.write ("\n" + voices [voice_idx_dict[k]])
+               if not using_old:
+                       if doing_alternative[voice_idx_dict[k]]:
+                               outf.write("}")
+                       if in_repeat[voice_idx_dict[k]]:
+                               outf.write("}")
                outf.write ("\n}")
        
 def dump_score (outf):
@@ -308,13 +322,16 @@ key_lookup = {    # abc to lilypond key mode names
        'm'   : 'minor',
        'min' : 'minor',
        'maj' : 'major',
+       'major' : 'major',      
        'phr' : 'phrygian',
        'ion' : 'ionian',
        'loc' : 'locrian',
        'aeo' : 'aeolian',
        'mix' : 'mixolydian',
+       'mixolydian' : 'mixolydian',    
        'lyd' : 'lydian',
-       'dor' : 'dorian'
+       'dor' : 'dorian',
+       'dorian' : 'dorian'     
 }
 
 def lily_key (k):
@@ -431,7 +448,7 @@ def header_append (key, a):
        s = ''
        if header.has_key (key):
                s = header[key] + "\n"
-       header [key] = s + a
+               header [key] = s + a
 
 def wordwrap(a, v):
        linelen = len (v) - string.rfind(v, '\n')
@@ -450,9 +467,16 @@ def stuff_append (stuff, idx, a):
 def voices_append(a):
        if current_voice_idx < 0:
                select_voice ('default', '')
-
        stuff_append (voices, current_voice_idx, a)
 
+def repeat_prepend():
+       global repeat_state
+       if current_voice_idx < 0:
+               select_voice ('default', '')
+       if not using_old:
+               repeat_state[current_voice_idx] = 't'
+
+       
 def lyrics_append(a):
        a = re.sub ( '#', '\\#', a)     # latex does not like naked #'s
        a = re.sub ( '"', '\\"', a)     # latex does not like naked "'s
@@ -462,14 +486,13 @@ def lyrics_append(a):
 # break lyrics to words and put "'s around words containing numbers and '"'s
 def fix_lyric(str):
        ret = ''
-
        while str != '':
                m = re.match('[ \t]*([^ \t]*)[ \t]*(.*$)', str)
                if m:
                        word = m.group(1)
                        str = m.group(2)
                        word = re.sub('"', '\\"', word) # escape "
-                       if re.match('.*[0-9"]', word):
+                       if re.match('.*[0-9"\(]', word):
                                word = re.sub('_', ' ', word) # _ causes probs inside ""
                                ret = ret + '\"' + word + '\" '
                        else:
@@ -485,7 +508,7 @@ def slyrics_append(a):
        a = re.sub ( '~', '_', a)       # ~ to space('_')
        a = re.sub ( '\*', '_ ', a)     # * to to space
        a = re.sub ( '#', '\\#', a)     # latex does not like naked #'s
-       if re.match('.*[0-9"]', a):     # put numbers and " into quoted string
+       if re.match('.*[0-9"\(]', a):   # put numbers and " and ( into quoted string
                a = fix_lyric(a)
        a = re.sub ( '$', ' ', a)       # insure space between lines
        __main__.lyric_idx = lyric_idx + 1
@@ -546,6 +569,8 @@ def try_parse_header_line (ln, state):
                                else:
                                        __main__.global_key  = compute_key (a)# ugh.
                                        voices_append ('\\key %s \\major;' % lily_key(a))
+               if g == 'N': # Notes
+                       header ['footnotes'] = header['footnotes'] +  '\\\\\\\\' + a
                if g == 'O': # Origin
                        header ['origin'] = a
                if g == 'X': # Reference Number
@@ -628,7 +653,12 @@ def duration_to_lilypond_duration  (multiply_tup, defaultlen, dots):
        # (num /  den)  / defaultlen < 1/base
        while base * multiply_tup[0] < multiply_tup[1]:
                base = base * 2
-       return '%d%s' % ( base, '.'* dots)
+       if base == 1:
+               if (multiply_tup[0] / multiply_tup[1])  == 2:
+                       base = '\\breve'
+               if (multiply_tup[0] / multiply_tup[1]) == 4:
+                       base = '\longa'
+       return '%s%s' % ( base, '.'* dots)
 
 class Parser_state:
        def __init__ (self):
@@ -733,7 +763,6 @@ artic_tbl = {
 }
        
 def try_parse_articulation (str, state):
-       
        while str and  artic_tbl.has_key(str[:1]):
                state.next_articulation = state.next_articulation + artic_tbl[str[:1]]
                if not artic_tbl[str[:1]]:
@@ -879,6 +908,11 @@ def try_parse_guitar_chord (str, state):
        if str[:1] =='"':
                str = str[1:]
                gc = ''
+               if str[0] == '_' or (str[0] == '^'):
+                       position = str[0]
+                       str = str[1:]
+               else:
+                       position = '^'
                while str and str[0] != '"':
                        gc = gc + str[0]
                        str = str[1:]
@@ -886,7 +920,7 @@ def try_parse_guitar_chord (str, state):
                if str:
                        str = str[1:]
                gc = re.sub('#', '\\#', gc)     # escape '#'s
-               state.next_articulation = ("^\"%s\"" % gc) + state.next_articulation
+               state.next_articulation = ("%c\"%s\"" % (position ,gc)) + state.next_articulation
        return str
 
 def try_parse_escape (str):
@@ -907,7 +941,7 @@ def try_parse_escape (str):
 # :: left-right repeat
 # |1 volta 1
 # |2 volta 2
-bar_dict = {
+old_bar_dict = {
 '|]' : '|.',
 '||' : '||',
 '[|' : '||',
@@ -919,23 +953,71 @@ bar_dict = {
 ':|2' : ':|',
 '|' :  '|'
 }
+bar_dict = {
+ '|]' : '\\bar "|.";',
+ '||' : '\\bar "||";',
+ '[|' : '\\bar "||";',
+ ':|' : '}',
+ '|:' : '\\repeat volta 2 {',
+ '::' : '} \\repeat volta 2 {',
+ '|1' : '} \\alternative{{',
+ '|2' : '} {',
+ ':|2' : '} {',
+ '|' :  '\\bar "|";'
+  }
 
 
 warn_about = ['|:', '::', ':|', '|1', ':|2', '|2']
+alternative_opener = ['|1', '|2', ':|2']
+repeat_ender = ['::', ':|']
+repeat_opener = ['::', '|:']
+in_repeat = [''] * 8
+doing_alternative = [''] * 8
+using_old = ''
 
 def try_parse_bar (str,state):
+       global in_repeat, doing_alternative, using_old
+       do_curly = ''
        bs = None
-
+       if current_voice_idx < 0:
+               select_voice ('default', '')
        # first try the longer one
        for trylen in [3,2,1]:
                if str[:trylen] and bar_dict.has_key (str[:trylen]):
                        s = str[:trylen]
-                       bs = "\\bar \"%s\";" % bar_dict[s]
-                       if s in warn_about:
-                               sys.stderr.write('Warning kludging for barline `%s\'\n' % s)
+                       if using_old:
+                               bs = "\\bar \"%s\";" % old_bar_dict[s]
+                       else:
+                               bs = "%s" % bar_dict[s]
                        str = str[trylen:]
-                       break
+                       if s in alternative_opener:
+                               if not in_repeat[current_voice_idx]:
+                                       using_old = 't'
+                                       bs = "\\bar \"%s\";" % old_bar_dict[s]
+                               else:
+                                       doing_alternative[current_voice_idx] = 't'
 
+                       if s in repeat_ender:
+                               if not in_repeat[current_voice_idx]:
+                                       sys.stderr.write("Warning: inserting repeat to beginning of notes.\n")
+                                       repeat_prepend()
+                                       in_repeat[current_voice_idx] = ''
+                               else:
+                                       if doing_alternative[current_voice_idx]:
+                                               do_curly = 't'
+                               if using_old:
+                                       bs = "\\bar \"%s\";" % old_bar_dict[s]
+                               else:
+                                       bs =  bar_dict[s]
+                               doing_alternative[current_voice_idx] = ''
+                               in_repeat[current_voice_idx] = ''
+                       if s in repeat_opener:
+                               in_repeat[current_voice_idx] = 't'
+                               if using_old:
+                                       bs = "\\bar \"%s\";" % old_bar_dict[s]
+                               else:
+                                       bs =  bar_dict[s]
+                       break
        if str[:1] == '|':
                state.next_bar = '|\n'
                str = str[1:]
@@ -949,7 +1031,9 @@ def try_parse_bar (str,state):
        if bs <> None:
                clear_bar_acc(state)
                voices_append (bs)
-
+               if do_curly != '':
+                       voices_append("} }")
+                       do_curly = ''
        return str
 
 def try_parse_tie (str):
@@ -1035,13 +1119,16 @@ def try_parse_comment (str):
 #non-western scales, it is necessary to be able to tell a translator that
 #the barlines should not affect its interpretation of the pitch.  
                        if (string.find(str,'nobarlines') > 0):
-                               #debugging
                                nobarlines = 1
                elif str[0:3] == '%LY':
                        p = string.find(str, 'voices')
                        if (p > -1):
                                voices_append(str[p+7:])
                                voices_append("\n")
+                       p = string.find(str, 'slyrics')
+                       if (p > -1):
+                               slyrics_append(str[p+8:])
+                       
 #write other kinds of appending  if we ever need them.                 
        return str
 
@@ -1103,7 +1190,7 @@ def identify():
 
 def help ():
        print r"""
-Convert ABC to Lilypond.
+Convert ABC to lilypond.
 
 Usage: abc2ly [OPTIONS]... ABC-FILE
 
index 462c51a673e9471d37d60e9973f0d170f81c377f..5a86f0ce617c8555ff7755f768c48aadeb0857e5 100644 (file)
@@ -119,8 +119,8 @@ if 1:                                       # need new a namespace
                
                return str
 
-       conversions.append (
-               ((0,1,19), conv, 'deprecated \\octave; can\'t convert automatically'))
+       conversions.append ((
+               ((0,1,19), conv, 'deprecated \\octave; can\'t convert automatically')))
 
 
 if 1:                                  # need new a namespace
@@ -131,8 +131,8 @@ if 1:                                       # need new a namespace
                        
                return str
 
-       conversions.append (
-               ((0,1,20), conv, 'deprecated \\textstyle, new \key syntax'))
+       conversions.append ((
+               ((0,1,20), conv, 'deprecated \\textstyle, new \key syntax')))
 
 
 if 1:
@@ -142,16 +142,16 @@ if 1:
                        
                return str
 
-       conversions.append (
+       conversions.append ((
                ((0,1,21), conv, '\\musical_pitch -> \\musicalpitch, '+
-                '\\meter -> \\time'))
+                '\\meter -> \\time')))
 
 if 1:
        def conv (str):
                return str
 
-       conversions.append (
-               ((1,0,0), conv, '0.1.21 -> 1.0.0 '))
+       conversions.append ((
+               ((1,0,0), conv, '0.1.21 -> 1.0.0 ')))
 
 
 if 1:
@@ -162,9 +162,9 @@ if 1:
                        
                return str
 
-       conversions.append (
+       conversions.append ((
                ((1,0,1), conv, '\\accidentals -> \\keysignature, ' +
-                'specialaccidentals -> keyoctaviation'))
+                'specialaccidentals -> keyoctaviation')))
 
 if 1:
        def conv(str):
@@ -172,7 +172,7 @@ if 1:
                        sys.stderr.write ('\nNot smart enough to convert to new \\header format')
                return str
        
-    conversions.append (((1,0,2), conv, '\\header { key = concat + with + operator }'))
+       conversions.append (((1,0,2), conv, '\\header { key = concat + with + operator }'))
 
 if 1:
        def conv(str):
@@ -180,7 +180,7 @@ if 1:
                        
                return str
        
-    conversions.append (((1,0,3), conv, '\\melodic -> \\notes'))
+       conversions.append (((1,0,3), conv, '\\melodic -> \\notes'))
 
 if 1:
        def conv(str):
@@ -189,7 +189,7 @@ if 1:
                        
                return str
        
-    conversions.append (((1,0,4), conv, 'default_{paper,midi}'))
+       conversions.append (((1,0,4), conv, 'default_{paper,midi}'))
 
 if 1:
        def conv(str):
@@ -198,7 +198,7 @@ if 1:
                        
                return str
        
-    conversions.append (((1,0,5), conv, 'ChoireStaff -> ChoirStaff'))
+       conversions.append (((1,0,5), conv, 'ChoireStaff -> ChoirStaff'))
 
 if 1:
        def conv(str):
@@ -207,7 +207,7 @@ if 1:
                        raise FatalConversionError()
                return str
        
-    conversions.append (((1,0,6), conv, 'foo = \\translator {\\type .. } ->\\translator {\\type ..; foo; }'))
+       conversions.append (((1,0,6), conv, 'foo = \\translator {\\type .. } ->\\translator {\\type ..; foo; }'))
 
 
 if 1:
@@ -216,7 +216,7 @@ if 1:
                        
                return str
        
-    conversions.append (((1,0,7), conv, '\\lyric -> \\lyrics'))
+       conversions.append (((1,0,7), conv, '\\lyric -> \\lyrics'))
 
 if 1:
        def conv(str):
@@ -229,12 +229,12 @@ if 1:
                str =  re.sub ('\\]([0-9/]+)', '] }', str)
                return str
        
-    conversions.append (((1,0,10), conv, '[2/3 ]1/1 -> \\times 2/3 '))
+       conversions.append (((1,0,10), conv, '[2/3 ]1/1 -> \\times 2/3 '))
 
 if 1:
        def conv(str):
                return str
-    conversions.append (((1,0,12), conv, 'Chord syntax stuff'))
+       conversions.append (((1,0,12), conv, 'Chord syntax stuff'))
 
 
 if 1:
@@ -245,7 +245,7 @@ if 1:
                        
                return str
        
-    conversions.append (((1,0,13), conv, '<a ~ b> c -> <a b> ~ c'))
+       conversions.append (((1,0,13), conv, '<a ~ b> c -> <a b> ~ c'))
 
 if 1:
        def conv(str):
@@ -254,7 +254,7 @@ if 1:
                        
                return str
        
-    conversions.append (((1,0,14), conv, '<[a b> <a b]>c -> [<a b> <a b>]'))
+       conversions.append (((1,0,14), conv, '<[a b> <a b]>c -> [<a b> <a b>]'))
 
 
 if 1:
@@ -264,7 +264,7 @@ if 1:
                        
                return str
        
-    conversions.append (((1,0,16), conv, '\\type -> \\context, textstyle -> textStyle'))
+       conversions.append (((1,0,16), conv, '\\type -> \\context, textstyle -> textStyle'))
 
 
 if 1:
@@ -274,7 +274,7 @@ if 1:
                        raise FatalConversionError()
                return str
        
-    conversions.append (((1,0,18), conv,
+       conversions.append (((1,0,18), conv,
                 '\\repeat NUM Music Alternative -> \\repeat FOLDSTR Music Alternative'))
 
 if 1:
@@ -285,7 +285,7 @@ if 1:
                        
                return str
 
-    conversions.append (((1,0,19), conv,
+       conversions.append (((1,0,19), conv,
                 'fontsize -> fontSize, midi_instrument -> midiInstrument, SkipBars -> skipBars'))
 
 
@@ -297,7 +297,7 @@ if 1:
                        
                return str
 
-    conversions.append (((1,0,20), conv,
+       conversions.append (((1,0,20), conv,
                 '{,tie,slur}ydirection -> {v,tieV,slurV}erticalDirection'))
 
 
@@ -307,7 +307,7 @@ if 1:
                        
                return str
 
-    conversions.append (((1,0,21), conv,
+       conversions.append (((1,0,21), conv,
                 'hshift -> horizontalNoteShift'))
 
 
@@ -317,7 +317,7 @@ if 1:
                        
                return str
 
-    conversions.append (((1,1,52), conv,
+       conversions.append (((1,1,52), conv,
                 'deprecate \\grouping'))
 
 
@@ -327,7 +327,7 @@ if 1:
                        
                return str
 
-    conversions.append (((1,1,55), conv,
+       conversions.append (((1,1,55), conv,
                 '\\wheel -> \\coda'))
 
 if 1:
@@ -337,7 +337,7 @@ if 1:
                        
                return str
 
-    conversions.append (((1,1,65), conv,
+       conversions.append (((1,1,65), conv,
                 'slurdash -> slurDash, keyoctaviation -> keyOctaviation'))
 
 if 1:
@@ -346,7 +346,7 @@ if 1:
                        
                return str
 
-    conversions.append (((1,1,66), conv,
+       conversions.append (((1,1,66), conv,
                 'semi -> volta'))
 
 
@@ -356,7 +356,7 @@ if 1:
                        
                return str
 
-    conversions.append (((1,1,67), conv,
+       conversions.append (((1,1,67), conv,
                 'beamAuto -> noAutoBeaming'))
 
 if 1:
@@ -365,7 +365,7 @@ if 1:
                        
                return str
 
-    conversions.append (((1,2,0), conv,
+       conversions.append (((1,2,0), conv,
                 'automaticMelismas -> automaticMelismata'))
 
 if 1:
@@ -374,7 +374,7 @@ if 1:
                        
                return str
 
-    conversions.append (((1,2,1), conv,
+       conversions.append (((1,2,1), conv,
                 'dynamicDir -> dynamicDirection'))
 
 if 1:
@@ -384,7 +384,7 @@ if 1:
                        
                return str
 
-    conversions.append (((1,3,4), conv,
+       conversions.append (((1,3,4), conv,
                 '\\cadenza -> \cadenza{On|Off}'))
 
 if 1:
@@ -394,7 +394,7 @@ if 1:
                              str)
                return str
 
-    conversions.append (((1,3,5), conv, 'beamAuto moment properties'))
+       conversions.append (((1,3,5), conv, 'beamAuto moment properties'))
 
 if 1:
        def conv (str):
@@ -403,7 +403,7 @@ if 1:
                              str)
                return str
 
-    conversions.append (((1,3,17), conv, 'stemStyle -> flagStyle'))
+       conversions.append (((1,3,17), conv, 'stemStyle -> flagStyle'))
 
 if 1:
        def conv (str):
@@ -412,7 +412,7 @@ if 1:
                              str)
                return str
 
-    conversions.append (((1,3,18), conv, 'staffLineLeading -> staffSpace'))
+       conversions.append (((1,3,18), conv, 'staffLineLeading -> staffSpace'))
 
 if 1:
        def conv (str):
@@ -424,7 +424,7 @@ if 1:
                              str)
                return str
 
-    conversions.append (((1,3,35), conv, 'textEmptyDimension -> textNonEmpty'))
+       conversions.append (((1,3,35), conv, 'textEmptyDimension -> textNonEmpty'))
 
 if 1:
        def conv (str):
@@ -436,7 +436,7 @@ if 1:
                        sys.stderr.write ('\nNot smart enough to convert to new \\notenames format')
                return str
 
-    conversions.append (((1,3,38), conv, '\musicalpitch { a b c } -> #\'(a b c)'))
+       conversions.append (((1,3,38), conv, '\musicalpitch { a b c } -> #\'(a b c)'))
 
 if 1:
        def conv (str):
@@ -446,7 +446,7 @@ if 1:
                str = re.sub ("\\\\key ([^;]+);",  replace, str)
                return str
        
-    conversions.append (((1,3,39), conv, '\\key A ;  ->\\key a;'))
+       conversions.append (((1,3,39), conv, '\\key A ;  ->\\key a;'))
 
 if 1:
        def conv (str):
@@ -454,7 +454,7 @@ if 1:
                        sys.stderr.write ('\nNot smart enough to convert to new tremolo format')
                return str
 
-    conversions.append (((1,3,41), conv,
+       conversions.append (((1,3,41), conv,
                 '[:16 c4 d4 ] -> \\repeat "tremolo" 2 { c16 d16 }'))
 
 if 1:
@@ -462,7 +462,7 @@ if 1:
                str = re.sub ('Staff_margin_engraver' , 'Instrument_name_engraver', str)
                return str
 
-    conversions.append (((1,3,42), conv,
+       conversions.append (((1,3,42), conv,
                 'Staff_margin_engraver deprecated, use Instrument_name_engraver'))
 
 if 1:
@@ -470,14 +470,14 @@ if 1:
                str = re.sub ('note[hH]eadStyle\\s*=\\s*"?(\\w+)"?' , "noteHeadStyle = #'\\1", str)
                return str
 
-    conversions.append (((1,3,49), conv,
+       conversions.append (((1,3,49), conv,
                 'noteHeadStyle value: string -> symbol'))
 
 if 1:
        def conv (str):
                str = re.sub (r"""\\key *([a-z]+) *;""", r"""\\key \1 \major;""",str);
                return str
-    conversions.append (((1,3,59), conv,
+       conversions.append (((1,3,59), conv,
                 '\key X ; -> \key X major; ')) 
 
 if 1:
@@ -486,7 +486,7 @@ if 1:
                              'latexheaders = "',
                              str)
                return str
-    conversions.append (((1,3,68), conv, 'latexheaders = "\\input global" -> latexheaders = "global"'))
+       conversions.append (((1,3,68), conv, 'latexheaders = "\\input global" -> latexheaders = "global"'))
 
 
 
@@ -508,7 +508,7 @@ if 1:
                str = re.sub ('basic([A-Za-z_]+)Properties', '\\1', str)
                return str
        
-    conversions.append (((1,3,92), conv, 'basicXXXProperties -> XXX'))
+       conversions.append (((1,3,92), conv, 'basicXXXProperties -> XXX'))
 
 if 1:
        def conv (str):
@@ -534,7 +534,7 @@ if 1:
                
                return str
        
-    conversions.append (((1,3,93), conv,
+       conversions.append (((1,3,93), conv,
                 'property definiton case (eg. onevoice -> oneVoice)'))
 
 
@@ -548,7 +548,7 @@ if 1:
 
                return str
        
-    conversions.append (((1,3,97), conv, 'ChordName -> ChordNames'))
+       conversions.append (((1,3,97), conv, 'ChordName -> ChordNames'))
 
 if 1:
        def conv (str):
@@ -560,7 +560,7 @@ if 1:
 
                return str
        
-    conversions.append (((1,3,102), conv, 'beamAutoEnd -> autoBeamSettings \\push (end * * * *)'))
+       conversions.append (((1,3,102), conv, 'beamAutoEnd -> autoBeamSettings \\push (end * * * *)'))
 
 
 if 1:
@@ -570,16 +570,16 @@ if 1:
 
                return str
        
-    conversions.append (((1,3,110), conv, '\\push -> \\override, \\pop -> \\revert'))
+       conversions.append (((1,3,110), conv, '\\push -> \\override, \\pop -> \\revert'))
 
 if 1:
        def conv (str):
                str = re.sub ('LyricVoice', 'LyricsVoice', str)
-               % old fix
+               # old fix
                str = re.sub ('ChordNames*.ChordNames*', 'Chordnames.Chordname', str)
                return str
        
-    conversions.append (((1,3,113), conv, 'LyricVoice -> LyricsVoice'))
+       conversions.append (((1,3,113), conv, 'LyricVoice -> LyricsVoice'))
 
 
 ############################