Merge from vendor branch TNFTP:
[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.7 2007/04/27 08:49:42 swildner Exp $
36 .\"
37 .Dd April 22, 2007
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 f Ar frequency
52 .Op Fl s
53 .Op Ar string ...
54 .Sh DESCRIPTION
55 The command
56 .Nm
57 read the given input and reformat it in the form of morse code.
58 Acceptable input are command line arguments or the standard input.
59 .Pp
60 Available options:
61 .Bl -tag -width flag
62 .It Fl s
63 The
64 .Fl s
65 option produces dots and dashes rather than words.
66 .It Fl o
67 Write 16bit signed, 44.1kHz native endian sound data
68 to the file specified by
69 .Fl P ,
70 or, if not specified, to standard out.
71 .It Fl p
72 Send morse the real way. This only works if your system has
73 .Xr sound 4
74 support.
75 .It Fl P Ar dspdevice
76 Select a different dsp device from the default
77 .Pa /dev/dsp .
78 .It Fl w Ar speed
79 Set the sending speed in words per minute. If not specified the default
80 speed of 20 WPM is used.
81 .It Fl f Ar frequency
82 Set the sidetone frequency to something other than the default 600 Hz.
83 .It Fl d Ar device
84 Similar to
85 .Fl p ,
86 but use the RTS line of
87 .Ar device
88 (which must by a tty device)
89 in order to emit the morse code.
90 .It Fl e
91 echo each character before it is sent, used together with either
92 .Fl p
93 or
94 .Fl d .
95 .El
96 .Pp
97 The
98 .Fl w
99 and
100 .Fl f
101 flags only work in conjunction with either the
102 .Fl p
103 or the
104 .Fl d
105 flag.
106 .Pp
107 Not all prosigns have corresponding characters. Use
108 angle brackets to create a ligature, like
109 .Ql <KA> .
110 The more common prosigns are
111 .Ql =
112 for
113 .Em BT ,
114 .Ql \&(
115 for
116 .Em KN
117 and
118 .Ql +
119 for
120 .Em AR .
121 .Pp
122 Using flag
123 .Fl d Ar device
124 it is possible to key an external device, like a sidetone generator with
125 a headset for training purposes, or even your ham radio transceiver.  For
126 the latter, simply connect an NPN transistor to the serial port
127 .Ar device ,
128 emitter connected to ground, base connected through a resistor
129 (few kiloohms) to RTS, collector to the key line of your transceiver
130 (assuming the transceiver has a positive key supply voltage and is keyed
131 by grounding the key input line).  A capacitor (some nanofarads) between
132 base and ground is advisable to keep stray RF away,
133 and to suppress the
134 minor glitch that is generated during program startup.
135 .Sh ENVIRONMENT
136 If your
137 .Ev LC_CTYPE
138 locale codeset is
139 .Ql KOI8-R ,
140 characters with the high-order bit set are interpreted as
141 Cyrillic characters.  If your
142 .Ev LC_CTYPE
143 locale codeset is
144 .Ql ISO8859-1
145 compatible,
146 they are interpreted
147 as belonging to the
148 .Ql ISO-8859-1
149 character set.
150 .Sh SEE ALSO
151 .Xr sound 4
152 .Sh HISTORY
153 Sound support for
154 .Nm
155 added by
156 .An Lyndon Nerenberg (VE7TCP/VE6BBM) Aq lyndon@orthanc.com
157 and later converted to use
158 .Xr sound 4
159 by
160 .An Simon 'corecode' Schubert Aq corecode@fs.ei.tum.de .
161 .Pp
162 Ability to key an external device added by
163 .An J\(:org Wunsch
164 (DL8DTL).
165 .Sh BUGS
166 Only understands a few European characters
167 (German and French),
168 no Asian characters,
169 and no continental landline code.
170 .Pp
171 Sends a bit slower than it should due to system overhead. Some people
172 would call this a feature.