API: TimeMap2_timeToBeats and TimeMap2_beatsToTime broken with a lot of tempo markers
Here's an example project:
https://stash.reaper.fm/21147/API%20bugs.RPP
Tempo markers are set at every grid division of 1/256
Before procesing with the report, let me just mention that besides broken API, we can also see broken ruler:
Notice how measure count resumes after that big bunch of tempo markers (measure 3 should be followed by measures 4 and 5, and current measure 4 should be measure 6)
When trying to determine beats and measure location with TimeMap2_timeToBeats, beats since measure will always be something like 0, and measure count will behave the same as ruler (always being 3, when in fact it can also be 4 and 5 in some cases):
TimeMap2_beatsToTime is also broken. For example, if we run this while edit cursor is positioned on the first tempo marker (like seen on the first screenshot):
Code:
RPR_TimeMap2_beatsToTime(0, 0, 3)
the return value will be 12.242187500005, and not 6.0 as it should be.
Please fix this, as it leaves some of us dead in water when it comes to writing stuff for SWS :)
Discussion thread: http://forum.cockos.com/showthread.php?t=142449