From: Han-Wen Nienhuys Date: Thu, 21 Nov 2002 20:50:55 +0000 (+0000) Subject: (tempo_event): use tempo-unit for \tempo X-Git-Tag: release/1.7.9~37 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=f4bb931f47bf0a7551d63e72c3a242993ae19ddb;p=lilypond.git (tempo_event): use tempo-unit for \tempo duration. This fixes \tempo taking time. --- diff --git a/ChangeLog b/ChangeLog index 521f1b2902..1cb230a2cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-11-21 Han-Wen Nienhuys + + * lily/parser.yy (tempo_event): use tempo-unit for \tempo + duration. This fixes \tempo taking time. + 2002-11-21 Mats Bengtsson * lily/volta-engraver.cc (process_acknowledged_grobs): diff --git a/lily/parse-scm.cc b/lily/parse-scm.cc index f9c972bfb9..e65e445511 100644 --- a/lily/parse-scm.cc +++ b/lily/parse-scm.cc @@ -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) { diff --git a/lily/parser.yy b/lily/parser.yy index e39a2d78ca..012e2be3d1 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -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 ($$); 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)); } ; diff --git a/lily/tempo-performer.cc b/lily/tempo-performer.cc index 1dce3712d5..d9a1190dcd 100644 --- a/lily/tempo-performer.cc +++ b/lily/tempo-performer.cc @@ -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_; diff --git a/scm/music-property-description.scm b/scm/music-property-description.scm index 9dd8e8c9ce..af871aa0d9 100644 --- a/scm/music-property-description.scm +++ b/scm/music-property-description.scm @@ -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") diff --git a/scm/music-types.scm b/scm/music-types.scm index 6c56a7393d..dae259dedd 100644 --- a/scm/music-types.scm +++ b/scm/music-types.scm @@ -462,7 +462,6 @@ c8-[ c c-] c8") (TempoEvent . ( (description . "") - (length . #f) (internal-class-name . "Event") (types . (general-music tempo-event event)) ))