Go Back   Cockos Incorporated Forums > REAPER Forums > ReaScript, JSFX, REAPER Plug-in Extensions, Developer Forum

Reply
 
Thread Tools Display Modes
Old 11-11-2016, 06:24 PM   #1
dbmdbu
Human being with feelings
 
Join Date: Oct 2014
Posts: 6
Default Issues using api call for Time Selection: Set start/end point actions

Hi

I'm my OSX Csurf driver, I'm trying to use the (Time Selection: Set start point /Set end point) actions using they following C code

Main_OnCommand(40625, 0); //set time selection start
Main_OnCommand(40026, 0); // Set time selection stop

However, the results are not stable. Some time is will work, or some other time a "SET TIME SELECTION STOP" on a existing time selection will delete the existing selection, even if the play position is later on the timeline. (the usual keyboard "o" short cut would extend the selection"

If a second "SET TIME SELECTION STOP" is sent, it creats a new time selection even if a set start as not been sent... (the new time selection is set between the two "SET TIME SELECTION STOP" command on the timeline). all of this is done while in PLAY mode.

Is there other ways to control a time selection zone from a API call. Or I'm missing some thing that need to be set before calling the 40625/40625 actions ( I have tried issuing a "DELETE TIME SELECTION" before, the set start/stop but it doesn't help

Any pointers would be appreciated

dbmdbu
dbmdbu is offline   Reply With Quote
Old 11-12-2016, 11:03 PM   #2
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

Quote:
Originally Posted by dbmdbu View Post

Is there other ways to control a time selection zone from a API call

dbmdbu
There's these:

Code:
C: void GetSet_LoopTimeRange(bool isSet, bool isLoop, double* startOut, double* endOut, bool allowautoseek)

EEL: GetSet_LoopTimeRange(bool isSet, bool isLoop, &startOut, &endOut, bool allowautoseek)

Lua: number startOut retval, number endOut reaper.GetSet_LoopTimeRange(boolean isSet, boolean isLoop, number startOut, number endOut, boolean allowautoseek)

Python: (Boolean isSet, Boolean isLoop, Float startOut, Float endOut, Boolean allowautoseek) = RPR_GetSet_LoopTimeRange(isSet, isLoop, startOut, endOut, allowautoseek)


C: void GetSet_LoopTimeRange2(ReaProject* proj, bool isSet, bool isLoop, double* startOut, double* endOut, bool allowautoseek)

EEL: GetSet_LoopTimeRange2(ReaProject proj, bool isSet, bool isLoop, &startOut, &endOut, bool allowautoseek)

Lua: number startOut retval, number endOut reaper.GetSet_LoopTimeRange2(ReaProject proj, boolean isSet, boolean isLoop, number startOut, number endOut, boolean allowautoseek)

Python: (ReaProject proj, Boolean isSet, Boolean isLoop, Float startOut, Float endOut, Boolean allowautoseek) = RPR_GetSet_LoopTimeRange2(proj, isSet, isLoop, startOut, endOut, allowautoseek)
Probably in conjunction with:

Code:
C: double GetCursorPosition()

EEL: double GetCursorPosition()

Lua: number reaper.GetCursorPosition()

Python: Float RPR_GetCursorPosition()

edit cursor position


C: double GetCursorPositionEx(ReaProject* proj)

EEL: double GetCursorPositionEx(ReaProject proj)

Lua: number reaper.GetCursorPositionEx(ReaProject proj)

Python: Float RPR_GetCursorPositionEx(ReaProject proj)

edit cursor position
or
Code:
C: double GetPlayPosition()

EEL: double GetPlayPosition()

Lua: number reaper.GetPlayPosition()

Python: Float RPR_GetPlayPosition()

returns latency-compensated actual-what-you-hear position


C: double GetPlayPosition2()

EEL: double GetPlayPosition2()

Lua: number reaper.GetPlayPosition2()

Python: Float RPR_GetPlayPosition2()

returns position of next audio block being processed


C: double GetPlayPosition2Ex(ReaProject* proj)

EEL: double GetPlayPosition2Ex(ReaProject proj)

Lua: number reaper.GetPlayPosition2Ex(ReaProject proj)

Python: Float RPR_GetPlayPosition2Ex(ReaProject proj)

returns position of next audio block being processed


C: double GetPlayPositionEx(ReaProject* proj)

EEL: double GetPlayPositionEx(ReaProject proj)

Lua: number reaper.GetPlayPositionEx(ReaProject proj)

Python: Float RPR_GetPlayPositionEx(ReaProject proj)

returns latency-compensated actual-what-you-hear position
FnA 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 06:32 AM.


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