The Victorian Internet

Morse Code Straight Key J-38
Morse Code Straight Key J-38 (Photo credit: Whiskeygonebad)

The other week I stumbled across a post about Morse keyers and decided to write some python code for sending and understanding Morse code (this code was updated on the 8th August 2017, because the AVbin DLL was not loading on some machines). Before I describe the code in more detail, a little bit of history wont go amiss.

The first Morse code message was sent on the 24th May, 1844, saying simply:

  • HAPPY    ....  .-  .--.  .--.  -.--
  • MORSE   --  ---  .-.  ...  .
  • CODE      -.-.  ---  -..  .
  • DAY         -..  .-  -.--

Remarkably, some 20 years later in 1866 the first transatlantic telegraph cable was completed and on March 10th, 1876, the first voice message was sent. This initial foray into international communications has been dubbed the “Victorian Internet”.

The python code you can download will allow you to generate Morse with a mouse or from a text file. There is also a program for investigating the relationship between the different codes for each alphanumeric character. The latter program will group the codes into 6 categories, which probably helps with learning. I haven’t found this grouping anywhere else so maybe it’s a little unconventional.

Installation (Windows Only)

Firstly, you need to install Python 2.7 (64 bit) to its default location, which you can download from here. The 32 bit version is here. Secondly, unpack the contents this zip file and then change into the directory called morsecode2017. Thirdly, you should install either AVbin10-win64 or AVbin10-win32, depending on which version of python you installed. Finally check out the the four .bat files in this directory:

  • segment
  • play
  • keyer
  • translate

PORTABLE Python Version (windows only)

If you are not too keen on installing Python then you can download a version of the code containing portable python from here. Unpack the contents and then change into the directory called morsecodePortable where you will see the same four .bat files as listed above.



This program segments the morse code for each character into 6 categories. The categories are:


  • K   -.-
  • R   .-.
  • X   -..-
  • P   .--.


  • E   .
  • I    ..
  • S   ...
  • H   ....


  • T    -
  • M   --
  • O   ---

symmetric (dahs = dits)

  • A   .-
  • N   -.
  • C   -.-.
  • Z   --..

of length 3 with 1 dit or dah

  • D   -..
  • G   --.
  • W  .--
  • U   ..-

of length 4 with 1 dit or dah

  • B   -...
  • L   .-..
  • F   ..-.
  • V   ...-
  • J    .---
  • Y   -.--
  • Q   --.-


This program plays the alphabet.


This program allows you to generate Morse code through your sound card. Move the mouse cursor over the graphics window that opens and then use the left and right mouse buttons to generate dits and dahs respectively.


This program reads in a text file and produces the equivalent Morse. The output produced sounds like Morse but might not be acceptable to a professional coder.

All I can say is that if you like programming and/or just reading about Morse code then these programs are a good place to start.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s