pymorse

pymorse Developer's Guide

 

Table of Contents

Overview

See code. The algorithm comes from cwtext. I cached the translations to improve performance. The hard part is evolvingthe fake qso generator

Architecture

As a standalone, it accepts commandline options to set global ("g_") parameters. As an import library you need to set these prior to running the "main".

Then, based on session type, it calls a session generator. Most are pretty straightforward,. The "qso" generator uses global lists and random numbers to generate a fake qso.

The results go to a ".txt" file. This is used to generate ascii morse code, saved in a ".mor" file. The morse data is also used to generate a ".pcm" (pulse code modulation) audio file.

The driver script can print the txt before the pcm (to be used as hints), or after the pcm (to be used to check the listener's work) or both. See "test/go".

Edit Cycle

The work takes place in "test". There is a "go" script which can be used to drive the app when experimenting with new features, or when actually using it. Use option "--test" to make small files while experimenting.

To formally test new features, add a case to "basic_tests.py", and edit/"go_test"/"listen" until satisfied. Then "approve" the test.

The tests assume presence of oracles in test/testdata. Yet these are too large to bundle in the taball. So when first starting on a new system, run "go_test", and the "approve" the tests which fail due to missing pcms, e.g "approve sounds".

 
Creator: Harry George
Updated/Created: 2004-10-31