2 command-request.cc -- implement non-musical reqs
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
9 #include "command-request.hh"
11 #include "musical-request.hh"
14 Barcheck_req::do_equal_b (Request const *r) const
16 Barcheck_req const*b = dynamic_cast<Barcheck_req const*> (r);
20 Tempo_req::Tempo_req ()
22 set_mus_property ("duration", Duration (2,0).smobbed_copy ());
26 Key_change_req::transpose (Pitch p)
28 SCM newlist = SCM_EOL;
29 SCM pa = get_mus_property ("pitch-alist");
30 for (SCM s = pa; gh_pair_p (s); s = gh_cdr (s))
32 SCM key = gh_caar (s);
33 SCM alter = gh_cdar (s);
36 Pitch orig (gh_scm2int (gh_car (key)),
37 gh_scm2int (gh_cdr (key)),
42 SCM key = gh_cons (gh_int2scm (orig.octave_i ()),
43 gh_int2scm (orig.notename_i_));
45 newlist = gh_cons (gh_cons (key, gh_int2scm (orig.alteration_i_)),
48 else if (gh_number_p (key))
50 Pitch orig (0, gh_scm2int (key), gh_scm2int (alter));
53 key =gh_int2scm (orig.notename_i_);
54 alter = gh_int2scm (orig.alteration_i_);
55 newlist = gh_cons (gh_cons (key, alter), newlist);
59 set_mus_property ("pitch-alist", newlist);
62 Break_req::Break_req ()
68 Mark_req::do_equal_b (Request const * r) const
70 Mark_req const * other = dynamic_cast<Mark_req const*> (r);
71 return other && scm_equal_p (other->get_mus_property ("mark-label"),
72 get_mus_property ("mark-label")) == SCM_BOOL_T;
76 ADD_MUSIC (Articulation_req);
77 ADD_MUSIC (Barcheck_req);
78 ADD_MUSIC (Break_req);
79 ADD_MUSIC (Breathing_sign_req);
80 ADD_MUSIC (Busy_playing_req);
81 ADD_MUSIC (Extender_req);
82 ADD_MUSIC (Glissando_req);
83 ADD_MUSIC (Hyphen_req);
84 ADD_MUSIC (Key_change_req);
85 ADD_MUSIC (Lyric_req);
87 ADD_MUSIC (Melisma_playing_req);
88 ADD_MUSIC (Melisma_req);
89 ADD_MUSIC (Melodic_req);
92 ADD_MUSIC (Rhythmic_req);
93 ADD_MUSIC (Script_req);
96 ADD_MUSIC (Tempo_req);
97 ADD_MUSIC (Text_script_req);
99 ADD_MUSIC (Tremolo_req);