2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 1997--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
6 LilyPond is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 LilyPond is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
28 #define is_mus_type(x) internal_is_music_type (ly_symbol2scm (x))
30 class Music
: public Prob
34 Music (Music
const &m
);
35 VIRTUAL_COPY_CONSTRUCTOR (Music
, Music
);
37 Input
*origin () const;
38 void set_spot (Input
);
40 bool internal_is_music_type (SCM
) const;
42 Stream_event
*to_event () const;
44 DECLARE_SCHEME_CALLBACK (relative_callback
, (SCM
, SCM
));
45 Pitch
to_relative_octave (Pitch
);
46 Pitch
generic_to_relative_octave (Pitch
);
47 Moment
get_length () const;
48 Moment
start_mom () const;
51 /// Transpose, with the interval central C to #p#
52 void transpose (Pitch p
);
54 /// Scale the music in time by #factor#.
55 void compress (Moment factor
);
57 // Broadcast the event in a context's event-source.
58 void send_to_context (Context
*c
);
60 DECLARE_SCHEME_CALLBACK (duration_length_callback
, (SCM
));
63 virtual SCM
copy_mutable_properties () const;
64 virtual void type_check_assignment (SCM
, SCM
) const;
65 virtual void derived_mark () const;
69 friend SCM
ly_extended_make_music (SCM
, SCM
);
72 Music
*unsmob_music (SCM
);
73 Music
*make_music_by_name (SCM sym
);
74 SCM
ly_music_deep_copy (SCM
);
75 SCM
ly_camel_case_2_lisp_identifier (SCM name_sym
);
77 extern SCM ly_music_p_proc
;
79 /* common transposition function for music and event */
80 void transpose_mutable (SCM alist
, Pitch delta
);