Software Documentation

Exporting a firing system scriptDocumentation

Integration IntermediateLast updated: June 30, 2022

3 Cobra

To create and export a script for the Cobra firing system, please follow these three steps:

  1. Address the show (“Addressing > Address show”).
  2. Export the script to a USB thumb drive (“File > Export > Export firing scripts“). Save the file as “cobra.csv” on the USB drive.
  3. Insert the USB thumb drive into the 18R2 (To start your show, press cue #1 on channel 00!).

Step 2 creates the script file, which is a standard format CSV file with a “CSV” extension. The file format details are described below in this section.

 

Figure 1 – Cobra firing system

 

Cobra modules have 6, 18, 36, or 72 pins (cues), but as far as addresses are concerned the modules with more than 18 pins are just two or four 18-pin modules combined, with each of the 18-pin modules having a separately assignable module number (channel number). If you use 36 or 72 pin modules, simply treat them as multiple 18-pin modules stuck together, and assign their separate module numbers to whatever is needed at their physical locations. If you use 6-pin modules, take care to avoid assigning pins above 6 or create a custom module with a 6-pin limit.

 

Table 1 – File format and encoding

File formatExtensionText encodingField delimiterEnd-of-line
Text.csvASCIICommaCRLF

The script contains rows for the firing events, i.e., unique combinations of module, pin, and ignition-time. Multiple effects can be combined on a single cue. The special characteristics of the script are shown in the following table:

 

Table 2 – Special characteristics

Special characteristicsDescription
Script formats for different Cobra firmware versionsFinale 3D can export COBRA v3.0, COBRA v4.0, COBRA v5.0, and COBRA v6.0 format scripts. COBRA v3.0 and v4.0 scripts have 10th second resolution; later versions have 100ths second resolution. Beginning with COBRA v6.0, the script supports launch position coordinates, hazard class, definable pulse time, and embedded part numbers.
Sort order of rowsEvent rows in each section of the script are sorted ascending first by Event Time.
What rows representRows represent firing events, i.e., unique module-pin-ignition-time events. If multiple effects are triggered on the same cue, the effects are combined in name field, but the row is still just one row.
Structure of script fileThe script file begins with a header with position coordinates, followed by one or more sections (one for non-semi-automatic) of event rows, each section with its own two-row header, followed by “end” as a row by itself.
Script commentsEmpty cues in Finale 3D that have text in the Note field are included in exported Cobra scripts as script comment rows. The format of the script comment rows for Version 6 or later includes the Event Time field and the Name field only, as shown in the middle line of this example:

0,1,,0,audiobox.mp3,cobra,,,,
00:00:02.16s,,,THIS IS A SCRIPT COMMENT,,,,,,,
00:00:02.76s,channel 1,cue 1,Red Chrysanthemum,,,,,,,

Script comment rows for Version 5 and earlier are simply pound-sign comment rows, as in:

0,1,,0,audiobox.mp3,cobra,,,,
#THIS IS A SCRIPT COMMENT
00:00:02.76s,channel 1,cue 1,Red Chrysanthemum

Script comment rows in the Version 6 format will appear in Cobra Show Creator and in the Cobra Control Panel.

Header with position coordinatesThe script includes a version comment in the header. Optionally, the script can be set to include position coordinates. The rows indicate the coordinates of the positions and the list of modules at each position, in a simple syntax illustrated by this example:

##version 6
@beginPositions
@Pos-01,-50.0,0.0,-8.0,3.0,1
@Pos-02,-37.5,0.0,-8.0,3.0,2,5,6,7,8
@endPositions

The three coordinates following the position name are in meters: right (East), out toward viewer (South), and up toward the sky. The fourth field is the diameter of the position in meters. The remaining fields are the module channel numbers at that position.

Semi-automatic firing optionsCobra firing systems support three types of semi-automatic and step firing methods: 1) “Separate Scripts By Tracks”, 2) “Step By Tracks”, and 3) “Step By Events”. In Finale 3D, you can specify one of these three semi-auto script types or choose “Standard Script” (to generate a fully-automatic script) in the export options dialog that is presented when you export the script. The Separate Scripts By Tracks method splits the script into multiple scripts that are triggered on demand by pressing the corresponding cue button on the Cobra controller. The Step By Tracks method is similar, but advances through the tracks of the show sequentially with the step button on the controller, instead of by random access. The Step By Events method advances one event at a time sequentially with the step button. Examples of all four script formats are provided in Table 4.

