December 03, 2024, 09:49:07 AM

News:

You can now use Vixen to program your Prop-1 and Prop-2 controllers!  Get started quickly and easily, without having to learn PBASIC.  Details in the Library forum.


Using Vixen as a Prop Programmer

Started by JonnyMac, June 21, 2007, 08:05:22 PM

Previous topic - Next topic

JonnyMac

June 21, 2007, 08:05:22 PM Last Edit: November 02, 2007, 07:03:14 PM by JonnyMac
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.



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:



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. 



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



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.



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



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



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).



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
Jon McPhalen
EFX-TEK Hollywood Office

davisgraveyard

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?


JonnyMac

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.
Jon McPhalen
EFX-TEK Hollywood Office

JonnyMac

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.
Jon McPhalen
EFX-TEK Hollywood Office

davisgraveyard

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?


JonnyMac

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.

Jon McPhalen
EFX-TEK Hollywood Office

livinlowe

Jon-
You're horrible!  ;D Always leave them wanting more, huh???
Shawn
Scaring someone with a prop you built -- priceless!

davisgraveyard

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.


JonnyMac

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.
Jon McPhalen
EFX-TEK Hollywood Office

livinlowe

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!!
Shawn
Scaring someone with a prop you built -- priceless!

Clad In Shadows

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.

JonnyMac

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
Jon McPhalen
EFX-TEK Hollywood Office

audiblesd

This might be a strange question but can I use the lightorama sequence editor to creat these sequences?

JonnyMac

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?
Jon McPhalen
EFX-TEK Hollywood Office

davisgraveyard

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"?