PDA

View Full Version : 'Arithmetic' paste opions (to complement boolean)



sallz0r
10-05-2008, 10:19 AM
Hi!

A few things that I've found would be useful, that I can't figure out to do (except for manually).... unless anyone knows how to do them?

Basically, to complement the bitwise pasting options, it would be great to have a heap of arithmetic operations as well. for example, addition, subtraction, max, min, and the one I'm really after -- multiply. :-)

addition: pasted cell values are added to whatever's there, capped at the maximum, obviously.
subtraction: pasted cell values are subtracted from whatever's there.
max: highest of pasted and existing values (essentially, arithmetic version of bitwise OR).
min: lowest of pasted and existing values (essentially, arithmetic version of bitwise AND).
multiply: actually, maybe this should be called "scale", not multiply. Existing cells are multiplied by (the incoming value/MAX_INTENSITY). ie. if you multiply pasted a block of all full channels, it would stay the same, if you multiply pasted a block of value 128 (assuming 0-255), all values would halve.

Anyway, does anyone know how to do anything like that? I can't find anywhere in vixen that has that functionality. Is it possible to get it implemented? I'm happy to do the code for it, as it's not particularly involved, but I just need something to tie it into.

Anyway, thanks for your time and any thoughts or suggestions!

Cheers,
Michael

sallz0r
10-05-2008, 10:40 AM
(Actually, I realize the addition/subtraction can be handled with CTRL-UP and CTRL-DOWN, so I wasn't as interested in them...... but I figured I'd just add them for completeness. :-) )

WWNF911
10-06-2008, 12:52 AM
(Actually, I realize the addition/subtraction can be handled with CTRL-UP and CTRL-DOWN, so I wasn't as interested in them...... but I figured I'd just add them for completeness. :-) )


Respectfully, while I'm sure it can be done, the burning question from a "light sequencing" point of view is why? :???:

sallz0r
10-06-2008, 01:44 AM
Respectfully, while I'm sure it can be done, the burning question from a "light sequencing" point of view is why? :???:

I'm not sure which part you're referring to with your quote -- either the addition/subtraction parts, or all of it. If it's the former, then yes, I'll admit it's not something I use widely -- only a bit, now and then just to easily change things, and I just use CTRL-UP/DOWN for that anyway.

As for the others?

1) Max -- very handy when trying to overlay one pattern over another. Say I've got one pattern fading out, and one fading in -- to overlay one over the other, I either have to use transparent paste (which blows away some of the old one, which was brighter than the incoming value at the start), or try to use a bitwise OR. The bitwise OR sort-of does the job, however can sometimes get a bit screwy (since it's a bitwise operation). An arithmetic one would do the job perfectly.

2) Min -- handy to "mask" out some values. Say I'm chasing channels around a tree, and have that going, but want to fade it out -- I can either do it manually (which is what I'm doing now, very time consuming!) or if there was an arithmetic MIN function, I could make a slow fade in a dummy channel, and overlay that on top: keeps all the old values, and also helps to fade it out. However, sometimes it might not look quite right, which is where the "scale" or "multiply" comes in....

3) Scale -- really useful for fading. Same scenario as above: can be used to fade out a pattern really easily. Make a ramp/fade, copy it, and paste as an arithmetic scale! voila! :-)

Does that explain what I'm raving about? or does it not make much sense?

Cheers!
Michael

WWNF911
10-07-2008, 02:48 AM
Indeed it does. Thankyou Michael.

Leon

djulien
11-06-2008, 11:36 AM
Basically, to complement the bitwise pasting options, it would be great to have a heap of arithmetic operations as well. for example, addition, subtraction, max, min, and the one I'm really after -- multiply. :-)

addition: pasted cell values are added to whatever's there, capped at the maximum, obviously.
subtraction: pasted cell values are subtracted from whatever's there.
multiply: actually, maybe this should be called "scale", not multiply. Existing cells are multiplied by (the incoming value/MAX_INTENSITY). ie. if you multiply pasted a block of all full channels, it would stay the same, if you multiply pasted a block of value 128 (assuming 0-255), all values would halve.


I also would find "arithmetic fade" useful - that is, multiply a range of cells by a scale-down factor in order to get smooth fades, etc.

Since Vixen doesn't appear to have this feature, I made a little Windows utility to do it. I've attached it, in case it might be helpful for doing *some* of the stuff you need. (The EXE is within the ZIP file, since this forum doesn't allow an EXE to be attached directly to the post).

To use this utility, follow these steps:
1. Copy the .EXE onto your hard drive somewhere (could be anywhere)
2. In Vixen's Routines folder, make a shortcut to this .EXE
3. Right-click on the shortcut, and add the desired fader values to the end of the Target property (preceded by a space), in the following format:
{+|-|*}amount[%],{+|-|*}amount[%],{+|-|*}amount[%],...
Examples:
-25%,-50%,-75% will generate a 3-step fade, with values that are 75%, 50% and 25% of the original values (as stored within the VIR file)
+50 will generate a 1-step brightness increase of 50 for each of the values in the VIR file
*.33 will scale down the values in the VIR file to 1/3 their original value
etc.
4. Rename the shortcut to reflect its purpose, if desired
5. Repeat steps 2 - 4 as desired; you can have any number of shortcuts
6. Within Vixen, select a range of cells, right-click, and choose Save Routine
7. Drag and drop the VIR file from step 6 onto the desired shortcut from step 4
8. Back within Vixen, select a target cell, right-click, and choose Load Routine from file
9. Copy and paste groups of faded cells around as desired

don

sallz0r
11-06-2008, 08:39 PM
Hi djulien,

Hey, that looks great! I don't have a chance to try it out yet, but hopefully I will this weekend. Thanks for your time and effort! :-)

Cheers,
Michael