Go Back   Cockos Incorporated Forums > Projects > Deprecated REAPER issue tracker > Open Bug

API - tempo bugs Issue Tools
issueid=4359 09-16-2012 04:14 PM
Human being with feelings
API - tempo bugs
serious bugs that prevent normal use of the API

SetTempoTimeSigMarker - problems with time signatures

  • Setting tempo time sig marker that already has a time signature marker MOVES all the markers in front of it to one point!
    Here's the licecap:


    Code:
    p = RPR_GetTempoTimeSigMarker(0, 2, 0, 0, 0, 0, 0, 0, 0)
    RPR_SetTempoTimeSigMarker(0, p[2], -1, p[4], p[5], p[6] + 1, p[7], p[8], p[9])
    RPR_UpdateTimeline()
    It happens only if specifying measurepos and beatpos while leaving timepos -1. So the workaround would be to never user musical position but only time position.




  • If setting BPM of a tempo marker that allows a partial measure before it - and a partial measure before it exists - it reset's it's position



    Here's the script:
    Code:
    p = RPR_GetTempoTimeSigMarker(0, 2, 0, 0, 0, 0, 0, 0, 0)
    RPR_SetTempoTimeSigMarker(0, p[2], p[3], -1, -1, p[6] + 1, p[7], p[8], p[9])
    RPR_UpdateTimeline()
    It doesn't matter if using timepos or measurepos and
    beatpos...the result is the same.

Workaround would be to execute command
RPR_SetTempoTimeSigMarker(0, p[2], p[3], -1, -1, p[6] + 1, p[7], p[8], p[9]) twice in a row. But it's not always reliable in case of linear points.


TimeMap2_timeToBeats
  • It does not seem to take into account partial measures


    This is the .rpp: https://stash.reaper.fm/13628/TimeMap2_timeToBeats.RPP

    When I execute this python script, TimeMap2_timeToBeats's double* fullbeats is expected to output 7 but it outputs 8 (which would be correct if the measure weren't partial):

    Code:
    def msg(m) :
    	s = str(m) + '\n'
    	RPR_ShowConsoleMsg(s)
    
    	
    p = RPR_GetTempoTimeSigMarker(0, 2, 0, 0, 0, 0, 0, 0, 0)
    p = RPR_TimeMap2_timeToBeats(0, p[3], 0, 0, 0, 0)
    msg(p)





TimeMap2_beatsToTime
  • Code:
    convert a beat position (or optionally a beats+measures if measures is non-NULL) to time.
    
    double TimeMap2_beatsToTime(ReaProject* proj, double tpos, int* measures)
    If using beat and measures it behaves correctly, but if using ONLY beats it stops working after a tempo change (it doesn't matter if it has time signature or is a linear change)



    This will output 3.4969134626331737 which is correct

    Code:
    def msg(m) :
    	s = str(m) + '\n'
    	RPR_ShowConsoleMsg(s)
    
    p = RPR_TimeMap2_beatsToTime(0, 1, 2)
    msg(p)

    However, using only beats this will output 3.0 - as if it stops counting beats after it reaches tempo change
    Code:
    def msg(m) :
    	s = str(m) + '\n'
    	RPR_ShowConsoleMsg(s)
    
    p= RPR_TimeMap2_beatsToTime(0, 7, 0)
    msg(p)
    Here is the .rpp that was used to test it: https://stash.reaper.fm/13636/TimeMap2_beatsToTime.RPP

    btw...in the upper screenshot you can also notice illogical way a timeline is drawn over tempo changes (just try zooming out/in with a bunch of them to see what I'm talking about). One would expect to see start of a measure (ie 5, 8, 13) and not 5.3, 8.2, 13.3
Issue Details
Issue Type Open Bug
Project Deprecated REAPER issue tracker
Category Editing behavior
Status Unconfirmed
Priority 5 - Medium
Affected Version 4.26
Fixed Version (none)
Users able to reproduce bug 1
Users unable to reproduce bug 0
Assigned Users (none)
Tags (none)

09-02-2014 02:14 AM
Issue Changed by Jeffos
  • Priority changed from 1 - Highest to 5 - Medium
Reply

Issue Tools
Subscribe to this issue

All times are GMT -7. The time now is 12:31 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.