• grandMA2 User Manual
    • New in the Manual
    • Introduction
      • About this manual
      • System requirements grandMA2 onPC
      • Installation of grandMA2 onPC
      • Help from MA technical support
    • Safety Information
      • Symbols used
      • Intended use
      • Dangers caused by electric current
      • General safety instructions
    • Device Overview
      • grandMA2 console
      • grandMA2 replay unit (RPU)
      • grandMA2 fader wing
      • MA onPC command wing
      • MA onPC fader wing
    • System Overview
      • Standalone systems
      • Network systems
        • What is the replay unit (RPU)
        • What is the network processing unit (NPU)
        • What is the MA video processing unit (VPU)
        • What is the network dimmer processor (NDP)
        • What is MA 3D
        • What are the MA nodes
      • Paramters vs. DMX channels
      • Parameter expansion
      • Big systems
      • Media systems and CITP
    • First Steps
      • Unpack the device
      • Check scope of delivery
      • Position the device
      • Connect power
      • Connect desk lamps
      • Connect external screens
      • Connect USB mouse and USB keyboad
      • Connect DMX
      • Connect sound
      • Connect SMPTE (LTC)
      • Connect Ethernet
      • Connect analog remote control
      • Connect grandMA2 fader wing
      • Setup your PC
      • Turn on the console the first time
    • Keys & Buttons on the Console
      • Key overview
      • >>> [GoFastForward]
      • <<< [GoFastBack]
      • . [Dot]
      • Align
      • Assign
      • At
      • Backg [Background]
      • Backup
      • Blind
      • Bt Pg +
      • Bt Pg -
      • B.O. [Blackout]
      • Channel
      • Ch Pg +
      • Ch Pg -
      • Clear
      • Copy
      • Cue
      • Del [Delete]
      • Down
      • Edit
      • Effect
      • [Encoder]
      • Esc
      • Exec [Executor]
      • Executor Buttons
      • Fd Pg +
      • Fd Pg -
      • Fix
      • Fixture
      • Freeze
      • Full
      • Go + [small]
      • Go + [large]
      • Go - [small]
      • Go - [large]
      • Goto
      • Group
      • Help
      • Highlt [Highlight]
      • If
      • Keyboard
      • Learn
      • List
      • MA
      • Macro
      • [Minus] -
      • Mouse
      • Move
      • Next
      • [Numeric]
      • Off
      • On
      • Oops
      • Page
      • Pause [small]
      • Pause [large]
      • Please
      • [Plus] +
      • Preset
      • Prev [Previous]
      • Prvw [Preview]
      • Select
      • Sequ [Sequence]
      • Set
      • Setup
      • Solo
      • Store
      • Temp
      • Thru
      • Time
      • Top
      • Tools
      • Up
      • Update
      • User 1
      • User 2
      • View
      • U1 - U4
      • V1 - V10
      • X1 - X20
    • Workspace
      • User interface
        • Screen layout
        • User-defined area
        • Command line
        • X-Key labels
        • View buttons
        • Master section
        • Time control
      • Encoder bar
        • Preset control bar
        • Encoder toolbar
      • Encoder settings
      • Command wing bar
      • Command section
      • Mini executor bar
      • Work with views
      • Touch gestures
      • Calculator
      • Info
      • Oops and undo
      • Colors
        • System
        • Marker
        • Cue
      • Text indicators and symbols
      • Icons
      • Keyboard shortcuts
        • Turn on or turn off the keyboard shortcuts
        • Edit keyboard shortcuts
        • Add or delete keyboard shortcuts
        • Export or import keyboard shortcuts
    • Windows in General
      • Create and manage basic windows
      • Clear the screen or delete windows
    • Command Syntax and Keywords
      • General syntax rules
        • Helping keywords
        • Object keywords
        • Function keywords
      • All keywords
        • Special characters
        • <<< [GoFastBack]
        • >>> [GoFastForward]
        • - [Minus]
        • + [Plus]
        • AddUserVar
        • AddVar
        • Agenda
        • Alert
        • Align
        • AlignFaderModules
        • All
        • AllButtonExecutors
        • AllChaseExecutors
        • AllFaderExecutors
        • AllRows
        • AllSequExecutors
        • And
        • Appearance
        • Asterisk *
        • Assign
        • At
        • At @
        • Attribute
        • AutoCreate
        • Backup
        • Black
        • Blackout
        • BlackScreen
        • Blind
        • BlindEdit
        • Block
        • ButtonPage
        • Call
        • Camera
        • ChangeDest
        • Channel
        • ChannelFader
        • ChannelLink
        • ChannelPage
        • Chat
        • CircularCopy
        • Clear
        • ClearActive
        • ClearAll
        • ClearSelection
        • Clone
        • CmdDelay
        • CmdHelp
        • Copy
        • CrashLogCopy
        • CrashLogDelete
        • CrashLogList
        • Crossfade
        • CrossfadeA
        • CrossfadeB
        • Cue
        • Cut
        • Default
        • DefGoBack
        • DefGoForward
        • DefGoPause
        • Delay
        • Delete
        • DeleteShow
        • DisconnectStation
        • Dmx
        • Dollar $
        • DmxUniverse
        • Dot .
        • DoubleRate
        • DoubleSpeed
        • Down
        • DropControl
        • Edit
        • Effect
        • EffectAttack
        • EffectBPM
        • EffectDecay
        • EffectDelay
        • EffectFade
        • EffectForm
        • EffectHigh
        • EffectHZ
        • EffectID
        • EffectLow
        • EffectPhase
        • EffectSec
        • EffectSpeedGroup
        • EffectWidth
        • Empty
        • EndIf
        • EndSession
        • Escape
        • ExecButton1
        • ExecButton2
        • ExecButton3
        • Executor
        • Exit
        • Export
        • Extract
        • Fade
        • FadePath
        • Fader
        • FaderPage
        • Feature
        • Filter
        • Fix
        • Fixture
        • FixtureType
        • Flash
        • FlashGo
        • FlashOn
        • Flip
        • Form
        • Freeze
        • Full
        • FullHighlight
        • Gel
        • Go
        • GoBack
        • Goto
        • Group
        • HalfRate
        • HalfSpeed
        • Help
        • Highlight
        • IdentifyFaderModule
        • If
        • IfActive
        • IfOutput
        • IfProg
        • Image
        • Import
        • Info
        • Insert
        • Interleave
        • Invert
        • InviteStation
        • Item3D
        • JoinSession
        • Kill
        • Label
        • Layer
        • Layout
        • Learn
        • LeaveSession
        • List
        • ListEffectLibrary
        • ListFaderModules
        • ListLibrary
        • ListMacroLibrary
        • ListOops
        • ListOwner
        • ListPluginLibrary
        • ListShows
        • ListUpdate
        • ListUserVar
        • ListVar
        • Load
        • LoadNext
        • LoadPrev
        • LoadShow
        • Locate
        • Lock
        • Login
        • Logout
        • Lua
        • Macro
        • ManualXFade
        • Mask
        • Master
        • MasterFade
        • MAtricks
        • MAtricksBlocks
        • MAtricksFilter
        • MAtricksGroups
        • MAtricksInterleave
        • MAtricksReset
        • MAtricksWings
        • MediaServer
        • Menu
        • Message
        • Messages
        • MidiControl
        • MidiNote
        • MidiProgram
        • Model
        • Move
        • Move3D
        • NetworkInfo
        • NetworkNodeInfo
        • NetworkNodeUpdate
        • NetworkSpeedTest
        • NewShow
        • Next
        • NextRow
        • Normal
        • Off
        • On
        • Oops
        • Or
        • OutDelay
        • OutFade
        • Page
        • Parentheses ( )
        • Park
        • Part
        • Paste
        • Pause
        • Plugin
        • PMArea
        • Preset
        • PresetType
        • Preview
        • PreviewEdit
        • PreviewExecutor
        • Previous
        • PrevRow
        • Profile
        • Protocol
        • PSR
        • PSRList
        • Quotation marks " "
        • PSRPrepare
        • Rate
        • Rate1
        • RdmAutomatch
        • RdmAutopatch
        • RdmFixtureType
        • RdmInfo
        • RdmList
        • RdmSetParameter
        • RdmSetpatch
        • RdmUnmatch
        • Reboot
        • Record
        • Release
        • ReloadPlugins
        • Remote
        • RemoteCommand
        • Remove
        • RemoveIndividuals
        • Replace
        • ResetDmxSelection
        • ResetGuid
        • Restart
        • Root
        • Rotate3D
        • SaveShow
        • Screen
        • Search
        • SearchResult
        • Select
        • SelectDrive
        • Selection
        • Semicolon ;
        • SelFix
        • Sequence
        • SetHostname
        • SetIP
        • SetNetworkSpeed
        • Setup
        • SetUserVar
        • SetVar
        • ShuffleSelection
        • ShuffleValues
        • Shutdown
        • SnapPercent
        • Slash /
        • Solo
        • SpecialMaster
        • Square brackets [ ]
        • Speed
        • StepFade
        • StepInFade
        • StepOutFade
        • Stomp
        • Store
        • StoreLook
        • Surface
        • Swop
        • SwopGo
        • SwopOn
        • SyncEffects
        • TakeControl
        • Telnet
        • Temp
        • TempFader
        • Thru
        • Timecode
        • TimecodeSlot
        • Timer
        • ToFull
        • Toggle
        • Tools
        • Top
        • ToZero
        • Unblock
        • Unlock
        • Unpark
        • Up
        • Update
        • UpdateFirmware
        • UpdateSoftware
        • UpdateThumbnails
        • User
        • UserProfile
        • Value
        • Version
        • View
        • ViewButton
        • ViewPage
        • WebRemoteProgOnly
        • With
        • World
        • Zero
      • Work with lists
        • Object list
        • Selection list
        • Executor list
        • Attribute list
        • Station list
    • Using the Backup Menu
      • New show
      • Load show
      • Save show
      • Save show as...
      • Delete shows
      • Using a USB stick
      • Setting up a file server
      • Partial show read
      • ASCII show read
      • Save as grandMA3
    • Single User and Multi User Systems
      • The difference between a single user and a multi user system
      • Create user profiles and users
      • User settings
      • Login
    • Networking
      • What is networking
      • Set the IP address in the console
      • Set the IP address in the onPC
      • Using DHCP in MA devices
      • Session control
        • How to create a session
        • Protecting the session and station
        • Adding devices to the session
        • How to end or leave a session
        • Session collision
      • Getting DMX in and out of the system
        • Setting up DMX ports on MA devices
        • Network DMX protocols
        • What affects my DMX output?
      • Using CITP
        • Streaming CITP
        • Thumbnail exchange
      • PosiStageNet (PSN)
      • FTP connection to console and NPU
    • Patching, DMX, and Fixture Setup
      • What are channels & fixtures
        • Attributes
        • DMX break
      • What is 3D and stage setup
      • Adding fixtures to the show
      • Delete fixtures from the show
      • Working with layers
      • Multipatching
      • Live patching
      • DMX sheet
      • DMX testing
      • DMX and parameter lists
      • Universe pool
      • Stage view
      • Virtual 3D cameras
      • Position fixtures in the 3D stage
      • Auto calibrate fixture positions
    • Basic Fixture Types
      • What are attributes, features & preset types
      • ColorMix vs. MixColor
      • Different fixture types
        • Conventional
        • LED
        • Mirror
        • Moving lights
        • Media server
        • Virtual fixtures
    • Operate Fixtures
      • Channel sheet
      • Fixture sheet
      • Sheet options
        • Tools
        • Layer mask
        • Display
        • Title buttons
        • Assign executor
        • Mask (local)
      • Layers in sheets
        • Channel sheet and fixture sheet
        • Sequence content and sequence tracking sheet
      • What is the programmer
      • Encoder grouping
      • Using the color picker
      • Using the shaper dialog
      • Using the smart view
      • Edit a channel or fixture
    • Pools in General
      • Manage pool objects
      • Adjust pool options
      • Call modes
    • Groups
      • Create groups
      • Auto create groups
      • Using groups when programming
      • Choose copy method
      • Change specific group colors
      • Group masters
    • Presets
      • What are special modes
      • Preset pools
      • Preset pool "Dynamic"
      • Create presets
      • Preset pool options
      • Create preset reference
      • Auto create presets
      • Auto create additional presets
      • Embedded presets
      • Edit presets
      • Update presets
      • Delete presets
    • Cues and Sequences
      • What are cues and sequences
      • Looking at the cue sequence
      • Store cues
      • Store options and defaults
      • Cue timings
      • Renumber cues
      • Delete cues
      • Playing back cues
      • Looking at the cue content
      • Update cues
      • What is tracking
      • What is MIB
      • Sequence mini executor
      • Commands in cues
    • Executors
      • What are executors
      • Executors on the screens
      • Assign a function
      • Looking at the active executors
      • Common executor options
    • Advanced Sequence Functionality
      • Using different view sets in the sheets
      • Working with MIB
      • Using cue modes
      • Cue zero
      • Sequence info window
      • Looping cues
      • Cue path
    • Advanced Executor Functionality
      • Executor pages
      • Channel pages
      • Executor options
      • Masters window
      • Special masters
        • Default masters
        • Grand masters
        • Speed masters
        • Rate masters
        • Playback masters
    • Clone
      • Clone in user interface
      • Examples
      • Clone presets
    • Search and Replace
      • Search
      • Replace
    • Image Pool
      • Import images and videos
      • Image limitations & guidelines for symbols
      • Supported file formats
      • Delete images and videos
    • Layouts
      • Create a layout
      • Layout pool options
      • Edit layout
      • Layout view options
    • Worlds, Filters and Masks
      • What are worlds
      • Create worlds
      • Auto create worlds
      • Use worlds when programming
      • What are filters
      • Create filters
      • Use filters when programming
      • Use temporary filters
      • What are masks
      • Create masks
      • Use masks in the sheets
      • Apply worlds or filters to executors and sequences
    • MAtricks
      • MAtricks toolbar
      • MAtricks pool
      • MAtricks interleave
      • MAtricks blocks
      • MAtricks wings
      • MAtricks groups
    • Chasers
      • Create a chaser
      • Chaser settings
      • Chaser mini executor
    • Effects
      • Use predefined effects
      • Use template and selective effects
      • Create an effect in the programmer
      • Create an effect that uses presets
      • Create effect forms
      • Pool options
      • Effects in a cue
      • Assign effect to executor
      • Live edit an effect
      • Running effects
      • Update effects
      • Delete effects
    • Bitmap Fixture
      • Import bitmap fixture
      • Apply bitmap fixture in the layout
      • Control bitmap fixture
      • Edit bitmap fixture
      • Example
      • Priorities for bitmap effects
      • Disable bitmap for fixtures
    • XYZ
      • XYZ vs. pan/tilt
      • XYZ and pan/tilt in cues and sequences
      • Use stage markers
      • Link objects to stage markers in MA 3D
    • Remote Controlling the System
      • Remote input
      • MIDI show control (MSC)
      • Web remote
      • Telnet remote
      • Decimal – hex table
    • Timecode
      • What is timecode and timecode shows
      • Record a timecode show
      • Edit a timecode show
      • Playing back a timecode show
      • Organize the show with multiple timecode shows
    • Timer
      • Timer pool
      • Timer pool options
    • Agenda
      • What is agenda
      • Create an appointment in the agenda
    • Macros
      • What are macros
      • Manually create a macro
        • Use variables
        • Create pop-ups
        • Conditional expressions
        • Macro timing
      • Record a macro
      • Edit a macro
      • Command line interaction
      • Assign a macro to a key
      • Example macros
    • Plugins
      • What is Lua
      • Edit plugins
    • Partial Show Read
      • What is partial show read (PSR)
      • How to do a PSR
    • RDM
      • Turn RDM on
      • Match RDM devices
      • Auto patch RDM devices
      • Work with RDM parameters
      • Work with RDM sensors
      • Configure RDM notifications
      • Use the RDM sheet
      • Unmatch RDM devices
      • Splitters and mergers that support RDM
      • Turn RDM off
      • RDM specific keywords
    • DMX Profiles
    • Other System Tools
      • Message center
      • Help
      • Clock
      • Sound input window
      • VPU pixel mapper view
      • Network dimmer
        • Views
        • Errors
        • Readout
        • Edit properties of a rack
        • Edit a module
      • Desk status
      • Performance window
      • System monitor
    • Export and Import
      • Export by using command line
      • Export by using user interface
      • Import by using command line
      • Import by using user interface
      • Import predefined objects
    • Update the Software
      • Update via setup
      • Format a USB stick for Linux
      • Update or factory reset via boot menu
      • Restart from Linux
    • Advanced Fixture Types
      • Anatomy of a fixture type
        • Module manager
        • Instance manager
        • Wheel manager
      • Attribute & Encoder Grouping
    • grandMA2 onPC Details
    • Control the MA NDPs
      • Add the MA NDPs
      • Configure the MA NDPs
      • Delete the MA NDPs
    • Control the MA Network Switch
      • Add MA Network Switch
      • Change IP address
      • Enable DHCP client
      • Change hostname
      • Change switch ID
      • Configure ports
      • Edit groups
      • Edit presets
      • Edit LAGs
      • Mirror ports
      • Work with the switch configuration
      • Disable SNMP
      • Change password
      • Update firmware
      • Reset to factory defaults
      • Delete MA Network Switch
    • Control the MA xPort Nodes
      • Add the MA xPort Nodes
      • Configure the MA xPort Nodes in the console
      • Configure the MA xPort Nodes in a browser
      • Configure the MA xPort Nodes as splitters or mergers
      • Delete the MA xPort Nodes
    • Console Settings
      • Adjust the intensity of desk lights
      • Change screen options
      • Local settings
      • Wing & monitor setup
      • Date & time
    • Shut Down the System
    • Error Messages
    • Technical Data
    • Glossary
  • grandMA3 Mode2
  • grandMA2 Quick Start Guide
  • grandMA2 Quick Manual onPC solutions
  • MA 3D
  • MA VPU
  • Release Notes
