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