Timeline#
A Timeline object is returned from get_timeline.
Properties#
Property |
Value Type |
Description |
Value Example |
|---|---|---|---|
|
string |
Timeline name |
|
|
string |
Timeline Playback Group name |
|
|
integer or nil |
Timeline Playback Group number |
|
|
integer |
Timeline length, in milliseconds |
|
|
integer |
Integer value of constants: |
|
|
string |
Incoming timecode format on source bus |
|
|
integer |
0 is equivalent to the constant: |
|
|
integer |
Integer value of constants: |
|
|
boolean |
The Peak setting of the timeline, if set to an audio time source |
|
|
integer |
Milliseconds |
|
|
integer |
Integer value of the state - see Timeline States below for definitions |
|
|
boolean |
Whether the timeline is affecting output of any fixtures |
|
|
integer |
Milliseconds |
|
|
integer |
Integer value of constants: |
|
|
table |
Table keys and values correspond to custom property names and values |
For example:
tl = get_timeline(1)
name = tl.name
state = tl.state
if (tl.source_bus == TCODE_1) then
-- do something
end
Timeline States#
The timeline state is one of the following states (available as Lua constants) :
State |
Value |
Description |
|---|---|---|
|
0 |
The timeline has never been run (since the last reset of the controller). |
|
1 |
The timeline is running (although might not be actively controlling outputs - see the |
|
2 |
The timeline has been paused by another action. |
|
3 |
The timeline has reached the end, and is holding. |
|
4 |
The timeline has been run and has now been released. |
Timeline Reference Type#
The timeline reference type is one of the following (available as Lua constants) :
State |
Value |
Description |
|---|---|---|
|
0 |
The timeline position value is relative. |
|
1 |
The timeline position value is absolute. |
|
2 |
The timeline position value is obtained from a timeline flag. |
Member functions#
The following are member functions of Timeline objects.
start#
start()
Starts the timeline. For example:
-- start timeline 1
get_timeline(1):start()
start_release_others#
start_release_others(group[, fade[, same_group]])
Starts the timeline and releases others.
Parameter |
Value Type |
Description |
Value Example |
|---|---|---|---|
|
string or integer |
Optional playback group name or number. If name, prepend the name with |
|
|
float |
Optional fade time to use when releasing other timelines, in seconds |
|
|
boolean |
Optional flag to target the same playback group as the selected timeline. This flag has no effect when |
|
For example:
-- start timeline 1 and release all others in the default time
get_timeline(1):start_release_others()
-- start timeline 1 and release others except those in playback group "Back of House" in 2 seconds
get_timeline(1):start_release_others('!Back of House', 2.0)
-- start timeline 1 and release others in the same group in the default time
get_timeline(1):start_release_others(nil, nil, true)
release#
release([fade])
Releases the timeline. Optionally specify a fade time in seconds as a float, e.g. 2.0.
For example:
-- release timeline 3
get_timeline(3):release(1.0)
toggle#
toggle([fade])
Toggles the playback of the timeline - if it’s running, release it; if it’s not running, start it. Optionally specify a release fade time in seconds as a float, e.g. 2.0.
For example:
-- toggle timeline 2, releasing in time 3 secs if it's running
get_timeline(2):release(3.0)
pause#
pause()
Pauses the timeline.
resume#
resume()
Resumes the timeline.
set_rate#
set_rate(rate)
Sets the rate of playback of the timeline. Set the rate as a float or an integer with range, e.g. 0.1 or Variant(10, 100) would set the rate to 10% of normal speed.
For example:
-- set the rate of timeline 1 to 20% of normal speed
get_timeline(1):set_rate(0.2)
-- set the rate of timeline 2 to 30% of normal speed
get_timeline(2):set_rate(Variant(30,100))
set_position#
There are multiple overloaded calling parameters:
set_position(position)
Legacy behaviour, operates the same as set_position(Timeline.RELATIVE, position)
set_position(Timeline.RELATIVE, position)
Jumps playback of a timeline to a relative position within the timeline. Set position as a float or an integer with range, e.g. 0.1 or Variant(10, 100) would set the position to 10% of the timeline length.
set_position(Timeline.ABSOLUTE, position)
Jumps playback of a timeline to an absolute position within the timeline. Set position as a float or an integer, as the absolute timeline position in seconds.
set_position(Timeline.FLAG, flag_name)
Jumps playback of a timeline to the position of first matching timeline flag. Set the flag_name as a string, matching the name of the target timeline flag.
For example:
-- set the position of timeline 1 to 50% of timeline length
get_timeline(1):set_position(Timeline.RELATIVE, 0.5)
-- set the position of timeline 2 to 20% of timeline length
get_timeline(2):set_position(Timeline.RELATIVE, Variant(2,10))
-- set the position of timeline 3 to 180 seconds
get_timeline(3):set_position(Timeline.ABSOLUTE, 180)
-- set the position of timeline 4 to 12.34 seconds
get_timeline(4):set_position(Timeline.ABSOLUTE, 12.34)
-- set the position of timeline 5 to the "Start sparkle" flag
get_timeline(5):set_position(Timeline.FLAG,"Start sparkle")
set_default_source#
Set the time source for the timeline to the default.
For example:
get_timeline(1):set_default_source()
set_timecode_source#
set_timecode_source(timecodeBus[, offset])
Set a timecode source for the timeline according to the parameters:
Parameter |
Value Type |
Description |
Value Example |
|---|---|---|---|
|
integer |
Integer value of constants: |
|
|
integer |
Optional offset to apply to the timecode, in milliseconds |
|
set_audio_source#
set_audio_source(audioBus, band, channel[, peak])
Set a audio band as the time source for the timeline according to the parameters:
Parameter |
Value Type |
Description |
Value Example |
|---|---|---|---|
|
integer |
Integer value of constants: |
|
|
integer |
The audio band to sample (number of bands depends on audio source configuration; 0 => volume) |
|
|
integer |
Integer value of constants: |
|
|
boolean |
Optional. Whether to use the peak levels from the audio band as the time source input (default false) |
|