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