Timeline#
A Timeline
object is returned from get_timeline.
Properties#
Property |
Value Type |
Description |
Value Example |
---|---|---|---|
|
string |
Timeline name |
|
|
string |
Timeline group name ( |
|
|
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#
A timeline will be in one of the following states:
Timeline.NONE
The timeline has never been run (since the last reset of the controller).
Timeline.RUNNING
The timeline is running (although might not be actively controlling outputs - see the
onstage
property).
Timeline.PAUSED
The timeline has been paused by another action.
Timeline.HOLDING_AT_END
The timeline has reached the end, and is holding.
Timeline.RELEASED
The timeline has been run and has now been released.
Member functions#
The following are member functions of Timeline
objects.
start#
start()
Starts the timeline. For example:
-- start timeline 1
get_timeline(1):start()
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#
set_position(position)
Jumps the position of playback of the timeline. Set the 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.
For example:
-- set the position of timeline 1 to 50% of timeline length
get_timeline(1):set_position(0.5)
-- set the position of timeline 2 to 20% of timeline length
get_timeline(2):set_position(Variant(2,10))
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) |
|