[manual index][section index]

NAME

morse - a Morse code encoder/decoder

SYNOPSIS

morse [ -dic ] [ -at ] [ -de ] [ -w wpm ] [ -A ampl ] [ -W freq ]

DESCRIPTION

Morse is a program that speaks (encodes) and understands (decodes) Morse code. Morse data can be either in textual format (Morse elements: [.- ]) or in audio format (PCM samples).

Morse expects data to come from stdin, processes it, and and sends the result to stdout. This allows to decouple the various operation modes, and allow multiple variations (using pipes, see the examples below). Moreover it allows to separe signal recording from audio processing and decoding, which eases testing and implementation.

Options
-d
Print debugging messages.
-i
Uses the Enter key, to input on/off morse symbols.
-c
Either checks or sets the audio(3) settings (encoding, speed, bits, channels)
-[at]
Select the data format which can be either: audio (a) or text (t).
-[de]
Either perform Morse decoding (d) or encoding (e).
-w wpm
Set the morse code speed to wpm words per minute.
-A ampl
Set the amplitude of the sinusoidal wave used in the morse audio samples.
-W freq
Set the frequency of the sinusoidal wave used in the morse audio samples.

EXAMPLE

Encode text into morse code and viceversa:
	echo -n morse | morse -e
	echo -n '-- --- .-. ... . ' | morse -d
And to encode into audible morse code and viceversa:
	echo -n '-- --- .-. ... . ' | morse -aec > morse.raw
	morse -ad < morse.raw
Moreover is possible to close the encode/decode loop
	echo -n morse | morse -e | morse -aec | morse -ad
	echo -n morse | morse -e | morse -aec | morse -ad | morse -d
	...
Where the last pipe (|) could be replaced by any medium capable of transmitting the data; either in electronic, audible or RF waves.

This allows to implement a kind of remote control to access devices by sending/receiving morse code. Some interesting articles out there provide some usage ideas/examples for Morse:

- http://www.learnmorsecode.com/

- http://en.wikipedia.org/wiki/Text_messaging

- http://www.staton.us/electronics/cpc/cpc.html

- http://5b4az.chronos.org.uk/pages/morse.html

STATUS

Morse is a work in progress, an experiment performed to learn (by doing something useful/interesting) about the fields of Morse, audio & signal processing.

Ideas, suggestions and improvements are welcome.

REFERENCES

``The Radio Amateur's Handbook (ARRL)'',
http://www.arrl.org/catalog/?words=arrl+handbook , for details about radio and Morse code, eg. the alphabet, encoding and decoding.

``The Scientist and Engineer's Guide to Digital Signal Processing'',
http://www.dspguide.com/pdfbook.htm and

``The Spectral Audio Signal Processing book''
http://www.dsprelated.com/dspbooks/sasp , for details related with Goertzel tone detection algorithm and digital audio.

SOURCE

/appl/cmd/nds/morse.b

SEE ALSO

audio(6), audio(3)

MORSE(1 ) Rev:  Sun Mar 15 11:06:21 GMT 2009