Select different version
 
Hint:
New help version
The help version you selected belongs to an older software version. You may want to view the latest help version.
Version 3.4

Use variables in macros

It is possible to use variables in your macros and in any command line entry in the show.

Variables are containers of text that may be reused.

Variables may be used to store phrases of text, for later reuse by command line and macros, similar to what Presets are for Attributes.

 

SetVar

Variables are defined using the SetVar keyword and the $ character:

SetVar $nameofvariable="content of variable"

Whenever the variable is later referenced in the command line, the variable is replaced by its content.

The variables can contain text strings - like names. They should be put in quotation marks. That makes the grandMA2 interpret that as a text string and it can contain a space in the name.

If you do not put it in quotation marks, then the text would be interpreted as commands.

For instance if you want to create a variable containing This is Us and write:

[Channel]> SetVar $song_name = This is us

Then the grandMA2 would interpreted it as you defining a variable containing the text "This" and then the commands InviteStation User

[time] : Executing : SetVar $song_name = This InviteStation User

This is not what you wanted and it is not even a valid command.

So remember the quotation marks.

Variables can also contain numbers. If you create the variable and the content is a number then it is defined as an integer (whole number) or fixed point number (a whole number with 6 decimals after the point). If a number has become a fixed point number then you cannot convert it back to an integer. That was a little bit of technical math, that you most likely do not have to worry about.

