|
|
|
05-21-2017, 06:43 PM
|
#1
|
Human being with feelings
Join Date: Jan 2014
Location: Ontario, Canada
Posts: 1,619
|
How to set arrange view bounds by time?
On today's episode of Things About Reaper's API that make no sense ...
reaper.GetSet_ArrangeView2 gets the arrange view start/end position in time, but sets them in screen coordinates.
How can I set the arrange view bounds based on time codes? Or perhaps the question could be phrased as how can I convert between times and screen coordinates?
Many thanks.
|
|
|
05-23-2017, 02:45 PM
|
#2
|
Human being with feelings
Join Date: Jun 2012
Posts: 2,173
|
Hi tack, have you tried:
Code:
C: void BR_SetArrangeView(ReaProject* proj, double startTime, double endTime)
EEL: extension_api("BR_SetArrangeView", ReaProject proj, startTime, endTime)
Lua: reaper.BR_SetArrangeView(ReaProject proj, number startTime, number endTime)
Python: BR_SetArrangeView(ReaProject proj, Float startTime, Float endTime)
[BR] Deprecated, see GetSet_ArrangeView2 (REAPER v5.12pre4+) -- Set start and end time position of arrange view. To get arrange view instead, see BR_GetArrangeView.
?
|
|
|
05-23-2017, 06:59 PM
|
#3
|
Human being with feelings
Join Date: Jan 2014
Location: Ontario, Canada
Posts: 1,619
|
Ah thanks for that, FnA. I frequently miss the SWS APIs because I tend to mainly use the API docs from Reaper's site. I should have known better.
Surprised though to see the note that BR_SetArrangeView is deprecated in favor of GetSet_ArrangeView2. Either the author of that comment didn't understand GetSet_ArrangeView2's limitations, or I'm not seeing a way to convert between time (float) and screen coordinates (int).
|
|
|
05-23-2017, 07:28 PM
|
#4
|
Human being with feelings
Join Date: Jun 2012
Posts: 2,173
|
Blew my mind too. Had to go with the BR function. Seems to work reliably for my simple purposes.
|
|
|
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 07:04 AM.
|