+2002-02-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ * VERSION: 1.5.34 released.
+
+ * lily/rest-engraver.cc (create_grobs): rests can have pitches.
+
+ * lily/staff-symbol-referencer.cc (callback): assume that
+ staff-position is unset in general.
+
+ * input/regression/rest-pitch.ly: new file.
+
+ * lily/parser.yy (simple_element): rests can have pitch. Syntax:
+ a4\rest
+
+2002-02-26 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ * lily/scm-option.cc (set_lily_option): add internal-type-checks
+ as Scheme option. Run regression test by default with
+ internal-type-checking.
+
+ * lily/separating-group-spanner.cc (find_musical_sequences): removed.
+
+ * lily/lily-guile.cc (type_check_assignment): changed functions.
+
+ * scm/*description*.scm: be anal about typechecks. Some changes
+ for internal variable names.
+
+2002-02-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ * scm/ps.scm: -f ps output for GUILE 1.4 and 1.3.4
+
2002-02-25 Han-Wen <hanwen@cs.uu.nl>
* VERSION: 1.5.33 released.
@lilypondfile[printfilename]{mm-rests2.ly}
+@lilypondfile[printfilename]{rest-pitch.ly}
@section Accidentals
@lilypondfile[printfilename]{stem-direction-down.ly}
-
@section Scripts
@lilypondfile[printfilename]{staccato-pos.ly}
@lilypondfile[printfilename]{grace-sync.ly}
+@lilypondfile[printfilename]{grace-bar-number.ly}
+
@section Beams
@lilypondfile[printfilename]{part-combine.ly}
+@lilypondfile[printfilename]{font-magnification.ly}
@lilypondfile[printfilename,nofragment]{size11.ly}
The grob is @internalsref{Rest}. Whole bar rests centered in the bar are
specified using @code{R}, see @ref{Multi measure rests}.
+For polyphonic music, it can be convenient to specify the rest position
+directly. You can do that by entering a note, with the keyword
+@code{\rest} appended, e.g. Rest collisions will leave these rests alone.
+
+@lilypond[singleline,verbatim]
+a'4\rest d'4\rest
+@end lilypond
+
@c . {Skips}
@c FIXME: naming.
@code{\\}, to make multiple voices. You can use it for small,
short-lived voices (make a chord of voices) or for single chords:
-@lilypond
-\score {
-\notes \context Voice = VA \apply #voicify-music \relative c'' {
+@lilypond[verbatim,fragment]
+\context Voice = VA \apply #voicify-music \relative c'' {
c4 < { f d e } \\ { b c2 } > c4 < g' \\ c, \\ f \\ d >
}
-}
@end lilypond
The function @code{voicify-music} instantiates @internalsref{Voice}
Figured bass is printed by @internalsref{FiguredBass} context. This
context will print notes (relative to the central C) as figures. To
-ease entering these notes, the special @code{\figures} mode, is
+ease entering these notes, the special @code{\figures} mode is
available which allows you to type numbers, like @code{<4 6+>}.
-@lilypond
-\score { \notes <
- \context FiguredBass \transpose c'' {
+@lilypond[verbatim,fragment]
+< \context FiguredBass \transpose c'' {
<e! g >
<f8 ais >
\figures {
}
\context Voice {
c g8 g f4 d c
- }
-
->
- }
+ } >
@end lilypond
@c . {Tuning output}
PACKAGE_NAME=LilyPond
MAJOR_VERSION=1
MINOR_VERSION=5
-PATCH_LEVEL=33
+PATCH_LEVEL=34
MY_PATCH_LEVEL=
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
--- /dev/null
+\header {
+
+texidoc = "Rests can have pitches--these will be affected by
+transposition and relativization. If a rest has a pitch, rest
+collision will leave it alone."
+
+}
+
+\score { \notes\relative c'' \apply #voicify-music
+{
+ a4\rest b4\rest c4\rest
+
+<d \\ d\rest^"rest pitch" >
+<d \\ r>
+}
+}
"
}
\score {
- \context Voice \notes\relative c {
-
- e''4-. f-. d-.
- c,-. b-. c'''-. d-.
-
+ \context Voice \notes\relative c' {
+ e'4-. f-. d-. c-. b-.
}
\paper {
linewidth=-1.0
}
- \midi { }
}
assert (a == X_AXIS);
me = me->get_parent (a);
- /*
- ugh. the way DONE is done is not clean
- */
- if (!unsmob_grob (me->get_grob_property ("done")))
+
+ if (! to_boolean (me->get_grob_property ("collision-done")))
{
- me->set_grob_property ("done", me->self_scm ());
+ me->set_grob_property ("collision-done", SCM_BOOL_T);
do_shifts (me);
}
}
/**
- translate the rest symbols vertically by amount DY_I.
- */
+ translate the rest symbols vertically by amount DY_I, but only if
+ they have no staff-position set.
+*/
void
Note_column::translate_rests (Grob*me,int dy_i)
{
Grob * r = unsmob_grob (me->get_grob_property ("rest"));
- if (r)
+ if (r && !gh_number_p (r->get_grob_property ("staff-position")))
{
r->translate_axis (dy_i * Staff_symbol_referencer::staff_space (r)/2.0, Y_AXIS);
}
for (;gh_pair_p (heads); heads =gh_cdr (heads))
{
Grob * h = unsmob_grob (gh_car (heads));
- Grob *a = h ? unsmob_grob(h->get_grob_property ("accidentals")) : 0;
+ Grob *a = h ? unsmob_grob(h->get_grob_property ("accidentals-grob")) : 0;
if (a)
return a;
}
for (SCM s = music_list (); gh_pair_p (s); s = ly_cdr (s))
{
Music * mus = unsmob_music (ly_car (s));
- if (Melodic_req *m= dynamic_cast <Melodic_req *> (mus))
+ Melodic_req *m= dynamic_cast <Melodic_req *> (mus);
+
+ /*
+ kLudge: rests have pitches now as well.
+ */
+ Rest_req *r = dynamic_cast<Rest_req*> (mus);
+
+ if (r || m)
{
- Pitch pit = *unsmob_pitch (m->get_mus_property ("pitch"));
+ Pitch *old_pit = unsmob_pitch (mus->get_mus_property ("pitch"));
+ if (!old_pit)
+ continue;
- pit.to_relative_octave (last);
- m->set_mus_property ("pitch", pit.smobbed_copy ());
-
- return pit;
+ Pitch new_pit = *old_pit;
+ new_pit.to_relative_octave (last);
+ mus->set_mus_property ("pitch", new_pit.smobbed_copy ());
+
+ return new_pit;
}
+
}
return last;
}
virtual bool try_music (Music *);
virtual void stop_translation_timestep ();
virtual void start_translation_timestep ();
- virtual void create_grobs ();
+ virtual void process_music ();
public:
-
TRANSLATOR_DECLARATIONS(Rest_engraver);
};
}
void
-Rest_engraver::create_grobs ()
+Rest_engraver::process_music ()
{
if (rest_req_l_ && !rest_p_)
{
rest_p_ = new Item (get_property ("Rest"));
Rhythmic_head::set_interface (rest_p_);
- Staff_symbol_referencer::set_interface (rest_p_);
+
int durlog = unsmob_duration (rest_req_l_->get_mus_property ("duration"))-> duration_log ();
announce_grob (dot_p_, SCM_EOL);
}
+ Pitch *p = unsmob_pitch (rest_req_l_->get_mus_property ("pitch"));
+
+ /*
+ This is ridiculous -- rests don't have pitch, but we act as if
+ our nose is bleeding.
+ */
+ if (p)
+ {
+ int pos= p->steps ();
+ SCM c0 = get_property ("centralCPosition");
+ if (gh_number_p (c0))
+ pos += gh_scm2int (c0);
+
+ rest_p_->set_grob_property ("staff-position", gh_int2scm (pos));
+ }
+
announce_grob(rest_p_, rest_req_l_->self_scm());
}
}
/* descr */ "",
/* creats*/ "Rest Dots",
/* acks */ "",
-/* reads */ "",
+/* reads */ "centralCPosition",
/* write */ "");
{
Real space = Staff_symbol_referencer::staff_space (me);
off = gh_scm2double (pos) * space/2.0;
+ me->set_grob_property ("staff-position", gh_double2scm (0.0));
}
- me->set_grob_property ("staff-position", gh_double2scm (0.0));
-
return gh_double2scm (off);
}
void
Staff_symbol_referencer::set_interface (Grob * e)
{
- if (!gh_number_p (e->get_grob_property ("staff-position")))
- e->set_grob_property ("staff-position", gh_double2scm (0.0));
-
e->add_offset_callback (Staff_symbol_referencer::callback_proc, Y_AXIS);
}