Example

This is an example of using a variable in a cue list. See the Example macros topic for more examples of using variables in macros.

A common way to program lighting for a song, is to create a sequence of cues holding the base looks and major changes for each verse and chorus, and additionally trigger different chasers on and off via the command (CMD) column in the main sequence:

  • ...
  • Cue 5:"Chorus": CMD:Go Executor 201
  • Cue 6:"Verse 2": CMD: Off Executor 201
  • etc.

If only one chaser needs to be triggered, this simple syntax usually does the job.

By using variables, triggering of multiple chaser may be easily managed:

  • Cue 1:"Intro": CMD:SetVar $chorus_Chasers="Executor 201 + 204 + 205"
  • ...
  • Cue 5:"Chorus":CMD:Go $chorus_Chasers
  • Cue 6:"Verse2":CMD:Off $chorus_Chasers
  • etc
[Channel]> SetVar $chorus_Chasers="Executor 201 + 204 + 205"
[time] : Executing : SetVar $chorus_Chasers="Executor 201 + 204 + 205"
[Channel]> Go $chorus_Chasers
[time] : Executing : Go Executor 201 + 204 + 205
Hint:
Your console will only process valid commands. If none of the Executors exist, the console will not bother to process the command, and you will not see this last line

SetUserVar

Similar to the SetVar keyword is the SetUserVar keyword.

