Minor corrections.
[games.git] / games / morse / morse.6
1 .\" Copyright (c) 2000 Alexey Zelkin.  All rights reserved.
2 .\" Copyright (c) 1988, 1991, 1993
3 .\"     The Regents of the University of California.  All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in the
12 .\"    documentation and/or other materials provided with the distribution.
13 .\" 3. All advertising materials mentioning features or use of this software
14 .\"    must display the following acknowledgement:
15 .\"     This product includes software developed by the University of
16 .\"     California, Berkeley and its contributors.
17 .\" 4. Neither the name of the University nor the names of its contributors
18 .\"    may be used to endorse or promote products derived from this software
19 .\"    without specific prior written permission.
20 .\"
21 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 .\" SUCH DAMAGE.
32 .\"
33 .\"     @(#)bcd.6       8.1 (Berkeley) 5/31/93
34 .\" $FreeBSD: src/games/morse/morse.6,v 1.4.2.7 2003/01/26 02:57:27 keramida Exp $
35 .\" $DragonFly: src/games/morse/morse.6,v 1.9 2008/05/30 22:51:31 swildner Exp $
36 .\"
37 .Dd May 30, 2008
38 .Dt MORSE 6
39 .Os
40 .Sh NAME
41 .Nm morse
42 .Nd reformat input as morse code
43 .Sh SYNOPSIS
44 .Nm
45 .Op Fl o
46 .Op Fl p
47 .Op Fl P Ar dspdevice
48 .Op Fl d Ar device
49 .Op Fl e
50 .Op Fl w Ar speed
51 .Op Fl W Ar speed
52 .Op Fl f Ar frequency
53 .Op Fl s
54 .Op Ar string ...
55 .Sh DESCRIPTION
56 The command
57 .Nm
58 read the given input and reformat it in the form of morse code.
59 Acceptable input are command line arguments or the standard input.
60 .Pp
61 Available options:
62 .Bl -tag -width flag
63 .It Fl s
64 The
65 .Fl s
66 option produces dots and dashes rather than words.
67 .It Fl o
68 Write 16bit signed, 44.1kHz native endian sound data
69 to the file specified by
70 .Fl P ,
71 or, if not specified, to standard out.
72 .It Fl p
73 Send morse the real way. This only works if your system has
74 .Xr sound 4
75 support.
76 .It Fl P Ar dspdevice
77 Select a different dsp device from the default
78 .Pa /dev/dsp .
79 .It Fl w Ar speed
80 Set the sending speed in words per minute. If not specified the default
81 speed of 20 WPM is used.
82 .It Fl W Ar speed
83 Enable Farnsworth keying.
84 The argument to
85 .Fl w
86 will set the character keying speed and the argument to
87 .Fl W
88 will set the spacing between character and words.
89 .It Fl f Ar frequency
90 Set the sidetone frequency to something other than the default 600 Hz.
91 .It Fl d Ar device
92 Similar to
93 .Fl p ,
94 but use the RTS line of
95 .Ar device
96 (which must by a tty device)
97 in order to emit the morse code.
98 .It Fl e
99 echo each character before it is sent, used together with either
100 .Fl p
101 or
102 .Fl d .
103 .El
104 .Pp
105 The
106 .Fl w
107 and
108 .Fl f
109 flags only work in conjunction with either the
110 .Fl p
111 or the
112 .Fl d
113 flag.
114 .Pp
115 Not all prosigns have corresponding characters. Use
116 angle brackets to create a ligature, like
117 .Ql <KA> .
118 The more common prosigns are
119 .Ql =
120 for
121 .Em BT ,
122 .Ql \&(
123 for
124 .Em KN
125 and
126 .Ql +
127 for
128 .Em AR .
129 .Pp
130 Using flag
131 .Fl d Ar device
132 it is possible to key an external device, like a sidetone generator with
133 a headset for training purposes, or even your ham radio transceiver.  For
134 the latter, simply connect an NPN transistor to the serial port
135 .Ar device ,
136 emitter connected to ground, base connected through a resistor
137 (few kiloohms) to RTS, collector to the key line of your transceiver
138 (assuming the transceiver has a positive key supply voltage and is keyed
139 by grounding the key input line).  A capacitor (some nanofarads) between
140 base and ground is advisable to keep stray RF away,
141 and to suppress the
142 minor glitch that is generated during program startup.
143 .Sh ENVIRONMENT
144 If your
145 .Ev LC_CTYPE
146 locale codeset is
147 .Ql KOI8-R ,
148 characters with the high-order bit set are interpreted as
149 Cyrillic characters.  If your
150 .Ev LC_CTYPE
151 locale codeset is
152 .Ql ISO8859-1
153 compatible,
154 they are interpreted
155 as belonging to the
156 .Ql ISO-8859-1
157 character set.
158 .Sh SEE ALSO
159 .Xr sound 4
160 .Sh HISTORY
161 Sound support for
162 .Nm
163 added by
164 .An Lyndon Nerenberg (VE7TCP/VE6BBM) Aq lyndon@orthanc.com
165 and later converted to use
166 .Xr sound 4
167 by
168 .An Simon 'corecode' Schubert Aq corecode@fs.ei.tum.de .
169 .Pp
170 Ability to key an external device added by
171 .An J\(:org Wunsch
172 (DL8DTL).
173 .Sh BUGS
174 Only understands a few European characters
175 (German and French),
176 no Asian characters,
177 and no continental landline code.
178 .Pp
179 Sends a bit slower than it should due to system overhead. Some people
180 would call this a feature.