2 music.hh -- declare Music
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
12 #include "virtual-methods.hh"
18 #define is_mus_type(x) internal_is_music_type (ly_symbol2scm (x))
20 class Music : public Prob
24 Music (Music const &m);
25 VIRTUAL_COPY_CONSTRUCTOR (Music, Music);
27 Input *origin () const;
28 void set_spot (Input);
30 bool internal_is_music_type (SCM) const;
32 Stream_event *to_event () const;
34 DECLARE_SCHEME_CALLBACK (relative_callback, (SCM, SCM));
35 Pitch to_relative_octave (Pitch);
36 Pitch generic_to_relative_octave (Pitch);
37 Moment get_length () const;
38 Moment start_mom () const;
41 /// Transpose, with the interval central C to #p#
42 void transpose (Pitch p);
44 /// Scale the music in time by #factor#.
45 void compress (Moment factor);
47 // Broadcast the event in a context's event-source.
48 void send_to_context (Context *c);
50 DECLARE_SCHEME_CALLBACK (duration_length_callback, (SCM));
53 virtual SCM copy_mutable_properties () const;
54 virtual void type_check_assignment (SCM, SCM) const;
55 virtual void derived_mark () const;
59 friend SCM ly_extended_make_music (SCM, SCM);
62 Music *unsmob_music (SCM);
63 Music *make_music_by_name (SCM sym);
64 SCM ly_music_deep_copy (SCM);
65 SCM ly_camel_case_to_lisp_identifier (SCM name_sym);
67 extern SCM ly_music_p_proc;
69 /* common transposition function for music and event */
70 SCM transpose_mutable (SCM alist, Pitch delta);