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