Function
Static Public Summary | ||
public |
Get the character-space in ms |
|
public |
Get the dah length in ms |
|
public |
Get the dit length in ms |
|
public |
Get the dit space in ms |
|
public |
fditLength(wpm: *, fwpm: *): integer Get the Farnsworth dit length in ms for a given WPM and Farnsworth WPM. |
|
public |
fwpm(wpm: *, r: *): * Get the Farnsworth WPM for a given WPM and ratio |
|
public |
Convert PCM data to WAV file data. |
|
public |
getDataURI(data: number[], type: string): string |
|
public |
|
|
public |
looksLikeMorse(input: string): boolean this function was deprecated.
Determine whether a string is most likely morse code. |
|
public |
morse2text(morse: string, useProsigns: boolean): {message: string, morse: string, hasError: boolean} this function was deprecated.
Translate morse to text. |
|
public |
Get the dit length ratio for a given WPM and Farnsworth WPM |
|
public |
text2ditdah(text: string, useProsigns: boolean): string this function was deprecated.
Translate text to morse in 'Di-di-dah dah' form. |
|
public |
this function was deprecated.
Translate text to morse in '..- .. / --' form. |
|
public |
this function was deprecated.
Canonicalise morse text. |
|
public |
Get the word-space in ms |
|
public |
Get the WPM for a given dit length in ms |
Static Public
public charSpace(wpm: number, fwpm: number): integer source
import {charSpace} from 'morse-pro/src/morse-pro-wpm.js'
Get the character-space in ms
Return:
integer |
public dahLength(wpm: number): integer source
import {dahLength} from 'morse-pro/src/morse-pro-wpm.js'
Get the dah length in ms
Params:
Name | Type | Attribute | Description |
wpm | number | speed in words per minute |
Return:
integer |
public ditLength(wpm: number): integer source
import {ditLength} from 'morse-pro/src/morse-pro-wpm.js'
Get the dit length in ms
Params:
Name | Type | Attribute | Description |
wpm | number | speed in words per minute |
Return:
integer |
public ditSpace(wpm: number): integer source
import {ditSpace} from 'morse-pro/src/morse-pro-wpm.js'
Get the dit space in ms
Params:
Name | Type | Attribute | Description |
wpm | number | speed in words per minute |
Return:
integer |
public fditLength(wpm: *, fwpm: *): integer source
import {fditLength} from 'morse-pro/src/morse-pro-wpm.js'
Get the Farnsworth dit length in ms for a given WPM and Farnsworth WPM. Note, actual dit-spaces should not be slowed down
Params:
Name | Type | Attribute | Description |
wpm | * | ||
fwpm | * |
Return:
integer |
public fwpm(wpm: *, r: *): * source
import {fwpm} from 'morse-pro/src/morse-pro-wpm.js'
Get the Farnsworth WPM for a given WPM and ratio
Params:
Name | Type | Attribute | Description |
wpm | * | ||
r | * |
Return:
* |
public getData(data: number[], sampleRate: number, bitsPerSample: number): number[] source
import {getData} from 'morse-pro/src/morse-pro-util-riffwave.js'
Convert PCM data to WAV file data.
public getDataURI(data: number[], type: string): string source
import getDataURI from 'morse-pro/src/morse-pro-util-datauri.js'
public getMIMEType(): string source
import {getMIMEType} from 'morse-pro/src/morse-pro-util-riffwave.js'
public looksLikeMorse(input: string): boolean source
import {looksLikeMorse} from 'morse-pro/src/morse-pro-compat.js'
Determine whether a string is most likely morse code.
Params:
Name | Type | Attribute | Description |
input | string | the text |
public morse2text(morse: string, useProsigns: boolean): {message: string, morse: string, hasError: boolean} source
import {morse2text} from 'morse-pro/src/morse-pro-compat.js'
Translate morse to text. Canonicalise the morse first. If something in the morse is untranslatable then it is surrounded by hash-signs ('#') and a hash is placed in the text.
public ratio(wpm: number, fwpm: number): number source
import {ratio} from 'morse-pro/src/morse-pro-wpm.js'
Get the dit length ratio for a given WPM and Farnsworth WPM
public text2ditdah(text: string, useProsigns: boolean): string source
import {text2ditdah} from 'morse-pro/src/morse-pro-compat.js'
Translate text to morse in 'Di-di-dah dah' form.
public text2morse(text: string, useProsigns: boolean): {message: string, morse: string, hasError: boolean} source
import {text2morse} from 'morse-pro/src/morse-pro-compat.js'
Translate text to morse in '..- .. / --' form. If something in the text is untranslatable then it is surrounded by hash-signs ('#') and a hash is placed in the morse.
public tidyMorse(morse: string): string source
import {tidyMorse} from 'morse-pro/src/morse-pro-compat.js'
Canonicalise morse text. Canonical form matches [.-/ ]*, has single spaces between characters, has words separated by ' / ', and has no spaces at the start or end. A single '/' may be returned by this function.
Params:
Name | Type | Attribute | Description |
morse | string | Morse code matching [.-_/| ]* |
public wordSpace(wpm: number, fwpm: number): integer source
import {wordSpace} from 'morse-pro/src/morse-pro-wpm.js'
Get the word-space in ms
Return:
integer |
public wpm(ditLen: *): number source
import {wpm} from 'morse-pro/src/morse-pro-wpm.js'
Get the WPM for a given dit length in ms
Params:
Name | Type | Attribute | Description |
ditLen | * |