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

Reply
 
Thread Tools Display Modes
Old 06-20-2024, 01:04 PM   #1
AZpercussion
Human being with feelings
 
Join Date: Oct 2019
Location: Moscow / Tbilisi
Posts: 951
Default API: Take start offset can not be set because of stretch markers

Function to set take info returns true, but does nothing if the take has stretch markers.

Here the simple script for test:
Code:
item = reaper.GetSelectedMediaItem(0,0)
take = reaper.GetActiveTake(item)
offset = reaper.GetMediaItemTakeInfo_Value( take, 'D_STARTOFFS' )
msg(reaper.SetMediaItemTakeInfo_Value( take, 'D_STARTOFFS', offset + 2 ))
AZpercussion is offline   Reply With Quote
Old 06-20-2024, 01:16 PM   #2
MonkeyBars
Human being with feelings
 
MonkeyBars's Avatar
 
Join Date: Feb 2016
Location: Hollyweird
Posts: 2,686
Default

Oh my that's a serious bug that will break Superglue for sure. +1

I assume you've tried with some different values to be absolutely certain. Stretch markers greatly complicate the calculation of take values.
MonkeyBars is offline   Reply With Quote
Old 06-20-2024, 02:05 PM   #3
AZpercussion
Human being with feelings
 
Join Date: Oct 2019
Location: Moscow / Tbilisi
Posts: 951
Default

It just do nothing with any values.
Also it doesn't matter about stretch marker values. There can be at least single marker without any stretches and function stops work.
AZpercussion is offline   Reply With Quote
Old 06-20-2024, 02:50 PM   #4
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,169
Default

https://forum.cockos.com/showthread.php?t=180571
nofish is offline   Reply With Quote
Old 06-20-2024, 03:02 PM   #5
MonkeyBars
Human being with feelings
 
MonkeyBars's Avatar
 
Join Date: Feb 2016
Location: Hollyweird
Posts: 2,686
Default

Thanks nofish!

But still would be great to fix this longstanding bug, devs +1
MonkeyBars is offline   Reply With Quote
Old 06-20-2024, 03:50 PM   #6
AZpercussion
Human being with feelings
 
Join Date: Oct 2019
Location: Moscow / Tbilisi
Posts: 951
Default

Wow! Thank for the tip you, nofish and MPL.

I think it should be at least documented in the API, so scripters will be informed.
AZpercussion is offline   Reply With Quote
Old 06-21-2024, 04:57 AM   #7
odedd
Human being with feelings
 
Join Date: Dec 2019
Posts: 262
Default

Since the stretch markers are defined by their position in the source media, they sort of replace the offset. Or at least, the offset should also update them accordingly.
The way to set the offset would be to iterate the stretch markers and offset them instead. Notice that take markers act the same, so they would need to be offset as well.

However, since stretch/take markers in a looped item can be in different loops iterations themselves, this complicates things very much.
It took me forever to figure this out for my project archiver script, but I eventually got it to work. It's a pain, for sure.
__________________
Send Buddy | Stem Manager | Project Archiver
odedd is offline   Reply With Quote
Old 06-21-2024, 10:09 AM   #8
AZpercussion
Human being with feelings
 
Join Date: Oct 2019
Location: Moscow / Tbilisi
Posts: 951
Default

Quote:
Originally Posted by odedd View Post
Notice that take markers act the same, so they would need to be offset as well.
No, take markers obey to the take offset well.
AZpercussion is offline   Reply With Quote
Old 06-21-2024, 11:32 AM   #9
odedd
Human being with feelings
 
Join Date: Dec 2019
Posts: 262
Default

Quote:
Originally Posted by AZpercussion View Post
No, take markers obey to the take offset well.
Oh you’re right. Sorry.
__________________
Send Buddy | Stem Manager | Project Archiver
odedd 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 01:01 PM.


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