There is a full blown
LUA interpreter in
Palette which you can get to by telnetting to the IP on port 1123
Macros in
Palette OS are routines that run when triggered by a variable, a
cue or a look. The
macro can run either a ‘Command’ or a ‘Script’. Commands are predetermined actions that interact with the engine and use pre-filtered arguments. For example, you can define a command to do a GO on a
cue list, but you MUST choose an existing
cue list from the list.
Scripts are a much more advanced function and use the built-in
Lua interpreter in the engine. This is a programming language, much like BASIC or C and when run by the
macro,
Palette interprets the free-form text (syntax errors and all) and performs operations in the
fade engine.
A very simple script may be:
HC.CueListGo('My Cue List')
A more complex one which does a GO on the selected
cue list:
function trim(s)
return (string.gsub(s, "^%s*(.-)%s*$", "%1"))
end
a = HC.GetProperty('system','currentcuelist','name')
HC.CueListGo(trim(a))
Similar to how there is a math. library in
Lua {i.e. math.floor( ) }, or an OS. library {i.e. os.date( ) }, Horizon Control has extended
Lua to include the HC. library. HC commands interact with the
Palette OS. Here is a list of available commands:
Notes:
Text in [ ]’s is optional and often includes a comma.
Text separated by a | is either A or B.
Single quoted text depict ASCII text versus a number.
Text in < > are hints
HC.AddUserFunctionDescription('description_offunction')
HC.AttributeFade(
fixture[,attribute_name],value [,time])
HC.AttributeFadeCapture(
fixture[,attribute_name],value [,time])
HC.AttributeGetValue([source_identifier,]
fixture[,attribute_name])
HC.AttributeSetValue([source_identifier,]
fixture,attribute_name,attribute_value)
HC.Bump('page_name' | page_index , look_number, is_down )
HC.ButtonPress('
page','name' or order)
HC.ButtonWingButtonPress( bank,
button )
HC.ButtonWingPageDown( bank )
HC.ButtonWingPageUp( bank )
HC.CueListAssert('
cue list')
HC.CueListGo('
cue list')
HC.CueListGotoAndExecuteFollows('
cue list',
cue)
HC.CueListGotoAndHalt('
cue list',
cue)
HC.CueListHalt('
cue list')
HC.CueListHaltBack('
cue list')
HC.CueListRelease('
cue list'[,release_time])
HC.Deselect('fixture_string')
HC.
Encoder( encoder_number, signed_value)
HC.FixtureCheckBack()
HC.FixtureCheckForward()
HC.FixturePark('fixture_spec')
HC.FixtureUnPark('fixture_spec')
HC.FlashFixture([fixture_num])
HC.FlashOutput([output_num])
HC.FlipCurrentSelectionSet()
HC.GetButtonWingButtons( bank )
HC.GetButtonWingPageName( bank )
HC.GetCommandLineText()
HC.GetCurrentSelectionSet(['delimeter'])
HC.GetProperty( ... )
HC.GetScriptSource('type'|'number'|'parent'|'name'[,'type'|'number'|'parent'|'na me'[,'seperator']])
HC.GetScriptSource('type'|'number'|'parent'|'name'|'value'[,'type'|'number'|'
par ent'|'name'|'value'[,'seperator']])
HC.GetSoftkeyText( 'bank' )
HC.HardwareConsoleLights(
level 0 to 10)
HC.ILSLockCommand(device_id,lock(1)/unlock(0)
HC.ILSSetScene(device_id,scene)
HC.LookFade('
page',looknumber,value[,seconds])
HC.LookFadeRate('
page',looknumber,value[,seconds full scale])
HC.LookFadeStop('
page',looknumber)
HC.LookGetValue('
page',looknumber)
HC.MediaPlayerPause()
HC.MediaPlayerPlay()
HC.MediaPlayerPlayFile('file name')
HC.MediaPlayerStop()
HC.MessageBox('message_box_text')
HC.MidiNoteOff(channel_1_to_16,key_1_to_128[,velocity_0_to127])
HC.MidiNoteOn(channel_1_to_16,key_1_to_128[,velocity_0_to127])
HC.MidiTimeCodeEnable()
HC.MidiWrite(midi_byte[,midi_byte ...])
HC.OutputCapture(output ,
level | 'level_percent')
HC.OutputPark(output,
level | 'level_percent' [, park_group])
HC.OutputRelease(output )
HC.OutputRouteEnable( route_number [, 'live'|'blind'|'liveblind'] )
HC.OutputRouteDisable( route_number )
HC.OutputRouteAdd( output_start, output_end, '
shownet'|'
dmx'|'kinet'|'pathport'| 'e1.31'|'
artnet', xdmx_start [, 'live'|'blind'|'liveblind'])
HC.OutputUnPark(output [, park_group ] )
HC.OutputsEnable( true|false )
HC.PatchFixture(
fixture[,dmx_channel [, 'Dimmer' | 'DMX1' | 'DMX2' | 'DMX3' ] ] )
HC.PowerPointFirstSlide(machine_id)
HC.PowerPointGotoSlide(machine_id,slide_number)
HC.PowerPointLastSlide(machine_id)
HC.PowerPointNextSlide(machine_id)
HC.PowerPointPrevSlide(machine_id)
HC.RecordCue('cue_list',cue_number[,'merge'|'replace'][,'IPCGLSTE'][,cue_time][, 'label'])
HC.RecordLook('look_page',look_number[,'merge'|'replace'][,'IPCGLSTE'][,'label'] )
HC.ReleaseAll()
HC.RemDim()
HC.SaveShow()
HC.SearchFixtureProperties( 'search_bounds', 'inuse|notinuse|all', fixture_num_m atch, att_family_match, start_page_index, max_num_fixtures_returned, ...properti es...)
HC.Select('fixture_string')
HC.SerialClose(1 to 16)
HC.SerialOpen(1 to 16,'9600,N,8,1'[,'script'])
HC.SerialRead(1 to 16)
HC.SerialWrite(1 to 16,'output string' or binary_byte or table [,...])
HC.SetFixtureType(
fixture[, 'manufacturer', 'model [, 'mode']])
HC.SetLevel('fixture_string', 'level_string' [,fade_time_seconds])
HC.SetOutputPriority(output_number , priority )
HC.SetProperty( ... )
HC.SMPTEStart(['hh:mm:ss.fr'[,'30'|'30dr'|'25'|'24']][,interface])
HC.SMPTEStop(interface)
HC.SoftkeyPress( 'M or S', button_number )
HC.Status('status string')
HC.SystemRestart([<maintain state>true|false])
HC.SystemShutdown()
HC.Trackball( 'H' | 'V' | 'X' | 'Y', signed_value)
HC.UIMacro('macro-info'[,'macro-info' ...])
HC.VariableGet('
page','name' | order)
HC.VariablePagePatchSet('
page','new patch')
HC.VariableSet('
page','name' | order,'value' | value)
HC.VariableSetDelayed('
page','name' | order,'value' | value,seconds)
HC.VNStartPreset( room,
preset, rate)
HC.Wheel(wheel_number, signed_value)