Old 09-13-2018, 08:08 AM   #1
Jae.Thomas
Human being with feelings
 
Join Date: Jun 2006
Posts: 22,567
Default me2beats "Go to measure" script doesn't consider offsets

am I using it wrongly?

I have a negative 1 offset

i hit "go to measure" and enter 4, it goes to measure 3.
Jae.Thomas is offline   Reply With Quote
Old 09-13-2018, 10:10 AM   #2
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

You are using it correctly, but there's inconsistency in Reaper's "timemap" API functions.

There's a function for getting the Project start time (reaper.GetProjectTimeOffset), but there's no API function for getting the Project start measure -value.

Missing the GetProjectMeasureOffset -function is actually quite a bad thing because TimeMap_GetMeasureInfo and other related functions (I guess) don't take the measure offset into account.
spk77 is offline   Reply With Quote
Old 09-13-2018, 10:25 AM   #3
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

We can get the start offset using IntConfigVar though, just a pain.
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna is offline   Reply With Quote
Old 09-13-2018, 11:04 AM   #4
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 1,719
Default

I guess this means I won't be using Reaper for big Orchestral sessions. I need to be able to easily type in a number where the cursor is to tell it that it's measure 1.

Is there really no way to apply the current measure (at cursor) as a positive offset to the project bar start so that the measure at the cursor is 1?
__________________
Cheers... Andrew K
Reaper v6.80+dev0621 - June 21 2023 • Catalina • Mac Mini 2020 6 core i7 • 64GB RAM • OS: Catalina • 4K monitor • RME RayDAT card with Sync Card and extended Light Pipe.
Thonex is offline   Reply With Quote
Old 09-13-2018, 12:11 PM   #5
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by Lokasenna View Post
We can get the start offset using IntConfigVar though, just a pain.
I tried...
Code:
offs = reaper.SNM_GetIntConfigVar("PROJOFFS", -10000)
... but it didn't work. (because there are 3 values stored in PROJOFFS "key")


This is how the project offset data is stored in rpp files:
PROJOFFS 0 -2 0
  • Green = Project start time
  • Red = Project start measure
  • Blue = "Base ruler markings off this measure" (checkbox state - 0 or 1)
spk77 is offline   Reply With Quote
Old 09-13-2018, 12:39 PM   #6
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

Code:
reaper.SNM_GetIntConfigVar("projmeasoffs", 0)
It's always 1 off because the value is 0-based, so setting a start measure of 4 returns a value of 3.
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate

Last edited by Lokasenna; 09-13-2018 at 12:45 PM.
Lokasenna is offline   Reply With Quote
Old 09-13-2018, 12:46 PM   #7
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

Quote:
Originally Posted by Thonex View Post
I guess this means I won't be using Reaper for big Orchestral sessions. I need to be able to easily type in a number where the cursor is to tell it that it's measure 1.

Is there really no way to apply the current measure (at cursor) as a positive offset to the project bar start so that the measure at the cursor is 1?
SetIntConfigVar with "projmeasoffs" should do it.
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna is offline   Reply With Quote
Old 09-13-2018, 12:59 PM   #8
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by Lokasenna View Post
Code:
reaper.SNM_GetIntConfigVar("projmeasoffs", 0)
It's always 1 off because the value is 0-based, so setting a start measure of 4 returns a value of 3.
I forgot that the measure offset is stored into the reaper.ini (not only in project files)...that changes everything, thanks!

Time flies so quickly:
https://forum.cockos.com/showpost.ph...2&postcount=14
spk77 is offline   Reply With Quote
Old 09-13-2018, 03:40 PM   #9
Jae.Thomas
Human being with feelings
 
Join Date: Jun 2006
Posts: 22,567
Default

there's weird inconsistency with melodyne, as well - it's a bit annoying. Maybe just a reaper problem then?
Jae.Thomas is offline   Reply With Quote
Old 09-13-2018, 03:53 PM   #10
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 1,719
Default

Quote:
Originally Posted by Lokasenna View Post
SetIntConfigVar with "projmeasoffs" should do it.
Noted!! Thanks yet again Loka!!!
__________________
Cheers... Andrew K
Reaper v6.80+dev0621 - June 21 2023 • Catalina • Mac Mini 2020 6 core i7 • 64GB RAM • OS: Catalina • 4K monitor • RME RayDAT card with Sync Card and extended Light Pipe.
Thonex is offline   Reply With Quote
Old 09-13-2018, 04:08 PM   #11
Jae.Thomas
Human being with feelings
 
Join Date: Jun 2006
Posts: 22,567
Default

so is this script updated? did ya'll just fix it? How do I enter it in?
Jae.Thomas is offline   Reply With Quote
Old 05-21-2023, 01:41 PM   #12
lexaproductions
Human being with feelings
 
Join Date: Jan 2013
Posts: 1,126
Default

Quote:
Originally Posted by spk77 View Post
I forgot that the measure offset is stored into the reaper.ini (not only in project files)...that changes everything, thanks!

Time flies so quickly:
https://forum.cockos.com/showpost.ph...2&postcount=14
Sorry for getting back to this: The main problem with this route is that it cannot be used for background tabs.

Quote:
Originally Posted by spk77 View Post
There's a function for getting the Project start time (reaper.GetProjectTimeOffset), but there's no API function for getting the Project start measure -value.

Missing the GetProjectMeasureOffset -function is actually quite a bad thing because TimeMap_GetMeasureInfo and other related functions (I guess) don't take the measure offset into account.
This is really the best option. I'll make a feature request out for this. Let's hope it could be a simple fix.
lexaproductions 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 10:49 AM.


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