From 0af6d4cb04fa3e4aa69a7aecb76034e4cb1ec49b Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Fri, 10 Nov 2000 11:16:07 +0100 Subject: [PATCH] release: 1.3.106 ============ * Makeinfo html documentation generation fixes. 1.3.105. --- CHANGES | 22 ++++- Documentation/header.html.in | 7 +- Documentation/user/GNUmakefile | 1 + NEWS | 4 + VERSION | 4 +- input/test/manual-clef.ly | 26 +++++ lily/clef-engraver.cc | 137 +++++++++++--------------- lily/include/context-specced-music.hh | 5 +- lily/key-engraver.cc | 2 +- lily/key-performer.cc | 3 +- lily/lily-guile.cc | 7 +- lily/music-iterator.cc | 14 ++- lily/note-heads-engraver.cc | 26 ++++- lily/parser.yy | 64 ++++++++---- lily/piano-pedal-engraver.cc | 2 +- lily/property-engraver.cc | 10 +- lily/request-chord-iterator.cc | 12 +-- lily/timing-engraver.cc | 6 +- lily/translator-group.cc | 18 ++-- ly/engraver.ly | 52 +--------- ly/property.ly | 4 +- make/mutopia-rules.make | 3 - make/out/lilypond.lsm | 8 +- make/out/lilypond.spec | 4 +- mutopia/F.Schubert/standchen.ly | 41 +++++--- scm/element-descriptions.scm | 1 + scm/lily.scm | 77 +++++++++++++++ scm/translator-description.scm | 15 ++- scripts/mudela-book.py | 24 +++-- 29 files changed, 360 insertions(+), 239 deletions(-) create mode 100644 input/test/manual-clef.ly diff --git a/CHANGES b/CHANGES index 492d53fa96..ecca8a8e2d 100644 --- a/CHANGES +++ b/CHANGES @@ -3,8 +3,23 @@ * Makeinfo html documentation generation fixes. -1.3.104.jcn1 -============ +1.3.105.uu1 +=========== + +* Remove Bar_req, \bar is now a frontend to setting Score.whichBar + +* Move Context_specced_music::translator_{type,id}_str_ into music +properties. + +* Don't make line breaks during note playing. + +* Clef engraver rewrite. Clef-engraver is now controlled through +properties clefPosition, clefGlyph, clefOctavation. The \clef command +is just a front-end to these, see scm/lily.scm, function +clef-name-to-properties. See also input/test/manual-clef.ly + +1.3.105 +======= * Bit of temporary makefile hacking to stay in sync with makeinfo patch. @@ -218,7 +233,7 @@ input/test/instrument-name-grandstaff.ly * Moved Text_script_req's text_ member into mus-property. -* Renamed ChordName to ChordNames, for consistancy. +* Renamed ChordName to ChordNames, for consistency. * Resurrected most of chord names, superscripting and kerning is currently broken, though. @@ -368,7 +383,6 @@ Break_align_item::space-alist, Chord_name::chord-name-function * Added \property combineParts: part combiner switched off by default. - * Remove all print methods. * Use Scope::try_retrieve if possible. diff --git a/Documentation/header.html.in b/Documentation/header.html.in index 6ad66e9fce..6bd96bbf5a 100644 --- a/Documentation/header.html.in +++ b/Documentation/header.html.in @@ -81,10 +81,9 @@ which substitutes some @AT_VARIABLES@ as well. Short examples
Longer examples
- Mutopia Project
- Jonh Sankey
- Jeff Covey
- Dirk Lattermann
+ Mutopia Project
+ + Other URLs

