shithub: sf2mid

Download patch

ref: e58c162d5fa20a110291114416fc8786a4d40e4f
parent: 7e646b6916145bca8c82f178cd0ef793f0da80d7
author: Merlyn Morgan-Graham <[email protected]>
date: Tue Oct 16 20:51:19 EDT 2018

Fix incorrect constant for μs per quarter note

Fixes bug #29

--- a/tml.h
+++ b/tml.h
@@ -415,7 +415,7 @@
 		tml_message *PrevMessage = TML_NULL, *Msg, *MsgEnd, Swap;
 		unsigned int ticks = 0, tempo_ticks = 0; //tick counter and value at last tempo change
 		int step_smallest, msec, tempo_msec = 0; //msec value at last tempo change
-		double ticks2time = 480000 / (1000.0 * division); //milliseconds per tick
+		double ticks2time = 500000 / (1000.0 * division); //milliseconds per tick
 
 		// Loop through all messages over all tracks ordered by time
 		for (step_smallest = 0; step_smallest != 0x7fffffff; ticks += step_smallest)