Old 10-20-2020, 11:16 AM   #1
dsyrock
Human being with feelings
 
dsyrock's Avatar
 
Join Date: Sep 2018
Location: China
Posts: 565
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, 394 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,110
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.
plush2 is offline   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: 565
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: May 2017
Location: Leipzig
Posts: 6,621
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 - Donate, if you wish

On vacation for the time being...
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: May 2017
Location: Leipzig
Posts: 6,621
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 - Donate, if you wish

On vacation for the time being...

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: 565
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,110
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.
plush2 is offline   Reply With Quote
Old 11-22-2020, 05:01 PM   #8
AZpercussion
Human being with feelings
 
Join Date: Oct 2019
Location: Moscow / Tbilisi
Posts: 909
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
Old 11-24-2020, 06:50 PM   #9
plush2
Human being with feelings
 
Join Date: May 2006
Location: Saskatoon, Canada
Posts: 2,110
Default

It would be great to tie it to pre-roll. I cannot find an api call to do that but perhaps someone with more knowledge can offer a way.
plush2 is offline   Reply With Quote
Old 12-02-2020, 04:46 AM   #10
AZpercussion
Human being with feelings
 
Join Date: Oct 2019
Location: Moscow / Tbilisi
Posts: 909
Default

Quote:
Originally Posted by plush2 View Post
It would be great to tie it to pre-roll. I cannot find an api call to do that but perhaps someone with more knowledge can offer a way.
I tied with custom actions script DSY_save cursor.lua and record start.
It works in theory. If Reaper didn't lag on pre-roll.
AZpercussion is offline   Reply With Quote
Old 06-17-2021, 01:23 PM   #11
mgrtoma
Human being with feelings
 
Join Date: Aug 2020
Posts: 16
Default

Could someone please explain/make a short tutorial on how to trigger multiple sync points with action markers ? I tried to check the code but I think my skill is too low and couldn't find how to do it.

I also tried to make markers named ! followed by the CommandID of the DSY_save cursor.lua script but it didn't work either.

The original script is awesome but it would be even better if the sync points could be triggered by markers.

Thank you

Last edited by mgrtoma; 06-17-2021 at 01:33 PM.
mgrtoma is offline   Reply With Quote
Old 06-18-2021, 01:15 PM   #12
plush2
Human being with feelings
 
Join Date: May 2006
Location: Saskatoon, Canada
Posts: 2,110
Default

Quote:
Originally Posted by mgrtoma View Post
Could someone please explain/make a short tutorial on how to trigger multiple sync points with action markers ? I tried to check the code but I think my skill is too low and couldn't find how to do it.

I also tried to make markers named ! followed by the CommandID of the DSY_save cursor.lua script but it didn't work either.
Do you have SWS extensions installed?
Quote:
The original script is awesome but it would be even better if the sync points could be triggered by markers.

Thank you
This would be cool, the tricky part is the way the script is set up now it calculates based on where the target is. How do we tell the script to start 10 seconds before a marker that it doesn't know is there until it has played past it? It requires some thought. I'm sure there's a way to do that but maybe not using the current trigger method.
plush2 is offline   Reply With Quote
Old 06-22-2021, 11:55 AM   #13
babag
Human being with feelings
 
Join Date: Nov 2009
Posts: 2,227
Default

here's another way to do adr:

https://stash.reaper.fm/v/28281/ADR_Template.zip

i posted that years ago and it's pretty funky but works well for me. it didn't show up in any searches i did so took me some time to find. i think the scripting approach may be better in the long run but i found this simple and useful at the time.

the approach is to have multiple png files: 3, 2, 1, and punch, as well as two vertical streamers. the streamers are animated to come together in the center from the sides over the course of the 3, 2, 1, punch countdown and are located at the start of the template project. clips needing dialog replaced (or foley) are slid into place and recorded as needed.

the odd idiosyncrasy is in animating the streamers. for whatever reason, the envelope that animates one streamer has to be three times longer than the other. i never tried to figure out why since i got it to work and they are on their own tracks. if you like colored streamers as in this script, you can just tint the png files.

maybe it's useful to someone.
babag
babag is offline   Reply With Quote
Old 07-26-2021, 09:09 AM   #14
mgrtoma
Human being with feelings
 
Join Date: Aug 2020
Posts: 16
Default

Quote:
Originally Posted by babag View Post
here's another way to do adr:

https://stash.reaper.fm/v/28281/ADR_Template.zip

i posted that years ago and it's pretty funky but works well for me. it didn't show up in any searches i did so took me some time to find. i think the scripting approach may be better in the long run but i found this simple and useful at the time.

the approach is to have multiple png files: 3, 2, 1, and punch, as well as two vertical streamers. the streamers are animated to come together in the center from the sides over the course of the 3, 2, 1, punch countdown and are located at the start of the template project. clips needing dialog replaced (or foley) are slid into place and recorded as needed.

the odd idiosyncrasy is in animating the streamers. for whatever reason, the envelope that animates one streamer has to be three times longer than the other. i never tried to figure out why since i got it to work and they are on their own tracks. if you like colored streamers as in this script, you can just tint the png files.

maybe it's useful to someone.
babag
Thanks for your recommendation, It looks awesome, I will try it
mgrtoma is offline   Reply With Quote
Old 08-06-2021, 02:13 AM   #15
airon
Human being with feelings
 
airon's Avatar
 
Join Date: Aug 2006
Location: Berlin
Posts: 11,817
Default

Anyone thought about doing this via midi items?

Or loading a CSV that gets saved in the project file with TC in and out, notes and all that. Everyone generates lists like that for ADR and dubbing here.

I once wrote a script to export selected items as a CSV because I was targeting EdiCue, which generates a midi file that are then used to trigger the video output of countdowns.

The question is, can a script communicate with a video processor ?
__________________
Using Latch Preview (Video) - Faderport 16 setup for CSI 1.1 , CSI 3.10
Website
"My ego comes pre-shrunk" - Randy Thom
airon is offline   Reply With Quote
Old 04-27-2023, 12:20 AM   #16
soundsvisual
Human being with feelings
 
Join Date: Feb 2022
Posts: 27
Default

Quote:
Originally Posted by babag View Post
This is great - thank you! For just a couple of cues this is all I need. Just got to sort out AAF export from Reaper for my clients on ProTools (think I need AA Translator) and I am free from Logic
soundsvisual 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:23 AM.


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