EFX-TEK

TEK Talk => Library => Vixen => Topic started by: JonnyMac on June 21, 2007, 08:05:22 PM

Title: Using Vixen as a Prop Programmer
Post by: JonnyMac on June 21, 2007, 08:05:22 PM
We're excited to release the results of working with KC Oaks, creator of the incredibly cool Vixen control program.  In the past, Vixen has predominantly been used for lighting control, but its open architecture allows for different applications; this application happens to be a sequence programmer (with optional audio control) for our Prop-1 and Prop-2 controllers.  Here's how you can put this neat new tool to use.

1. If you haven't already done so, install the Parallax BASIC Stamp 1 Editor (get the latest from www.parallax.com) and make sure that BS1 and BS2 files are associated with it.  To check on the associations, open the Edit->Preferences dialog, select the Files & Directories tab, and then make sure that BS1 and BS2 are checked.  We also suggest that the 'Single editor' option be selected.

(http://www.efx-tek.com/files/vxn_bs_editor_setup.png)

2. Download and install Vixen (get it from www.vixenlights.com).  Note that Vixen requires the Microsoft .NET framework (you probably have it installed but don't know it). 

3. Once Vixen is running on your PC, download and extract the ZIP files attached to this message.  Put the files from vixen_efx_addins.zip into the Vixen\Addins folder; put the files from vixen_efx_sequences.zip into the Vixen\Sequences folder.

4. In Vixen, select Sequence->Open An Event Sequence and then select 'Prop-1 Sequencer (blank).vix' file from the Open File dialog.  This will open a blank sequence that is preconfigured for the Prop-1.  If you're using the Prop-2 then the sequence to open is 'Prop-2 Sequencer (blank).vix'.  The empty Prop-1 sequence looks like this:

(http://www.efx-tek.com/files/vxn_bs1_sequence.png)

Tracks 1 through 6 correspond to the Prop-1's OUT0 - OUT5; terminals P0 - P5 may be used for low voltage (TTL) outputs.  Track 7 is reserved for future use, and Track 8 will be used to end the sequence and provide a delay before the program returns to the trigger check-point (more on this later).

5. Before making changes to the sequence you should save the file to a new name.  Vixen doesn't have a standard Save As menu (as in most Windows applications), but it still allows a sequence to be saved to a new name.  Click on the Sequence menu (top of the screen) and then click on the name sequence you want to rename. 

(http://www.efx-tek.com/files/vxn_seq_rename1.png)

Change the name to something useful and then press the enter key.

(http://www.efx-tek.com/files/vxn_seq_rename2.png)

You will see the new name at the top of the sequence window.

5. The next step is to edit your sequence.  The easiest way to do this is select events on a given track (or across tracks) and then click on the On or Off tool bar buttons.  At the end of the sequence you'll need to put an event in Track 8 that stops the sequence.  The length of the event determines the "down" time between prop activation cycles.  Here's a simple "zig-zag" of the outputs with a five-second delay between triggers.

(http://www.efx-tek.com/files/vxn_seq_zigzag.png)

6. Save your sequence and then select EFX-TEK Prop-1 Sequence Generator from the Add-ins menu.

(http://www.efx-tek.com/files/vxn_p1seq_addin.png)

When you click on this option a Prop-1 Sequencer dialog will appear. 

(http://www.efx-tek.com/files/vxn_p1seq_dialog.png)

Let's keep thing simple for the moment and create a program that will run on the Prop-1 Trainer. 
-- enter 'ZigZag' in the Name field
-- select Active-High trigger level
-- select 'No audio player' from the Audio Device drop-down
-- keep the Threshold at 50%
-- check 'Open file in BASIC Stamp editor'

Now click OK.

7. You filename will be transfered to a Windows Save As dialog -- all you have to do is navigate to the folder where you want the program saved (this folder will be remembered as long as Vixen stays open).

(http://www.efx-tek.com/files/vxn_savas_dialog.png)

Click save and in a moment the program Vixen-created program will appear in the BASIC Stamp Editor.  All you have to do is connect your Prop-1 and download! 

The little demo presented here will run on the Prop-1 Trainer; once you have that working start posting your questions.  There is, of course, a whole lot more you can do with this plug-in -- but start with the basics first. ;D
Title: Re: Using Vixen as a Prop Programmer
Post by: davisgraveyard on June 22, 2007, 12:44:54 AM
I will probably have tons of questions but here is the first.

What are the limitations of the code generated for a Prop-1 and a Prop-2.

I created the ZigZag example for a Prop-1.  I can see how the EPROM data is used for the show control and the program itself is pretty simple.  But if we do anything too complicated aren't we going to run out of space in the Prop-1 pretty fast?   And even though the Prop-2 has more program space isn't there also a practical limit to the size of a show we can do on a Prop-2?   

Any guesses on rules of thumb for limitations?

Title: Re: Using Vixen as a Prop Programmer
Post by: JonnyMac on June 22, 2007, 01:58:52 AM
The intent of these add-ins to help the new user with simple, sequencer-type applications; period.  While the triggering of audio at the start of the sequence is an option, there is nothing else (no IF-THEN, RANDOM, etc.).  Many props don't require these features (though they can be more interesting when employed).  The reason we went through the trouble to do this is to help those customers that are nervous about learning prop programming -- or just don't have the time -- to get things going; the season is going to be on us soon.

The generated output is based on a sequencer engine that I wrote a long time ago and have used in a lot of customer applications.  What may not be obvious at first is that it uses a form of compression for storing the event data.  Let's say you have 10 columns of output data in your Vixen sequence that are all the same.  What happens is that the column data is output to a single EEPROM record followed by a 10 (called the Timing Multiplier in the listing comments).  So while it looks like there are a lot of things going on in Vixen they can get packed into a small space in the Prop-1 program. 

Yes, there are limitations.  The more column-to-column changes you have, the shorter your Vixen sequence will be, and if you make it too big the add-in will tell you that the program has run past the available space (the file will still be saved so you can see for yourself).  The maximum number of records per program type (AP-8 audio, simple audio, no audio) are listed in the *_fill.txt files (these contain the code fragments that get placed into your output).  For example, on a Prop-1 sequence using an AP-8 you can have a maximum of 86 records.  Remember, a record is a change in output status so your overall program can be longer than the event duration times the maximum number of records, it will just depend on column to column changes.

There are things you can do to adjust:
-- simplify the sequence
-- extend the column (event) timing which currently defaults to 100 ms

The second suggestion reduces your event resolution meaning you get fewer events over the run of the sequence, but this may be enough to get what you need.  As with everything, experiment, experiment, experiment -- I know what I know because I spend a lot of time answering my own questions with experiments. 

To change the event timing click on the Sequence menu, then select Settings.  In the dialog you can change the value called Event period length (ms).  Note that this will not change the overall length (in real time) of your sequence, it will just change the resolution of events.

Again, I suggest that if you think this will be useful at all you just experiment to see what works for the kind of props you create. It's not the answer to everything, but it can be an option for many things, especially when your prop operation is simple and your in a hurry to get a program done.
Title: Re: Using Vixen as a Prop Programmer
Post by: JonnyMac on June 22, 2007, 02:25:13 AM
Just to show that it's the column-to-column changes (in the Vixen sequence) that affect space used in the Prop-1 or Prop-2 program, I've attached two Vixen sequences that just zig through the six outputs.  Both use 100 ms event timing.  Note that the first is much shorter than the second (in real time) but that the program output from these sequences uses the same space -- this is because the number of column-to-column changes are the same. 

So, it is the column-to-column changes in the Vixen sequence that chew up code space.  You may have found that Vixen has an output randomizer.  You can select your output columns for a given range and then click on the Random button.  In a quick test I found that a six-second random (event length left at 1) consumed 77% of the program space in the Prop-1.  When I changed the event timing down to 50 ms and re-randomized that same span (six seconds) the program space was overrun.
Title: Re: Using Vixen as a Prop Programmer
Post by: davisgraveyard on June 22, 2007, 11:53:02 AM
So the answer to my question was that on a Prop1 using an AP8 you can do about 86 records.  I guess you can have a little more than 4 times that on a Prop2.

So here is my next question.  I want to use Vixen for programming an animated head sequence.  Won't the records for syncing the jaw to the audio alone be too big?  Then there is all the head nod, turn and tilt records too?  If you have a 2 minute speach with all 4 events happening at once it will look a lot like the randomize feature and blow the size in no time?  Or am I wrong and it really isn't that many events? 

Or are you planning on suggesting the Prox-SX for this type of animation for the storage and speed?

Title: Re: Using Vixen as a Prop Programmer
Post by: JonnyMac on June 22, 2007, 12:08:25 PM
No, it turns out that with a Prop-2 and AP-8 you get 639 records!  Why?  Well, the sequencer engine is about the same size and the record size is only 1.5x (three bytes versus two) -- all this adds up to 639 (compressed) records.  The Prop-2 has 8x the memory of the Prop-1 (2K versus 256 bytes [1/4K]).

I can't answer the second question because I don't know the complexity of the movement.  Again... we're not saying that this is the solution to all of your programming chores, just the simple ones.  You'll just have to experiment a bit to see if your prop sequences will work this way.  If not, you probably couldn't have used the Prop-1 or Prop-2, anyway -- unless you want to drive it live from Vixen when Vixen is holding all of the audio and movement data.

I have a pneumatic head on the way from Devious Concoctions that I will program using a Prop-1 or Prop-2, putting the audio in an AP-8 -- we'll just have to see how that goes.  The jaw pneumatics have speed control (via valves) so I may be able to use that to my advantage (smooth movement with simple outputs).

We have other plans for Vixen/Prop-SX -- but those are early so I'll keep them close to the vest at the moment.

Title: Re: Using Vixen as a Prop Programmer
Post by: livinlowe on June 22, 2007, 12:23:01 PM
Jon-
You're horrible!  ;D Always leave them wanting more, huh???
Title: Re: Using Vixen as a Prop Programmer
Post by: davisgraveyard on June 22, 2007, 12:31:04 PM
639 records!  Wow that is a lot more.   Maybe the Prop-2 will be able to do an animated head show of several minutes.

So I went and played with Vixen a bit more.  I added an audio track.  I used their audio interface and tapped the Ctrl key for each open mouth movement while the audio played.  The audio was 59 sec and it created 258 records.  It seems like it will be very feasable to do 2 minutes of audio with some head movements too?   Nice interface and very easy to use.

Title: Re: Using Vixen as a Prop Programmer
Post by: JonnyMac on June 22, 2007, 12:32:58 PM
Quote from: livinlowe on June 22, 2007, 12:23:01 PM
Jon-
You're horrible!  ;D Always leave them wanting more, huh???

That's my game, man.    8)

Let me toss this out... the Prop-SX has 32K (16x the Prop-2) of memory that can be devoted for sequences -- that's a lot of movement.  We're thinking stand-alone control of eight digital outputs and four servos would be nice....  Okay, I've said enough.
Title: Re: Using Vixen as a Prop Programmer
Post by: livinlowe on June 23, 2007, 09:47:37 AM
Wow! I just got done playing with the demo, that is just too easy!  :D Let me be the first (or one millionth) person to say - Thanks for you hard work at making building and animating props as easy as it can possibly be!!
Title: Re: Using Vixen as a Prop Programmer
Post by: Clad In Shadows on June 23, 2007, 10:12:34 PM
Quote from: livinlowe on June 23, 2007, 09:47:37 AM
Let me be the first (or one millionth) person to say - Thanks for you hard work at making building and animating props as easy as it can possibly be!!

I guess I'll be the second to say that.  Thanks , you folks at EFX-TEK !and especially Jon for your good advice and killer programming skills.
Title: Re: Using Vixen as a Prop Programmer
Post by: JonnyMac on November 02, 2007, 01:26:03 PM
I have updated the source files that work with the Vixen sequence generator addins -- please unzip the new files into the Vixen\Addins folder

Vixen Addins for Prop-1/Prop-2 Sequences (http://www.efx-tek.com/downloads/vixen_efx_addins.zip)
Title: Re: Using Vixen as a Prop Programmer
Post by: audiblesd on March 21, 2008, 09:12:05 PM
This might be a strange question but can I use the lightorama sequence editor to creat these sequences?
Title: Re: Using Vixen as a Prop Programmer
Post by: JonnyMac on March 21, 2008, 10:29:27 PM
Not that we're aware of.  Vixen is freeware, so we have it -- and we know the programmer who does us the great favor of creating cool EFX-TEK add-in modules.  Since Vixen is free, why not give it a go?
Title: Re: Using Vixen as a Prop Programmer
Post by: davisgraveyard on April 09, 2008, 11:57:00 PM
Quote from: JonnyMac on June 22, 2007, 12:32:58 PM
Quote from: livinlowe on June 22, 2007, 12:23:01 PM
Jon-
You're horrible!  ;D Always leave them wanting more, huh???

That's my game, man.    8)

Let me toss this out... the Prop-SX has 32K (16x the Prop-2) of memory that can be devoted for sequences -- that's a lot of movement.  We're thinking stand-alone control of eight digital outputs and four servos would be nice....  Okay, I've said enough.


This is coming up on a year from your tease.   Any idea when we might see this "stand-alone control of eight digital outputs and four servos"?

Title: Re: Using Vixen as a Prop Programmer
Post by: JonnyMac on April 10, 2008, 08:39:05 AM
It's one of those projects that's harder than it looks and, frankly, it's a little hard to justify [all the work it would take] at the moment with Prop-SX sales being as low as they are.  That said... KC and I have been talking and are working on a Prop-2 program generator that handles four servos and eight digital outputs (creates the tables automatically like the program I showed in another thread).  Once we've been through the process with the Prop-2, we're a step ahead.

Still, the SX version I originally had in mind is much more complicated.  It requires some user interface on the Prop-SX side and for Vixen to be able to "talk" to the Prop-SX so that the data can be dumped from Vixen into the Prop-SX's EEPROM (like the way the Stamp editor downloads a new program to the Prop-2's EEPROM).  This isn't trivial; please trust me on that. 

I'm sorry this has taken longer than we all hoped, and I'll hold my tongue with teases. 
Title: Re: Using Vixen as a Prop Programmer
Post by: davisgraveyard on April 10, 2008, 10:50:28 AM
Jon, while I admire your ambition and forward thinking maybe you're making things harder than it has to be at this stage.   Sure it would be great if it were all just point and click but a few extra steps or using more than one tool wouldn't be the end of the world.   If vixen outputed a text file that you had to paste into your program and then load with another tool that wouldn't be so bad.  It's not getting the final EPROM data statements into the controller that is the real problem its collecting the data.   That's really what vixen is.   Show control software is nothing more than a way to easily see your audio track and the data points that change and then giving you an interface to add/change the data points.   When doing a animated character the jaw movement is pretty simple this way.  You can just use the keyboard to tap away the mouth movement without seeing the real jaw move and then when you play back the data loaded in the controller test to see how well you did.  But trying to do the head turn,nod, and tilt movements as separate keyboard movements and then add all the data together and play back the show there is just too much back and forth between the code generation and controller playback to see how it works.   What would be nice is some sort of real-time interface to the servos with joystick interface to Vixen.  This really isn't a factor of the controller interface, more of a enhancement to Vixen in general.  If the interface existed then all your data points could be exported to a file that could be loaded into the SX or maybe run through a pre-compiler that converted the data into EPROM data statements and then pasted into a PBASIC program?

Just some thoughts.

Jeff
Title: Re: Using Vixen as a Prop Programmer
Post by: JonnyMac on April 10, 2008, 12:09:03 PM
Vixen 2.0 -- which I haven't looked at -- is supposed to have joystick support, so that may be helpful.  In the end though, our customers are going to tend (I believe) to want something that is point-and-click when it comes to converting Vixen data to prop control code.   
Title: Re: Using Vixen as a Prop Programmer
Post by: davisgraveyard on April 11, 2008, 09:55:41 AM
Well, I'm a customer, and I'd rather have something that worked than nothing at all.  A kludge is bettern than nothing as long as it doesn't stay a kludge.

I'll check into 2.0's joystick support and find out what I can do?

Title: Re: Using Vixen as a Prop Programmer
Post by: goober on June 16, 2008, 01:44:58 PM
Hi Jon,
I went through all these steps (a few times) and after spending about 4 hours with Vixen getting the prop-1 sequence and sequence generator add-ins installed. Now I'm getting a "template file is missing" error when I click on the generator. I'm stuck. I'd love to learn this, it seems a little faster then manually doing it. What does the error mean? Do I need my prop-1 connected? If so then I'll need to wait for the  BS1 Serial Adapter, I forgot to get one when you were here.
Title: Re: Using Vixen as a Prop Programmer
Post by: JonnyMac on June 16, 2008, 10:53:22 PM
For Prop-1 programming with Vixen you need to have these files in you Vixen >> Addins folder:

* Prop1SeqGen.dll
* prop-1_sequencer_main.txt
* prop-1_sequencer_fill.txt

Unzip the sequences examples to your Vixen >> Sequences folder.
Title: Re: Using Vixen as a Prop Programmer
Post by: avgjoefriday on February 28, 2009, 08:59:24 PM
Just a quick note for others. If you download the latest Vixen 2.1.zip file from www.vixenlights.com and try to use the Prop1 or Prop2 Sequence Generator addin, it will tell you "Template File is missing".  This is because the files
prop-1_sequencer_main.txt
prop-1_sequencer_fill.txt
prop-2_sequencer_main.txt
prop-2_sequencer_fill.txt
were not included in the distribution (all of the other add-ins and outputs are included in the one zip file). 
The text files in Jon's original zip appear to work fine if you place them in the vixen\addin directory.
Title: Re: Using Vixen as a Prop Programmer
Post by: calloween on March 29, 2009, 04:52:27 PM
How do you make a circuit to test the zig-zag for the prop-1?
Title: Re: Using Vixen as a Prop Programmer
Post by: JonnyMac on March 29, 2009, 06:50:41 PM
Use the Prop-1 Trainer -- if you don't have one, download the docs and build per the schematic inside.
Title: Re: Using Vixen as a Prop Programmer
Post by: calloween on May 28, 2009, 02:55:01 PM
Quote from: JonnyMac on March 29, 2009, 06:50:41 PM
Use the Prop-1 Trainer -- if you don't have one, download the docs and build per the schematic inside.

How would you set up a button or pir to trigger it.
Title: Re: Using Vixen as a Prop Programmer
Post by: JonnyMac on May 28, 2009, 04:35:27 PM
If you're using Vixen to create/export your program sequence you'll find it in the export dialog.  You want to select Active-High trigger.
Title: Re: Using Vixen as a Prop Programmer
Post by: jukingeo on August 08, 2010, 10:24:14 AM
Hello All,

While I have been an avid user of Vixen since last Christmas, this is the first year I am going to try something for Halloween using Vixen. 

I am basically doing your typical "Singing Pumpkins" routine and having lighted pumpkins trigger to an audio track.  I was going to originally do this via a computer, but I am already using a computer for another task this Halloween.   After poking around here at the ever so useful EFX-TEK forums I see that you can use Vixen to program a Prop-1/2 controller.

Upon reading this thread I DO see there are audio options for using Vixen with the Prop-1/2.   Would this mean that if I used an AP-8 or AP16+ with my Prop-1 or 2, I would be able to sync the audio with light trigger?   Or is the audio option just a start point and during the course of the program running, it would indeed drift out of sync?

If the audio does sync up, I am curious as to how that is done...furthermore the question of storage space on the Prop-1 & 2 comes to mind especially since I am intending on programming a 10minute sequence.   I would figure the Prop-1 is out of the question, BUT I do also own a Prop-2 which I bought a couple years ago.

If this is possible it would most certainly free up a computer on my part and it would allow me freedom in setting up the singing pumpkins just about anywhere in the yard.

Any info would be much appreciated.

Thank You,

Geo
Title: Re: Using Vixen as a Prop Programmer
Post by: JonnyMac on August 08, 2010, 12:19:15 PM
You show length is dependent on resolution -- 10minutes may be too much unless you use a very low resolution (e.g. > 250ms) period.  Most of us do not use this regularly so you're going to have to work empirically.  Vixen will tell you if the show length is too long to fit into the Prop-2.

Do not use the AP-8+ option, use the pulse start output.  Then connect V+ and OUT15 to the 12-24 VDC input of the AP-16+.

Okay... if you do use the AP-8 option you can manually edit the code to change the command string transmitted by SEROUT.
Title: Re: Using Vixen as a Prop Programmer
Post by: jukingeo on August 08, 2010, 03:33:55 PM
Quote from: JonnyMac on August 08, 2010, 12:19:15 PM
You show length is dependent on resolution -- 10minutes may be too much unless you use a very low resolution (e.g. > 250ms) period.  Most of us do not use this regularly so you're going to have to work empirically.  Vixen will tell you if the show length is too long to fit into the Prop-2.

Do not use the AP-8+ option, use the pulse start output.  Then connect V+ and OUT15 to the 12-24 VDC input of the AP-16+.

Okay... if you do use the AP-8 option you can manually edit the code to change the command string transmitted by SEROUT.

The AP-8's memory would be far to short to be considered for a project like this, but having talked about the much larger memory capacity of the AP-16+...now we are cookin' with gas!   But the main thing is will the audio sync up with the sequenced pattern.   Within Vixen this is a given because the source is the same computer, same program, and same file.  Externally via the Prop-2 and AP-16+ things are different.   So I am curious if the Prop-2/AP-16+ combo would still stay in sync.  Would that be possible or is the audio capability just a trigger and that it is possible that the audio and sequence would drift?

Thanx,

Geo
Title: Re: Using Vixen as a Prop Programmer
Post by: JonnyMac on August 08, 2010, 04:55:55 PM
Stay in sync?  Yes, but to what resolution?  Hard to say.  If you're going to acquire an AP-16+ and already have a Prop-2 (I think you do) then you can do some experiments.  Remember, the Prop-2 is running a single-threaded, interpreted language so timing will never be as precise as say using an SX or Propeller chip.

Again, this is going to be a case-by-case experiment.  Note that we only provided the Vixen tool as a "step up" for folks that had never used a programmable controller before.  Since Vixen does produce a .BS2 file you could always go into the code and fine-tune the timing constant if you find drift in the project.
Title: Re: Using Vixen as a Prop Programmer
Post by: jukingeo on August 08, 2010, 05:53:55 PM
Quote from: JonnyMac on August 08, 2010, 04:55:55 PM
Stay in sync?  Yes, but to what resolution?  Hard to say.  If you're going to acquire an AP-16+ and already have a Prop-2 (I think you do) then you can do some experiments.  Remember, the Prop-2 is running a single-threaded, interpreted language so timing will never be as precise as say using an SX or Propeller chip.

Usually I use 50ms for most of my "faster" songs with Vixen, but for the most part 100ms is fine too.  Only for the slowest songs that do very little fading do I even go up to 250ms,  but that is very rare.

Quote
Again, this is going to be a case-by-case experiment.  Note that we only provided the Vixen tool as a "step up" for folks that had never used a programmable controller before.  Since Vixen does produce a .BS2 file you could always go into the code and fine-tune the timing constant if you find drift in the project.

Yeah that IS pretty amazing that you and the creator of Vixen managed to turn out something that can create a code for the Prop controllers.

Well, overall I do have my answer and I believe I still will be sticking to two computers for this year, since I already have planned my set up that way for this year, BUT once I do get the AP-16+, then I can experiment and see what happens.

Discovering that you have released the AP-16+ does open other doors for projects that I have been considering...such as a MIB.   The AP-16+ will certainly make things quite a bit simpler.

Once again, thanx for the info.

Geo
Title: Re: Using Vixen as a Prop Programmer
Post by: John F. on August 31, 2012, 09:22:37 AM
I'm trying to get this to work, but I get error "can't load prop 1 or 2 vixen add-in to version 2.1.4" (not exact wording). Please help. Thanks.
Title: Re: Using Vixen as a Prop Programmer
Post by: John F. on August 31, 2012, 09:33:15 AM
Never mind, after posting this I logged on to the support and found your updates and it appears to be working okay. This is my first time trying this so I'll see how I do. Thanks.