Tone.TimeBase

↳ EXTENDS Tone

Tone.TimeBase is a flexible encoding of time which can be evaluated to and from a string.

CONSTRUCTOR

new Tone.TimeBase (
val
, [
units
] )
val

The time value as a number, string or object

type: Time
units

Unit values

type: String
optional

EXAMPLE

Tone.TimeBase(4, "n")
Tone.TimeBase(2, "t")
Tone.TimeBase("2t")
Tone.TimeBase({"2t" : 2})
Tone.TimeBase("2t") + Tone.TimeBase("4n");

Methods

.dispose ( )

#
↪ returns Tone.TimeBase

this

Clean up

</>

.toFrequency ( )

#
↪ returns Frequency

Return the value in hertz

</>

.toMilliseconds ( )

#
↪ returns Milliseconds

Return the time in milliseconds.

</>

.toSamples ( )

#
↪ returns Samples

Return the time in samples

</>

.toSeconds ( )

#
↪ returns Seconds

Return the value in seconds

</>

.valueOf ( )

#
↪ returns Seconds

Evaluate the time value. Returns the time in seconds.

</>
docs generated Sep 15 2019