Old 11-10-2018, 01:32 AM   #1
Mordi
Human being with feelings
 
Mordi's Avatar
 
Join Date: May 2014
Location: Norway
Posts: 982
Default Creating a loop in the video processor?

Hey, I was wondering if there is any way to use a for-loop or while-loop in the Reaper video processor? I don't even know what programming language it uses.
Mordi is offline   Reply With Quote
Old 11-10-2018, 02:41 AM   #2
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default

Its eel as I found out here: https://mespotin.uber.space/Mespotin...l#introduction

And it of course should be capable of doing so.
http://www.eelang.org/documentation/index.php

Are you planning to create you own video processor presets? Have you an idea? I'm not curious.
Eliseat is offline   Reply With Quote
Old 11-10-2018, 02:43 AM   #3
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default

And that's a good reason to put Reaper video in its own subforum to quickly find out such things in the future: https://forum.cockos.com/showthread.php?t=213107
Eliseat is offline   Reply With Quote
Old 11-10-2018, 05:12 PM   #4
wwwmaze
Human being with feelings
 
Join Date: Oct 2009
Posts: 99
Default

EEL is invented by Cockos and often mistaken for this other language which is named the same but otherwise has no similarities (Eli posted a link to it).

Concerning Reaper EEL is used for 3 things:
- JSFX
- EEL ReaScripts
- Video processor

All 3 have their own dedicated set of functions but there are many things in common.
For example the stuff here (JSFX basic code reference) is mostly available for video-processor too.

You'll find 3 kind of loops there too (for, while, do-while).
wwwmaze is offline   Reply With Quote
Old 11-11-2018, 04:03 AM   #5
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default

Hmm! So I was completely wrong. Sometimes the most obvious isn't the truth. This was a good lesson for that.
Eliseat is offline   Reply With Quote
Old 11-11-2018, 10:03 AM   #6
Mordi
Human being with feelings
 
Mordi's Avatar
 
Join Date: May 2014
Location: Norway
Posts: 982
Default

Thanks for the tips! I was able to create a shadow effect using a loop.

I'll share my preset here. Where do people share their video presets anyway?

Code:
// text overlay
text="Set text here";
font="Arial";

//@param1:size 'text size' 0.05 0.01 0.3 0.1 0.001
//@param2:ypos 'y position' 0.5 -0.2 1.2 0.5 0.01
//@param3:xpos 'x position' 0.5 0 1 0.5 0.01

//@param5:fgr 'text R' 255 0 255 128 1
//@param6:fgg 'text G' 255 0 255 128 1
//@param7:fgb 'text B' 255 0 255 128 1
//@param8:fga 'text A' 1 0 1 0.5 0.005

//@param10:sha 'shadow alpha' 0.3 0 1 0.5 0.01
//@param11:shy 'shadow y' 0.5 -1 1 0.5 0.01
//@param12:shs 'shadow spread' 5 0 10 5 0.05
//@param13:shi 'shadow iterations' 5 1 20 5 1

gfx_blit(0,1);
gfx_setfont(size*project_h,font);
gfx_str_measure(text,txtw,txth);
yt = (project_h - txth)*ypos;
gfx_set(0,0,0,fga * (sha * sha * sha * sha), 18);
x = xpos * (project_w-txtw);
i = 0;

loop(shi,

  gfx_str_draw(text,x + (i * shs * size),yt + (100 * shy * size) + (i * shs * size));
  gfx_str_draw(text,x - (i * shs * size),yt + (100 * shy * size) - (i * shs * size));
  gfx_str_draw(text,x + (i * shs * size),yt + (100 * shy * size) - (i * shs * size));
  gfx_str_draw(text,x - (i * shs * size),yt + (100 * shy * size) + (i * shs * size));
  
  i += 1;
);

gfx_set(fgr/255,fgg/255,fgb/255,fga);
gfx_str_draw(text,x,yt);
Mordi 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 02:45 PM.


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