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