Hi all;
i have started the xml output module for vixen.
My color coding for the below is as follows:
GREEN= just output this exactly as shown
ORANGE= i can get rid of these, unneeded for a nutcracker vix file
BLUE= places whjere i need to supply the data.
I found this thread on vixen file format
http://doityourselfchristmas.com/forums/archive/index.php/t-2539.html
This is a cut and paste from a musicbox.vix file.
1..
2..
3.. 117760
4.. 50
5..
I assume
Lets use an example. 16 strings, 50 pixels each. I need one channel for r,g,b for each pixel
16x50=3 = 2400 channels. If i have a 5 second sequence with a 50ms frame time, then i have 100 frames.
$frames=100;
$frametime=50;
time = $frames * $frameTime;
EventPeriodInMilliseconds=$frameTime;
or
time=5000
EventPeriodInMilliseconds=50
6.. 0 I assume MinimumLevel,MaximumLevel is the range of each rgb value?
7.. 255
8.. -1
9.. 0
10.
11.
12. <PlugIn name="Adjustable preview" key="-1193625963" id="0" enabled="True" type="Output" from="1"
13. to= "698">Is 698 the number of frames that are in sequence?
14.
15. ... lots of stuff here, assume it is also base64 representing the image ....
16.
17. False
18.
19. 211
20. 459
21. 3
22. 5
23.
24.
25. <Channel Number="6">WQAMAFkACwBZAAoAWQAJAFoACQBaAAoAWgALAFoADABbAAwAXA
MAFwADQBdAAwAXQALAF0ACgBeAAoAXwAKAF8ACwBfAAwAXwANAF4ADQBdAA0AXAALAFwA
gBeAAkAXQAJAFwACQBbAAkAXAAOAF0ADgBbAA0AWgANAFkADQBeAA4AWwALAF8ADgBeAAw
AXgALAFoACABZAAgAWAAIAFcACQBWAAkAVQAJAE0AEABMABAAVAAOAFQADQBUAAwAVQAM (i added word wraps here, just for clarity)
AFYACwBWAAoAVwAKAFgACgBYAAsAWAAMAFcADABWAAwAUwAMAFMADQBSAA0AVAALAFUAC
wBWAA0AVgAOAFUADgBTAA4AUgAOAFEADgBQAA4ATwAOAE4ADgBNAA4ATQAPAE4ADwBPAA8A
UAAPAEwADwBLAA8ASgAPAEoADgBLAA4ATAAOAE0ADQBOAA0ATgAMAE8ADABQAAwAUQAMAFIAD
ABSAAsAUwALAFQACgBUAAkAVQAKAFMACgBRAA0AS
gAQAEoAEQBKABIASwASAEsAEQBMABEATgAQAE8AEABRAA8AVQANAFcACwBYAA0AVwANAFIADwB
TAA8ASwAQAFoADwBZAA8AWAAPAFsADwBcAA8AXAAQAFsAEABaABAAWQAQAFgAEABXABAAVgAQ
AFUAEABVABEAVwAPAFYAEQBUABEAUwARAFIAEQBRABEAUgAQAFMAEABUABAAVQAPAFAAEQBPABE
ATgARAE4AEgBNABIATQATAE4AEwBPABMAUAATAFEAEwBSABMAUwATAFMAEgBPABIAUAASAFEAEABSABIAUQASAFQAEgBVABIAVwARAA==
....
26. channels are listed here
....
27. EAAMABAADQAQAA4AEAAPABAAEAAQABEAEAASABAAEwAQABQAEAAVABAAFgAQABcAEAAYAA==
What are these numbers in the channel section? Is this where we specify what device is connected to the channel?
Lets use an example. 16 strings, 50 pixels each. I need one channel for r,g,b for each pixel
16x50=3 = 2400 channels. If i have a 5 second sequence with a 50ms frame time, then i have 100 frames.
So for string 1, Pixel #1 i have channels 1,2,3
So for string 1, Pixel #2 i have channels 4,5,6
So for string 1, Pixel #3 i have channels 7,8,9
..
So for string 16, Pixel #50 i have channels 2398,2399,2400
or is there a different format when outputting to rgb devices?
28. DAAWAA4AFAAPABMAEAASABEAEQASABAAEwAPAA0AFQAUAA4A
29. EAASABEAEwASABQAEwAVABQAFgAPABEADgAQAA0ADwAMAA4A
30.
31.
32.
33.
34.
35.
36. COM1
37. 57600
38. None
39. 8
40. One
41. 1
42. True
43.
44.
45.
46. <Profile2009 SequencesI think i may want to make a profile, *.pro file. If i do , it oges here?
47.
49.
50. .... lots of base64 stuff goes here ....
So I assume all channels are concatenated into one huge string of base64 data?
I will be using php's base64_encode ( string $data ) to encode the data.
I assume this data is the r/g/b value for the frame i am at?
so.
So for channel#1 ( string 1, Pixel #1 ,R) i will encode the 100 bytes that correspond to the 100 frames of RED
So for channel#2 ( string 1, Pixel #1 ,G) i will encode the 100 bytes that correspond to the 100 frames of BLUE
So for channel#3 ( string 1, Pixel #1 ,B) i will encode the 100 bytes that correspond to the 100 frames of GREEN
So for channel#4 ( string 1, Pixel #2 ,R) i will encode the 100 bytes that correspond to the 100 frames of RED
So for channel#5 ( string 1, Pixel #2 ,G) i will encode the 100 bytes that correspond to the 100 frames of BLUE
So for channel#6 ( string 1, Pixel #2 ,B) i will encode the 100 bytes that correspond to the 100 frames of GREEN
51.
52.
53. Standard
54.
55.
56.
57. 160,27
58. 214
59.
When replying , you can use the line numbers i gave to point me to what section you are talking about.
I do believe this forum has the most knowledgeable Vixen users. As soon as i get this, we are probably going to see vixen files by this weekend. (fingers crossed).
Thanks
smeighan wrote:I assume
Yes.
6+7. MinimumLevel + MaximumLevel are the range for the channel values. Max possible is 255 (1 byte). There is a fine distinction between "channel" and "RGB value", in that it typically takes 3 channel values to make an RGB value (one for R, G, B), although there are ways around that.
27. Those are a Base64-encoded rectangular matrix of channel values (#event periods * #channels).
or is there a different format when outputting to rgb devices?
Sometimes yes.
I think i may want to make a profile, *.pro file. If i do , it oges here?
46. Profiles are typically used when the same set of channels or plug-ins will be used with multiple sequences. It's easy enough for the user to switch back and forth between profile and no profile if you just want to make a stand-alone sequence file (imho).
50. Yes, all channels are concatenated into one huge string of base64 data.
I will be using php's base64_encode ( string $data ) to encode the data.
I assume this data is the r/g/b value for the frame i am at?
Any given byte would only be the red, green, or blue value if you are using the convention of representing each RGB value with 3 channels (which is often done). So they would typically end up interleaved in the Base64 matrix - R#1, G#1, B#1, R#2, G#2, B#2, R#3, ...
Another helpful source of info is to put some known values into Vixen and save it, then look at the XML file it creates.
don
AussiePhil gave a simplified assumption. Don't make a vix file, make a csv file matrix of the data from Nutcracker
AussiePhil wrote:
SeanSeriously for Vixen2.x i wouldn't bother trying to write the VIX files directly, I respectfully suggest that 99.99% of people will want to incorporate these effects into larger over all sequences involving other elements and the provision of the raw data in a TEXT file based on channels v Time would allow people to paste effects into existing sequences.
If you want to integrate into the app closer then create Routine Files that can then be accessed inside the Vixen UI......
From memory a Routine file and a data text file have the same structure.
Comma seperated channel values, each row is a channel over time.
ie
255,0,255,0,255
255,0,255,0,255Will flash three channels on-off-on-off-on and if pasted across three channels going to a RGB pixel the flashing would be white.
Phil
Hi Phil;
So in my example
Lets use an example. 16 strings, 50 pixels each. I need one channel for r,g,b for each pixel16x50=3 = 2400 channels. If i have a 5 second sequence with a 50ms frame time, then i have 100 frames.
I am going to have 100 values ( because i have 100 frames) so
100,200,111,122 ... 122 "string 1, Pixel #1, R' , until i printed 100 values?
100,200,111,122 ... 122 "string 1, Pixel #1, G' , until i printed 100 values?
100,200,111,122 ... 122 "string 1, Pixel #1, B' , until i printed 100 values?
100,200,111,122 ... 122 "string 1, Pixel #2, R' , until i printed 100 values?
100,200,111,122 ... 122 "string 1, Pixel #2, G' , until i printed 100 values?
so there would be 2400 lines of ascii and each line would have 100 values, comma separated?
that certainly would be easier.
So I have implemented this, it will be ready by end of day today.
Here is a snippet of the csv . I just need to do some cleanup (change nutcracker pixel# into user pixel number) and write a file. It will either be a *.csv or a *.vir. The comments on the end of each line will be removed, they were just there for debugging.
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 # String 1, Pixel # 28, 'R'
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 # String 1, Pixel # 28, 'G'
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 # String 1, Pixel # 28, 'B'
19,19,19,19,19,19,19,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,19,19,19,19,19,19,19,0,19,19,19,19,19,19,19,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,19,19,19,19,19,19,19,0,19,19,19,19,19,19,19,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,19,19,19,19,19,19,19,0,19,19,19,19,19,19,19,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,19,19,19,19,19,19,19,0,19,19,19,19,19,19,19,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,19,19,19,19,19,19,19,0 # String 1, Pixel # 29, 'R'
48,48,48,48,48,48,48,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,48,48,48,48,48,48,48,0,48,48,48,48,48,48,48,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,48,48,48,48,48,48,48,0,48,48,48,48,48,48,48,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,48,48,48,48,48,48,48,0,48,48,48,48,48,48,48,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,48,48,48,48,48,48,48,0,48,48,48,48,48,48,48,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,48,48,48,48,48,48,48,0 # String 1, Pixel # 29, 'G'
255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0 # String 1, Pixel # 29, 'B'
19,19,19,19,19,19,19,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,19,19,19,19,19,19,19,0,19,19,19,19,19,19,19,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,19,19,19,19,19,19,19,0,19,19,19,19,19,19,19,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,19,19,19,19,19,19,19,0,19,19,19,19,19,19,19,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,19,19,19,19,19,19,19,0,19,19,19,19,19,19,19,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,19,19,19,19,19,19,19,0 # String 1, Pixel # 30, 'R'
62,62,62,62,62,62,62,62,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,62,62,62,62,62,62,62,0,62,62,62,62,62,62,62,62,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,62,62,62,62,62,62,62,0,62,62,62,62,62,62,62,62,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,62,62,62,62,62,62,62,0,62,62,62,62,62,62,62,62,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,62,62,62,62,62,62,62,0,62,62,62,62,62,62,62,62,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,62,62,62,62,62,62,62,0 # String 1, Pixel # 30, 'G'
255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0 # String 1, Pixel # 30, 'B'
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 # String 2, Pixel # 1, 'R'
smeighan wrote:So I have implemented this, it will be ready by end of day today.
Here is a snippet of the csv . I just need to do some cleanup (change nutcracker pixel# into user pixel number) and write a file. It will either be a *.csv or a *.vir. The comments on the end of each line will be removed, they were just there for debugging.
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 # String 1, Pixel # 28, 'R'
You probably have this figure it out, but in case not, the actual routine files should be space separated (looking at one for 2.1), including one at the end of each line and *.vir
ie:
0 255 214 111 022
0 255 214 111 224
0 255 214 111 022
Emmanuel
nuelemma wrote:You probably have this figure it out, but in case not, the actual routine files should be space separated (looking at one for 2.1), including one at the end of each line and *.vir
ie:
0 255 214 111 022
0 255 214 111 224
0 255 214 111 022Emmanuel
I did get told that it is space delimited, i did not know that each line has to end in a space.
i will make that change.
thanks
smeighan wrote:I did get told that it is space delimited, i did not know that each line has to end in a space.i will make that change.
thanks
Hey,
After playing a little with notepad, it looks like, only the first line needs to have this extra space at the end. :hmm:
Ok, here is first pass of a vixen vir file
http://meighan.net/nutcracker_sean/effects/workspaces/f/AA.vir
This file should make a picture that looks like this

This was the target
MODEL: AA.dat
target_name AA
total_strings 10
pixel_count 80
pixel_length 240.00
unit_of_measure in
topography UP_DOWN_NEXT <= So there are 40 pixels per strands, 2 stands per striing.
And here was effects settings
_POST
username f
user_target AA
effect_class spirals
effect_name VIXEN_VIR_TEST
handiness r
number_spirals 4
number_rotations 2
spiral_thickness 2
window_degrees 180
start_color #FF147A
end_color #FFF712
frame_delay 5
direction cw
sparkles
use_background y
background_color #80FF84
sequence_duratio 6.5
submit Submit Form to create your target model
I am not releasing the code yet , because any bigger trees uses up all the memory. I will need to put the effect models you create into a database also.
I dont know vixen well enough to see how to load this
This vir file has a blank on end of every line, if that cause a problem, let me know.
brought to my attention it needs to be space delimited, not comma delimited.
fixed.
same link should work
Ive been following what youve been working on and love it. I see you posted file for vixen where does that gonna go. And lets say i 10 effects i made using your builder how will it know where to put them in vixen.
Its not worked for me.
I renamed a routine - opened your file - copied the data - opened my routine file with note pad (not the best I know) and replaced the data - saved.
Opend vixen 2.1 - opened a profile with 32 42 pixel long strings and tried to insert the routine - came up with the folloing error - (how many pixels did the modle you created have in each string?
System.ArgumentOutOfRangeException: Parameter must be positive and < Width.
Parameter name: x
at System.Drawing.Bitmap.SetPixel(Int32 x, Int32 y, Color color)
at Vixen.Dialogs.Routine..ctor(String filePath)
at Vixen.Dialogs.RoutineSelectDialog..ctor()
at StandardSequence.StandardSequence.GetRoutine()
at StandardSequence.StandardSequence.loadARoutineToolStripMenuItem_Click(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

