From f2f5eb23db6c2daf882957dcfe472657c8bdb1b6 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Wed, 11 Oct 2000 00:52:58 +0200 Subject: [PATCH] release: 1.3.95 ========== * Use music property for setting type. This prevents accidental forgotten copies. 1.3.94.j --- CHANGES | 34 ++++---------- Documentation/header.html.in | 5 +- VERSION | 4 +- input/bugs/generic-output-property.ly | 0 lily/arpeggio.cc | 2 +- lily/auto-change-iterator.cc | 3 +- lily/auto-change-music.cc | 4 +- lily/change-iterator.cc | 15 +++--- lily/change-translator.cc | 12 ----- lily/context-specced-music.cc | 1 + lily/grace-music.cc | 1 + lily/include/auto-change-music.hh | 5 +- lily/include/change-translator.hh | 25 ---------- lily/include/note-head.hh | 11 ++--- lily/include/output-property.hh | 2 + lily/include/request.hh | 1 + lily/include/rest.hh | 4 +- lily/include/rhythmic-head.hh | 8 +++- lily/include/spacing-spanner.hh | 23 +++++++++ lily/include/translation-property.hh | 3 ++ lily/lyric-combine-music.cc | 2 + lily/music-iterator.cc | 68 +++++++++++++++------------ lily/music-list.cc | 10 ++-- lily/output-property-engraver.cc | 21 +++++++-- lily/output-property.cc | 18 ------- lily/parser.yy | 42 +++++++++++------ lily/part-combine-music.cc | 2 + lily/property-iterator.cc | 2 +- lily/relative-octave-music.cc | 1 + lily/repeat-acknowledge-engraver.cc | 6 +++ lily/repeated-music.cc | 1 + lily/request.cc | 5 ++ lily/spacing-spanner.cc | 38 +++++++++++++++ lily/span-arpeggio.cc | 2 +- lily/time-scaled-music.cc | 1 + lily/transposed-music.cc | 2 +- ly/engraver.ly | 2 +- make/out/lilypond.lsm | 8 ++-- make/out/lilypond.spec | 4 +- 39 files changed, 225 insertions(+), 173 deletions(-) delete mode 100644 input/bugs/generic-output-property.ly delete mode 100644 lily/output-property.cc diff --git a/CHANGES b/CHANGES index 3f4b565714..2092760b67 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ ---- ../lilypond-1.3.94.jcn2/CHANGES Tue Oct 10 15:50:19 2000 -++ b/CHANGES Tue Oct 10 19:36:50 2000 -@@ -1,3 +1,10 @@ +1.3.94.uu1 +========== + +* Use music property for setting type. This prevents accidental +forgotten copies. + 1.3.94.jcn3 =========== @@ -8,37 +11,16 @@ * Yet another bugfix for output-property (Han-Wen) - 1.3.94.jcn2 - =========== - --- ../lilypond-1.3.94/CHANGES Sun Oct 8 10:27:38 2000 -++ b/CHANGES Tue Oct 10 17:28:55 2000 -@@ -1,3 +1,13 @@ -1.3.94.lec1 -=========== - -* fix abc2ly so that it doesn't ignor an L: field before an M: field - -* fix abc2ly so that bar lines are preserved - -* fix basic_properties.scm so that setting the default bar type to empty - doesn't give warnings about unknown barline glyph. - - 1.3.93.uu1 - ========== - 1.3.94.jcn2 -=========== - * Made some fixes to les-nereides. * Fixed output-property (Dankje). -1.3.94.jcn1 -=========== - * Added backend framework for arpeggios. * Fixes for les-nereides. Should we do asymmetric slurs...? +* Don't print repeat bars at start of line. + 1.3.94 ====== diff --git a/Documentation/header.html.in b/Documentation/header.html.in index 3454056125..2fa27d012a 100644 --- a/Documentation/header.html.in +++ b/Documentation/header.html.in @@ -48,13 +48,12 @@ which substitutes some @AT_VARIABLES@ as well. Documentation - NEWS
Change Log
FAQ
User manual
Features
- Todo
-
+ To do
+
Download Source diff --git a/VERSION b/VERSION index 91886aae3b..6693a290ce 100644 --- a/VERSION +++ b/VERSION @@ -1,8 +1,8 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 -PATCH_LEVEL=94 -MY_PATCH_LEVEL=jcn3 +PATCH_LEVEL=95 +MY_PATCH_LEVEL= # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/input/bugs/generic-output-property.ly b/input/bugs/generic-output-property.ly deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lily/arpeggio.cc b/lily/arpeggio.cc index b05187d805..1e7253645c 100644 --- a/lily/arpeggio.cc +++ b/lily/arpeggio.cc @@ -42,7 +42,7 @@ Arpeggio::brew_molecule (SCM smob) a.translate_axis (i * staff_space, Y_AXIS); mol.add_molecule (a); } - mol.translate (Offset (-2 * staff_space, 0); + mol.translate (Offset (-2 * staff_space, 0)); return mol.create_scheme (); } diff --git a/lily/auto-change-iterator.cc b/lily/auto-change-iterator.cc index cf291348c0..605363c488 100644 --- a/lily/auto-change-iterator.cc +++ b/lily/auto-change-iterator.cc @@ -125,7 +125,8 @@ Auto_change_iterator::process (Moment m) String to_id = (s >= 0) ? "up" : "down"; Auto_change_music const * auto_mus = dynamic_cast (music_l_); - change_to (child_iter_p_, auto_mus->what_str_, to_id); + String wh = ly_scm2string (auto_mus->get_mus_property ("what")); + change_to (child_iter_p_, wh, to_id); } } } diff --git a/lily/auto-change-music.cc b/lily/auto-change-music.cc index 82871ffd7d..c75cb9e605 100644 --- a/lily/auto-change-music.cc +++ b/lily/auto-change-music.cc @@ -10,8 +10,8 @@ #include "auto-change-music.hh" -Auto_change_music::Auto_change_music (String what, Music * m) +Auto_change_music::Auto_change_music (Music * m) : Music_wrapper (m) { - what_str_ = what; + set_mus_property ("type", ly_symbol2scm ("auto-change-music")); } diff --git a/lily/change-iterator.cc b/lily/change-iterator.cc index 7bd04e1e89..d1fc2006f0 100644 --- a/lily/change-iterator.cc +++ b/lily/change-iterator.cc @@ -8,16 +8,15 @@ #include "change-iterator.hh" #include "translator-group.hh" -#include "change-translator.hh" +#include "music.hh" #include "debug.hh" void Change_iterator::error (String reason) { - Change_translator const * t = dynamic_cast (music_l_); - String to_type = t->change_to_type_str_; - String to_id = t->change_to_id_str_; + String to_type = ly_scm2string (music_l_->get_mus_property ("change-to-type")); + String to_id = ly_scm2string (music_l_->get_mus_property ("change-to-id")); String warn1 = _f ("can't change `%s' to `%s'", to_type, to_id) + ": " + reason; @@ -28,7 +27,7 @@ Change_iterator::error (String reason) + report_to_l ()->type_str_ + " = `" + report_to_l ()->id_str_ + "': "; warning (warn2); - t->origin ()->warning (warn1); + music_l_->origin ()->warning (warn1); } /* @@ -40,9 +39,9 @@ Change_iterator::process (Moment m) Translator_group * current = report_to_l (); Translator_group * last = 0; - Change_translator const * t = dynamic_cast (music_l_); - String to_type = t->change_to_type_str_; - String to_id = t->change_to_id_str_; + String to_type = ly_scm2string (music_l_->get_mus_property ("change-to-type")); + String to_id = ly_scm2string (music_l_->get_mus_property ("change-to-id")); + /* find the type of translator that we're changing. diff --git a/lily/change-translator.cc b/lily/change-translator.cc index 144aefd229..8b13789179 100644 --- a/lily/change-translator.cc +++ b/lily/change-translator.cc @@ -1,13 +1 @@ -/* - change-translator.cc -- implement Change_translator - - source file of the GNU LilyPond music typesetter - - (c) 1997--2000 Han-Wen Nienhuys -*/ - -#include "change-translator.hh" -#include "debug.hh" - - diff --git a/lily/context-specced-music.cc b/lily/context-specced-music.cc index eb3005964e..cf3f520773 100644 --- a/lily/context-specced-music.cc +++ b/lily/context-specced-music.cc @@ -11,4 +11,5 @@ Context_specced_music::Context_specced_music(Music *m) : Music_wrapper (m) { + set_mus_property ("type", ly_symbol2scm ("context-specced-music")); } diff --git a/lily/grace-music.cc b/lily/grace-music.cc index 50c0f155f6..532bd07aaf 100644 --- a/lily/grace-music.cc +++ b/lily/grace-music.cc @@ -24,4 +24,5 @@ Grace_music::length_mom () const Grace_music::Grace_music (Music *p) : Music_wrapper (p) { + set_mus_property ("type", ly_symbol2scm ("grace-music")); } diff --git a/lily/include/auto-change-music.hh b/lily/include/auto-change-music.hh index 2295eb2223..f96a354fcb 100644 --- a/lily/include/auto-change-music.hh +++ b/lily/include/auto-change-music.hh @@ -12,11 +12,12 @@ #include "music-wrapper.hh" + class Auto_change_music : public Music_wrapper { public: - Auto_change_music (String what, Music *); - String what_str_; + Auto_change_music (Music *); + }; diff --git a/lily/include/change-translator.hh b/lily/include/change-translator.hh index 7dc774ca37..8b13789179 100644 --- a/lily/include/change-translator.hh +++ b/lily/include/change-translator.hh @@ -1,26 +1 @@ -/* - change-translator.hh -- declare Change_translator - source file of the GNU LilyPond music typesetter - - (c) 1997--2000 Han-Wen Nienhuys -*/ - - -#ifndef CHANGE_TRANSLATOR_HH -#define CHANGE_TRANSLATOR_HH - -#include "music.hh" - -class Change_translator : public Music -{ -public: - String change_to_type_str_; - String change_to_id_str_; - -protected: - VIRTUAL_COPY_CONS(Music); -}; - - -#endif // CHANGE_TRANSLATOR_HH diff --git a/lily/include/note-head.hh b/lily/include/note-head.hh index 8974b9828d..6703c443bb 100644 --- a/lily/include/note-head.hh +++ b/lily/include/note-head.hh @@ -10,15 +10,14 @@ #include "lily-guile.hh" #include "molecule.hh" -/** ball at the end of the stem. Takes care of: +/** ball at the end of the stem. Also takes care of ledger lines. - * help lines - - Properties + NoteHead is a kind of RhythmicHead, see there. + Read-only: + style -- symbol that sets note head style - - */ +*/ class Note_head { diff --git a/lily/include/output-property.hh b/lily/include/output-property.hh index bea2e0e2d6..01e8ffbf13 100644 --- a/lily/include/output-property.hh +++ b/lily/include/output-property.hh @@ -28,3 +28,5 @@ public: }; #endif /* OUTPUT_PROPERTY_HH */ + +#error diff --git a/lily/include/request.hh b/lily/include/request.hh index f1cd68f483..3792ee507b 100644 --- a/lily/include/request.hh +++ b/lily/include/request.hh @@ -26,6 +26,7 @@ */ class Request : public Music { public: + Request (); VIRTUAL_COPY_CONS(Music); bool equal_b (Request const*) const; protected: diff --git a/lily/include/rest.hh b/lily/include/rest.hh index 204c19f407..051bdaf989 100644 --- a/lily/include/rest.hh +++ b/lily/include/rest.hh @@ -14,8 +14,10 @@ /** A pause. + + See also Rhythmic_head, Staff_symbol_referencer. - Properties + Read-only properties: style -- string specifying glyph style */ diff --git a/lily/include/rhythmic-head.hh b/lily/include/rhythmic-head.hh index 855f84b7f7..50b1b87187 100644 --- a/lily/include/rhythmic-head.hh +++ b/lily/include/rhythmic-head.hh @@ -16,10 +16,14 @@ /* Properties - duration-log -- 2-log of the notehead duration - dot -- reference to Dots object. + stem -- pointer to Stem object + + Read-only + + duration-log -- 2-log of the notehead duration + */ class Rhythmic_head { diff --git a/lily/include/spacing-spanner.hh b/lily/include/spacing-spanner.hh index 7f678043ee..f0f81dde76 100644 --- a/lily/include/spacing-spanner.hh +++ b/lily/include/spacing-spanner.hh @@ -12,6 +12,29 @@ #include "spanner.hh" +/** + Read-only properties + + maximum-duration-for-spacing -- rational: space as if a duration of + this type is available in this measure. + + + + Read properties from paper-column + + dir-list -- list of stem directions + + shortest-playing-duration -- duration of the shortest playing in that column. + + shortest-starter-duration -- duration of the shortest notes that starts + exactly in that column. + + contains-grace -- boolean. Used to widen entries for grace notes. + + extra-space -- pair of distances + + stretch-distance -- pair of distances + */ class Spacing_spanner { public: diff --git a/lily/include/translation-property.hh b/lily/include/translation-property.hh index c8a4950783..dc332df200 100644 --- a/lily/include/translation-property.hh +++ b/lily/include/translation-property.hh @@ -1,3 +1,4 @@ +#if 0 /* translation-property.hh -- declare Translation_property @@ -23,6 +24,7 @@ class Translation_property : public Music { public: + Translation_property (); VIRTUAL_COPY_CONS(Music); }; @@ -61,3 +63,4 @@ void apply_pop_property (Translator_group*trans, SCM syms, SCM eprop); #endif // PROPERTY_HH +#endif diff --git a/lily/lyric-combine-music.cc b/lily/lyric-combine-music.cc index 2059314b25..dbbbfab278 100644 --- a/lily/lyric-combine-music.cc +++ b/lily/lyric-combine-music.cc @@ -14,6 +14,8 @@ Lyric_combine_music::Lyric_combine_music (Music * m, Music * l) { set_mus_property ("music", m->self_scm ()); set_mus_property ("lyrics", l->self_scm ()); + + set_mus_property ("type", ly_symbol2scm ("lyric-combine-music")); } diff --git a/lily/music-iterator.cc b/lily/music-iterator.cc index c6020272fd..4a2c2ec95e 100644 --- a/lily/music-iterator.cc +++ b/lily/music-iterator.cc @@ -10,37 +10,27 @@ UGH. too many includes. */ #include "debug.hh" -#include "music-list.hh" #include "music-iterator.hh" #include "property-iterator.hh" #include "request-chord-iterator.hh" #include "sequential-music-iterator.hh" #include "simultaneous-music-iterator.hh" #include "translator-group.hh" -#include "translation-property.hh" #include "change-iterator.hh" -#include "change-translator.hh" #include "music-wrapper.hh" #include "music-wrapper-iterator.hh" #include "time-scaled-music-iterator.hh" -#include "time-scaled-music.hh" -#include "context-specced-music.hh" #include "repeated-music.hh" #include "folded-repeat-iterator.hh" #include "unfolded-repeat-iterator.hh" #include "grace-iterator.hh" -#include "grace-music.hh" -#include "lyric-combine-music.hh" #include "lyric-combine-music-iterator.hh" -#include "auto-change-music.hh" #include "auto-change-iterator.hh" -#include "part-combine-music.hh" #include "part-combine-music-iterator.hh" -#include "request.hh" #include "simple-music-iterator.hh" -#include "output-property.hh" #include "output-property-music-iterator.hh" #include "chord-tremolo-iterator.hh" +#include "context-specced-music.hh" Music_iterator::Music_iterator () { @@ -109,38 +99,56 @@ Music_iterator::get_music (Moment)const return SCM_EOL; } + + +/* We could do this decentrally: + + - Declare a new smob-type, which stores a function ptr in its CDR + (and not a struct ptr). The function ptr has signature + + Music_iterator* (*)() + + - initialize all music with a set_mus_property("iterator-ctor"), + + - do + + func_ptr p = (func_ptr) gh_cdr (get_mus_property ("iterator-ctor")); + iter_p = (*p)(); + +*/ + Music_iterator* Music_iterator::static_get_iterator_p (Music *m) { Music_iterator * p =0; - /* It would be nice to do this decentrally, but the order of this is - significant. */ - if (dynamic_cast (m)) + SCM type = m->get_mus_property ("type") ; + + if (type == ly_symbol2scm ("property-set")) + p = new Property_iterator; + else if (type == ly_symbol2scm ("property-push")) + p = new Push_property_iterator; + else if (type == ly_symbol2scm ("property-pop")) + p = new Pop_property_iterator; + else if (type == ly_symbol2scm ("output-property")) + p = new Output_property_music_iterator; + else if (type == ly_symbol2scm ("request-chord")) p = new Request_chord_iterator; - else if (dynamic_cast (m)) + else if (type == ly_symbol2scm ("lyric-combine-music")) p = new Lyric_combine_music_iterator; - else if (dynamic_cast (m)) + else if (type == ly_symbol2scm ("simultaneous-music")) p = new Simultaneous_music_iterator; - else if (dynamic_cast (m)) + else if (type == ly_symbol2scm ("sequential-music")) p = new Sequential_music_iterator; - else if (dynamic_cast (m)) - p = new Property_iterator; - else if (dynamic_cast (m)) + else if (type == ly_symbol2scm ("change-translator")) p = new Change_iterator; - else if (dynamic_cast (m)) - p = new Push_property_iterator; - else if (dynamic_cast (m)) - p = new Pop_property_iterator; - else if (dynamic_cast (m)) + else if (type == ly_symbol2scm ("time-scaled-music")) p = new Time_scaled_music_iterator; - else if (dynamic_cast (m)) + else if (type == ly_symbol2scm ("grace-music")) p = new Grace_iterator; - else if (dynamic_cast (m)) + else if (type == ly_symbol2scm ("auto-change-music")) p = new Auto_change_iterator; - else if (dynamic_cast (m)) - p = new Output_property_music_iterator; - else if (dynamic_cast (m)) + else if (type == ly_symbol2scm ("part-combined-music")) p = new Part_combine_music_iterator; else if (dynamic_cast (m)) p = new Music_wrapper_iterator; diff --git a/lily/music-list.cc b/lily/music-list.cc index 4df9c53da4..81eee92a02 100644 --- a/lily/music-list.cc +++ b/lily/music-list.cc @@ -24,12 +24,13 @@ Simultaneous_music::length_mom () const Simultaneous_music::Simultaneous_music(SCM head) : Music_sequence (head) { - + set_mus_property ("type", ly_symbol2scm ("simultaneous-music")); } Sequential_music::Sequential_music(SCM head) : Music_sequence (head) { + set_mus_property ("type", ly_symbol2scm ("sequential-music")); } @@ -48,14 +49,15 @@ Simultaneous_music::to_relative_octave (Musical_pitch p) Request_chord::Request_chord(SCM s) : Simultaneous_music (s) { + set_mus_property ("type", ly_symbol2scm ("request-chord")); } Musical_pitch Request_chord::to_relative_octave (Musical_pitch last) { - for (SCM s = music_list (); gh_pair_p (s); s = gh_cdr (s)) - { - Music * mus = unsmob_music (gh_car (s)); + for (SCM s = music_list (); gh_pair_p (s); s = gh_cdr (s)) + { + Music * mus = unsmob_music (gh_car (s)); if (Melodic_req *m= dynamic_cast (mus)) { Musical_pitch &pit = m->pitch_; diff --git a/lily/output-property-engraver.cc b/lily/output-property-engraver.cc index b20f3d7ca2..ad596bea3e 100644 --- a/lily/output-property-engraver.cc +++ b/lily/output-property-engraver.cc @@ -7,7 +7,6 @@ */ -#include "output-property.hh" #include "engraver.hh" #include "score-element.hh" @@ -16,8 +15,20 @@ class Output_property_engraver : public Engraver public: VIRTUAL_COPY_CONS(Translator); protected: + + /* + should do this with \once and \push ? + + + \property Voice.outputProperties \push #pred = #modifier + + where both MODIFIER and PRED are functions taking a + score-element. + + */ + - Link_array props_; + Link_array props_; virtual void do_pre_move_processing (); virtual void acknowledge_element (Score_element_info); @@ -28,9 +39,9 @@ protected: bool Output_property_engraver::do_try_music (Music* m) { - if (Output_property * o = dynamic_cast (m)) + if (m->get_mus_property ("type") == ly_symbol2scm ("output-property")) { - props_.push (o); + props_.push (m); return true; } return false; @@ -41,7 +52,7 @@ Output_property_engraver::acknowledge_element (Score_element_info inf) { for (int i=props_.size (); i--; ) { - Output_property * o = props_[i]; + Music * o = props_[i]; SCM pred = o->get_mus_property ("predicate"); /* diff --git a/lily/output-property.cc b/lily/output-property.cc deleted file mode 100644 index 8cd70e8262..0000000000 --- a/lily/output-property.cc +++ /dev/null @@ -1,18 +0,0 @@ -/* - output-property.cc -- implement Output_property - - source file of the GNU LilyPond music typesetter - - (c) 2000 Han-Wen Nienhuys - - */ -#include "output-property.hh" -#include "lily-guile.hh" - -Output_property::Output_property(SCM pred, SCM sym, SCM val) -{ - set_mus_property ("predicate", pred); - set_mus_property ("symbol", sym); - set_mus_property ("value", val); -} - diff --git a/lily/parser.yy b/lily/parser.yy index 0fd6d6d14b..8d64ac3d47 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -12,7 +12,7 @@ #include #include "translator-def.hh" #include "lily-guile.hh" -#include "translation-property.hh" + #include "lookup.hh" #include "misc.hh" #include "my-lily-lexer.hh" @@ -29,7 +29,7 @@ #include "context-specced-music.hh" #include "score.hh" #include "music-list.hh" -#include "change-translator.hh" + #include "file-results.hh" #include "input.hh" #include "scope.hh" @@ -42,7 +42,7 @@ #include "grace-music.hh" #include "auto-change-music.hh" #include "part-combine-music.hh" -#include "output-property.hh" + #include "chord.hh" bool @@ -692,8 +692,14 @@ Simple_music: { THIS->parser_error (_("First argument must be a procedure taking 1 argument")); } - - $$ = new Output_property (pred,$3, $5); + + Music *m = new Music; + m->set_mus_property ("predicate", pred); + m->set_mus_property ("symbol", $3); + m->set_mus_property ("value", $5); + m->set_mus_property ("type", ly_symbol2scm ("output-property")); + + $$ = m; } | MUSIC_IDENTIFIER { $$ = unsmob_music ($1)->clone (); @@ -722,7 +728,8 @@ Composite_music: $$ = csm; } | AUTOCHANGE STRING Music { - Auto_change_music * chm = new Auto_change_music (ly_scm2string ($2), $3); + Auto_change_music * chm = new Auto_change_music ($3); + chm->set_mus_property ("what", $2); $$ = chm; chm->set_spot (*$3->origin ()); @@ -807,9 +814,11 @@ part_combined_music: translator_change: TRANSLATOR STRING '=' STRING { - Change_translator * t = new Change_translator; - t-> change_to_type_str_ = ly_scm2string ($2); - t-> change_to_id_str_ = ly_scm2string ($4); + Music * t = new Music; + t->set_mus_property ("type", + ly_symbol2scm ("change-translator")); + t-> set_mus_property ("change-to-type", $2); + t-> set_mus_property ("change-to-id", $4); $$ = t; $$->set_spot (THIS->here_input ()); @@ -818,8 +827,9 @@ translator_change: property_def: PROPERTY STRING '.' STRING '=' scalar { - Translation_property *t = new Translation_property; + Music *t = new Music; + t->set_mus_property ("type", ly_symbol2scm ("property-set")); t->set_mus_property ("symbol", scm_string_to_symbol ($4)); t->set_mus_property ("value", $6); @@ -830,8 +840,8 @@ property_def: csm-> translator_type_str_ = ly_scm2string ($2); } | PROPERTY STRING '.' STRING PUSH embedded_scm '=' embedded_scm { - Push_translation_property *t = new Push_translation_property; - + Music *t = new Music; + t->set_mus_property ("type", ly_symbol2scm ("property-push")); t->set_mus_property ("symbols", scm_string_to_symbol ($4)); t->set_mus_property ("element-property", $6); t->set_mus_property ("element-value", $8); @@ -842,8 +852,8 @@ property_def: csm-> translator_type_str_ = ly_scm2string ($2); } | PROPERTY STRING '.' STRING POP embedded_scm { - Pop_translation_property *t = new Pop_translation_property; - + Music *t = new Music; + t->set_mus_property ("type", ly_symbol2scm ("property-pop")); t->set_mus_property ("symbols", scm_string_to_symbol ($4)); t->set_mus_property ("element-property", $6); @@ -886,8 +896,10 @@ command_element: $1-> set_spot (THIS->here_input ()); } | PARTIAL duration_length ';' { - Translation_property * p = new Translation_property; + Music * p = new Music; p->set_mus_property ("symbol", ly_symbol2scm ( "measurePosition")); + p->set_mus_property ("type", ly_symbol2scm ("property-set")); + Moment m = - $2->length_mom (); p->set_mus_property ("value", m.make_scm()); delete $2; // ugh diff --git a/lily/part-combine-music.cc b/lily/part-combine-music.cc index c6ee771304..155f2de24c 100644 --- a/lily/part-combine-music.cc +++ b/lily/part-combine-music.cc @@ -18,6 +18,8 @@ Part_combine_music::Part_combine_music (String what, Music * f, Music * s) scm_unprotect_object (f->self_scm()); scm_unprotect_object (s->self_scm()); + + set_mus_property ("type", ly_symbol2scm ("part-combined-music")); } void diff --git a/lily/property-iterator.cc b/lily/property-iterator.cc index ea8273d761..3799ba0e2f 100644 --- a/lily/property-iterator.cc +++ b/lily/property-iterator.cc @@ -7,7 +7,7 @@ */ #include "property-iterator.hh" -#include "translation-property.hh" +#include "music.hh" #include "translator-def.hh" #include "translator-group.hh" diff --git a/lily/relative-octave-music.cc b/lily/relative-octave-music.cc index 5f8081afa0..f339aa92ca 100644 --- a/lily/relative-octave-music.cc +++ b/lily/relative-octave-music.cc @@ -21,6 +21,7 @@ Relative_octave_music::Relative_octave_music(Music*p,Musical_pitch def) : Music_wrapper (p) { last_pitch_ = element ()->to_relative_octave (def); + set_mus_property ("type", ly_symbol2scm ("relative-octave-music")); } diff --git a/lily/repeat-acknowledge-engraver.cc b/lily/repeat-acknowledge-engraver.cc index 477e295fb1..bf888bc1b0 100644 --- a/lily/repeat-acknowledge-engraver.cc +++ b/lily/repeat-acknowledge-engraver.cc @@ -57,6 +57,12 @@ Repeat_acknowledge_engraver::do_post_move_processing () void Repeat_acknowledge_engraver::do_process_music () { + /* + At the start of a piece, we don't print any repeat bars. + */ + if (now_mom () == Moment (0)) + return ; + SCM cs = get_property ("repeatCommands"); String s = ""; diff --git a/lily/repeated-music.cc b/lily/repeated-music.cc index baae892504..4cdd682761 100644 --- a/lily/repeated-music.cc +++ b/lily/repeated-music.cc @@ -40,6 +40,7 @@ Repeated_music::Repeated_music(Music *beg, int times, Music_sequence * alts) 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) diff --git a/lily/request.cc b/lily/request.cc index ad9223d274..3b39385c4b 100644 --- a/lily/request.cc +++ b/lily/request.cc @@ -23,3 +23,8 @@ Request::do_equal_b (Request const*) const return true; } + +Request::Request () +{ + set_mus_property ("type", ly_symbol2scm ("request")); +} diff --git a/lily/spacing-spanner.cc b/lily/spacing-spanner.cc index 5483955386..43ef9b974a 100644 --- a/lily/spacing-spanner.cc +++ b/lily/spacing-spanner.cc @@ -340,3 +340,41 @@ Spacing_spanner::set_springs (SCM smob) +/* + maximum-duration-for-spacing +From: bf250@freenet.carleton.ca (John Sankey) +To: gnu-music-discuss@gnu.org +Subject: note spacing suggestion +Date: Mon, 10 Jul 2000 11:28:03 -0400 (EDT) + +Currently, Lily spaces notes by starting with a basic distance, +arithmetic_multiplier, which it applies to the minimum duration note +of the bar. Then she adds a logarithmic increment, scaled from +arithmetic_basicspace, for longer notes. (Then, columns are aligned +and justified.) Fundamentally, this matches visual spacing to musical +weight and works well. + +A lot of the time in music, I see a section basically in melodic +notes that occasionally has a rapid ornamental run (scale). So, there +will be a section in 1/4 notes, then a brief passage in 1/32nds, then +a return to long notes. Currently, Lily gives the same horizontal +space to the 1/32nd notes in their bar (even if set in small size as +is commonly done for cadenzii) as she gives to 1/4 notes in bars +where 1/4 note is the minimum duration. The resulting visual weight +does not match the musical weight over the page. + +Looking at the music I am typesetting, I feel that Lily's spacing +could be significantly improved if, with no change in the basic +method used, arithmetic_multiplier could be applied referred to the +same duration throughout a piece. Of course, the current method +should be retained for those who have already set music in it, so I +suggest a property called something like arithmetic_base=16 to fix +1/16 duration as the reference for arithmetic_multiplier; the default +would be a dynamic base is it is now. + +Does anyone else feel that this would be a useful improvement for +their music? (Of course, if arithmetic_multiplier became a regular +property, this could be used to achieve a similar result by +tweaking.) + + */ diff --git a/lily/span-arpeggio.cc b/lily/span-arpeggio.cc index ce588cea2b..2dc2ca7761 100644 --- a/lily/span-arpeggio.cc +++ b/lily/span-arpeggio.cc @@ -60,7 +60,7 @@ Span_arpeggio::brew_molecule (SCM smob) a.translate_axis (i * staff_space, Y_AXIS); mol.add_molecule (a); } - mol.translate (Offset (-2 * staff_space, 0); + mol.translate (Offset (-2 * staff_space, 0)); return mol.create_scheme (); } diff --git a/lily/time-scaled-music.cc b/lily/time-scaled-music.cc index 4aa1d037af..75547b17b4 100644 --- a/lily/time-scaled-music.cc +++ b/lily/time-scaled-music.cc @@ -16,6 +16,7 @@ Time_scaled_music::Time_scaled_music (int n, int d,Music *mp) num_i_ = n; den_i_ = d; compress (Moment (num_i_,den_i_)); + set_mus_property ("type", ly_symbol2scm ("time-scaled-music")); } diff --git a/lily/transposed-music.cc b/lily/transposed-music.cc index 7c7f38ac2d..e22f19f8f2 100644 --- a/lily/transposed-music.cc +++ b/lily/transposed-music.cc @@ -15,13 +15,13 @@ Transposed_music::Transposed_music (Music *p, Musical_pitch pit) { transpose_to_pitch_ = pit; p->transpose (pit); + set_mus_property ("type", ly_symbol2scm ("transposed-music")); } Musical_pitch Transposed_music::to_relative_octave (Musical_pitch p) { - return p; } diff --git a/ly/engraver.ly b/ly/engraver.ly index 7ec843a289..53c4a8aab1 100644 --- a/ly/engraver.ly +++ b/ly/engraver.ly @@ -551,7 +551,7 @@ ScoreContext = \translator { (interfaces . (dot-interface)) (molecule-callback . ,Dots::brew_molecule) (dot-count . 1) - (position . 0.0) + (staff-position . 0.0) (Y-offset-callbacks . (,Dots::quantised_position_callback ,Staff_symbol_referencer::callback)) (name . "Dots") diff --git a/make/out/lilypond.lsm b/make/out/lilypond.lsm index c1e1c8f272..c318b7dfef 100644 --- a/make/out/lilypond.lsm +++ b/make/out/lilypond.lsm @@ -1,15 +1,15 @@ Begin3 Title: LilyPond -Version: 1.3.94 -Entered-date: 08OCT00 +Version: 1.3.95 +Entered-date: 11OCT00 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.94.tar.gz + 1000k lilypond-1.3.95.tar.gz Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/ - 1000k lilypond-1.3.94.tar.gz + 1000k lilypond-1.3.95.tar.gz Copying-policy: GPL End diff --git a/make/out/lilypond.spec b/make/out/lilypond.spec index 43985875f9..ea06e44e7d 100644 --- a/make/out/lilypond.spec +++ b/make/out/lilypond.spec @@ -1,9 +1,9 @@ Name: lilypond -Version: 1.3.94 +Version: 1.3.95 Release: 1 License: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.94.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.95.tar.gz Summary: A program for printing sheet music. URL: http://www.cs.uu.nl/~hanwen/lilypond # Icon: lilypond-icon.gif -- 2.39.2