From 1161a2b71bc32575ea9878a8631221edb8c03279 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Mon, 4 Dec 2000 17:42:18 +0100 Subject: [PATCH] release: 1.3.115 =========== * 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 --- CHANGES | 51 ++++- Documentation/topdocs/FAQ.texi | 9 - Documentation/user/GNUmakefile | 5 +- FAQ.txt | 66 ++++++ VERSION | 4 +- input/test/GNUmakefile | 2 + input/test/coriolan-margin.ly | 21 +- input/test/figured-bass.ly | 26 +++ input/test/time.ly | 280 +++++++++++++------------- lily/all-font-metrics.cc | 4 +- lily/auto-change-music.cc | 2 +- lily/context-specced-music.cc | 2 +- lily/grace-music.cc | 2 +- lily/include/auto-change-music.hh | 2 +- lily/include/context-specced-music.hh | 2 +- lily/include/grace-music.hh | 2 +- lily/include/lyric-combine-music.hh | 2 +- lily/include/music-wrapper.hh | 2 +- lily/include/music.hh | 4 +- lily/include/part-combine-music.hh | 2 +- lily/include/relative-music.hh | 5 +- lily/include/repeated-music.hh | 3 +- lily/include/time-scaled-music.hh | 5 +- lily/include/transposed-music.hh | 2 +- lily/instrument-name-engraver.cc | 23 ++- lily/lyric-combine-music.cc | 6 +- lily/music-sequence.cc | 4 +- lily/music-wrapper.cc | 5 +- lily/music.cc | 4 +- lily/parser.yy | 208 ++++++++++++++----- lily/part-combine-music.cc | 11 +- lily/relative-octave-music.cc | 5 +- lily/repeated-music.cc | 21 +- lily/request.cc | 1 + lily/tie-engraver.cc | 45 +++-- lily/time-scaled-music.cc | 7 +- lily/translator-group.cc | 38 ++++ lily/transposed-music.cc | 5 +- make/out/lilypond.lsm | 8 +- make/out/lilypond.spec | 4 +- make/toplevel.make.in | 2 +- scm/lily.scm | 1 + scm/translator-description.scm | 15 +- scm/translator-properties.scm | 4 +- scripts/abc2ly.py | 135 ++++++++++--- scripts/convert-ly.py | 102 +++++----- 46 files changed, 750 insertions(+), 409 deletions(-) create mode 100644 FAQ.txt create mode 100644 input/test/figured-bass.ly diff --git a/CHANGES b/CHANGES index aa2ce1f6de..743168d426 100644 --- 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. diff --git a/Documentation/topdocs/FAQ.texi b/Documentation/topdocs/FAQ.texi index 4f9cf32846..080ee097ed 100644 --- a/Documentation/topdocs/FAQ.texi +++ b/Documentation/topdocs/FAQ.texi @@ -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 diff --git a/Documentation/user/GNUmakefile b/Documentation/user/GNUmakefile index bff671da11..906ea48fb5 100644 --- a/Documentation/user/GNUmakefile +++ b/Documentation/user/GNUmakefile @@ -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 index 0000000000..eee25e0582 --- /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 73a41db9ce..b94cd0f76c 100644 --- 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. diff --git a/input/test/GNUmakefile b/input/test/GNUmakefile index f044715b2f..d3df72fc77 100644 --- a/input/test/GNUmakefile +++ b/input/test/GNUmakefile @@ -4,5 +4,7 @@ depth = ../.. examples= font20 LOCALSTEPMAKE_TEMPLATES=mutopia +EXTRA_DISTFILES=features.abc + include $(depth)/make/stepmake.make diff --git a/input/test/coriolan-margin.ly b/input/test/coriolan-margin.ly index 30bb13b080..26bd470d44 100644 --- a/input/test/coriolan-margin.ly +++ b/input/test/coriolan-margin.ly @@ -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 index 0000000000..f019ea5327 --- /dev/null +++ b/input/test/figured-bass.ly @@ -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 | + } +} + diff --git a/input/test/time.ly b/input/test/time.ly index d97e700df6..0731002786 100644 --- a/input/test/time.ly +++ b/input/test/time.ly @@ -1,145 +1,145 @@ \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 { } diff --git a/lily/all-font-metrics.cc b/lily/all-font-metrics.cc index fd34ea57a2..b678dc5adf 100644 --- a/lily/all-font-metrics.cc +++ b/lily/all-font-metrics.cc @@ -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); } diff --git a/lily/auto-change-music.cc b/lily/auto-change-music.cc index d98cd8ed29..5af0524d96 100644 --- a/lily/auto-change-music.cc +++ b/lily/auto-change-music.cc @@ -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); diff --git a/lily/context-specced-music.cc b/lily/context-specced-music.cc index 4c6cbfb47a..8350fcb098 100644 --- a/lily/context-specced-music.cc +++ b/lily/context-specced-music.cc @@ -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", diff --git a/lily/grace-music.cc b/lily/grace-music.cc index e2928ad6ec..a17842339c 100644 --- a/lily/grace-music.cc +++ b/lily/grace-music.cc @@ -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", diff --git a/lily/include/auto-change-music.hh b/lily/include/auto-change-music.hh index f96a354fcb..0451dd1fba 100644 --- a/lily/include/auto-change-music.hh +++ b/lily/include/auto-change-music.hh @@ -16,7 +16,7 @@ class Auto_change_music : public Music_wrapper { public: - Auto_change_music (Music *); + Auto_change_music (SCM); }; diff --git a/lily/include/context-specced-music.hh b/lily/include/context-specced-music.hh index 0c293c8166..719a37fffb 100644 --- a/lily/include/context-specced-music.hh +++ b/lily/include/context-specced-music.hh @@ -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 */ diff --git a/lily/include/grace-music.hh b/lily/include/grace-music.hh index ed9ab73d9f..cc015b5c85 100644 --- a/lily/include/grace-music.hh +++ b/lily/include/grace-music.hh @@ -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; diff --git a/lily/include/lyric-combine-music.hh b/lily/include/lyric-combine-music.hh index d28a8c5fe3..78b18b0cb2 100644 --- a/lily/include/lyric-combine-music.hh +++ b/lily/include/lyric-combine-music.hh @@ -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); diff --git a/lily/include/music-wrapper.hh b/lily/include/music-wrapper.hh index 4f6546c405..b5f274cad4 100644 --- a/lily/include/music-wrapper.hh +++ b/lily/include/music-wrapper.hh @@ -22,7 +22,7 @@ class Music_wrapper : public Music { public: - Music_wrapper (Music*); + Music_wrapper (SCM); Music * element () const; virtual void transpose (Pitch); diff --git a/lily/include/music.hh b/lily/include/music.hh index a139ae28d4..c6b5339e4f 100644 --- a/lily/include/music.hh +++ b/lily/include/music.hh @@ -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_; - }; diff --git a/lily/include/part-combine-music.hh b/lily/include/part-combine-music.hh index ed0b560a9f..4314b86471 100644 --- a/lily/include/part-combine-music.hh +++ b/lily/include/part-combine-music.hh @@ -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; diff --git a/lily/include/relative-music.hh b/lily/include/relative-music.hh index 071b34152b..5a07fbc8a1 100644 --- a/lily/include/relative-music.hh +++ b/lily/include/relative-music.hh @@ -15,10 +15,7 @@ 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); diff --git a/lily/include/repeated-music.hh b/lily/include/repeated-music.hh index b2deaee08f..b7ebb339d8 100644 --- a/lily/include/repeated-music.hh +++ b/lily/include/repeated-music.hh @@ -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); }; diff --git a/lily/include/time-scaled-music.hh b/lily/include/time-scaled-music.hh index 21d8e70d87..d184f395d1 100644 --- a/lily/include/time-scaled-music.hh +++ b/lily/include/time-scaled-music.hh @@ -17,10 +17,7 @@ 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); }; diff --git a/lily/include/transposed-music.hh b/lily/include/transposed-music.hh index 55ff38ff8d..641c8a915b 100644 --- a/lily/include/transposed-music.hh +++ b/lily/include/transposed-music.hh @@ -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); diff --git a/lily/instrument-name-engraver.cc b/lily/instrument-name-engraver.cc index cac8ec76d4..e903781f7e 100644 --- a/lily/instrument-name-engraver.cc +++ b/lily/instrument-name-engraver.cc @@ -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_) diff --git a/lily/lyric-combine-music.cc b/lily/lyric-combine-music.cc index a91dcb5644..51e37f80f5 100644 --- a/lily/lyric-combine-music.cc +++ b/lily/lyric-combine-music.cc @@ -11,11 +11,9 @@ #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); } diff --git a/lily/music-sequence.cc b/lily/music-sequence.cc index 5fd6206da3..5ce5b1a8b9 100644 --- a/lily/music-sequence.cc +++ b/lily/music-sequence.cc @@ -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 diff --git a/lily/music-wrapper.cc b/lily/music-wrapper.cc index 801af5b8e9..c6f7f50b9a 100644 --- a/lily/music-wrapper.cc +++ b/lily/music-wrapper.cc @@ -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 diff --git a/lily/music.cc b/lily/music.cc index b807dec07e..d4b7d7b166 100644 --- a/lily/music.cc +++ b/lily/music.cc @@ -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 (); } diff --git a/lily/parser.yy b/lily/parser.yy index c39f5ecc32..5d6485132a 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -663,13 +663,30 @@ Alternative_music: Repeated_music: REPEAT STRING bare_unsigned Music Alternative_music { - Music_sequence* m = dynamic_cast ($5); - if (m && $3 < m->length_i ()) + Music_sequence* alts = dynamic_cast ($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; diff --git a/lily/part-combine-music.cc b/lily/part-combine-music.cc index 27617f77e8..7059eca24c 100644 --- a/lily/part-combine-music.cc +++ b/lily/part-combine-music.cc @@ -11,16 +11,9 @@ #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); } diff --git a/lily/relative-octave-music.cc b/lily/relative-octave-music.cc index 33a85917bc..ae6773a6b2 100644 --- a/lily/relative-octave-music.cc +++ b/lily/relative-octave-music.cc @@ -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")); } diff --git a/lily/repeated-music.cc b/lily/repeated-music.cc index fec8d7be73..9ff853a9a6 100644 --- a/lily/repeated-music.cc +++ b/lily/repeated-music.cc @@ -24,29 +24,12 @@ Repeated_music::alternatives ()const return dynamic_cast (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) diff --git a/lily/request.cc b/lily/request.cc index d10693e898..e9f6427cd1 100644 --- a/lily/request.cc +++ b/lily/request.cc @@ -25,6 +25,7 @@ Request::do_equal_b (Request const*) const Request::Request () + : Music (SCM_EOL) { set_mus_property ("type", ly_symbol2scm ("request")); } diff --git a/lily/tie-engraver.cc b/lily/tie-engraver.cc index 953bdb0ff3..57f9baad36 100644 --- a/lily/tie-engraver.cc +++ b/lily/tie-engraver.cc @@ -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 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 pitchget_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 (); } diff --git a/lily/time-scaled-music.cc b/lily/time-scaled-music.cc index 74559e404a..ed3961b27e 100644 --- a/lily/time-scaled-music.cc +++ b/lily/time-scaled-music.cc @@ -10,15 +10,12 @@ #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)); } diff --git a/lily/translator-group.cc b/lily/translator-group.cc index 5b16536e94..4bf75074a0 100644 --- a/lily/translator-group.cc +++ b/lily/translator-group.cc @@ -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 (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 (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); diff --git a/lily/transposed-music.cc b/lily/transposed-music.cc index 166f68c968..a059b2b5bd 100644 --- a/lily/transposed-music.cc +++ b/lily/transposed-music.cc @@ -10,10 +10,9 @@ #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")); } diff --git a/make/out/lilypond.lsm b/make/out/lilypond.lsm index a31d8622a8..173a3f2ae8 100644 --- a/make/out/lilypond.lsm +++ b/make/out/lilypond.lsm @@ -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 diff --git a/make/out/lilypond.spec b/make/out/lilypond.spec index 7da1afd806..f99faf6c03 100644 --- a/make/out/lilypond.spec +++ b/make/out/lilypond.spec @@ -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 diff --git a/make/toplevel.make.in b/make/toplevel.make.in index db72f683ce..37ac56142a 100644 --- a/make/toplevel.make.in +++ b/make/toplevel.make.in @@ -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) diff --git a/scm/lily.scm b/scm/lily.scm index 7243adeae8..228c6d3a78 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -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)))) diff --git a/scm/translator-description.scm b/scm/translator-description.scm index 3f2816cd8b..879b4ff090 100644 --- a/scm/translator-description.scm +++ b/scm/translator-description.scm @@ -10,10 +10,10 @@ '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) diff --git a/scm/translator-properties.scm b/scm/translator-properties.scm index dec53c5905..751081619a 100644 --- a/scm/translator-properties.scm +++ b/scm/translator-properties.scm @@ -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 diff --git a/scripts/abc2ly.py b/scripts/abc2ly.py index b31a56bc3c..8cab59b86a 100644 --- a/scripts/abc2ly.py +++ b/scripts/abc2ly.py @@ -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 diff --git a/scripts/convert-ly.py b/scripts/convert-ly.py index 462c51a673..5a86f0ce61 100644 --- a/scripts/convert-ly.py +++ b/scripts/convert-ly.py @@ -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, ' c -> ~ c')) + conversions.append (((1,0,13), conv, ' c -> ~ c')) if 1: def conv(str): @@ -254,7 +254,7 @@ if 1: return str - conversions.append (((1,0,14), conv, '<[a b> c -> [ ]')) + conversions.append (((1,0,14), conv, '<[a b> c -> [ ]')) 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')) ############################ -- 2.39.5