* 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.
#define is_mus_type(x) internal_is_music_type (ly_symbol2scm (x))
-/** Music is anything that has duration and supports both time compression and
- transposition.
-
- In Lily, everything that can be thought to have a length and a pitch
- (which has a duration which can be transposed) is considered "music",
-
- Music is hierarchical:
-
- @see Music_sequence
-
- TODO: make a equalp function for general music.
- */
class Music
{
public:
#include "score.hh"
#include "warn.hh"
+/*
+ Music is anything that has duration and supports both time compression
+ and transposition.
+
+ In Lily, everything that can be thought to have a length and a pitch
+ (which has a duration which can be transposed) is considered "music",
+*/
bool
Music::internal_is_music_type (SCM k) const
{
Translator_group * tg
= dynamic_cast<Translator_group*> (c->implementation ());
-
/*
Top down:
*/
(tg->*ptr) ();
}
- for (SCM s = c->children_contexts () ; scm_is_pair (s);
+ for (SCM s = c->children_contexts (); scm_is_pair (s);
s = scm_cdr (s))
{
recurse_over_translators (unsmob_context (scm_car (s)), ptr, dir);
if (dir == UP)
{
translator_each (tg->get_simple_trans_list (),
- ptr);
+ ptr);
(tg->*ptr) ();
}
#include "untransposable-music.hh"
-/*
- todo: This one, together with Un_relativable_music is ugh.
-
- fixthis.
-*/
-void
-Untransposable_music::transpose (Pitch)
-{
-}
-
Pitch
Untransposable_music::to_relative_octave (Pitch p)
{
(string-number ,integer? "The number of the string in a String_number_req")
(symbol ,symbol? "Grob name to perform an override/revert on.")
(text ,markup? "markup expression to be printed")
- (transpose-callback ,procedure? "How to transpose a piece of
-music")
(tremolo-type ,integer? "")
(type ,symbol? "The type of this music object. Determines iteration in some cases.")
(types ,list? "The types of this music object; determines by what
(bracket-start ,boolean? "start a bracket
here. TODO: use span requests?")
(bracket-stop ,boolean? "stop a bracket here.")
-
+ (untransposable ,boolean? "If set, this music is not transposed.")
)))
(UntransposableMusic
. (
(description . "Music that can not be transposed.")
-
+ (untransposable . #t)
(internal-class-name . "Untransposable_music")
(types . (music-wrapper-music general-music untransposable-music))
))