The only difference is that a variable defined with the SetVar is a global variable for all users, while variables defined with SetUserVar applies to the current user only.

 


ListVar and ListUserVar

With the keyword ListVar and ListUserVar, the command line feedback window will list current variables and their content.

[Channel]> ListVar
[time] : Global : $CHORUS_CHASERS = Executor 201 + 204 + 205

The list is longer. ListVar shows both user and global variables. ListUserVar only shows the variables for the current user.

Notice that the variables are stored with capital letters. This means that the grandMA2 do not distinguish between two variables called $thisISgreat and $thisisGREAT. For the grandMA2 it will just be $THISISGREAT.

Predefined Variables

If you try the ListVar command then you will see the list of all the variables. There are a lot of predefined variables in the grandMA2 that automatically gets updated.

Some of the most useful are:

$SELECTEDEXEC:

This is the number of the currently selected executor.

$SELECTEDEXECCUE:

This is the current active cue on the selected executor.

$FADERPAGE:

This is the page number of the Executor Fader page.

$BUTTONPAGE:

This is the page number for the Executors without faders.

$SHOWFILE:

This is the name of the show.

$USER:

This is the currently logged in user.

 

Even though these are listed as "Global" some are actually user variables. Two different users in the same session will not get the same result in some of these - for instance the $USER will be different and they can also be on different pages and have different executors selected.


