]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/key-performer.cc
* Documentation/user/notation.itely (Bar lines): Added a note that
[lilypond.git] / lily / key-performer.cc
index dbdfb4d8351a78f9febcfd0e0cc10f8029157c94..4f0da8ae5b707b82a2276f2348e85473e0997f99 100644 (file)
@@ -16,7 +16,7 @@
 class Key_performer : public Performer
 {
 public:
-  TRANSLATOR_DECLARATIONS(Key_performer);
+  TRANSLATOR_DECLARATIONS (Key_performer);
   ~Key_performer ();
 
 protected:
@@ -45,23 +45,24 @@ Key_performer::create_audio_elements ()
   if (key_req_) 
     {
       SCM pitchlist = key_req_->get_property ("pitch-alist");
-      SCM proc = scm_primitive_eval (ly_symbol2scm ("accidentals-in-key")); 
-      SCM acc = gh_call1 (proc, pitchlist);
+      SCM proc = ly_scheme_function ("alterations-in-key");
+      
+      SCM acc = scm_call_1 (proc, pitchlist);
       
       Pitch key_do (0, 
-                   gh_scm2int (ly_caar (pitchlist)),
-                   gh_scm2int (ly_cdar (pitchlist)));
+                   scm_to_int (scm_caar (pitchlist)),
+                   scm_to_int (scm_cdar (pitchlist)));
 
       Pitch c_do (0, 0, 0);
                  
       SCM c_pitchlist
        = ly_transpose_key_alist (pitchlist,
-                                 interval (key_do, c_do).smobbed_copy ());
+                                 pitch_interval (key_do, c_do).smobbed_copy ());
 
       /* MIDI keys are too limited for lilypond scales.
         We check for minor scale and assume major otherwise.  */
-      SCM minor = scm_primitive_eval (ly_symbol2scm ("minor"));
-      audio_ = new Audio_key (gh_scm2int (acc),
+      SCM minor = scm_c_eval_string ("minor");
+      audio_ = new Audio_key (scm_to_int (acc),
                              SCM_BOOL_T != scm_equal_p (minor, c_pitchlist));
 
       Audio_element_info info (audio_, key_req_);
@@ -95,7 +96,7 @@ Key_performer::try_music (Music* req)
   return false;
 }
 
-ENTER_DESCRIPTION(Key_performer,
+ENTER_DESCRIPTION (Key_performer,
                  "","",
                  "key-change-event",
                  "","","");