Skip to content

ValueChannel

rech edited this page Jun 15, 2026 · 1 revision

Description

Returns a value from timing input.

Remarks

_

Properties


Name Type Description
name string The name of the channel

Methods


find(name)

Description

Find the channel within the sub-channels that composed this.

Parameters

Name Type Description
name string Name of the channel to find

Return types

ValueChannel

Remarks

Returns nil if no channel was found.

This method is useful to detect if you have previously created a channel for a prop of a controller, which is a common need when working with note groups.

Example

local toFind = Channel.keyframe()
toFind.name = "myChannel"
track.colorA = toFind * mixedChannel
local foundChannel = track.colorA.find("myChannel")
foundChannel.addKey(0, 255)

valueAt(timing)

Description

Calculate the value at a timing point.

Parameters

Name Type Description
timing number Timing point to calculate at

Return types

number

Remarks

The implementation of this method differs for each channel type.

Example

local saw = Channel.saw("so", Channel.constant(1000), Channel.constant(1), Channel.constant(0), Channel.constant(0))
log(saw.valueAt(500))
local keyChannel = Channel.keyframe()
track.colorA.addKey(1000, keyChannel.valueAt(1000))
track.colorA.addKey(2000, 0)

Operators

Operator Return type Description
+ ValueChannel Add two value channels, or a value channel with a number, or a number with a value channel together
- ValueChannel Subtract two value channels, or a value channel with a number, or a number with a value channel together
* ValueChannel Multiply two value channels, or a value channel with a number, or a number with a value channel together
/ ValueChannel Divide one value channel with another, or a value channel with a number, or a number with a value channel
% ValueChannel Modulo one value channel with another, or a value channel with a number, or a number with a value channel

Clone this wiki locally