Old 01-22-2018, 05:08 AM   #1
fundorin
Banned
 
Join Date: Feb 2014
Location: Moscow, Russia
Posts: 554
Default Time selection function

I can move cursor along the arrange view with:
1. MoveEditCursor(amt, 1)
2. SetEditCurPos(BR_GetPrevGridDivision(GetCursorPosi tion()), 1, 0)
SetEditCurPos(BR_GetNextGridDivision(GetCursorPosi tion()), 1, 0)
3. ApplyNudge(0, 2, 6, 2, amt, true, 0)

Tried all three methods and found the last one most suitable.

Now, I need to move cursor by grid lines, creating time selection.
What would be the best way to do that?
fundorin is offline   Reply With Quote
Old 01-22-2018, 07:25 AM   #2
fundorin
Banned
 
Join Date: Feb 2014
Location: Moscow, Russia
Posts: 554
Default

There's a pair of actions in SWS, called
SWS: Move cursor and time selection left to grid
and
SWS: Move cursor and time selection right to grid

And this is their source code, which is a perfect solution to the issue above:
https://github.com/reaper-oss/sws/bl...EditCursor.cpp
fundorin is offline   Reply With Quote
Old 01-22-2018, 07:25 AM   #3
fundorin
Banned
 
Join Date: Feb 2014
Location: Moscow, Russia
Posts: 554
Default

Thanks, man. That was very helpful! 😜
fundorin is offline   Reply With Quote
Old 01-22-2018, 11:18 AM   #4
vitalker
Human being with feelings
 
vitalker's Avatar
 
Join Date: Dec 2012
Posts: 13,333
Default

@fundorin, you are welcome.
vitalker 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 05:48 AM.


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