Class: LFO

LFO

new LFO(rate, outputMin, outputMax)

Low Frequency Oscillator LFO produces an output signal which can be attached to an AudioParam for constant control over that parameter the LFO can also be synced to the transport
Parameters:
Name Type Argument Description
rate number
outputMin number <optional>
outputMax number <optional>
Source:

Extends

Members

<private> _connect

pointer to the parent's connect method
Source:

isFrequency

true if the input is in the format number+hz i.e.: 10hz
Inherited From:
Source:

isNotation

tests if a string is musical notation i.e.: 4n = quarter note 2m = two measures 8t = eighth-note triplet
Inherited From:
Source:

isTransportTime

tests if a string is transportTime i.e. : 1:2:0 = 1 measure + two quarter notes + 0 sixteenth notes
Inherited From:
Source:

oscillator :Tone.Oscillator

Type:
Source:

scaler :Tone.Scale

Type:
Source:

Methods

connect(param)

override the connect method so that it 0's out the value if attached to an AudioParam
Parameters:
Name Type Description
param AudioNode | AudioParam | Tone
Source:

notationToSeconds(notation, bpm, timeSignature) → {number}

convert notation format strings to seconds
Parameters:
Name Type Argument Description
notation string
bpm number <optional>
timeSignature number <optional>
Inherited From:
Source:
Returns:
Type
number

receive(channelName)

recieve the input from the desired channelName to the input gain of 'this' node.
Parameters:
Name Type Description
channelName string
Inherited From:
Source:

send(channelName, amount) → {GainNode}

send signal to a channel name
Parameters:
Name Type Description
channelName string
amount number
Inherited From:
Source:
Returns:
Type
GainNode

setFrequency(rate)

set the frequency
Parameters:
Name Type Description
rate number
Source:

setMax(min)

set the maximum output of the LFO
Parameters:
Name Type Description
min number
Source:

setMin(min)

set the minimum output of the LFO
Parameters:
Name Type Description
min number
Source:

setType(type)

set the waveform of the LFO
Parameters:
Name Type Description
type string
Source:

start(time)

start the LFO
Parameters:
Name Type Description
time Tone.Time
Source:

stop(time)

stop the LFO
Parameters:
Name Type Description
time Tone.Time
Source:

sync()

Sync the start/stop/pause to the transport and the frequency to the bpm of the transport
Source:

toFrequency(time) → {number}

convert a time to a frequency
Parameters:
Name Type Description
time Tone.Time
Inherited From:
Source:
Returns:
the time in hertz
Type
number

toSeconds(time, bpm, timeSignature)

convert Tone.Time into seconds unlike the method which it overrides, this takes into account transporttime and musical notation
Parameters:
Name Type Argument Description
time Tone.Time
bpm number <optional>
timeSignature number <optional>
Inherited From:
Source:

toTransportTime(seconds, bpm, timeSignature) → {string}

Convert seconds to the closest transportTime in the form measures:quarters:sixteenths
Parameters:
Name Type Argument Description
seconds Tone.Time
bpm number <optional>
timeSignature number <optional>
Inherited From:
Source:
Returns:
Type
string

transportTimeToSeconds(transportTime, bpm, timeSignature) → {number}

convert transportTime into seconds i.e.: 4:2:3 == 4 measures + 2 quarters + 3 sixteenths
Parameters:
Name Type Argument Description
transportTime string
bpm number <optional>
timeSignature number <optional>
Inherited From:
Source:
Returns:
seconds
Type
number

unsync()

unsync the LFO from transport control
Source: