Modulator
interface Modulator {
uuid: string
kind: keyof Modulators
label: string
enabled: boolean
index: number
bipolar: boolean
amount: number
modulations: readonly Modulation[]
valueTracks: readonly ValueTrack[]
addValueTrack<T extends AnyModulator | Modulation>(target: T, parameter: ParameterPath<T>, props?: Partial<Pick<Track, 'enabled'>>): ValueTrack
assign<T extends Automatable>(target: T, parameter: ParameterPath<T>, depth?: number): Modulation
remove(): void
}Common surface of all modulators, created with Project.addModulator
Properties
uuid: string
readonly
Unique id
kind: keyof Modulators
readonly
Modulator type identifier
- See:
label: string
Custom label
enabled: boolean
Enable the modulator
index: number
readonly
Order in the modulator list
bipolar: boolean
Bipolar output (-1 to 1) instead of unipolar (0 to 1) (default true)
amount: number
Output amount (0.0 to 1.0, default 1.0)
modulations: readonly Modulation[]
readonly
All assignments
- See:
valueTracks: readonly ValueTrack[]
readonly
Automation lanes of this modulator's own parameters and assignment depths
- See:
Methods
addValueTrack<
T extends AnyModulator | Modulation,
>(
target: T,
parameter: ParameterPath<T>,
props?: Partial<Pick<Track, 'enabled'>>,
): ValueTrack
Add an automation lane for one of this modulator's parameters or an assignment depth
Type Parameters
TextendsAnyModulator | Modulation
Parameters
target(T) — This modulator or one of its modulationsparameter(ParameterPath<T>) — Parameter path, e.g."rateAbsolute"or"depth"props(Partial<Pick<Track, "enabled">>, optional)
Returns
- See:
assign<
T extends Automatable,
>(
target: T,
parameter: ParameterPath<T>,
depth?: number,
): Modulation
Assign this modulator to a parameter
Type Parameters
TextendsAutomatable
Parameters
target(T) — Any modulatable object (a device, a unit, ...)parameter(ParameterPath<T>) — Parameter path, e.g."cutoff"depth(number, optional) — Modulation depth (-1.0 to 1.0, default 0.25)
Returns
Example
CODE
const lfo = project.addModulator("LFO", {rateSync: 6})
lfo.assign(synth.instrument, "cutoff", 0.5)remove(): void
Remove this modulator including its assignments
Returns
void