-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMorsConv.guide
141 lines (84 loc) · 6.61 KB
/
MorsConv.guide
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
@DATABASE MorsConv.guide
@$VER: MorsConv.guide 2.3 (03.04.2024)
@AUTHOR: RastPort
@WORDWRAP
@WIDTH 80
@NODE Main "MorsConv"
@{B}MorsConv 2.3@{UB}
MorsConv is a modular Morse code generator. It can convert a text, given as commandline argument, to various forms of Morse code. MorsConv is a shell command, it has no GUI.
@{B}Installation@{UB}
Copy MorsConv executable somewhere in your system command path (for example to C:).
@{B}Usage@{UB}
@{FG SHINE}MorsConv <text> [MODE=<module>] [module controls]@{FG TEXT}
The first argument of MorsConv is a text to convert. If the text contains spaces, it should be quoted. Morse code has no concept of small and capital letters, so text is automatically capitalized before conversion. Characters, which have no representation in Morse code, are skipped silently. Current version of MorsConv supports following set of characters:
@{FG SHINE}!"$&'()+,-./0123456789:;=?@ABCDEFGHIJKLMNOPQRSTUVWXYZ_@{FG TEXT}
MODE argument specifies output mode to use. Mode names are case insensitive. If MODE is omitted, CON mode is the default.
Following optional arguments can be used to modify the output form of Morse code. Set of arguments available depends on selected output mode.
@{B}Output modes@{UB}
@{" CON " LINK modcon} Replaces Morse code elements with texts.
@{" COUNT " LINK modcount} Counts Morse code elements.
@{" 8SVX " LINK mod8svx} Generates IFF 8SVX audio file.
@{" WAVE " LINK modwave} Generates RIFF WAVE audio file.
@ENDNODE
@NODE modcon "CON mode"
@{B}CON@{UB}
Prints textual representation of Morse code to the standard output. Usually it means the CLI window, MorsConv is launched in. Standard AmigaDOS output redirection may be used to write the Morse code to a file or other DOS device.
Each Morse code element, including three kinds of pauses, may be replaced with an arbitrary string. String need not to be just one character. Longer strings, as well as empty ones, are supported.
@{B}Control arguments@{UB}
DOT - specifies a string to be used for Morse code short symbol (dot). Default dot string is ".".
DASH - specifies a string to be used for Morse code long symbol (dash). Default dash string is "-".
SPAUSE - specifies a string to be used for Morse code pause between symbols in a character (1 unit pause). Default is empty string.
CPAUSE - specifies a string to be used for Morse code pause between characters in a word (3 units pause). Default is " " (a space).
WPAUSE - specifies a string to be used for Morse code pause between words (7 units pause). Default string is " " (3 spaces).
@{B}Escape sequnces@{UB}
All the above arguments accept a few escape sequences for non-printable characters. Escape character is '%' (percent sign).
* '%n' sequence is replaced with a newline character ($0A).
* '%t' sequence is replaced with a horizontal tab ($09).
* '%%' represents a single percent sign.
Any other sequences are ignored (replaced with nothing).
These sequences allow for vertical and/or columnar output of Morse code.
@{B}Notes@{UB}
The CON mode appends a newline character at the end of output.
@ENDNODE
@NODE modcount "COUNT mode"
@{B}COUNT@{UB}
Counts Morse code elements. It prints five integer numbers separated by spaces and ended by a newline:
1. Number of dots.
2. Number of dashes.
3. Number of symbol pauses (inside a character).
4. Number of character pauses (inside a word).
5. Number of word pauses.
@{B}Control arguments@{UB}
None.
@{B}Notes@{UB}
Number of Morse characters can be calculated as @{I}character pauses @{UI}+ @{I}word pauses @{UI}+ 1. Note that skipped characters (having no representation in Morse code) are not counted. ASCII spaces are not counted as well, they are just word pauses.
@ENDNODE
@NODE mod8svx "8SVX mode"
@{B}8SVX@{UB}
Generates IFF 8SVX audio file (mono, 8-bit) with Morse code. Audio preserves standard timings with optional extension of pauses according to Farnsworth timing. Sine waveform is used. An ASR envelope is applied to each symbol.
@{B}Control arguments@{UB}
TO - Output file name. Required.
SAMPLERATE=SR - Sampling rate of audio in Hz. Optional. Allowed range: 1000 - 65536. Default: 8000.
PITCH - Tone pitch in Hz. Optional. Allowed range: 100 - 8000. Default: 500. Additional upper limit is sampling rate / 4.
WPM - Speed of the code in words per minute, based on PARIS word. Optional. Allowed range: 5 - 100. Default 20.
REALWPM - Enable Farnsworth timing. Characters are sent at speed specified by WPM. Pauses between characters and words are extended proportionally to obtain average REALWPM code speed. Optional argument, default value is equal to WPM (standard timing). Allowed range: 5 to 100, but must be less than or equal to WPM.
ATTACK - Attack phase of the symbol envelope in miliseconds. Optional. Allowed range: 0 - 50. Default 0.
RELEASE - Release phase of the symbol envelope in miliseconds. Optional. Allowed range: 0 - 50. Default 1.
@{B}Notes@{UB}
Each symbol starts at sine zero crossing. An end of a symbol may be not at zero crossing, and the wave is cut hard. It creates a nasty click. That is why default envelope release time is set to 1 ms, not 0, so the click is suppressed.
To reduce quantization noise make sampling rate evenly divisible by tone pitch.
@ENDNODE
@NODE modwave "WAVE mode"
@{B}WAVE@{UB}
Generates RIFF WAVE audio file (mono, 16-bit) with Morse code. Audio preserves standard timings with optional extension of pauses according to Farnsworth timing. Sine waveform is used. An ASR envelope is applied to each symbol.
@{B}Control arguments@{UB}
TO - Output file name. Required.
SAMPLERATE=SR - Sampling rate of audio in Hz. Optional. Allowed range: 1000 - 192000. Default: 8000.
PITCH - Tone pitch in Hz. Optional. Allowed range: 100 - 8000. Default: 500. Additional upper limit is sampling rate / 4.
WPM - Speed of the code in words per minute, based on PARIS word. Optional. Allowed range: 5 - 100. Default 20.
REALWPM - Enable Farnsworth timing. Characters are sent at speed specified by WPM. Pauses between characters and words are extended proportionally to obtain average REALWPM code speed. Optional argument, default value is equal to WPM (standard timing). Allowed range: 5 to 100, but must be less than or equal to WPM.
ATTACK - Attack phase of the symbol envelope in miliseconds. Optional. Allowed range: 0 - 50. Default 0.
RELEASE - Release phase of the symbol envelope in miliseconds. Optional. Allowed range: 0 - 50. Default 1.
@{B}Notes@{UB}
Each symbol starts at sine zero crossing. An end of a symbol may be not at zero crossing, and the wave is cut hard. It creates a nasty click. That is why default envelope release time is set to 1 ms, not 0, so the click is suppressed.
@ENDNODE