2 music.hh -- declare Music
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
17 #define is_mus_type(x) internal_is_music_type (ly_symbol2scm (x))
19 class Music : public Prob
23 Music (Music const &m);
24 VIRTUAL_COPY_CONSTRUCTOR (Music, Music);
26 Input *origin () const;
27 void set_spot (Input);
29 bool internal_is_music_type (SCM) const;
31 Stream_event *to_event () const;
33 DECLARE_SCHEME_CALLBACK (relative_callback, (SCM, SCM));
34 Pitch to_relative_octave (Pitch);
35 Pitch generic_to_relative_octave (Pitch);
36 Moment get_length () const;
37 Moment start_mom () const;
40 /// Transpose, with the interval central C to #p#
41 void transpose (Pitch p);
43 /// Scale the music in time by #factor#.
44 void compress (Moment factor);
46 // Broadcast the event in a context's event-source.
47 void send_to_context (Context *c);
49 DECLARE_SCHEME_CALLBACK (duration_length_callback, (SCM));
52 virtual SCM copy_mutable_properties () const;
53 virtual void type_check_assignment (SCM, SCM) const;
54 virtual void derived_mark () const;
58 friend SCM ly_extended_make_music (SCM, SCM);
61 Music *unsmob_music (SCM);
62 Music *make_music_by_name (SCM sym);
63 SCM ly_music_deep_copy (SCM);
64 SCM ly_camel_case_2_lisp_identifier (SCM name_sym);
66 extern SCM ly_music_p_proc;
68 /* common transposition function for music and event */
69 void transpose_mutable (SCM alist, Pitch delta);