See semi-automatic-firing for further instructions.

Step By Events“Step By Event” scripts advance through the “Step Cues” manually as you press the STEP button. Each Step Cue consists of one or more events that are logically triggered together. For example, a pair of shells ignited at the same time are logically triggered together even if they are ignited by different pins or modules. A stack of different size shells ignited at the same time — and thus generally breaking at different times — are also part of the Step Cue.

The concept of events being logically triggered together also extends to events with the same effect times. A stack of different size shells ignited at different times but breaking at the same time are also part of the same Step Cue, because that is what you would expect. If events in a Step Cue have different ignition times, the Step Cue triggers the first immediately and incorporates a delay in the later events to preserve their relative ignition times. A stack of different size shells breaking at the same time thus generally fires the largest shell immediately and the smaller shells after delays that cause them to break at the same time.

DMX events may also be included in Step Cues, on their own or combined with pyro events. Since a DMX effect represented by one row in the script table may require multiple DMX events in the exported script to control multiple DMX channels, all the DMX events associated with a row of the script table are necessarily part of the same Step Cue. In some cases, such as a DMX fixture with a color wheel or moving head, some of the DMX events associated with the effect must occur in advance of the visual appearance in order to turn the color wheel or move the head to the correct angle before turning on the fixture effect. Since the wheel turning or head moving can’t begin until the Step Cue has been triggered, the fixture effect may not be ready to turn on immediately, which manifests in a delay between when you press the STEP button and when the effect visually appears. Please see DMX setup events — preparing channels before the effect begins for more details.

TracksThe “Separate Scripts By Tracks” and “Step By Tracks” firing methods use the Track property in Finale 3D script rows to indicate the section of the show to which the row belongs. For Separate Scripts By Tracks the Track also indicates the button on the Cobra controller that triggers the section, which is the Track value itself, a number 1-18 (please unhide the Track property in the script to use this feature). In Finale 3D, the Track field in the script table is hidden by default; unhide it from the blue gear menu. In the Cobra script file, sections are listed sequentially with a comment row and header row above the event rows, e.g.,

#Track 1
0,1,,0,audiobox

The Track value in the Finale 3D script is the number in the #Track comment row, and also in the following header row after the word “cue”. The rows in each section of a semi-automatic script have time values relative to the first event in the section, which is always time zero.

In the Finale 3D script, please arrange the track sections in order, with no interwoven or overlapping events. Separate tracks in DMX scripts therefore need separate safety channels.

Special charactersTo avoid the need for an escaping convention, Finale 3D filters out comma, semicolon, double-quote, backslash, and all control characters from the exported script. The Cobra controller implements the Excel escaping convention, but Finale 3D filters the characters anyway to avoid types of errors that are common when users import and export from Excel and text editors.
Minimum separation between cuesNone
AlternatesCobra scripts provide for listing “Alternate1” and “Alternate2” events at the end of the script, and binding the events to buttons that can be pressed to trigger the events during or after the script. To use this function in Finale 3D, unhide the “Alternate” column in the script table window, and put the value “1” into script rows that you want to be “Alternate1” events; and the value “2” into script rows that you want to be “Alternate2” events. Finale 3D will include these events at the end of the exported script, and optionally double-list them in the body of the script depending on your choices in the Export Options dialog (See Table 3).
Hazard classCOBRA v6.0 and later firmware recognizes the “Hazard” field of Finale 3D, which is exported as a text field identifying a class of events that can be disabled on the fly based on conditions during the show.
Pulse TimeCOBRA v6.0 and later firmware supports a user-defined pulse duration for which cue is to be energized.
Multi-hit pinsSupported in the script format and with manual addressing in Finale 3D, for non-pyro effects like flames and relays that can be triggered multiple times. Finale 3D handles multi-hit pins in the Cobra exporter the same as it handles single-hit pins — whatever pin address is in the script row in Finale 3D will be copied to the exported script row for Cobra, whether or not the pin address is unique. The standard pyro addressing functions in Finale 3D assign pins sequentially, so it may be easiest to address multi-hit pins in Finale 3D by editing the script table by hand and then locking the edited rows so the show can be re-addressed for pyro without affecting them.
DMXCOBRA v6.0 and later firmware with 36M and 72M modules supports DMX output for separate or shared DMX universes on each module.

