Old 03-24-2017, 07:42 AM   #1
lexaproductions
Human being with feelings
 
Join Date: Jan 2013
Posts: 1,126
Default How does "Wait 5 seconds before next action" works?

I need to make action that will revert itself after 5 seconds. I'm trying to understand how this command works:
To test it, I made a quick action doing:
Transport: Play
Action: Wait 5 seconds before next action
Transport: Stop

I would assume the transport to stop after 5 seconds. But the action only plays and IMMEDIATELY stops rather than waiting 5 seconds.

What am I not understanding?
lexaproductions is offline   Reply With Quote
Old 03-24-2017, 06:19 PM   #2
xpander
Human being with feelings
 
xpander's Avatar
 
Join Date: Jun 2007
Location: Terra incognita
Posts: 7,670
Default

If you run that custom action, you may notice that the play control actually is active and after 5 seconds it will go out. What happens is that the playback is initiated with the first step, but right after that Reaper starts to wait for the next action for 5 seconds and during that time nothing happens.

IOW wait actions cannot be used if you want something else happening in the meanwhile. Not quite what is always expected I'd imagine. At least the shorter wait actions used to help with some custom actions where the steps were executed too fast otherwise. But if these wait actions cannot do things like tried here, maybe there should be some "continue for x seconds" or similar actions?

Last edited by xpander; 03-24-2017 at 06:27 PM.
xpander is offline   Reply With Quote
Old 03-25-2017, 07:25 AM   #3
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,096
Default

Can be done with a script though.

Here's a Lua example script doing "Play, wait 5 sec., Stop"
I commented it where you can put the wait time and your own actions.



edit:
Script is in my ReaScripts repo, see link in signature.

Last edited by nofish; 05-04-2017 at 05:02 AM.
nofish is offline   Reply With Quote
Old 03-25-2017, 03:53 PM   #4
lexaproductions
Human being with feelings
 
Join Date: Jan 2013
Posts: 1,126
Default

Wow. This is great!
Would you know how to make it so that, If I retrigger the script without the delay being done, the count resets?

I'm making myself a "Suspend Auto-Scroll" command
lexaproductions is offline   Reply With Quote
Old 05-10-2019, 06:09 AM   #5
Skorobagatko
Human being with feelings
 
Skorobagatko's Avatar
 
Join Date: Mar 2017
Location: Ukraine, Kyiv
Posts: 546
Default

Quote:
Originally Posted by nofish View Post
Can be done with a script though.

Here's a Lua example script doing "Play, wait 5 sec., Stop"
I commented it where you can put the wait time and your own actions.



edit:
Script is in my ReaScripts repo, see link in signature.
How can I make your script to work with actions like this (not just the numbers like "1007"): _RS65de0e469e7ba28ab9419e7292dfc97e9af5c7e8 ?
Skorobagatko is offline   Reply With Quote
Old 05-10-2019, 06:17 AM   #6
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

You can get the number associated with
_RS65de0e469e7ba28ab9419e7292dfc97e9af5c7e8
using this function:
https://mespotin.uber.space/Ultrasch...dCommandLookup
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 05-10-2019, 06:21 AM   #7
Skorobagatko
Human being with feelings
 
Skorobagatko's Avatar
 
Join Date: Mar 2017
Location: Ukraine, Kyiv
Posts: 546
Default

Quote:
Originally Posted by mespotine View Post
You can get the number associated with
_RS65de0e469e7ba28ab9419e7292dfc97e9af5c7e8
using this function:
https://mespotin.uber.space/Ultrasch...dCommandLookup
Thanks a lot!
Skorobagatko is offline   Reply With Quote
Old 01-23-2020, 04:32 PM   #8
lowellben
Human being with feelings
 
lowellben's Avatar
 
Join Date: Aug 2010
Location: They put me in a home.
Posts: 3,432
Default

Are these actions gone now?
__________________
47.8% of statistics are made up.
lowellben is offline   Reply With Quote
Old 03-31-2020, 06:29 PM   #9
alex_
Human being with feelings
 
Join Date: Mar 2015
Posts: 29
Default

Quote:
Originally Posted by mespotine View Post
You can get the number associated with
_RS65de0e469e7ba28ab9419e7292dfc97e9af5c7e8
using this function:
https://mespotin.uber.space/Ultrasch...dCommandLookup
I'm not sure how to use the NamedCommandLookup function to get the number form an ID.
Do I have to use an IDE for that, or can it be done in reaper?
alex_ is offline   Reply With Quote
Old 03-31-2020, 06:52 PM   #10
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Just use this script:

Code:
-- Meo Mespotine - 1st of April 2020
-- shows the accompanying commandid-number of an _ActionCommandID
-- in the ReaScriptConsole

A,B=reaper.GetUserInputs("Give me the ActionCommandID", 1, "Action Command ID", "")
if A==true then
  if B:sub(1,1)~="_" then B="_"..B end
  C=reaper.NamedCommandLookup(B)
  if C==0 then 
    reaper.ShowConsoleMsg("\nNo CommandID number exists for: "..B.."\n")
  else
    reaper.ShowConsoleMsg("\n\nCommand-id-number is: "..C.." for action \""..B.."\"\n")
  end
end
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 04-01-2020, 05:28 AM   #11
alex_
Human being with feelings
 
Join Date: Mar 2015
Posts: 29
Default

Thanks mespotine, this is really helpful!
alex_ 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 03:08 AM.


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