The context associated with the time value. Used to compute Transport and context-relative timing.
Optionalvalue: TimeValue
The time value as a number, string or object
Optionalunits: TimeBaseUnit
Unit values
Protected_All of the conversion expressions
Protected Optional_The units of time
Protected Optional_The value of the units
ReadonlycontextSet this debug flag to log all events that happen in this class.
ReadonlydefaultThe default units
ReadonlynameThe name of the class
StaticversionThe version number semver
Indicates if the instance was disposed. 'Disposing' an instance means that all of the Web Audio nodes that were created for the instance are disconnected and freed for garbage collection.
Protected_Protected_Protected_Return the bpm
Protected_All of the time encoding expressions
Protected_Return the PPQ or 192 if Transport is not available
Protected_Return the timeSignature
Protected_With no arguments, return 'now'
Protected_Return the current time in whichever context is relevant
Protected_Protected_disconnect and dispose.
Coerce a time type into this units type.
Any time type units
ProtectedlogPrints the outputs to the console log for debugging purposes.
Prints the contents only if either the object has a property
called debug set to true, or a variable called TONE_DEBUG_CLASS
is set to the name of the class.
Quantize the time by the given subdivision. Optionally add a percentage which will move the time value towards the ideal quantized value by that percentage.
The subdivision to quantize to
Optionalpercent: number
Move the time value towards the quantized value by a percentage.
Return the time encoded as Bars:Beats:Sixteenths.
Return the value in hertz
Return the value as a midi note.
Return the time in milliseconds.
Convert a Time to Notation. The notation values are will be the closest representation between 1m to 128th note.
Return the time in samples
Return the time in seconds.
Return the time in ticks.
Evaluate the time value. Returns the time in seconds.
StaticgetReturns all of the default options belonging to the class.
TransportTime is a time along the Transport's timeline. It is similar to Tone.Time, but instead of evaluating against the AudioContext's clock, it is evaluated against the Transport's position. See TransportTime wiki.