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