|
|
|
11-24-2019, 03:05 AM
|
#1
|
Human being with feelings
Join Date: Jan 2014
Posts: 923
|
API function GetSet_ArrangeView2 bug?
API documentation:
number start_time, number end_time = reaper.GetSet_ArrangeView2(ReaProject proj, boolean isSet, integer screen_x_start, integer screen_x_end)
Gets or sets the arrange view start/end time for screen coordinates. use screen_x_start=screen_x_end=0 to use the full arrange view's start/end time
I want to set arrange start/end time but nothing happens..
reaper.GetSet_ArrangeView2(0, true,10, 20)
|
|
|
11-24-2019, 05:26 AM
|
#2
|
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
|
This is a bug in the documentation. GetSet_ArrangeView2 actually has 6 parameters and start_time/end_time are the last two. screen_x_start and screen_x_end are screen coordinates in pixels.
Code:
void GetSet_ArrangeView2(
ReaProject* proj,
bool isSet,
int screen_x_start,
int screen_x_end,
double* start_timeOut,
double* end_timeOut
)
Use it in Lua like this:
Code:
reaper.GetSet_ArrangeView2(0, true, 0, 0, 10.0, 20.0)
|
|
|
11-24-2019, 09:50 AM
|
#3
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,241
|
interesting.
I'm trying to get the screen_x_start and screen_x_end coordinates in lua but it seems it always gets nil
Code:
local s1, e1, x_start, x_end = reaper.GetSet_ArrangeView2(0, false, 0, 0, 0.0, 0.0)
s1 and e1 are ok. time in seconds.
x_start is nil
x_end is nil
|
|
|
11-24-2019, 10:00 AM
|
#4
|
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
|
screen_x_start and screen_x_end are not return values. They are for specifying where start_time and stop_time should be on the screen when non-zero.
For example, to set the 10 second mark to be at 300px from the left of the screen and the 20 second mark at 600px:
Code:
reaper.GetSet_ArrangeView2(0, true, 300, 600, 10.0, 20.0)
|
|
|
11-25-2019, 03:06 AM
|
#5
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,241
|
thank you cfillion
Then it would be a feature request. Having the pixel coordinates of the arrange area then I think it would be possible to fix this:
I am trying to avoid having to manually resize the graph area of the script like this
|
|
|
11-28-2019, 09:23 AM
|
#6
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
Quote:
Originally Posted by cfillion
This is a bug in the documentation. GetSet_ArrangeView2 actually has 6 parameters and start_time/end_time are the last two. screen_x_start and screen_x_end are screen coordinates in pixels.
|
Thanks for pointing that out. Will add that to my API-docs.
@devs
Could you add that to the official docs too, please?
|
|
|
05-31-2021, 12:11 AM
|
#7
|
Human being with feelings
Join Date: Jul 2019
Posts: 156
|
Just ran into this bug. Thanks for the thread, would be nice to get the documentation fixed.
|
|
|
05-31-2021, 10:00 AM
|
#8
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
Quote:
Originally Posted by nvk
Just ran into this bug. Thanks for the thread, would be nice to get the documentation fixed.
|
You can use my docs, where I usually try to add stuff like this:
https://mespotin.uber.space/Ultrasch...AutomationItem
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 05:01 AM.
|