Tone.Midi
↳ EXTENDS Tone.FrequencyTone.Midi is a primitive type for encoding Time values. Tone.Midi can be constructed with or without the new
keyword. Tone.Midi can be passed into the parameter of any method which takes time as an argument.
CONSTRUCTOR
new Tone.Midi (val
, [ units
]
)
val
The time value.
type:
String
or
Number
units
The units of the value.
type:
String
optional
EXAMPLE
Methods
.transpose ( )
#
interval
type:
Interval
↪ returns
Tone.Frequency
A new transposed frequency
Transposes the frequency by the given number of semitones.
EXAMPLE
↳ inherited from
Tone.Frequency
.toSeconds ( )
#
↪ returns
Seconds
Return the duration of one cycle in seconds.
↳ inherited from
Tone.Frequency
.toTicks ( )
#
↪ returns
Ticks
Return the duration of one cycle in ticks
↳ inherited from
Tone.Frequency
.harmonize ( )
#Takes an array of semitone intervals and returns an array of frequencies transposed by those intervals.
EXAMPLE
↳ inherited from
Tone.Frequency
.toNote ( )
#
↪ returns
Note
Return the value of the frequency in Scientific Pitch Notation
EXAMPLE
↳ inherited from
Tone.TimeBase
.valueOf ( )
#
↪ returns
Seconds
Evaluate the time value. Returns the time in seconds.
↳ inherited from
Tone.TimeBase
.toMilliseconds ( )
#
↪ returns
Milliseconds
Return the time in milliseconds.