Spotlight
After the Circus

Random Sample
Lunar Eclipse 2008








contact me
jean at geemoo dot ca
Blog

Jun 24, 2009
I've been thinking about learning morse code (AKA CW) for a while, and after last weekend, I've finally convinced myself that I want to do it. So, my first step was to write myself a little script to generate CW practice files that I can listen to on the bus rides to work. Running the script will generate a text file, and an mp3 file. The general idea is that you load up mp3 file onto your ipod, decode the message on paper (or in your head, if you're that good), and then compare it against the text version to see how many mistakes you made.

The script uses an assortment of tools, all of which were fairly easy to acquire. The list comprises the following: QSO, sox, lame, cwpcm and ofcourse bash. You can get the list of tools by doing a apt-get install morse lame sox. cwpcm you have to compile from source, I'm afraid. You can grab it at http://cwtext.sourceforge.net/.

Once you've got all that, run it at your command line, with the number of samples you wish to generate. If you're going to make a large number, I recommend going for coffee. The mp3 conversion step is time consuming. At the top of the script, there are two variables you can play with.. the characters per minute, and the words per minute, which affect the speed that the morse is played at.

# ./gencw.sh 50
cw-4WPM-8CPM-0001....
cw-4WPM-8CPM-0002....
cw-4WPM-8CPM-0003....
<and so on>

You can download the script at http://geemoo.ca/files/gencw.sh.
Tags: linux, radio