Merge branch 'vendor/LIBARCHIVE'
[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.10 2008/05/30 22:58:08 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 .Fl W ,
108 and
109 .Fl f
110 flags only work in conjunction with either the
111 .Fl p
112 or the
113 .Fl d
114 flag.
115 .Pp
116 Not all prosigns have corresponding characters. Use
117 angle brackets to create a ligature, like
118 .Ql <KA> .
119 The more common prosigns are
120 .Ql =
121 for
122 .Em BT ,
123 .Ql \&(
124 for
125 .Em KN
126 and
127 .Ql +
128 for
129 .Em AR .
130 .Pp
131 Using flag
132 .Fl d Ar device
133 it is possible to key an external device, like a sidetone generator with
134 a headset for training purposes, or even your ham radio transceiver.  For
135 the latter, simply connect an NPN transistor to the serial port
136 .Ar device ,
137 emitter connected to ground, base connected through a resistor
138 (few kiloohms) to RTS, collector to the key line of your transceiver
139 (assuming the transceiver has a positive key supply voltage and is keyed
140 by grounding the key input line).  A capacitor (some nanofarads) between
141 base and ground is advisable to keep stray RF away,
142 and to suppress the
143 minor glitch that is generated during program startup.
144 .Sh ENVIRONMENT
145 If your
146 .Ev LC_CTYPE
147 locale codeset is
148 .Ql KOI8-R ,
149 characters with the high-order bit set are interpreted as
150 Cyrillic characters.  If your
151 .Ev LC_CTYPE
152 locale codeset is
153 .Ql ISO8859-1
154 compatible,
155 they are interpreted
156 as belonging to the
157 .Ql ISO-8859-1
158 character set.
159 .Sh SEE ALSO
160 .Xr sound 4
161 .Sh HISTORY
162 Sound support for
163 .Nm
164 added by
165 .An Lyndon Nerenberg (VE7TCP/VE6BBM) Aq lyndon@orthanc.com
166 and later converted to use
167 .Xr sound 4
168 by
169 .An Simon 'corecode' Schubert Aq corecode@fs.ei.tum.de .
170 .Pp
171 Ability to key an external device added by
172 .An J\(:org Wunsch
173 (DL8DTL).
174 .Sh BUGS
175 Only understands a few European characters
176 (German and French),
177 no Asian characters,
178 and no continental landline code.
179 .Pp
180 Sends a bit slower than it should due to system overhead. Some people
181 would call this a feature.