Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Bug Reports

Reply
 
Thread Tools Display Modes
Old 11-29-2021, 05:57 AM   #1
paaltio
Human being with feelings
 
Join Date: Aug 2011
Location: Los Angeles, CA
Posts: 308
Default [v6.42] Deleting a tempo/timesig change with "Remove contents of time selection"

Deleting a tempo and time signature change with "Remove contents of time selection" will cause items to get out of sync:

paaltio is offline   Reply With Quote
Old 11-29-2021, 06:02 AM   #2
paaltio
Human being with feelings
 
Join Date: Aug 2011
Location: Los Angeles, CA
Posts: 308
Default

I experimented with timebase changes, but that doesn't seem to affect this behavior. In the GIF the project timebase is Beats (position, length, rate) and the item is set to the default timebase.
paaltio is offline   Reply With Quote
Old 12-02-2021, 01:32 AM   #3
paaltio
Human being with feelings
 
Join Date: Aug 2011
Location: Los Angeles, CA
Posts: 308
Default

As a workaround, I've added this ReaScript before running the action (repeats the bpm at the end of the time selection when needed to avoid change in bpm)

Code:
tsStart, tsEnd = reaper.GetSet_LoopTimeRange2(0, false, false, 0, 0, false)
activeTempoIndex = reaper.FindTempoTimeSigMarker(0, tsEnd + 0.01)
if activeTempoIndex > -1 then
    retval, timepos, measurepos, beatpos, bpm, timesig_num, timesig_denom, lineartempo = reaper.GetTempoTimeSigMarker(0, activeTempoIndex)
    if (reaper.TimeMap2_GetDividedBpmAtTime(0, tsStart - 0.01) ~= (reaper.TimeMap2_GetDividedBpmAtTime(0, tsEnd + 0.01))) then
        if timepos < tsEnd then
            reaper.AddTempoTimeSigMarker(0, tsEnd, bpm, timesig_num, timesig_denom, lineartempo)
            reaper.UpdateTimeline()
        elseif timepos == tsEnd then
            reaper.SetTempoTimeSigMarker(0, activeTempoIndex, timepos, measurepos, beatpos, reaper.TimeMap2_GetDividedBpmAtTime(0, tsEnd + 0.01), timesig_num, timesig_denom, lineartempo)
            reaper.UpdateTimeline()
        end
    end
end
paaltio is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 06:33 AM.


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