From bf5f5c9c8e72ac18466ce8b23e0c83b9cf2384b5 Mon Sep 17 00:00:00 2001 From: revilofr Date: Thu, 6 Nov 2014 15:36:39 +0100 Subject: [PATCH] Update of the duration formula to handle more than 3 dots. Even if it is uncommon it's theorically correct, and it seems that some generator use to do that. With that formula is is theorically possible to handle an infinite number of dots as opposed to the previous version which was handling a fixed maximum amount of 3 dots. --- timbre.dev.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/timbre.dev.js b/timbre.dev.js index 92cb888..f3289ba 100644 --- a/timbre.dev.js +++ b/timbre.dev.js @@ -8835,7 +8835,7 @@ dot = cmd.dot || status.dot; } duration = (60 / tempo) * (4 / len) * 1000; - duration *= [1, 1.5, 1.75, 1.875][dot] || 1; + duration *= 2 - (1 / Math.pow(2, dot)); vel = status.v << 3; if (status.tie) {