When you export a firing script for Cobra, Finale 3D presents an “Export Options” dialog with options that go into the header of the exported script or affect the format. The choices are shown in Table 3.

 

Table 3 – Export options

Option nameDescription
VersionChoose the script format that matches your firmware version, v3.0 – v6.0. The version affects the number of columns in the exported script, the time resolution, and various capabilities. Version v6.0 is the first version to support DMX.
Script TypeChoose one of the four script types: Standard Script, Step By Events, Separate Scripts By Tracks, and Step By Tracks.
Audiobox FilenameIn COBRA firmware v3.X and 4.X, the Audio Box filename must be “audiobox.mp3” and is not editable.
In COBRA firmware v5.0.X, the Audio Box filename can be custom, but must be 12 characters or less including the .mp3 file extension.
In COBRA firmware v5.1.X and v6.X, the Audio Box filename can be custom, but must be 31 characters or less including the .mp3 file extension.

Note: The Audio Box filename may contain lowercase letters a-z, uppercase letters A-Z, numbers 0-9, hyphens '-', underscores '_', and spaces. No other characters are permitted. The filename of the music soundtrack that you place on your USB drive and insert into the COBRA Audio Box must be identical to the filename you enter here.

SMPTE Timecode(COBRA v5.0 and later) Select among three timecode choices: None, Timecode 1, and Timecode 2. This choice merely fills into the header of the exported script. The choice does not affect any other timecode related features, including the exported sound track.
Trigger ChannelChoose the channel that the 18R2 remote needs to be on as a precondition for the user to initiate this script: 0-99, or the option “None”. The option “None” indicates no specific channel is required as a precondition for initiating this script..
Return ChannelChoose the channel that the 18R2 returns to automatically upon completion of the script, 1-18 or “None”.
Trigger ButtonSubject to the Trigger Channel precondition, the Trigger Button is the button on the 18R2 remote that triggers the script, 1-18, or the STEP button, or the AUTOFIRE button (all-caps). If you choose the script type Separate Scripts By Tracks, then the Track field in Finale 3D that groups together sections of the show into separately triggered scripts on the 18R2 also specifies the Trigger Buttons for the separate scripts as being the Track numbers.
Deadman Button / Trigger Confirmation ButtonChoose “None” or optionally a button 1-18 or “Deadman” as a confirmation button for triggering the script. The choice cannot be the same as the Trigger Button.
Disable Firing ButtonChoose “None” or optionally a button 1-18 to disable firing during a show.
Alternate 1 ButtonChoose the button associated with “Alternate 1” script events (see “Alternates” in Table 2).
Alternate 2 ButtonChoose the button associated with “Alternate 2” script events (see “Alternates” in Table 2).
Exclude alternates from script bodyChoose whether alternates are double listed in the body of the script (see “Alternates” in Table 2).
First event of Step By Events scripts fires when script startsChoose whether Step By Events scripts, when triggered, require pressing the STEP button for the first event or whether the first event fires immediately when the script is triggered. This option is typically not checked unless if you choose the STEP button as the Trigger Button for the script, in which case it is a matter of personal preference. The option only affects Step By Events type scripts.

After the header, each row in the script has a number of fields separated by the vertical bar character. The names of these fields and their descriptions are shown in Table 4.

 

Table 4 – Specifications of script fields

