Old 10-20-2020, 11:16 AM   #1
dsyrock
Human being with feelings
 
dsyrock's Avatar
 
Join Date: Sep 2018
Location: China
Posts: 402
Default Foley record assistant



Code:
// Record Assistant
//@param 1:w "WIDTH" 20 20 80 50 5
//@param 2:wait "PRE-ROLL" 10 3 20 11.5 1
//@param 4:state "STATE" 1 0 1 .5 1
//@gmem=target_point
input=0;
gfx_blit(input);

start=project_w/2-w/2;
time_now=project_time;
tar=gmem[1];

tar>0 && state==1 ? (
  gfx_set(0, 1, 0, 1);
  gfx_fillrect(start, 0, w, project_h);
  tar-time_now<=wait && tar-time_now>=0 ? (
    gfx_set(1, 1, 1, 1);
    gfx_fillrect(start-start*(tar-time_now)/wait, 0, w, project_h);
  );
);
How to use:

1 Insert video processor to the track which contains video items

2 Copy and paste the code I wrote in the video processor and press ctrl/command + s

3 Locate edit cursor to the target position, and run "DSY_save cursor.lua". Then you will see a green line in the video window.

4 Play your project. When play cursor is very close(less than 10 seconds by default) to the target position you set before, a white line will show and move to the green line, according to the distance between play cursor and target position.

PS: You can set the width of the lines with the WIDTH knob, and how close between play cursor and target position to trigger the white line with the PRE-ROLL knob. And STATE knob can temporarily disable this plugin.
Attached Files
File Type: lua DSY_save cursor.lua (84 Bytes, 160 views)

Last edited by dsyrock; 10-20-2020 at 11:33 AM.
dsyrock is offline   Reply With Quote
Old 10-20-2020, 08:23 PM   #2
plush2
Human being with feelings
 
Join Date: May 2006
Location: Saskatoon, Canada
Posts: 2,001
Default

This is great. I've always thought this could and should be done but never could quite make my brain rise to the challenge. This will also be useful for ADR work.

Thanks very much. It would be cool if the bar countdown could be triggered by a session or item marker.
__________________
mymusic - http://music.darylpierce.com
mywork - http://production.darylpierce.com
mypodcast - Ultimate Sound Test
plush2 is online now   Reply With Quote
Old 10-20-2020, 10:56 PM   #3
dsyrock
Human being with feelings
 
dsyrock's Avatar
 
Join Date: Sep 2018
Location: China
Posts: 402
Default

Quote:
Originally Posted by plush2 View Post
It would be cool if the bar countdown could be triggered by a session or item marker.
Yes, but video processor is quite limited, it can't get any marker's position, or I can't find the correct way.
dsyrock is offline   Reply With Quote
Old 10-22-2020, 05:16 PM   #4
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: Apr 2020
Location: Leipzig
Posts: 2,632
Default

Nice. Could you add an optional counter for the last three seconds? like

"3"
"2"
"1"
"Go!"
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper
Off for some time. Bugreports&Docs notes please do here:https://github.com/Ultraschall/ultra...-reaper/issues - Donate, if you wish
Meo-Ada Mespotine is offline   Reply With Quote
Old 10-22-2020, 05:20 PM   #5
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: Apr 2020
Location: Leipzig
Posts: 2,632
Default

Quote:
Originally Posted by plush2 View Post
This is great. I've always thought this could and should be done but never could quite make my brain rise to the challenge. This will also be useful for ADR work.

Thanks very much. It would be cool if the bar countdown could be triggered by a session or item marker.
You can, at least with regualar markers used as action markers. Just add a marker beginning with ! and the _action-command-id of the script.

"!_RS25ce8efc2ffd8208fee2bb29024f929e8caf3fa8" is it in my case.

Needs SWS installed to work.

Edit:
requested action-marker-support for take-markers as well
https://github.com/reaper-oss/sws/issues/1433
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper
Off for some time. Bugreports&Docs notes please do here:https://github.com/Ultraschall/ultra...-reaper/issues - Donate, if you wish

Last edited by Meo-Ada Mespotine; 10-22-2020 at 05:26 PM.
Meo-Ada Mespotine is offline   Reply With Quote
Old 10-22-2020, 09:37 PM   #6
dsyrock
Human being with feelings
 
dsyrock's Avatar
 
Join Date: Sep 2018
Location: China
Posts: 402
Default

Quote:
Originally Posted by Meo-Ada Mespotine View Post
You can, at least with regualar markers used as action markers. Just add a marker beginning with ! and the _action-command-id of the script.

"!_RS25ce8efc2ffd8208fee2bb29024f929e8caf3fa8" is it in my case.
Hi, is there more detail about action marker? And how does video processor get the position of action marker?

EDIT:Oh I see, when play cursor go through the action marker, the action will be actived. Awesome! Didn't know that before, thanks!

Last edited by dsyrock; 10-22-2020 at 09:43 PM.
dsyrock is offline   Reply With Quote
Old 10-24-2020, 10:01 PM   #7
plush2
Human being with feelings
 
Join Date: May 2006
Location: Saskatoon, Canada
Posts: 2,001
Default

Quote:
Originally Posted by dsyrock View Post
Hi, is there more detail about action marker? And how does video processor get the position of action marker?

EDIT:Oh I see, when play cursor go through the action marker, the action will be actived. Awesome! Didn't know that before, thanks!
With the current command of GetCursorPosition the memory location is that of the edit cursor or where the playback started from. I changed it to GetPlayPosition and now it will grab the location of the action marker. I think this workflow might work better.
__________________
mymusic - http://music.darylpierce.com
mywork - http://production.darylpierce.com
mypodcast - Ultimate Sound Test
plush2 is online now   Reply With Quote
Old 11-22-2020, 05:01 PM   #8
AZpercussion
Human being with feelings
 
Join Date: Oct 2019
Location: Moscow, Russia
Posts: 290
Default

Quote:
Originally Posted by plush2 View Post
I changed it to GetPlayPosition and now it will grab the location of the action marker. I think this workflow might work better.
Hi! It's cool!
And what if link pre-roll in plugin with reapers pre-roll?
So would no need to place marker. Just place cursor and start record.
Unfortunately, I can't code.
AZpercussion 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 04:32 PM.


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