Old 11-10-2018, 01:32 AM   #1
Mordi
Human being with feelings
 
Mordi's Avatar
 
Join Date: May 2014
Location: Norway
Posts: 538
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 online now   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,167
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,167
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: 115
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,167
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: 538
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 online now   Reply With Quote
Old 11-11-2018, 03:51 PM   #7
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,167
Default

Many thanks for sharing. I will test it tomorrow because its to late at night now.

Yeah! Where to share the video presets? You could upload it to stash. But as I mentioned in my second post in this thread: We need a video section in this forums! This is a separate world to Reaper and should be handled like that. So give your +1 in the request. Maybe they will hear/read us.

Eliseat is offline   Reply With Quote
Old 11-12-2018, 04:31 AM   #8
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,167
Default

Quote:
Originally Posted by Mordi View Post
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?

...
Wow! Pretty amazing.
I have tested it and it works like a charm. Font selection, shadowing ... very nice. Many thanks for that.
Eliseat is offline   Reply With Quote
Old 11-15-2018, 10:51 AM   #9
Mordi
Human being with feelings
 
Mordi's Avatar
 
Join Date: May 2014
Location: Norway
Posts: 538
Default

Quote:
Originally Posted by Eliseat View Post
Wow! Pretty amazing.
I have tested it and it works like a charm. Font selection, shadowing ... very nice. Many thanks for that.
Cool, thanks. Hey, you should make a "Share your video processor presets" thread so we can share presets like these.

Eventually we should also incorporate the best ones to the ReaPack repository.
Mordi is online now   Reply With Quote
Old 11-15-2018, 02:36 PM   #10
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,167
Default

Quote:
Originally Posted by Mordi View Post
Cool, thanks. Hey, you should make a "Share your video processor presets" thread so we can share presets like these.

Eventually we should also incorporate the best ones to the ReaPack repository.
That's exactly what I planned. Did you read my thoughts?

There are some other codes hidden in the forums. Maybe it would be a good start to gather them as links in one thread.

By the way. Is it possible to anti aliasing the fonts? I recognized that they look rasterized sometimes. But I'm not sure if its the font or the method of the video processor.

Beside that. I have to say, it looks pretty awesome to choose your preset with semi transparent fonts and a bit of shadow. Beautiful.

Last edited by Eliseat; 11-15-2018 at 03:08 PM.
Eliseat is offline   Reply With Quote
Old 11-20-2018, 10:35 PM   #11
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 12,389
Default

Quote:
Originally Posted by Mordi View Post
Cool, thanks. Hey, you should make a "Share your video processor presets" thread so we can share presets like these.
Probably better to make a thread per preset (and its inevitable derived versions)...
Justin is offline   Reply With Quote
Old 11-21-2018, 04:34 AM   #12
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,167
Default

Quote:
Originally Posted by Justin View Post
Probably better to make a thread per preset (and its inevitable derived versions)...
Yes, that's what I thought too. But I will start a gathering thread for presets (links and short description) because lots of them are hidden in threads with different titles. And this thread is a good example.
Eliseat is offline   Reply With Quote
Old 12-04-2018, 03:51 PM   #13
SonicAxiom
Human being with feelings
 
SonicAxiom's Avatar
 
Join Date: Dec 2012
Location: Germany
Posts: 1,857
Default

Quote:
Originally Posted by Mordi View Post
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);
thanks a lot for sharing this, Mordi!

Is there a way to avoid stairsteps at the edges of round letters like some sort of alias filtering or "font smoothing"?

.
__________________
[Check out my free VST plugin collection here.]
SonicAxiom 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 11:53 AM.


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