Field nameDescription
Event TimeIgnition time of the event, in the format: 00:00:01.00s.
ChannelChannel number (same as the Module Number and Rail Address), in the format: channel 10. (Blank for DMX rows.)
CueCue number (same as the Pin Address), in the format: cue 1. (Blank for DMX rows.)
NameEffect name, followed by the part number in curly braces (COBRA v6.0 and later; non-DMX effects only), followed by double-slash and the name of the position or positions, followed by double-dash and the DMX channel label and channel offset in parentheses if event is a DMX event. If the name contains a fixture ID / effect ID annotation in the format “[xxx/yyyy]” the fixture ID will be removed since it is redundant with the name of the fixture that is typically also in the name. The value is a text string, at most 80 characters long.

PYRO EXAMPLE:

"Red Chrysanthemum {G2SH1000} // Pos-01/Pos-02/Pos-03"

DMX EXAMPLE:

"EZPAR [1096] White Flash (sm) // Pos-01/Pos-02/Pos-03 -- Dimmer (+0)"

The DMX example’s effect originally had a fixture ID / effect ID annotation of “[005/1096]” but the fixture ID “005/” was removed from the exported name.

Hazard(COBRA v6.0 and later) Text string identifying a class of events that can be disabled on the fly based on conditions during the show.
Pulse Time(COBRA v6.0 and later) Duration for which cue is to be energized, in floating point format (0.01 second resolution); or blank for the default duration. Finale 3D writes the empty string value, unless the cue contains an event of type sfx, flame, light, or not_an_effect, in which case Finale 3D writes the duration of the event as shown in the script row. See Why is ‘Type’ so important? What depends on it?.
Auxiliary Parameter(COBRA v6.0 and later) Not used. Finale 3D leaves this field blank.
DMX Universe(COBRA v6.0 and later) Integer from 1-100, identifying the DMX universe. (Blank for non-DMX rows.)
DMX Channel(COBRA v6.0 and later) Integer from 1-512 identifying the DMX channel of the row. (Blank for non-DMX rows.) NOTE: as of 4/2/2021 Cobra hardware is limited to 200 channels, 1-200.
DMX Channel Value(COBRA v6.0 and later) Integer from 0-255 identifying the value for the DMX channel. (Blank for non-DMX rows.)
DMX Duration(COBRA v6.0 and later) Duration of DMX command, at which point the DMX channel value will be reset to zero, or, blank to leave the DMX channel value as is until a subsequent script row for the same channel changes the value. (Blank for non-DMX rows.)

An example semi-automatic script with two sections is shown below. The first track section contains two events with hazard classes (wind, rain), and a third event with an explicit pulse duration.

##version 6
#Track 1
0,1,,0,audiobox
00:00:00.00s,channel 1,cue 1,White Chrysanthemum {G2SH1000},wind,
00:00:02.90s,channel 2,cue 1,White Chrysanthemum {G2SH1000},rain,
00:00:05.40s,channel 2,cue 4,Long Flame Projector Shot {GXX1101},,0.41
#Track 2
0,2,,0,audiobox
00:00:00.00s,channel 5,cue 1,Green Chrysanthemum {G2SH1001},,
00:00:01.00s,channel 6,cue 1,Green Chrysanthemum {G2SH1001},,
00:00:02.00s,channel 7,cue 1,Green Chrysanthemum {G2SH1001},,
00:00:03.00s,channel 8,cue 1,Green Chrysanthemum {G2SH1001},,
end

Figure 2 – Example Cobra script

 

Table 5 – Example files

Download linkExplanation
test_cobra.finExample show
test_cobra_standard_script.csvExample exported standard script (fully-automatic)
test_cobra_separate_scripts_by_tracks.csvExample exported semi-automatic script (separate scripts by tracks)
test_cobra_step_script_by_tracks.csvExample exported step by tracks
test_cobra_step_script_by_events.csvExample exported step by events
magicfx_cobra_standard.finExample DMX show using MagicFX flame projector
magicfx_cobra_standard.csvExample exported DMX script using MagicFX flame projector