common-shortest-duration field.
* lily/parser.yy (translator_spec_body): allow \set in \translator
{} block. This is the same as \override, here.
* lily/score-engraver.cc (one_time_step): don't warn about columns
when skipTypesetting == #t.
* lily/spacing-spanner.cc (musical_column_spacing): change
ragged right function to produce natural spacing.
+2002-07-11 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ * lily/spacing-spanner.cc (set_springs): add support for
+ common-shortest-duration field.
+
+ * lily/parser.yy (translator_spec_body): allow \set in \translator
+ {} block. This is the same as \override, here.
+
+ * lily/score-engraver.cc (one_time_step): don't warn about columns
+ when skipTypesetting == #t.
+
+ * lily/spacing-spanner.cc (musical_column_spacing): change
+ ragged right function to produce natural spacing.
+
2002-07-10 Han-Wen Nienhuys <hanwen@cs.uu.nl>
* lily/paper-column.cc (before_line_breaking): update
unsmob_translator_def ($$)
->add_push_property (scm_string_to_symbol ($2), $4, $6);
}
+ | translator_spec_body STRING SET embedded_scm '=' embedded_scm {
+ unsmob_translator_def ($$)
+ ->add_push_property (scm_string_to_symbol ($2), $4, $6);
+ }
| translator_spec_body STRING REVERT embedded_scm {
unsmob_translator_def ($$)->add_pop_property (
scm_string_to_symbol ($2), $4);
{
Global_translator::prepare (w);
+ /*
+ TODO: don't make columns when skipTypesetting is true.
+ */
make_columns ();
-
+
command_column_l_->set_grob_property ("when", now_mom_.smobbed_copy ());
musical_column_l_->set_grob_property ("when", now_mom_.smobbed_copy ());
+
Translator_group::start_translation_timestep();
}
for (int i = announce_info_arr_.size(); i--;)
{
Grob *g = announce_info_arr_[i].grob_l_;
- String msg= "Grob "
- + g->name()
- + " was created too late!";
- g->programming_error (msg);
+ if (!dynamic_cast<Paper_column*> (g)) // ugh.
+ {
+
+ String msg= "Grob "
+ + g->name()
+ + " was created too late!";
+ g->programming_error (msg);
+ }
}
announce_info_arr_.clear ();
}
/*
result is junked.
*/
- command_column_l_->remove_grob_property ("breakable");
+ if (command_column_l_)
+ command_column_l_->remove_grob_property ("breakable");
}
void
positions->satisfies_constraints_b_ =
positions->satisfies_constraints_b_ && break_satisfy;
+
+ if (ragged && force_f_ < 0)
+ positions->satisfies_constraints_b_ = false;
}
/****************************************************************/
set_explicit_neighbor_columns (all);
- Rational global_shortest = find_shortest (me, all);
+ SCM preset_shortest = me->get_grob_property ("common-shortest-duration");
+ Rational global_shortest;
+ if (unsmob_moment (preset_shortest))
+ {
+ global_shortest = unsmob_moment (preset_shortest)->main_part_;
+ }
+ else
+ global_shortest = find_shortest (me, all);
+
prune_loose_colunms (me, &all, global_shortest);
set_implicit_neighbor_columns (all);
Maybe it should be continuous?
*/
max_fixed_note_space = max_fixed_note_space <? max_note_space;
-
+#if 0
+ /*
+ This doesn't make sense. For ragged right we want to have the same
+ spacing. Otherwise the option should be called differently.
+
+ ragged-righted-and-weird-spacing. Whatever.
+
+ */
Real strength = (ragged) ? 1.0 : 1 / (max_note_space - max_fixed_note_space);
Real distance = (ragged) ? max_fixed_note_space : max_note_space;
+#else
+
+ /*
+ TODO: make sure that the space doesn't exceed the right margin.
+ */
+ Real strength = 1 / (max_note_space - max_fixed_note_space);
+ Real distance = max_note_space;
+#endif
+
// Spaceable_grob::add_spring (lc, rc, distance, strength, expand_only);
Spaceable_grob::add_spring (lc, rc, distance, strength, false);
*/
Rational ratio = d.main_part_ / shortest;
-
+
+#if 0
*expand_only = true;
+#endif
return ((k-1) + double (ratio)) * incr;
}
else
head width) A 16th note is followed by 0.5 note head width. The
quarter note is followed by 3 NHW, the half by 4 NHW, etc.
",
- "grace-space-factor spacing-increment base-shortest-duration shortest-duration-space");
+ "grace-space-factor spacing-increment base-shortest-duration shortest-duration-space common-shortest-duration");
depth = ../..
-SUBDIRS = Petites-Preludes Cembalo-Partitas
+SUBDIRS = Petites-Preludes
EXTRA_DIST_FILES=
(grob-property-description 'self-alignment-Y number? "like self-alignment-X but for Y axis.")
(grob-property-description 'shorten number? "the amount of space that a stem should be shortened (DOCME!)")
(grob-property-description 'shorten-pair number-pair? "the length on each side to shorten a text-spanner, for example a pedal bracket")
+(grob-property-description 'common-shortest-duration moment?
+ "The most common shortest note length.
+This is used in spacing. Making this larger will make the score tighter.")
(grob-property-description 'shortest-duration-space number? "Start
with this much space for the shortest duration. This is explessed in @code{spacing-increment} as unit. See also
@ref{spacing-spanner-interface}.")