]> git.donarmstrong.com Git - lilypond.git/commitdiff
(tempo_event): use tempo-unit for \tempo
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 21 Nov 2002 20:50:55 +0000 (20:50 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 21 Nov 2002 20:50:55 +0000 (20:50 +0000)
duration. This fixes \tempo taking time.

ChangeLog
lily/parse-scm.cc
lily/parser.yy
lily/tempo-performer.cc
scm/music-property-description.scm
scm/music-types.scm

index 521f1b2902b9084f13b0f8c2039054b7eb0f40aa..1cb230a2cd829e4e0b2aefd87ec87a9b3251ebbe 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-11-21  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * lily/parser.yy (tempo_event): use tempo-unit for \tempo
+       duration. This fixes \tempo taking time.
+
 2002-11-21  Mats Bengtsson  <mats.bengtsson@s3.kth.se>
 
        * lily/volta-engraver.cc (process_acknowledged_grobs): 
index f9c972bfb9a263afd60d125fc7bd3c0aa9d76c61..e65e4455110faf1510620829e6466ebf259ce920 100644 (file)
@@ -113,6 +113,9 @@ protected_ly_parse_scm (Parse_start *ps)
 
 bool  parse_protect_global  = true; 
 
+/*
+  Try parsing. If failure, then return SCM_UNDEFINED.
+ */
 SCM
 ly_parse_scm (char const* s, int *n, Input i)
 {
index e39a2d78ca22e991180c09b7b73a189cc05ff114..012e2be3d1c9c3de3564580e34d075ad4875bcaa 100644 (file)
@@ -655,7 +655,7 @@ music_output_def_body:
                        music.
                */
                int m = gh_scm2int ( $2->get_mus_property ("metronome-count"));
-               Duration *d = unsmob_duration ($2->get_mus_property ("duration"));
+               Duration *d = unsmob_duration ($2->get_mus_property ("tempo-unit"));
                Midi_def * md = dynamic_cast<Midi_def*> ($$);
                if (md)
                        md->set_tempo (d->get_length (), m);
@@ -668,7 +668,7 @@ music_output_def_body:
 tempo_event:
        TEMPO steno_duration '=' bare_unsigned  {
                $$ = MY_MAKE_MUSIC("TempoEvent");
-               $$->set_mus_property ("duration", $2);
+               $$->set_mus_property ("tempo-unit", $2);
                $$->set_mus_property ("metronome-count", gh_int2scm ( $4));
        }
        ;
index 1dce3712d5b7d96e057e7421777ab51ca24fded4..d9a1190dcdf9ffb9672704805c605d4685b37e51 100644 (file)
@@ -45,7 +45,7 @@ Tempo_performer::create_audio_elements ()
     {
 
       SCM met = tempo_req_->get_mus_property ("metronome-count");
-      Duration *d = unsmob_duration (tempo_req_->get_mus_property ("duration"));
+      Duration *d = unsmob_duration (tempo_req_->get_mus_property ("tempo-unit"));
       
       Rational r =  (d->get_length () / Moment (Rational (1, 4)) * Moment (gh_scm2int (met))).main_part_;
       
index 9dd8e8c9ce9cfcd55e970dded99601f2b2862067..af871aa0d98c1cceaf1c06c0846dd179a8f8fd65 100644 (file)
@@ -43,6 +43,7 @@ TODO: consider making type into symbol ")
 (music-property-description 'digit integer? "digit for fingering")
 (music-property-description 'direction ly:dir? "Print this up or down?")
 (music-property-description 'text-type symbol? "Particular type of text script (eg. finger, dynamic).")
+(music-property-description 'tempo-unit ly:duration? "The unit for the metronome count.")
 (music-property-description 'element ly:music? "The single child of a Music_wrapper music object, or the body of a repeat.")
 (music-property-description 'elements music-list? "A list of elements for sequential of simultaneous music, or the alternatives of repeated music. ")
 (music-property-description 'force-accidental boolean? "If set, a cautionary accidental should always be printed on this note")
index 6c56a7393d0bb01239770b047aae29d2984d0666..dae259deddbf493c5774b28f32a375425c311e3a 100644 (file)
@@ -462,7 +462,6 @@ c8-[ c c-] c8")
     (TempoEvent
      . (
        (description .  "")
-       (length . #f)
        (internal-class-name . "Event")
        (types . (general-music tempo-event event))
        ))