[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tempo as REAL number
From: |
karl |
Subject: |
Re: tempo as REAL number |
Date: |
Thu, 16 Jul 2015 13:59:03 +0200 (CEST) |
dak:
> jan <address@hidden> writes:
...
> > \tempo 4 = 82.3
> > produces the error.
> > "syntax error, unexpected REAL"
> > Since in midi tempo definitions are of type float
>
> They aren't. They are exact fractions.
>
> > I wonder if there is a reason for Lilypond to restrict the tempo to
> > integers. If there is no reason, I would like to suggest to make the
> > tempo command more general and accept reals.
>
> Inexact numbers would make LilyPond's Midi output unpredictable
> (unsuitable for binary comparison). I am not sure this would be a
> problem: we have the same situation with the extensive floating point
> calculations involved in the printed output.
midi's view of tempo is microseconds per midi quarter note, or
(though I find midi's time and time sig. handling confusing)
midi_tempo = 60*1000*1000 / "\tempo 4 value"
and
60000000 / 82.3 about= 729040.09720534629404617253
I doubt that truncating/rounding that to a int vould cause any problem.
Regards,
/Karl Hammar
-----------------------------------------------------------------------
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sweden
+46 173 140 57