denemo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Denemo-devel] (d-GetDurationInTicks) bug


From: Nils Gey
Subject: [Denemo-devel] (d-GetDurationInTicks) bug
Date: Wed, 27 Oct 2010 01:05:05 +0200

Hello list,

(d-GetDurationInTicks) has a bug. Backstory: I wrote a function that can 
calculate the Ticks if given a base duration (in ticks) and the number of dots 
(0 is valid, too). More important: I wrote a function that knows only from the 
ticks alone which note it is and how many dots it has. (to be honest I did not 
test it with tuplets yet, maybe this will break things).

But more important: d-GetDurationInTicks only returns integers but should 
return fractions, too.
It happens if you add too many dots (each dot adds baseticks/2^dots to the 
tick-count) the added value gets too small so you get float numbers.

Longer durations do not suffer from this (except dotted tuplets may) until they 
get around 8 or 9 dots, which I  have never seen. But the lower durations 
cannot stand even one dot and the GetDurationInTicks goes off. Well, to be 
honest again its not a real problem since even for 1/128 notes you need three 
dots to make it break.

But still its a theoretical bug. We offer unlimited dots, even for 1/128 and 
1/256 (which needs only 2 dots to break :)) so it should work. And I have the 
feeling it will get less theoretical once I look into tuplet values.

Can you make GetDurationInTicks let return floats (Scheme displays them as 21/2 
and not as float, don't know how the internals work).

Nils



reply via email to

[Prev in Thread] Current Thread [Next in Thread]