/ fm / liveswitch / dtmf / Tone
Class: Tone
liveswitch.dtmf.Tone
A DTMF (telephone-event) tone.
Table of contents
Constructors
Methods
- clone
- fmliveswitchdtmfToneInit
- getDuration
- getEnd
- getTypeString
- getValue
- toJson
- toString
- fromJson
- fromJsonArray
- fromToneString
- getA
- getAValue
- getB
- getBValue
- getC
- getCValue
- getD
- getDValue
- getEight
- getEightValue
- getEmpty
- getEmptyValue
- getFive
- getFiveValue
- getFour
- getFourValue
- getHash
- getHashValue
- getNine
- getNineValue
- getOne
- getOneValue
- getPause
- getPauseDuration
- getPauseValue
- getSeven
- getSevenValue
- getSix
- getSixValue
- getStar
- getStarValue
- getThree
- getThreeValue
- getTwo
- getTwoValue
- getZero
- getZeroValue
- toJson
- toJsonArray
- toToneString
Constructors
constructor
+ new Tone(): Tone
Returns: Tone
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:26
+ new Tone(value
: string): Tone
Initializes a new instance of the [[fm.liveswitch.dtmf.tone]] class.
Parameters:
Name | Type | Description |
---|---|---|
value |
string | The value. |
Returns: Tone
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:27
+ new Tone(value
: string, duration
: number): Tone
Initializes a new instance of the [[fm.liveswitch.dtmf.tone]] class.
Parameters:
Name | Type | Description |
---|---|---|
value |
string | The value. |
duration |
number | The duration. |
Returns: Tone
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:34
Methods
clone
▸ clone(): Tone
Clones this instance.
Returns: Tone
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:769
▸ clone(duration
: number): Tone
Clones this instance.
Parameters:
Name | Type | Description |
---|---|---|
duration |
number | The new duration. |
Returns: Tone
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:776
fmliveswitchdtmfToneInit
▸ Private
fmliveswitchdtmfToneInit(): void
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:21
getDuration
▸ getDuration(): number
Gets the duration in milliseconds.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:792
getEnd
▸ getEnd(): boolean
Gets whether this is the final tone raised for the current value.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:805
getTypeString
▸ getTypeString(): string
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:9
getValue
▸ getValue(): string
Gets the value.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:825
toJson
▸ toJson(): string
Serializes to JSON.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:871
toString
▸ toString(): string
Serializes to a string.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:883
fromJson
▸ Static
fromJson(toneJson
: string): Tone
Deserializes from JSON.
Parameters:
Name | Type | Description |
---|---|---|
toneJson |
string | The JSON. |
Returns: Tone
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:128
fromJsonArray
▸ Static
fromJsonArray(tonesJson
: string): Tone[]
Deserializes an array from JSON.
Parameters:
Name | Type | Description |
---|---|---|
tonesJson |
string | The JSON. |
Returns: Tone[]
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:158
fromToneString
▸ Static
fromToneString(toneString
: string): Tone[]
Converts a DTMF tone string into an array of tones. Each tone will have a duration of 100ms and an inter-tone gap of 100ms.
Parameters:
Name | Type | Description |
---|---|---|
toneString |
string | The tone string. |
Returns: Tone[]
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:176
▸ Static
fromToneString(toneString
: string, duration
: number): Tone[]
Converts a DTMF tone string into an array of tones. Each tone will have an inter-tone gap of 100ms.
Parameters:
Name | Type | Description |
---|---|---|
toneString |
string | The tone string. |
duration |
number | The duration, in milliseconds (minimum of 40, maximum of 2,000). |
Returns: Tone[]
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:185
▸ Static
fromToneString(toneString
: string, duration
: number, interToneGap
: number): Tone[]
Converts a DTMF tone string into an array of tones.
Parameters:
Name | Type | Description |
---|---|---|
toneString |
string | The tone string. |
duration |
number | The duration, in milliseconds (minimum of 40, maximum of 2,000). |
interToneGap |
number | The time between tones, in milliseconds (minimum of 40). |
Returns: Tone[]
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:194
getA
▸ Static
getA(): Tone
Gets A tone.
Returns: Tone
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:231
getAValue
▸ Static
getAValue(): string
Gets the A value ("A").
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:243
getB
▸ Static
getB(): Tone
Gets the B tone.
Returns: Tone
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:255
getBValue
▸ Static
getBValue(): string
Gets the B value ("B").
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:267
getC
▸ Static
getC(): Tone
Gets the C tone.
Returns: Tone
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:279
getCValue
▸ Static
getCValue(): string
Gets the C value ("C").
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:291
getD
▸ Static
getD(): Tone
Gets the D tone.
Returns: Tone
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:303
getDValue
▸ Static
getDValue(): string
Gets the D value ("D").
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:315
getEight
▸ Static
getEight(): Tone
Gets the eight tone.
Returns: Tone
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:327
getEightValue
▸ Static
getEightValue(): string
Gets the eight value ("8").
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:339
getEmpty
▸ Static
getEmpty(): Tone
Gets the empty tone.
Returns: Tone
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:351
getEmptyValue
▸ Static
getEmptyValue(): string
Gets the empty value ("").
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:363
getFive
▸ Static
getFive(): Tone
Gets the five tone.
Returns: Tone
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:375
getFiveValue
▸ Static
getFiveValue(): string
Gets the five value ("5").
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:387
getFour
▸ Static
getFour(): Tone
Gets the four tone.
Returns: Tone
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:399
getFourValue
▸ Static
getFourValue(): string
Gets the four value ("4").
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:411
getHash
▸ Static
getHash(): Tone
Gets the hash tone.
Returns: Tone
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:423
getHashValue
▸ Static
getHashValue(): string
Gets the hash value ("#").
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:435
getNine
▸ Static
getNine(): Tone
Gets the nine tone.
Returns: Tone
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:447
getNineValue
▸ Static
getNineValue(): string
Gets the nine value ("9").
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:459
getOne
▸ Static
getOne(): Tone
Gets the one tone.
Returns: Tone
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:471
getOneValue
▸ Static
getOneValue(): string
Gets the one value ("1").
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:483
getPause
▸ Static
getPause(): Tone
Gets the pause tone.
Returns: Tone
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:495
getPauseDuration
▸ Static
getPauseDuration(): number
Gets the pause duration in milliseconds (2000).
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:507
getPauseValue
▸ Static
getPauseValue(): string
Gets the pause value (",").
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:519
getSeven
▸ Static
getSeven(): Tone
Gets the seven tone.
Returns: Tone
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:531
getSevenValue
▸ Static
getSevenValue(): string
Gets the seven value ("7").
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:543
getSix
▸ Static
getSix(): Tone
Gets the six tone.
Returns: Tone
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:555
getSixValue
▸ Static
getSixValue(): string
Gets the six value ("6").
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:567
getStar
▸ Static
getStar(): Tone
Gets the star tone.
Returns: Tone
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:579
getStarValue
▸ Static
getStarValue(): string
Gets the star value ("*").
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:591
getThree
▸ Static
getThree(): Tone
Gets the three tone.
Returns: Tone
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:603
getThreeValue
▸ Static
getThreeValue(): string
Gets the three value ("3").
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:615
getTwo
▸ Static
getTwo(): Tone
Gets the two tone.
Returns: Tone
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:627
getTwoValue
▸ Static
getTwoValue(): string
Gets the two value ("2").
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:639
getZero
▸ Static
getZero(): Tone
Gets the zero tone.
Returns: Tone
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:651
getZeroValue
▸ Static
getZeroValue(): string
Gets the zero value ("0").
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:663
toJson
▸ Static
toJson(tone
: Tone): string
Serializes to JSON.
Parameters:
Name | Type |
---|---|
tone |
Tone |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:675
toJsonArray
▸ Static
toJsonArray(tones
: Tone[]): string
Serializes an array to JSON.
Parameters:
Name | Type | Description |
---|---|---|
tones |
Tone[] | The array. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:692
toToneString
▸ Static
toToneString(tones
: Tone[]): string
Converts an array of DTMF tones into a tone string. This discards duration and inter-tone gap data.
Parameters:
Name | Type | Description |
---|---|---|
tones |
Tone[] | The tones. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/dtmf/Tone.ts:706