2 newkey-def.cc -- implement Newkey_def
4 source file of the GNU LilyPond music typesetter
6 (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #include "newkey-def.hh"
14 Newkey_def::Newkey_def()
16 pitch_alist_ = SCM_EOL;
20 Newkey_def::transpose (Musical_pitch p)
22 SCM newlist = SCM_EOL;
23 for (SCM s = pitch_alist_; gh_pair_p (s); s = gh_cdr (s))
29 Musical_pitch orig (gh_list (gh_car (k), gh_cdr (k), gh_cdr (s), SCM_UNDEFINED));
33 SCM key = gh_cons (gh_int2scm (orig.octave_i_),
34 gh_int2scm (orig.notename_i_));
36 newlist = gh_cons (gh_cons (key, gh_int2scm (orig.accidental_i_)),
39 else if (gh_number_p (k))
41 Musical_pitch orig (gh_list (gh_int2scm (0), k, gh_cdar (s), SCM_UNDEFINED));
44 SCM key =gh_int2scm (orig.notename_i_);
45 newlist = gh_cons (gh_cons (key, gh_int2scm (orig.accidental_i_)),
50 pitch_alist_ = newlist;