|
|
|
10-19-2019, 12:13 AM
|
#1
|
Human being with feelings
Join Date: Feb 2019
Location: Southern Vermont
Posts: 864
|
API Request: reaper.GetSet_VerticalArrangeView()
Humbly requesting to the REAPER lords an API function that allows retrieving/declaring of the arrange view's vertical position and zoom, in pixels.
Also, an API function that allows get/set of arrange view vertical scroll.
Identical, in fact, to REAPER's reaper.GetSet_ArrangeView2(), except that it would affect/retrieve the vertical of the arrange window, and that it would be pixel-based (for obvious reasons).
Last edited by Dafarkias; 10-24-2019 at 08:36 AM.
|
|
|
10-19-2019, 08:11 AM
|
#2
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,921
|
Quote:
Originally Posted by Dafarkias
Also, an API function that allows get/set of arrange view vertical scroll.
|
In the meantime you could use js_ReaScriptAPI extension, JS_Window_Get/SetScrollInfo, for example...
Code:
arrangeview = reaper.JS_Window_FindChildByID(reaper.GetMainHwnd(), 1000)
retval, position, pageSize, min, max, trackPos = reaper.JS_Window_GetScrollInfo(arrangeview, "SB_VERT")
reaper.JS_Window_SetScrollPos(arrangeview, "SB_VERT", position + 100) -- scroll down 100 pixels
Last edited by Edgemeal; 10-19-2019 at 08:37 AM.
Reason: Add link to Julian's thread
|
|
|
10-19-2019, 03:27 PM
|
#3
|
Human being with feelings
Join Date: Feb 2019
Location: Southern Vermont
Posts: 864
|
@Edgemeal
Thanks!
Actually that is what I'm currently using for the new script I'm working on. It's a wip, but I'm trying to create a project map. Scalable, and used to quickly jump to any project location with just a click.
https://forum.cockos.com/showthread.php?t=226263
Last edited by Dafarkias; 10-20-2019 at 04:41 AM.
|
|
|
10-21-2019, 10:04 AM
|
#4
|
Human being with feelings
Join Date: Feb 2019
Location: Southern Vermont
Posts: 864
|
Bump. Essentially I've found it impossible to create my rmb marquee portion of my project map script, even when using Julian's extension.
[edit]
Okay, maybe not impossible but it's a very clunky workaround.
Last edited by Dafarkias; 10-21-2019 at 10:33 PM.
|
|
|
10-24-2019, 04:37 AM
|
#5
|
Human being with feelings
Join Date: Mar 2013
Posts: 216
|
+1 because I'm in love with Dafarkias new script and it will make it more powerful
|
|
|
10-24-2019, 05:08 AM
|
#6
|
Human being with feelings
Join Date: Oct 2009
Location: France
Posts: 745
|
+1
thank you.
|
|
|
10-25-2019, 12:03 AM
|
#7
|
Human being with feelings
Join Date: Feb 2019
Location: Southern Vermont
Posts: 864
|
Thanks for the support!
It would be nice to have some acknowledgement from the devs that this thread exists... E.g., we don't have time for this at the moment, or there are logistical limitations that would prevent us from incorporating such an API function...
|
|
|
10-25-2019, 06:03 AM
|
#8
|
Human being with feelings
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
|
Quote:
Originally Posted by Dafarkias
Thanks for the support!
It would be nice to have some acknowledgement from the devs that this thread exists... E.g., we don't have time for this at the moment, or there are logistical limitations that would prevent us from incorporating such an API function...
|
I've been on this forum for ten years and I can probably count on one hand the number of times I've seen that happen.
|
|
|
10-25-2019, 11:03 AM
|
#9
|
Human being with feelings
Join Date: Feb 2019
Location: Southern Vermont
Posts: 864
|
Fingers crossed. This may just be the (1>x<5)+1 occurrence. :P
jk.
|
|
|
11-03-2019, 12:58 AM
|
#10
|
Human being with feelings
Join Date: Feb 2019
Location: Southern Vermont
Posts: 864
|
Buuu-uuuummp?
|
|
|
11-14-2019, 05:26 AM
|
#11
|
Human being with feelings
Join Date: Feb 2019
Location: Southern Vermont
Posts: 864
|
A shameless bump.
One day, the devs will give in to my insufferable persistence lol
This feature, I feel, will open up doors for graphic scripts that can more heavily optimize zooming and track management workflows. This excites me, as I love being able to 'custom script' workflow utilities via a near seamless integration.
I don't know if m/any other DAWs provide such similar capability.
|
|
|
11-20-2019, 12:01 PM
|
#12
|
Human being with feelings
Join Date: Feb 2019
Location: Southern Vermont
Posts: 864
|
I've decided not to bump this thread anymore.
I've given up on the idea that scripters (I'm not a scripter, I'm too bad at it) should be able to manually adjust and set the virtual zoom of the arrange view.
It would cause havoc!
Think about it! All the various scripters being able to assign vertical view positioning all willy-nilly? The sheer thought of it makes me laugh.
Last edited by Dafarkias; 11-20-2019 at 12:10 PM.
|
|
|
11-20-2019, 12:04 PM
|
#13
|
Human being with feelings
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
|
Quote:
Originally Posted by Dafarkias
Think about it! All the various scripters being able to assign vertical view positioning willy-nilly? The sheer thought of it makes me laugh.
|
That's only a problem if someone has more than one script running that affects the zoom/scroll state; that's a user issue.
I'm still firmly a +1 to this FR, because if I have a script that manipulates the visible tracks, their heights, whatever, I should damn well be able to make sure that user is looking at the intended track afterward.
|
|
|
11-20-2019, 12:09 PM
|
#14
|
Human being with feelings
Join Date: Feb 2019
Location: Southern Vermont
Posts: 864
|
I must shamefully admit that I was being facetious with ^^^ that post.
I realize that sarcasm is the lowest form of wit, but it's all I have...
|
|
|
11-23-2019, 12:34 PM
|
#15
|
Human being with feelings
Join Date: Feb 2019
Location: Southern Vermont
Posts: 864
|
Found a work-around (I think?) for setting vertical zoom and positioning using existing REAPER API functions...
If you're interesting let me know, please. I've attempted to use the workaround in my v.093 Project Map Nav. script.
[Edit]
When I look back at the code, it looks as if I did use two of Julian's functions to make my workaround, reaper.JS_Window_GetClientSize, and reaper.JS_Window_GetScrollInfo.
It's a really ugly work around, but it's loosely based on this code:
Code:
reaper.CSurf_OnScroll( 0, math.floor((reaper.GetMediaTrackInfo_Value( reaper.GetTrack( 0, 0 ), "I_WNDH" )/8)+.5) )
It seems as if when REAPER zooms, the reaper.CSurf_OnScroll 'follows' it by a division of 8. What makes it tricky is that (I believe) it accounts for the 'gray space' at the bottom of your last track in the arrange view, meaning it isn't a truly relevant conversion until you use Julian's functions to calculate the 'gray space'.
So basically, you could attempt to:
- save each tracks' height into a table, and the combined total in a variable
- calculate 'gray space' by comparing total vertical height of all tracks to the arrange view height using reaper.JS_Window_GetClientSize
- create a ratio using these variables/tables, and set/multiply each track's height accordingly using the "I_HEIGHTOVERRIDE" parameter from reaper.SetMediaTrackInfo_Value
Zoom is complete...- use reaper.CSurf_OnScroll( 0, -100000 ) to vertically scroll to the top of the arrange
- using your corrected ratios, utilize reaper.CSurf_OnScroll again with a division of '8' to set your scroll accordingly.
Scroll is complete...
It's a huge pain in the butt, and definitely should be added natively to the API!
Last edited by Dafarkias; 11-23-2019 at 11:08 PM.
|
|
|
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 03:14 PM.
|