| Title: | Translate Text to Morse to Sound |
|---|---|
| Description: | Converts a string input to Morse Code and back. Plays the Morse Code as audible dits and dahs (dots and dashes). |
| Authors: | Matt Dray [aut, cre] |
| Maintainer: | Matt Dray <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.1 |
| Built: | 2026-05-18 10:04:21 UTC |
| Source: | https://github.com/matt-dray/remorse |
A mapping of Morse Code signals to letters, digits and punctuation.
morse_lookupmorse_lookup
A named character vector of length 52.
International Morse Code.
Provide a Morse Code string and it will be played over your computer's speakers as dits (dots), dahs (dashes) and pauses.
morse2sfx(string, dit_length = 0.05, play = TRUE)morse2sfx(string, dit_length = 0.05, play = TRUE)
string |
Character. A Morse Code string. See details. |
dit_length |
Numeric. Length of a dit in seconds. The length of a dah
will be three times the |
play |
Logical. Should sounds be played? Defaults to |
Only certain characters can be converted to and from Morse Code.
See the inbuilt morse_lookup dataset. The input will be
composed of dits (or dots, '.'), dahs (or dashes, '-'), dividers around
the dits and dahs that represent a single character ('/') and word
dividers (' ', a space). Ideally it will have been produced using
txt2morse.
Nothing. Sounds will play if play = TRUE.
## Not run: txt2morse("hello there!") |> morse2sfx()## Not run: txt2morse("hello there!") |> morse2sfx()
Provide a string of Morse Code and it'll be converted to the corresponding text.
morse2txt(string)morse2txt(string)
string |
Character. A Morse Code string. See details. |
Only certain characters can be converted to and from Morse Code.
See the inbuilt morse_lookup dataset. The input will be
composed of dits (or dots, '.'), dahs (or dashes, '-'), dividers around
the dits and dahs that represent a single character ('/') and word
dividers (' ', a space). Ideally it will have been produced using
txt2morse.
A character string.
txt2morse("hello there!") |> morse2txt()txt2morse("hello there!") |> morse2txt()
Provide a string of text and it'll be converted to the corresponding string that represents that string in Morse Code.
txt2morse(string)txt2morse(string)
string |
Character. Some text. See details. |
Only certain characters can be converted to and from Morse Code.
See the inbuilt morse_lookup dataset. The output will be
composed of dits (or dots, '.'), dahs (or dashes, '-'), dividers around
the dits and dahs that represent a single character ('/') and word
dividers (' ', a space).
A character string.
txt2morse("hello there!")txt2morse("hello there!")