[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TV effect filter



Salut Francois,

>It's a common filter, to produce TV lines. I have wrote it from scratch.
>His name is Interlaced.

Hey, it looks good!

I simply copied it from the mail and pasted it into FilterMeister's editing
window and FM compiled it without problems.


>R:(((((ctl(6)||0)==0)?x:y)%ctl(3))==0)||((((ctl(6)||0)==0)?x:y)%ctl(3)<ctl(
>4)?1:0)?(!ctl(7)||0)*mix(ctl(z),c,ctl(5),255)+(ctl(7)||0)*c:(ctl(7)||0)*mix
(
>ctl(z),c,ctl(5),255)+(!ctl(7)||0)*c

Good use of the mix() function... :-)

Nevertheless, there are some things that could save some space, as in:

((ctl(6)||0)==0)?    can be changed to        !ctl(6)?

and

!ctl(7)||0            to            !ctl(7)

Oh, and I changed the ctl(4)-part to the following:

val(4,0,ctl(3))

This way, the slider 4 (thickness) won't be larger than the spacing.

See the edited program below. I changed sliders 6 and 7 to checkboxes. All
you would need to do is correct the user control range displayed to the
user. For example, ctl(4) should have to show a range between 0 (or 1) and
ctl(3). This has been accomplished in TV Mania (do it as a homework ;-))
sent with the FM package resp. in the following homepage:

http://privat.schlund.de/f/filter-factory/tv_mania.htm

Greetings from Germany,

Wern

// Interlaced lines by Francois Saluden

%ffp

Category: FS Filters
Title: Interlaced lines
Copyright: Freeware
Author: Francois Saluden
Filename: interlac.8bf

R,G,B:
((((!ctl(6))?x:y)%ctl(3))==0)||(((!ctl(6))?x:y)%ctl(3)<val(4,0,ctl(3))?1:0)?
(!ctl(7))*mix(ctl(z),c,ctl(5),255)+(ctl(7)||0)*c:(ctl(7)||0)*mix(ctl(z),c,ct
l(5),255)+!ctl(7)*c

A:a

ctl[0]: "Red"
ctl[1]: "Green"
ctl[2]: "Blue"
ctl[3]: "Spacing"
ctl[4]: "Thickness"
ctl[5]: "Opacity"
ctl[6]: CHECKBOX, "Verti/Horiz"
ctl[7]: CHECKBOX, "Inversion

val[0]: 0
val[1]: 0
val[2]: 0
val[3]: 2
val[4]: 1
val[5]: 255
val[6]: 255
val[7]: 0

// end