Exporting

Exporting VSA data

Routine information can be exported from VSA and used in a variety of applications. Of particular interest, is the ability to store exported data in an embedded system and eliminate the PC. Brookshire Software also offers the Remote Advanced Playback Unit (RAPU) that is fully compatible with VSA and does not require a PC for playback.

To export data, select Export... from the Tools menu. Select a track by placing a check next to its name. Only data for selected tracks will be exported. Choose to Include Initial Positions and VSA will include a frame that initializes all selected tracks to the user defined default position. From the Save as type selection box, choose to export either a Comma Separated Value File or a Binary Data File.

_images/export.jpg
  • CSV Files “Comma Separated Values,” or CSV files, contain the selected track data in a text format. Each line contains data for each frame, consisting of a position for each track (separated by commas). Only data for selected tracks will be included in the file. If “Include Initial Positions” has been selected, then a zero-the frame will include commands to positions all devices to their default positions.

    Track:

    0

    1

    2

    3

    4

    5

    6

    7

    8

    9

    10

    11

    12

    13

    14

    15

    Frame 1

    x,

    x,

    x,

    x,

    x,

    x,

    x,

    x,

    x,

    x,

    x,

    x,

    x,

    x,

    x,

    x,

    Frame 2

    x,

    x,

    x,

    x,

    x,

    x,

    x,

    x,

    x,

    x,

    x,

    x,

    x,

    x,

    x,

    x,

    Frame 3

    x,

    x,

    x,

    x,

    x,

    x,

    x,

    x,

    x,

    x,

    x,

    x,

    x,

    x,

    x,

    x,

  • BIN Files “Binary Data” files, or BIN files, contain the selected track data in a binary format. No text formatting (commas or line ends) are included in the file. The data is stored in a row/frame and column/track format. Each position value is 4 bytes. For example, if three tracks are selected, the first four bytes will indicate the position of track 0 at time 0 (assuming Include Initial Positions is not selected). The next four bytes will indicate the position of track 1 at time 0, etc.

  • Sparse Data Output If you choose to output sparse data, VSA outputs “-1” (or hex “FFFFFFFF”) for data positions to indicate a “no change condition.” For example, when outputting sparse data, a “-1” (or hex “FFFFFFFF”) will appear during all frames where no event is present. On the other hand, if sparse data is not selected, then frames where no event is present will be filled with the most previous event’s stop position. This feature is useful for systems capable of ignoring unchanging device positions.

Importing VSA data

Events can be imported into VSA. This feature is particularly useful if an external application is used to create a complex sequence of events. To import events, select Import... from the Tools menu. Select the file to be imported. The text file must have the following format:

 

Event Type

Track Number

Start Time

Stop Time

Start Position / Default Value

Stop Position / Pulse Value

Number of Events

2

 

       

Event #1

0 0 10 20 127 30

Event #2

1

1

400

401

0

1