diff --git a/Documentation/user/GNUmakefile b/Documentation/user/GNUmakefile index feafeb8fcd..b586a9a4f5 100644 --- a/Documentation/user/GNUmakefile +++ b/Documentation/user/GNUmakefile @@ -38,6 +38,7 @@ DEEP_HTML_FILES = $(outdir)/lilypond/lilypond.html $(outdir)/lilypond-internals/ local-WWW: $(HTML_FILES) $(datafiles) $(PS_GZ_FILES) $(DEEP_HTML_FILES) $(SHELL) $(buildscript-dir)/install-info-html.sh --dir=$(outdir) lilypond lilypond-internals $(MAKE) footify + -mkdir $(outdir)/lilypond ln -f $(outdir)/*.png $(outdir)/lilypond $(MAKE) deep-footify diff --git a/NEWS b/NEWS index 2f2f4347ae..fd86eddfd9 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,8 @@ internals: LilyPond is smaller, cleaner, more flexible, etc. * New font selection scheme similar to Latex-NFSS. +* Medieval notation features: clefs, custodes + * Piano pedal support, Arpeggios, Custodes * MIDI: dynamics, tempo changes @@ -38,6 +40,8 @@ internals: LilyPond is smaller, cleaner, more flexible, etc. * Finished ouverture Coriolan as full orchestral score example. +* Self-documenting: generated internal documentation. + * AsciiScript: ASCII-art output * Translations into Japanese, French and Russian diff --git a/VERSION b/VERSION index 8276e5dc47..a70f97234c 100644 --- a/VERSION +++ b/VERSION @@ -1,8 +1,8 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 -PATCH_LEVEL=105 -MY_PATCH_LEVEL=tca1 +PATCH_LEVEL=106 +MY_PATCH_LEVEL= # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/input/test/manual-clef.ly b/input/test/manual-clef.ly new file mode 100644 index 0000000000..f6b08e02d6 --- /dev/null +++ b/input/test/manual-clef.ly @@ -0,0 +1,26 @@ +\version "1.3.105"; + +%{ + +Test clef engraver by setting \property directly. \clef is merely a front-end to this. + +%} + +\score { \notes { + \property Staff.clefGlyph = #"clefs-F" + \property Staff.clefPosition = #2 + c'4 + \property Staff.clefGlyph = #"clefs-G" + c'4 + \property Staff.clefGlyph = #"clefs-C" + + c'4 + \property Staff.clefOctavation = #7 + c'4 + \property Staff.clefOctavation = #0 + \property Staff.clefPosition = #0 + c'4 + \clef "bla"; + c'4 + +}} diff --git a/lily/clef-engraver.cc b/lily/clef-engraver.cc index 83eb544afe..818e3544a0 100644 --- a/lily/clef-engraver.cc +++ b/lily/clef-engraver.cc @@ -32,86 +32,81 @@ public: Clef_engraver (); Direction octave_dir_; - bool first_b_; protected: virtual void do_process_music (); virtual void do_pre_move_processing (); virtual void do_creation_processing (); virtual void do_post_move_processing (); - virtual bool do_try_music (Music*); virtual void acknowledge_element (Score_element_info); private: Item * clef_p_; Item * octavate_p_; Clef_change_req * clef_req_l_; - + + SCM prev_glyph_; + SCM prev_cpos_; + SCM prev_octavation_; void create_clef (); - bool set_type (String); + void set_central_c (SCM, SCM, SCM); + void set_glyph (); }; Clef_engraver::Clef_engraver () { - first_b_ = true; clef_p_ = 0; clef_req_l_ = 0; octave_dir_ = CENTER; octavate_p_ = 0; + + /* + will trigger a clef at the start since #f != '() + */ + prev_cpos_ = prev_glyph_ = SCM_BOOL_F; } -bool -Clef_engraver::set_type (String s) +void +Clef_engraver::set_central_c (SCM glyph,SCM clefpos, SCM octavation) { - if (s.right_str (2) == "_8") // Down one octave - { - octave_dir_ = DOWN; - s = s.left_str (s.length_i () - 2); - } - else if (s.right_str (2) == "^8") // Up one octave - { - octave_dir_ = UP; - s = s.left_str (s.length_i () - 2); - } - else - octave_dir_ = CENTER; + prev_cpos_ = clefpos; + prev_glyph_ = glyph; + prev_octavation_ = octavation; - SCM c = get_property ("supportedClefTypes"); SCM p = get_property ("clefPitches"); - - if (gh_list_p (c)) + int c0_position = 0; + if (gh_list_p (p)) { - SCM found = scm_assoc (ly_str02scm (s.ch_C ()), c); + SCM found = scm_assoc (glyph, p); if (found == SCM_BOOL_F) - return false; - - SCM glyph = gh_cadr (found); - SCM pos = gh_caddr (found); - - daddy_trans_l_->set_property ("clefGlyph", glyph); - daddy_trans_l_->set_property ("clefPosition", pos); - - found = scm_assoc (glyph, p); - if (found == SCM_BOOL_F) - return false; + { + c0_position =0; + } + else + { + c0_position = gh_scm2int (gh_cdr (found)); - int c0_position = gh_scm2int (pos) + gh_scm2int (gh_cdr (found)); - daddy_trans_l_->set_property ("centralCPosition", gh_int2scm (c0_position)); + if (gh_number_p (octavation)) + c0_position -= gh_scm2int (octavation); + + if (gh_number_p (clefpos)) + c0_position += gh_scm2int (clefpos); + } + } - - int c0_position = gh_scm2int (get_property ("centralCPosition")); - c0_position -= (int)octave_dir_ * 7; daddy_trans_l_->set_property ("centralCPosition", gh_int2scm (c0_position)); +} +void +Clef_engraver::set_glyph () +{ + SCM glyph_sym = ly_symbol2scm ("glyph"); + SCM glyph = get_property ("clefGlyph"); SCM basic = ly_symbol2scm ("Clef"); - SCM gl = ly_symbol2scm ("glyph"); - - daddy_trans_l_->execute_single_pushpop_property (basic, gl, SCM_UNDEFINED); - daddy_trans_l_->execute_single_pushpop_property (basic, gl, - get_property ("clefGlyph")); - - return true; + + daddy_trans_l_->execute_single_pushpop_property (basic, glyph_sym, SCM_UNDEFINED); + daddy_trans_l_->execute_single_pushpop_property (basic, glyph_sym, glyph); } /** @@ -154,31 +149,9 @@ Clef_engraver::acknowledge_element (Score_element_info info) void Clef_engraver::do_creation_processing () { - daddy_trans_l_->set_property ("clefPosition", gh_int2scm (0)); - daddy_trans_l_->set_property ("clefGlyph", SCM_EOL); - daddy_trans_l_->set_property ("centralCPosition", gh_int2scm (0)); - - SCM def = get_property ("defaultClef"); - if (gh_string_p (def)) - { - set_type (ly_scm2string (def)); - } } -bool -Clef_engraver::do_try_music (Music * r_l) -{ - if (Clef_change_req *cl = dynamic_cast (r_l)) - { - clef_req_l_ = cl; - String t = ly_scm2string (cl->get_mus_property ("clef-type")); - if (!set_type (t)) - cl->origin ()->warning (_ ("unknown clef type")); - return true; - } - return false; -} void Clef_engraver::create_clef () @@ -186,16 +159,17 @@ Clef_engraver::create_clef () if (!clef_p_) { Item *c= new Item (get_property ("Clef")); - announce_element (c, clef_req_l_); + announce_element (c, 0); Staff_symbol_referencer::set_interface (c); clef_p_ = c; } Staff_symbol_referencer::set_position (clef_p_, - gh_scm2int (get_property ("clefPosition") - )); - if (octave_dir_) + gh_scm2int (get_property ("clefPosition"))); + + SCM oct = get_property("clefOctavation"); + if (gh_number_p (oct) && gh_scm2int (oct)) { Item * g = new Item (get_property ("OctavateEight")); @@ -204,18 +178,28 @@ Clef_engraver::create_clef () g->set_parent (clef_p_, Y_AXIS); g->set_parent (clef_p_, X_AXIS); - g->set_elt_property ("direction", gh_int2scm (octave_dir_)); + g->set_elt_property ("direction", gh_int2scm (sign (gh_scm2int (oct)))); octavate_p_ = g; - announce_element (octavate_p_, clef_req_l_); + announce_element (octavate_p_, 0); } } void Clef_engraver::do_process_music () { - if (clef_req_l_ || first_b_) + SCM glyph = get_property ("clefGlyph"); + SCM clefpos = get_property ("clefPosition"); + SCM octavation = get_property ("clefOctavation"); + + if (scm_equal_p (glyph, prev_glyph_) == SCM_BOOL_F + || scm_equal_p (clefpos, prev_cpos_) == SCM_BOOL_F + || scm_equal_p (octavation, prev_octavation_) == SCM_BOOL_F) { + set_glyph(); + set_central_c (glyph, clefpos, octavation); + create_clef (); + clef_p_->set_elt_property ("non-default", SCM_BOOL_T); } } @@ -246,14 +230,11 @@ Clef_engraver::do_pre_move_processing () octavate_p_ = 0; } - - first_b_ = 0; } void Clef_engraver::do_post_move_processing () { - clef_req_l_ = 0; } ADD_THIS_TRANSLATOR (Clef_engraver); diff --git a/lily/include/context-specced-music.hh b/lily/include/context-specced-music.hh index abcf2c40f3..e6eb7c8b0f 100644 --- a/lily/include/context-specced-music.hh +++ b/lily/include/context-specced-music.hh @@ -14,12 +14,15 @@ class Context_specced_music : public Music_wrapper { -public: + +/* /// The kind of translation needed for this music. String translator_type_str_; /// what identification for the translation unit String translator_id_str_; +*/ +public: Context_specced_music (Music*); VIRTUAL_COPY_CONS(Music); diff --git a/lily/key-engraver.cc b/lily/key-engraver.cc index eff8a73a20..46f4d3f656 100644 --- a/lily/key-engraver.cc +++ b/lily/key-engraver.cc @@ -150,7 +150,7 @@ void Key_engraver::read_req (Key_change_req const * r) { SCM p = r->get_mus_property ("pitch-alist"); - if (p == SCM_UNDEFINED) + if (!gh_pair_p (p)) return; SCM n = scm_list_copy (p); diff --git a/lily/key-performer.cc b/lily/key-performer.cc index 79fdac637e..f13cc85d7d 100644 --- a/lily/key-performer.cc +++ b/lily/key-performer.cc @@ -26,7 +26,8 @@ Key_performer::~Key_performer () void Key_performer::do_process_music () { - if (key_req_l_ && key_req_l_->get_mus_property ("pitch-alist") != SCM_UNDEFINED) + if (key_req_l_ && + gh_list_p (key_req_l_->get_mus_property ("pitch-alist"))) { audio_p_ = new Audio_key (); // *key_req_l_->key_); Audio_element_info info (audio_p_, key_req_l_); diff --git a/lily/lily-guile.cc b/lily/lily-guile.cc index 7f56dbcf3e..91096bce8e 100644 --- a/lily/lily-guile.cc +++ b/lily/lily-guile.cc @@ -390,11 +390,6 @@ wave_sweep_goodbye (void *dummy1, void *dummy2, void *dummy3) } #endif -SCM -undefd () -{ - return SCM_UNDEFINED; -} #include "version.hh" SCM @@ -413,7 +408,7 @@ init_functions () scm_make_gsubr ("ly-version", 0, 0, 0, (Scheme_function_unknown)ly_warning); scm_make_gsubr ("ly-gulp-file", 1,0, 0, (Scheme_function_unknown)ly_gulp_file); scm_make_gsubr ("dir?", 1,0, 0, (Scheme_function_unknown)ly_isdir_p); - scm_make_gsubr ("undefd", 0,0, 0, (Scheme_function_unknown)undefd); + scm_make_gsubr ("ly-number->string", 1, 0,0, (Scheme_function_unknown) ly_number2string); diff --git a/lily/music-iterator.cc b/lily/music-iterator.cc index 4a2c2ec95e..08f454fae1 100644 --- a/lily/music-iterator.cc +++ b/lily/music-iterator.cc @@ -185,8 +185,18 @@ Music_iterator::init_translator (Music *m, Translator_group *report_l) music_l_ = m; if (Context_specced_music * csm =dynamic_cast (m)) { - Translator_group* a =report_l-> - find_create_translator_l (csm->translator_type_str_, csm->translator_id_str_); + SCM ct = csm->get_mus_property ("context-type"); + String c_type; + if (gh_string_p (ct)) + c_type = ly_scm2string (ct); + + String c_id; + SCM ci = csm->get_mus_property ("context-id"); + if (gh_string_p (ci)) + c_id = ly_scm2string (ci); + + Translator_group* a + =report_l->find_create_translator_l (c_type, c_id); set_translator (a); diff --git a/lily/note-heads-engraver.cc b/lily/note-heads-engraver.cc index 9bcd1dad7b..ec47cb0442 100644 --- a/lily/note-heads-engraver.cc +++ b/lily/note-heads-engraver.cc @@ -5,15 +5,14 @@ */ #include "rhythmic-head.hh" -#include "engraver.hh" #include "paper-def.hh" #include "musical-request.hh" #include "dots.hh" #include "dot-column.hh" #include "staff-symbol-referencer.hh" -#include "engraver.hh" -#include "pqueue.hh" #include "item.hh" +#include "score-engraver.hh" +#include "warn.hh" /** make balls and rests @@ -29,6 +28,7 @@ public: Note_heads_engraver(); protected: + virtual void do_post_move_processing (); virtual bool do_try_music (Music *req_l) ; virtual void do_process_music(); virtual void do_pre_move_processing(); @@ -129,6 +129,26 @@ Note_heads_engraver::do_pre_move_processing() note_req_l_arr_.clear (); } +void +Note_heads_engraver::do_post_move_processing () +{ + /* TODO:make this settable? + */ + if (note_end_mom_ > now_mom()) + { + Score_engraver * e = 0; + Translator * t = daddy_grav_l (); + for (; !e && t; t = t->daddy_trans_l_) + { + e = dynamic_cast (t); + } + + if (!e) + programming_error ("No score engraver!"); + else + e->forbid_breaks (); // guh. Use properties! + } +} diff --git a/lily/parser.yy b/lily/parser.yy index 76d6d7e169..6853bc91fd 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -251,7 +251,7 @@ yylex (YYSTYPE *s, void * v_l) %type music_output_def_body %type shorthand_command_req %type post_request -%type command_req verbose_command_req +%type command_req verbose_command_req %type extender_req %type hyphen_req %type string bare_number number_expression @@ -729,9 +729,8 @@ Composite_music: CONTEXT STRING Music { Context_specced_music *csm = new Context_specced_music ($3); - csm->translator_type_str_ = ly_scm2string ($2); - csm->translator_id_str_ = ""; - + csm->set_mus_property ("context-type",$2); + csm->set_mus_property ("context-id", ly_str02scm ("")); $$ = csm; } @@ -748,8 +747,8 @@ Composite_music: | CONTEXT STRING '=' STRING Music { Context_specced_music *csm = new Context_specced_music ($5); - csm->translator_type_str_ = ly_scm2string ($2); - csm->translator_id_str_ = ly_scm2string ($4); + csm->set_mus_property ("context-type", $2); + csm->set_mus_property ("context-id", $4); $$ = csm; } @@ -854,7 +853,7 @@ property_def: $$ = csm; $$->set_spot (THIS->here_input ()); - csm-> translator_type_str_ = ly_scm2string ($2); + csm-> set_mus_property ("context-type", $2); } | PROPERTY STRING '.' STRING PUSH embedded_scm '=' embedded_scm { Music *t = new Music; @@ -866,7 +865,7 @@ property_def: $$ = csm; $$->set_spot (THIS->here_input ()); - csm-> translator_type_str_ = ly_scm2string ($2); + csm-> set_mus_property ("context-type", $2); } | PROPERTY STRING '.' STRING POP embedded_scm { Music *t = new Music; @@ -878,7 +877,7 @@ property_def: $$ = csm; $$->set_spot (THIS->here_input ()); - csm-> translator_type_str_ = ly_scm2string ($2); + csm-> set_mus_property ("context-type", $2); } ; @@ -912,6 +911,19 @@ command_element: $$-> set_spot (THIS->here_input ()); $1-> set_spot (THIS->here_input ()); } + | BAR STRING ';' { + Music *t = new Music; + + t->set_mus_property ("type", ly_symbol2scm ("property-set")); + t->set_mus_property ("symbol", ly_symbol2scm ("whichBar")); + t->set_mus_property ("value", $2); + + Context_specced_music *csm = new Context_specced_music (t); + $$ = csm; + $$->set_spot (THIS->here_input ()); + + csm->set_mus_property ("context-type", ly_str02scm ("Score")); + } | PARTIAL duration_length ';' { Music * p = new Music; p->set_mus_property ("symbol", ly_symbol2scm ( "measurePosition")); @@ -922,12 +934,31 @@ command_element: delete $2; // ugh Context_specced_music * sp = new Context_specced_music (p); $$ =sp ; - sp-> translator_type_str_ = "Score"; + sp-> set_mus_property ("context-type", ly_str02scm ( "Score")); + } + | CLEF STRING ';' { + SCM func = scm_eval2 (ly_symbol2scm ("clef-name-to-properties"), SCM_EOL); + SCM result = gh_call1 (func, $2); + + SCM l = SCM_EOL; + for (SCM s = result ; gh_pair_p (s); s = gh_cdr (s)) { + Music * p = new Music; + for (SCM k = gh_car (s) ; gh_pair_p (k); k = gh_cdr (k)) { + p->set_mus_property (gh_caar (k), gh_cdar (k)); + } + l = gh_cons (p->self_scm (), l); + scm_unprotect_object (p->self_scm ()); + } + Sequential_music * seq = new Sequential_music (l); + + Context_specced_music * sp = new Context_specced_music (seq); + $$ =sp ; + sp-> set_mus_property("context-type", ly_str02scm("Staff")); } ; command_req: - shorthand_command_req + shorthand_command_req { $$ = $1; } | verbose_command_req semicolon { $$ = $1; } ; @@ -963,11 +994,7 @@ shorthand_command_req: verbose_command_req: - - BAR STRING { - $$ = new Bar_req (ly_scm2string ($2)); - } - | COMMANDSPANREQUEST bare_int STRING { + COMMANDSPANREQUEST bare_int STRING { Span_req * sp_p = new Span_req; sp_p-> set_span_dir ( Direction($2)); sp_p->set_mus_property ("span-type",$3); @@ -1011,11 +1038,6 @@ verbose_command_req: | tempo_request { $$ = $1; } - | CLEF STRING { - $$ = new Clef_change_req; - $$->set_mus_property ("clef-type", $2); - - } | KEY { Key_change_req *key_p= new Key_change_req; $$ = key_p; diff --git a/lily/piano-pedal-engraver.cc b/lily/piano-pedal-engraver.cc index a510a141ff..3f09f169e1 100644 --- a/lily/piano-pedal-engraver.cc +++ b/lily/piano-pedal-engraver.cc @@ -134,7 +134,7 @@ Piano_pedal_engraver::do_process_music () { for (Pedal_info*p = info_list_; p->name_; p ++) { - SCM s = SCM_UNDEFINED; + SCM s = SCM_EOL; if (p->req_l_drul_[STOP] && p->req_l_drul_[START]) { if (!p->start_req_l_) diff --git a/lily/property-engraver.cc b/lily/property-engraver.cc index baddf06bb6..9861866e82 100644 --- a/lily/property-engraver.cc +++ b/lily/property-engraver.cc @@ -109,7 +109,7 @@ Property_engraver::apply_properties (SCM p, Score_element *e, Translator_group*o SCM val = get_property (prop_sym); - if (val == SCM_UNDEFINED) + if (val == SCM_EOL) ; // Not defined in context. else if (gh_apply (type_p, scm_listify (val, SCM_UNDEFINED)) == SCM_BOOL_T) // defined and right type: do it @@ -135,16 +135,16 @@ Property_engraver::apply_properties (SCM p, Score_element *e, Translator_group*o else /* - we don't print a warning if VAL == #f, because we would + we don't print a warning if VAL == (), because we would get lots of warnings when we restore stuff to default, eg. - slurDash = #1 [...] slurDash = ##f + slurDash = #1 [...] slurDash = () should not cause "type error: slurDash expects number not - boolean" + boolean */ - if (val != SCM_BOOL_F) + if (val != SCM_EOL) { // not the right type: error message. SCM errport = scm_current_error_port (); warning (_("Wrong type for property")); diff --git a/lily/request-chord-iterator.cc b/lily/request-chord-iterator.cc index aaeeeecac7..79df69f6da 100644 --- a/lily/request-chord-iterator.cc +++ b/lily/request-chord-iterator.cc @@ -71,15 +71,9 @@ Request_chord_iterator::process (Moment m) { Music *mus = unsmob_music (gh_car (s)); - if (Request * req_l = dynamic_cast (mus)) - { - bool gotcha = try_music (req_l); - if (!gotcha) - req_l->origin ()->warning (_f ("Junking request: `%s'", classname( req_l))); - } - else - mus->origin ()->warning (_f ("Huh? Not a Request: `%s'", - classname (mus))); + bool gotcha = try_music (mus); + if (!gotcha) + mus->origin ()->warning (_f ("Junking request: `%s'", classname(mus))); } } skip (m); diff --git a/lily/timing-engraver.cc b/lily/timing-engraver.cc index c727c58896..05b4fbfc20 100644 --- a/lily/timing-engraver.cc +++ b/lily/timing-engraver.cc @@ -66,8 +66,9 @@ Timing_engraver::do_pre_move_processing () bool Timing_engraver::do_try_music (Music*m) { - if (Bar_req * b= dynamic_cast (m)) + if (0) // { + Bar_req * b= dynamic_cast (m); if (bar_req_l_ && !bar_req_l_->equal_b (b)) return false; @@ -81,7 +82,4 @@ Timing_engraver::do_try_music (Music*m) void Timing_engraver::do_process_music () { - if (bar_req_l_) - daddy_trans_l_->set_property ("whichBar", bar_req_l_->get_mus_property ("type")); } - diff --git a/lily/translator-group.cc b/lily/translator-group.cc index cf813de963..1b85d8113a 100644 --- a/lily/translator-group.cc +++ b/lily/translator-group.cc @@ -282,12 +282,12 @@ Translator_group::where_defined (SCM sym) const } /* - TODO: return SCM_EOL iso. SCM_UNDEFINED when not found. + return SCM_EOL when not found. */ SCM Translator_group::get_property (SCM sym) const { - SCM val =SCM_UNDEFINED; + SCM val =SCM_EOL; if (properties_dict ()->try_retrieve (sym, &val)) return val; @@ -322,10 +322,6 @@ Translator_group::execute_single_pushpop_property (SCM prop, SCM eltprop, SCM va { SCM prev = get_property (prop); - /* - we don't tack onto SCM_UNDEFINED, because it creates - errors down the line, if we do scm_assoc(). - */ if (gh_pair_p (prev) || prev == SCM_EOL) { bool ok = true; @@ -333,6 +329,13 @@ Translator_group::execute_single_pushpop_property (SCM prop, SCM eltprop, SCM va SCM errport = scm_current_error_port (); SCM meta = scm_assoc (ly_symbol2scm ("meta"), prev); + + /* + We're probably in a performer. + */ + if (!gh_pair_p (meta)) + return; + SCM props = scm_assoc (ly_symbol2scm ("properties"), gh_cdr (meta)); SCM type_p = scm_assoc (eltprop, gh_cdr (props)); if (!gh_pair_p (type_p)) @@ -348,7 +351,8 @@ Translator_group::execute_single_pushpop_property (SCM prop, SCM eltprop, SCM va else { type_p = gh_cdr (type_p); - if (gh_call1 (type_p, val) == SCM_BOOL_F) + if (val != SCM_EOL + && gh_call1 (type_p, val) == SCM_BOOL_F) { ok = false; scm_puts (_("Failed typecheck for #'").ch_C (),errport); diff --git a/ly/engraver.ly b/ly/engraver.ly index 383bb18c8c..be2d0f15e7 100644 --- a/ly/engraver.ly +++ b/ly/engraver.ly @@ -366,59 +366,11 @@ ScoreContext = \translator { splitInterval = #'(0 . 1) changeMoment = #`(,(make-moment 0 0) . ,(make-moment 1 512)) - defaultClef = #"treble" - StaffMinimumVerticalExtent = #(cons -4.0 4.0) barAuto = ##t voltaVisibility = ##t % name, glyph id, clef position - supportedClefTypes = #'( - ("treble" . ("clefs-G" -2)) - ("violin" . ("clefs-G" -2)) - ("G" . ("clefs-G" -2)) - ("G2" . ("clefs-G" -2)) - ("french" . ("clefs-G" -4 )) - ("soprano" . ("clefs-C" -4 )) - ("mezzosoprano" . ("clefs-C" -2 )) - ("alto" . ("clefs-C" 0 )) - ("tenor" . ("clefs-C" 2 )) - ("baritone" . ("clefs-C" 4 )) - ("varbaritone" . ("clefs-F" 0)) - ("bass" . ("clefs-F" 2 )) - ("F" . ( "clefs-F" 2)) - ("subbass" . ("clefs-F" 4)) - ("vaticana_do1" . ("clefs-vaticana_do" -1)) - ("vaticana_do2" . ("clefs-vaticana_do" 1)) - ("vaticana_do3" . ("clefs-vaticana_do" 3)) - ("vaticana_fa1" . ("clefs-vaticana_fa" -1)) - ("vaticana_fa2" . ("clefs-vaticana_fa" 1)) - ("medicaea_do1" . ("clefs-medicaea_do" -1)) - ("medicaea_do2" . ("clefs-medicaea_do" 1)) - ("medicaea_do3" . ("clefs-medicaea_do" 3)) - ("medicaea_fa1" . ("clefs-medicaea_fa" -1)) - ("medicaea_fa2" . ("clefs-medicaea_fa" 1)) - ("hufnagel_do1" . ("clefs-hufnagel_do" -1)) - ("hufnagel_do2" . ("clefs-hufnagel_do" 1)) - ("hufnagel_do3" . ("clefs-hufnagel_do" 3)) - ("hufnagel_fa1" . ("clefs-hufnagel_fa" -1)) - ("hufnagel_fa2" . ("clefs-hufnagel_fa" 1)) - ("hufnagel" . ("clefs-hufnagel_do_fa" 4)) - ("mensural1_c1" . ("clefs-mensural1_c" -4)) - ("mensural1_c2" . ("clefs-mensural1_c" -2)) - ("mensural1_c3" . ("clefs-mensural1_c" 0)) - ("mensural1_c4" . ("clefs-mensural1_c" 2)) - ("mensural2_c1" . ("clefs-mensural2_c" -4)) - ("mensural2_c2" . ("clefs-mensural2_c" -2)) - ("mensural2_c3" . ("clefs-mensural2_c" 0)) - ("mensural2_c4" . ("clefs-mensural2_c" 2)) - ("mensural2_c5" . ("clefs-mensural2_c" 4)) - ("mensural3_c1" . ("clefs-mensural3_c" -2)) - ("mensural3_c2" . ("clefs-mensural3_c" 0)) - ("mensural3_c3" . ("clefs-mensural3_c" 2)) - ("mensural3_c4" . ("clefs-mensural3_c" 4)) - ("mensural_f" . ("clefs-mensural_f" 2)) - ) % where is c0 in this clef? clefPitches = #'(("clefs-G" . -4) ("clefs-C" . 0) @@ -435,9 +387,11 @@ ScoreContext = \translator { ("clefs-mensural3_c" . 0) ("clefs-mensural_f" . 0)) + clefGlyph = #"clefs-G" + clefPosition = #-2 + automaticPhrasing = ##t; alignmentReference = \down; - defaultClef = #"treble" defaultBarType = #"|" explicitClefVisibility = #all-visible diff --git a/ly/property.ly b/ly/property.ly index 15656a9161..754e2854cc 100644 --- a/ly/property.ly +++ b/ly/property.ly @@ -48,8 +48,8 @@ voiceFour = { \shiftOn } -slurDotted = \property Voice.Slur \push #'dash = #1 -slurNoDots = \property Voice.Slur \pop #'dash +slurDotted = \property Voice.Slur \push #'dashed = #1 +slurNoDots = \property Voice.Slur \pop #'dashed tiny = diff --git a/make/mutopia-rules.make b/make/mutopia-rules.make index 509de0118a..923aa009d8 100644 --- a/make/mutopia-rules.make +++ b/make/mutopia-rules.make @@ -13,9 +13,6 @@ $(outdir)/%.png: $(outdir)/%.ps $(outdir)/%.ly.txt: %.ly ln -f $< $@ -$(outdir)/%.fly.txt: %.fly - ln -f $< $@ - $(outdir)/%.ly.txt: %.abc #which file to show here -- abc seems more cute? ln -f $< $@ diff --git a/make/out/lilypond.lsm b/make/out/lilypond.lsm index eae217f289..9aa271c1a4 100644 --- a/make/out/lilypond.lsm +++ b/make/out/lilypond.lsm @@ -1,15 +1,15 @@ Begin3 Title: LilyPond -Version: 1.3.105 -Entered-date: 09NOV00 +Version: 1.3.106 +Entered-date: 10NOV00 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.105.tar.gz + 1000k lilypond-1.3.106.tar.gz Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/ - 1000k lilypond-1.3.105.tar.gz + 1000k lilypond-1.3.106.tar.gz Copying-policy: GPL End diff --git a/make/out/lilypond.spec b/make/out/lilypond.spec index e8516e9d82..731458cd47 100644 --- a/make/out/lilypond.spec +++ b/make/out/lilypond.spec @@ -1,11 +1,11 @@ %define info yes Name: lilypond -Version: 1.3.105 +Version: 1.3.106 Release: 1 License: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.105.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.106.tar.gz Summary: A program for printing sheet music. URL: http://www.cs.uu.nl/~hanwen/lilypond # Icon: lilypond-icon.gif diff --git a/mutopia/F.Schubert/standchen.ly b/mutopia/F.Schubert/standchen.ly index 0dfe91f8da..0d1006949b 100644 --- a/mutopia/F.Schubert/standchen.ly +++ b/mutopia/F.Schubert/standchen.ly @@ -43,8 +43,12 @@ Note: Original key f. \version "1.3.93"; +dynamicUp = \property Voice.DynamicLineSpanner \push #'direction = #1 +dynamicRevert = \property Voice.DynamicLineSpanner \pop #'direction + + vocalVerse = \notes\relative c''{ - \property Voice.dynamicDirection=\up + \dynamicUp \times 2/3 { [ g8( )as] g } c4. g8 | \times 2/3 { [ f8( )g] f } c'4 f,8 r | g4.-> f8 \times 2/3 { [ f( )es] d } | @@ -73,7 +77,7 @@ vocalVerse = \notes\relative c''{ } vocalThrough = \notes\relative c{ - \property Voice.dynamicDirection=\up + \dynamicUp g''8. g16 b8. b16 d8. d16 | c4 b r | g4. b8 d8. c16 | @@ -176,7 +180,7 @@ trebleVerseOne = \notes\relative c{ } trebleEentje = \notes \relative c'{ - \context Voice=one \property Voice.verticalDirection = \center + \stemBoth | ( c> <)f16 )as> | | @@ -190,7 +194,7 @@ trebleEentje = \notes \relative c'{ } trebleThrough = \notes \relative c'{ - \context Voice=one \property Voice.verticalDirection = \center + \stemBoth | %61 R2. | @@ -201,18 +205,18 @@ trebleThrough = \notes \relative c'{ %65 < { d,2.\f a'2} { e2. ~ e2 } { b'2. c,2 }> r4 | \context Staff < - { - \context Voice=one \property Voice.verticalDirection = 1 + \context Voice=one { + \voiceOne a8. b16 c4-> () a8 r | a8. b16 c4-> () a8 r | } - { - \context Voice=two \property Voice.verticalDirection = -1 + \context Voice=two { + \voiceTwo | | } > - \context Voice=one \property Voice.verticalDirection = 0 + % 4 bars copied from end verse1 r8 | %70 @@ -222,8 +226,10 @@ trebleThrough = \notes \relative c'{ < { a4.-> )f8 } { a'4. f8 } > | r4 | r4 | - \property Voice . textStyle = "italic" + \property Voice . TextItem \push #'font-style = #'italic r4 | + \property Voice . TextItem \pop #'font-style + %75 r4 | | @@ -233,14 +239,17 @@ trebleThrough = \notes \relative c'{ | | %80 - \property Voice . textStyle = "italic" + + \property Voice . TextItem \push #'font-style = #'italic | + \property Voice . TextItem \pop #'font-style + | | } bassIntro = \notes\relative c{ - \property Voice.dynamicDirection=1 + \dynamicUp %1 r4 | r4 | @@ -250,7 +259,7 @@ bassIntro = \notes\relative c{ bassVerseOne = \notes\relative c{ % \clef bass; - \property Voice.dynamicDirection=1 + \dynamicUp %5 r4 | r4 | @@ -281,7 +290,7 @@ bassVerseOne = \notes\relative c{ } bassEentje = \notes\relative c{ - \property Voice.dynamicDirection=1 + \dynamicUp [ ] | c,8 [ ] | [ ] | @@ -293,7 +302,7 @@ bassEentje = \notes\relative c{ } bassThrough = \notes\relative c{ - \property Voice.dynamicDirection=1 + \dynamicUp %61 [ b-> d->> ] | [ b-> d->> ] | @@ -351,7 +360,7 @@ vocals = \notes{ \property Voice.noAutoBeaming = ##t \property Staff.automaticMelismata= ##t - \property Voice.dynamicDirection = \up + \dynamicUp \skip 4 * 12; \vocalVerse \skip 4 * 24; diff --git a/scm/element-descriptions.scm b/scm/element-descriptions.scm index cb5f5438d1..9adc6639cb 100644 --- a/scm/element-descriptions.scm +++ b/scm/element-descriptions.scm @@ -302,6 +302,7 @@ (Y-offset-callbacks . (,Side_position::aligned_side)) (molecule-callback . ,Text_item::brew_molecule) (font-shape . italic) + (font-family . roman) (meta . ,(element-description "OctavateEight" text-interface font-interface )) )) diff --git a/scm/lily.scm b/scm/lily.scm index be6872c677..6876a9cb65 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -767,3 +767,80 @@ (eval-string (ly-gulp-file "chord-names.scm")) (eval-string (ly-gulp-file "element-descriptions.scm")) ) + + +;; +;; (name . (glyph clef-position octavation)) +;; -- the name clefOctavation is misleading the value 7 is 1 octave not 7 Octaves. +;; +(define supported-clefs '( + ("treble" . ("clefs-G" -2 0)) + ("violin" . ("clefs-G" -2 0)) + ("G" . ("clefs-G" -2 0)) + ("G2" . ("clefs-G" -2 0)) + ("french" . ("clefs-G" -4 0)) + ("soprano" . ("clefs-C" -4 0)) + ("mezzosoprano" . ("clefs-C" -2 0)) + ("alto" . ("clefs-C" 0 0)) + ("tenor" . ("clefs-C" 2 0)) + ("baritone" . ("clefs-C" 4 0)) + ("varbaritone" . ("clefs-F" 0 0)) + ("bass" . ("clefs-F" 2 0)) + ("F" . ( "clefs-F" 2 0)) + ("subbass" . ("clefs-F" 4 0)) + + ;; should move mensural stuff to separate file? + ("vaticana_do1" . ("clefs-vaticana_do" -1 0)) + ("vaticana_do2" . ("clefs-vaticana_do" 1 0)) + ("vaticana_do3" . ("clefs-vaticana_do" 3 0)) + ("vaticana_fa1" . ("clefs-vaticana_fa" -1 0)) + ("vaticana_fa2" . ("clefs-vaticana_fa" 1 0)) + ("medicaea_do1" . ("clefs-medicaea_do" -1 0)) + ("medicaea_do2" . ("clefs-medicaea_do" 1 0)) + ("medicaea_do3" . ("clefs-medicaea_do" 3 0)) + ("medicaea_fa1" . ("clefs-medicaea_fa" -1 0)) + ("medicaea_fa2" . ("clefs-medicaea_fa" 1 0)) + ("hufnagel_do1" . ("clefs-hufnagel_do" -1 0)) + ("hufnagel_do2" . ("clefs-hufnagel_do" 1 0)) + ("hufnagel_do3" . ("clefs-hufnagel_do" 3 0)) + ("hufnagel_fa1" . ("clefs-hufnagel_fa" -1 0)) + ("hufnagel_fa2" . ("clefs-hufnagel_fa" 1 0)) + ("hufnagel" . ("clefs-hufnagel_do_fa" 4 0)) + ("mensural1_c1" . ("clefs-mensural1_c" -4 0)) + ("mensural1_c2" . ("clefs-mensural1_c" -2 0)) + ("mensural1_c3" . ("clefs-mensural1_c" 0 0)) + ("mensural1_c4" . ("clefs-mensural1_c" 2 0)) + ("mensural2_c1" . ("clefs-mensural2_c" -4 0)) + ("mensural2_c2" . ("clefs-mensural2_c" -2 0)) + ("mensural2_c3" . ("clefs-mensural2_c" 0 0)) + ("mensural2_c4" . ("clefs-mensural2_c" 2 0)) + ("mensural2_c5" . ("clefs-mensural2_c" 4 0)) + ("mensural3_c1" . ("clefs-mensural3_c" -2 0)) + ("mensural3_c2" . ("clefs-mensural3_c" 0 0)) + ("mensural3_c3" . ("clefs-mensural3_c" 2 0)) + ("mensural3_c4" . ("clefs-mensural3_c" 4 0)) + ("mensural_f" . ("clefs-mensural_f" 2 0)) + ) +) + +(define (clef-name-to-properties cl) + (let ((e (assoc cl supported-clefs)) + ) + (if (pair? e) + `(((symbol . clefGlyph) + (type . property-set) + (value . ,(cadr e)) + ) + ((symbol . clefPosition) + (type . property-set) + (value . ,(caddr e)) + ) + ((symbol . clefOctavation) + (type . property-set) + (value . ,(caddr (cdr e))) + ) + ) + (begin + (ly-warn (string-append "Unknown clef type `" cl "'\nSee scm/lily.scm for supported clefs")) + '()) + ))) diff --git a/scm/translator-description.scm b/scm/translator-description.scm index 61badb5ef9..ee58d6ba18 100644 --- a/scm/translator-description.scm +++ b/scm/translator-description.scm @@ -148,14 +148,13 @@ given in an @code{\alternative}. "Determine and set reference point for pitches" '(Clef OctavateEight) (list - (translator-property-description 'supportedClefTypes - list? "Clef settings supported. The value is an association list contain entries (NAME . (GLYPH . POSITION)), where NAME is the clef name (alto, baritone, etc.), GLYPH the glyph name, POSITION an integer where the center symbol should go.") - (translator-property-description 'clefPosition number? " where the center of the symbol should go") - (translator-property-description 'clefGlyph string? "name of the symbol within the music font") - (translator-property-description 'centralCPosition number? "place of the central C. ") - (translator-property-description 'defaultClef string? "generate this clef at the very start of this staff. If not set, don't generate a clef") - (translator-property-description 'explicitClefVisibility procedure? "visibility-lambda function for clefs entered as \clef.") - (translator-property-description 'clefPitches list? "alist mapping GLYPHNAME to the position of the central C for that symbol") + (translator-property-description 'clefPosition number? "Where should the center of the symbol go?") + (translator-property-description 'clefGlyph string? "Name of the symbol within the music font") + (translator-property-description 'centralCPosition number? "Place of the central C. Usually determined by looking at clefPosition and clefGlyph.") + (translator-property-description 'clefOctavation integer? "Add +this much extra octavation. Values of 7 and -7 are common.") + (translator-property-description 'explicitClefVisibility procedure? "visibility-lambda function for clef changes.") + (translator-property-description 'clefPitches list? "an alist mapping GLYPHNAME to the position of the central C for that symbol") ))) diff --git a/scripts/mudela-book.py b/scripts/mudela-book.py index 6539a48e3b..d37806d3a9 100644 --- a/scripts/mudela-book.py +++ b/scripts/mudela-book.py @@ -5,6 +5,8 @@ # * add support for .lilyrc +# todo: dimension handling (all the x2y) is clumsy. + # This is was the idea for handling of comments: # Multiline comments, @ignore .. @end ignore is scanned for # in read_doc_file, and the chunks are marked as 'ignore', so @@ -36,10 +38,14 @@ import operator program_version = '@TOPLEVEL_VERSION@' if program_version == '@' + 'TOPLEVEL_VERSION' + '@': - program_version = '1.3.105.tca1' + program_version = '1.3.106' include_path = [os.getcwd()] + +# g_ is for global (?) + +g_here_dir = os.getcwd () g_dep_prefix = '' g_outdir = '' g_force_mudela_fontsize = 0 @@ -813,10 +819,10 @@ def find_eps_dims (match): "Fill in dimensions of EPS files." fn =match.group (1) - if g_outdir: - fn = os.path.join(g_outdir, fn) dims = bounding_box_dimensions (fn) - + if g_outdir: + fn = os.path.join(g_outdir, fn) + return '%ipt' % dims[0] @@ -850,8 +856,14 @@ def compile_all_files (chunks): if g_outdir: os.chdir(g_outdir) if tex: - lilyopts = map (lambda x: '-I ' + x, include_path) - lilyopts = string.join (lilyopts, ' ' ) + # fixme: be sys-independent. + def incl_opt (x): + if g_outdir and x[0] <> '/' : + x = os.path.join (g_here_dir, x) + return ' -I %s' % x + + incs = map (incl_opt, include_path) + lilyopts = string.join (incs, ' ' ) texfiles = string.join (tex, ' ') system ('lilypond %s %s' % (lilyopts, texfiles)) for e in eps: -- 2.39.2