Tone.TimeBase
↳ EXTENDS ToneTone.TimeBase is a flexible encoding of time which can be evaluated to and from a string. Parsing code modified from https://code.google.com/p/tapdigit/ Copyright 2011 2012 Ariya Hidayat, New BSD License
CONSTRUCTOR
new Tone.TimeBase (val
, [ units
]
)
EXAMPLE
Methods
.clone ( )
#
↪ returns
Tone.TimeBase
The new cloned Tone.TimeBase
Return a clone of the TimeBase object.
.div ( )
#
val
The value to divide by
type:
Time
units
Optional units to use with the value.
type:
String
optional
↪ returns
Tone.TimeBase
this
Divide the current value by the given time.
EXAMPLE
.mult ( )
#
val
The value to multiply
type:
Time
units
Optional units to use with the value.
type:
String
optional
↪ returns
Tone.TimeBase
this
Multiply the current value by the given time.
EXAMPLE
.set ( )
#
exprString
type:
String
↪ returns
Tone.TimeBase
this
Repalce the current time value with the value given by the expression string.
.sub ( )
#
val
The value to subtract
type:
Time
units
Optional units to use with the value.
type:
String
optional
↪ returns
Tone.TimeBase
this
Subtract the value from the current time.
EXAMPLE
.add ( )
#
val
The value to add
type:
Time
units
Optional units to use with the value.
type:
String
optional
↪ returns
Tone.TimeBase
this
Add to the current value.