The first line of the text file indicates the number of lines, or events, that will follow. This number must be greater than zero and less than 65535. Each subsequent line contains event data to be imported and must contain exactly six numbers separated only by spaces. The event type determines whether the line is interpreted as a Linear Bar (0) or a Pulse Bar (1). Event durations cannot overlap: if a start time occurs before a stop time for the same track number, the import will fail. Furthermore, the start time must always be less than the stop time. Track numbers and times are zero-based (the first track is Track #0) and positions and values must be positive within the maximum and minimum device values. Start positions may be adjusted by VSA during import to reflect the most recent stop position.

Importing and Fitting VSA Data

The above import option allows you to import events. If, instead, your data is represented by device positions (e.g., servo positions) rather than events, VSA can create events to “fit” the data. VSA expects a binary file where each device position is represented as a 4-byte signed integer. For each of the N enabled servos, VSA will read 4*N bytes from the file. Each 4*N bytes defines a single frame; so if the file is of size M bytes, the total number of frames processed will be M/(4*N). During the import, VSA will use the current routine’s time and track settings to interpret the data.

Note that only enabled tracks are imported. Disabled tracks are not imported and no associated data for them is expected in the file.

 

Enabled Device #0

Enabled Device #1

Enabled Device #2

Frame #0

10

100

100

Frame #1

9 110 99

Frame #2

8

120

98

Exporting RAPU data

When the VSA routine is complete, the data can be exported to the Remote Advanced Playback Unit (RAPU). The playback on the RAPU exactly matches that of the PC.

  • The RAPU v6 is documented here.

  • The RAPU v3/4/5 are still supported as legacy devices. They are standalone players capable of controlling MiniSSC/SMI/SV203/Parallax/Pololu/PicoPic/SSC32/K108A/DMX compatible servos, motors, relays, and dimmers at 2400bps, 4800bps, 9600bps, 19.2kbps, 38.4kbps, and DMX speeds. The RAPU v3.0/3.1 data and MP3 audio are stored on a CompactFlash card. The RAPU v3.2/4.0/5.0 uses an SD/SDHC flash card.

  • The RAPU v2.0 is still supported by VSA as a legacy device. The RAPU v2.0 uses CD-R’s and CD-RW’s to playback VSA routines without a PC. Motion output is available for up to 16 tracks for the Mini-SSC or SMI at 30FPS. One channel of CD-quality audio is provided in perfect synchronization with the motion.

Exporting RAPU v3-v6 Data

To export data for the RAPU v3.0/3.1/3.2/4.0/5.0/6.0, select RAPU Export... from the Tools menu. Select RAPU v4.0/3.0 (.rapu), RAPU v5.0 (.rapu5), or RAPU v6.0 (.rapu6) as the Save as type. Next, select the tracks you want to be included in the RAPU playback. The number of tracks supported is determined by the RAPU version and device type:

Supported devices

RAPU Version

Device Type

Number of Supported Devices

RAPU v3.X

All

32

RAPU v4.X

All

32

RAPU v5.X

DMX

128

RAPU v5.X

Non-DMX, BOC

64

RAPU v6

Supported devices

64

Enter a Track Title that will appear on the RAPU. All selected devices must use a single communications port (e.g. COM1 or RAPU0 or None) and must have the same baud rate. The baud rate and frame rate for the RAPU will be derived from the Port <port-settings> and Timing <timing-modify-frame-rate> Settings. For example, if you select tracks that are DMX devices on an RAPU port, the created file will configure the RAPU for DMX operation. If you select tracks that are MiniSSC devices on a serial port, the created file will configure the RAPU for serial/MiniSSC operation. If you do not have a DMX port attached to the system (i.e., an RAPU, Velleman, or ENTTEC device) but want to export DMX data, set the port type to NONE and the device type to the desired DMX compatible device. The RAPU export will automatically recognize that a DMX port/baud should be used.

_images/rapu3_export.jpg

RAPU v6

See documentation here.

RAPU v3-v5

The Track Title specifies the text that will appear on the RAPU screen. This title may be up to 16 characters and, if left blank, will be the first 16 characters of the File name.

The .rapu file output contains a copy of the MP3/WAV audio file and the raw device data. This file must be uploaded to the RAPU via the unit’s built-in USB interface or a commercially available CompactFlash or SD/SDHC card reader (see the RAPU documentation for details). Use the RAPU Manager to write this .rapu file to the CompactFlash card. The RAPU Manager software is available on the Brookshire Software webpage.

The RAPU Manager may require an MP3 encoder to convert the audio data to a suitable MP3 format. Note that this encoding process may slightly alter the timing characteristics on the audio file. This timing change may result in event/audio mismatch. For this reason, it is advised that an MP3 encoded at 44100 Hz sample rate and 128 kbps bit rate be used during routine authoring. An MP3 file encoded at this rate will not need to be converted by the RAPU Manager during upload to the CompactFlash. As a result, event/audio timing will be most reliable.

RAPU v2.0

To export data for the RAPU v2.0, select RAPU Export... from the Tools menu. Select RAPU v2.0/1.0 (.wav) as the Save as type. Next, select the sixteen (16) tracks you want to be included in the RAPU playback. Tracks are mapped to Mini-SSC/SMI addresses 0-15, in the order they appear in the Export Tracks list. Additionally, the routine’s wave file is encoded; this wave file must be sampled at 44.1kHz. Select the Use Multiple Tracks option if you want to divide your RAPU routine into several tracks on the CD. Each track will last exactly 3 minutes and it is suggested, when this option is used, that the CD be burned using Disk At Once (DAO). DAO will allow the routine to play from one track to the next without interruption.

The exported RAPU file will have a “.wav” extension so your CD burning software can recognize it. Do not attempt to play this file on your PC, as it may damage your speakers. Open the CD burning software, create a new Audio CD project, and burn the CD-R or CD-RW.