From 7e8a92a7c94146cd5879cde33b680af0e778777f Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Fri, 14 Jan 2005 17:15:40 +0000 Subject: [PATCH] * lily/include/music.hh (class Music): unvirtualize transpose(). * lily/sequential-music.cc: remove file. * lily/include/music.hh (class Music): replace Music::start_mom() by start-callback property * lily/time-scaled-music.cc: remove file. * lily/include/music.hh (class Music): include SCM init argument. (class Music): replace Music::get_length() virtual by length-callback property everywhere. --- ChangeLog | 2 ++ lily/beam-quanting.cc | 7 ++----- lily/include/music.hh | 4 ++-- lily/include/untransposable-music.hh | 1 - lily/music.cc | 5 ++++- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4d85ffb925..cbabb55bb7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2005-01-14 Han-Wen Nienhuys + * lily/include/music.hh (class Music): unvirtualize transpose(). + * lily/sequential-music.cc: remove file. * lily/include/lyric-combine-music.hh ("music.hh"): remove file. diff --git a/lily/beam-quanting.cc b/lily/beam-quanting.cc index d2b3dc576e..df1e6ca5fe 100644 --- a/lily/beam-quanting.cc +++ b/lily/beam-quanting.cc @@ -238,9 +238,6 @@ Beam::quanting (SCM smob) } Real rad = Staff_symbol_referencer::staff_radius (me); - - - Drul_array edge_beam_counts (Stem::beam_multiplicity (stems[0]).length () + 1, Stem::beam_multiplicity (stems.top ()).length () + 1); @@ -252,8 +249,8 @@ Beam::quanting (SCM smob) if (qscores[i].demerits < reasonable_score) { Real d = score_forbidden_quants (qscores[i].yl, qscores[i].yr, - rad, slt, thickness, beam_translation, - edge_beam_counts, ldir, rdir); + rad, slt, thickness, beam_translation, + edge_beam_counts, ldir, rdir); qscores[i].demerits += d; #if DEBUG_QUANTING diff --git a/lily/include/music.hh b/lily/include/music.hh index 664b8be6b4..16536ccc2d 100644 --- a/lily/include/music.hh +++ b/lily/include/music.hh @@ -51,8 +51,8 @@ public: void print () const; /// Transpose, with the interval central C to #p# - virtual void transpose (Pitch p); - + void transpose (Pitch p); + /// Scale the music in time by #factor#. void compress (Moment factor); diff --git a/lily/include/untransposable-music.hh b/lily/include/untransposable-music.hh index 7e88a21b07..e240f96572 100644 --- a/lily/include/untransposable-music.hh +++ b/lily/include/untransposable-music.hh @@ -19,7 +19,6 @@ public: VIRTUAL_COPY_CONSTRUCTOR (Music, Untransposable_music); virtual Pitch to_relative_octave (Pitch); - virtual void transpose (Pitch); }; diff --git a/lily/music.cc b/lily/music.cc index 4ebfc6a13c..958eedc221 100644 --- a/lily/music.cc +++ b/lily/music.cc @@ -179,6 +179,9 @@ Music::compress (Moment factor) void Music::transpose (Pitch delta) { + if (to_boolean (get_property ("untransposable"))) + return ; + for (SCM s = this->get_property_alist (true); scm_is_pair (s); s = scm_cdr (s)) { SCM entry = scm_car (s); @@ -191,7 +194,7 @@ Music::transpose (Pitch delta) if (abs (transposed.get_alteration ()) > DOUBLE_SHARP) { - warning (_f ("Transposition by %s makes alteration larger than two", + warning (_f ("Transposition by %s makes alteration larger than double", delta.to_string ())); } } -- 2.39.2