Additions with Variables

There are two commands that allows you to do a little addition with variables: AddVar and AddUserVar.

You can do math with numbers and you can append text to text or numbers (this will convert a number to text).

This is the possible syntax:

AddVar $variable = number

AddVar $variable = "text"

AddVar $variable = $variable

The only difference between AddVar and AddUserVar is that the first is used with the global variables and the second is for the current users own variables.

The variable needs to exist before you use AddVar/AddUserVar on it.

Examples

Adding numbers:

SetVar $my_number = 1

AddVar $my_number = 1

Result is that the variable $my_number is the number 2.

 

Adding text:

SetVar $my_executor = "Executor 10"

AddVar $my_executor = " + 11"

Result is the text in the variable $my_executor is Executor 10 + 11.

 

Adding variables:

SetVar $date_time = $DATE

AddVar $date_time = "_"

AddVar $date_time = $TIME

Result of $date_time is a text string and is off coarse based on when you do this, but it could look like this: 12.8.2016_12h31m37.963s notice that for better readability we added an underscore between the date and the time.

 

Adding a number to text:

SetVar $num_text = 23

AddVar $num_text = " bananas"

The result is converted to text and it will be: 23 bananas.

 

Adding a text to a number:

SetVar $text_num = "The answer is "

AddVar $text_num = 42

The result is a text that reads: The answer is 42.

 

For more practical examples please read the Example macros topic.


Select different version