Morse Practice
This page describes the Java source files used by
MorsePractice, debug logs,
and provides some information on the Sun audio classes MorsePractice uses.
Here are the Java source files used by the application. You may use
them to develop your applets and applications for personal use or
"Open Source" distribution.
Click here for documentation on
the Java classes and methods.
- src.zip
- src.zip contains all Java source files in a 100 Kbyte ZIP archive.
- AlertDialog.java
- AlertDialog.java displays a simple text dialog.
- AppletFramework.java
- AppletFramework.java runs an Applet in an application context.
- AudioSynthesizer.java
- AudioSynthesizer.java creates the signal source (either a
tone or silence) that will be played. It is not a general
audio synthesizer, but is useful only for Morse Code.
It is based on
SynthAudioClip.java,
Copyright © 1996 by
Jef Poskanzer. Please see
SynthAudioClip.java for the original source,
copyright, and disclaimers.
- Comparable.java
- Comparable.java is an interface used by the Sort class.
- EditTextArea.java
- EditTextArea.java is a text area that supports the Edit
Menu, including Undo.
- EditTextAreaListener.java
- EditTextAreaListener.java is the interface that connects an
EditTextArea to the component that manages the Edit Menu.
- EtchedBorder.java
- EtchedBorder.java draws eye-candy for the user interface.
It is based on software developed by Taligent Inc. See the
source code for Taligent's copyright and permission notice.
- IntegerField.java
- IntegerField.java is a dialog field that only accepts
integer values.
- KochTextField.java
- KochTextField.java is a text field that shows and selects
the symbols used for Koch random symbol training..
- Main.java
- Main.java is a trivial main program that simplifies starting
MorsePractice on Windows or Linux.
- MacFileUtilities.java
- MacFileUtilities.java contains several Macintosh (MRJ) file
management utilities. They were written using Java class
reflection so they should compile and run on all Java 1.1
implementations (and do nothing on non-Macintosh environments).
- MorseCode.java
- MorseCode.java contains the table of Morse Code characters.
- MorseCodeSender.java
- MorseCodeSender.java converts a Morse Code symbol to tones.
It understands the sun.audio data format.
- MorsePractice
- MorsePractice is a stand-alone MacOS application that runs
MorsePractice directly. This is all you need to run MorsePractice
on a MacOS system that supports MRJ version 2.2 or later.
- MorsePractice Run
- "MorsePractice Run" is a stand-alone MacOS application that launches
the application from MorsePractice.jar. If you put this file and
MorsePractice.jar into the same folder, you should be able to run
MorsePractice on MRJ 2.1.4, however this is untested.
- MorsePractice.java
- MorsePractice.java is the main program. It contains the
user interface.
- MorsePractice.gif
- MorsePractice.gif is a decorative image.
- MorsePractice.hqx
- MorsePractice.hqx is a Macintosh archive containing the
double-clickable application.
- MorsePractice.html
- MorsePractice.html defines a web page that contains the applet.
- MorsePractice.mcp
- MorsePractice.mcp is the MetroWerks java project.
- MorsePractice.mf
- MorsePractice.mf is the JAR manifest file.
- MorsePractice.rsrc
- MorsePractice.rsrc contains icons for the MorsePractice
application. It is only used by the Macintosh build
procedure.
- MorsePracticeFile.java
- MorsePracticeFile.java has some file utilities. Although this
class uses Macintosh-specific routines to manage
the Mac creator and filetype information, it should work
correctly on all Java 1.1 implementations.
- MorsePracticeSupport.html
- MorsePracticeSupport.html is this software description file.
- MRJApp.properties
- MRJApp.properties configures the MacOS application.
- RandomQSO.java
- RandomSentence.java generates random QSO's using
RandomSentence.java to do the generation."
- RandomSentence.java
- RandomSentence.java generates random sentences from
a context-free grammar. It is based on a C utility
I wrote in 1979 and, originally, on a sample in
James Gimpel's "Algorithms in SNOBOL4."
- readme.txt
- readme.txt provides an overview of how to install the sofware.
- ResultPanel.java
- ResultPanel.java shows the text that was sent with incorrectly-received
symbols indicated.
- RotateImageFilter.java
- RotateImageFilter.java is an.ImageFilter that rotates the
source image by 90 degrees. The VerticalLabel class uses
it to draw the confusion matrix label.
- Sort.java
- Sort.java is a generic sort utility.
- Trial.java
- Trial.java manages a random text trial.
- TrialChar.java
- TrialChar.java holds one symbol in a listening trial.
- TrialData.java
- TrialData.java performs the numerical computation displayed
by TrialDialog.java.
- TrialDialog.java
- TrialDialog.java displays the results of a random text trial.
- TrialLabel.java
- TrialLabel.java displays confusion matrix row and column labels.
- TrialMatrix.java
- TrialMatrix.java displays the confusion matrix content.
- TrialPair.java
- TrialPair.java is the data retained by a random text trial.
- TrialScrollPanel.java
- TrialScrollPanel.java contains the entire confusion matrix and
its row and column labels.
- VerticalLabel.java
- VerticalLabel.java draws a string rotated 90 degrees for
one of the confusion matrix labels..
The Sun Audio Package
MorsePractice uses non-standard Java classes to generate sound. Here
are some links that helped me learn how to use these classes:
Please contact me if you find any bugs
in MorsePractice.
Recent changes and bug-fixes
- Added additional international characters and punctuation
marks (as synonyms for prosigns BT, AR, SK) using the
ARRL data and sample QSO's from MEGS.
- Rewrote the synthesizer to eliminate glitches. The disadvantage
of the rewrite is that the application can't be extended
to callback to the user interface to provide "follow the
bouncing ball" progress. On the other hand, the revision
seems to have eliminated the glitches.
- Added edit and file menus. The edit menu can copy text to
and from the Clipboard. The file menu loads to and saves
text from the listening area. The file menu is not useful
in the Applet version.
- Cleaned up the code. Added Undo support to the edit menu.
- Added confusion matrix display. Changed the symbol buttons
to checkboxes to use for training. Added an audio save
menu option. Cleaned up the user interface, not for the
first time, and probably not for the last.
- Messing around with trial data statistics. The numbers
are probably meaningless right now. The goal is to be
able to fiddle with the random statistics to provide
additional training for symbol pairs that the
student is finding troublesome.
- The Clipboard code was rewritten to avoid a null pointer
exception on Linus that occurs if there is no Clipboard
object.
- Added a parameter file. This currently saves the current
data rate, option states, and the selected training set.
Also added a "Koch" field that displays the characters in
training order. This is only useable in the Applet version.
- Fixed a typo in the Koch training list ("0" and "O" were
confused.). Added "selectAll" and "selectNone" menu options.
- Added random QSO's using the grammar from SuperiorMorse,
a Unix program published by Paul J. Drongowski, N20QT
and distributed on the amateur radio FTP site.
(Copyright © 1991 Paul J. Drongowski). 'You may use
it for any non-commercial purposes. This is roughly
equivalent to "fair use."' The grammar synthesizer is
based on one I wrote for Decus C which, in turn, was
based on James Gimpel's "Algorithms in SNOBOL-4."
- Rewrote the sample smoothing to avoid clicks at 30 wpm.
Rewrote the timing computation to match algorithms in
two Unix Morse Code synthesizers, but the results are
still about 3% slow if I use their algorithm exactly.
Fiddled with the numbers until the timing is close
(about +/- 200 msec). Fixed a bug (negative timeout
value) that could appear for long messages.
- More code cleanup. Moved the file creation and browsing
methods to a separate class. Revised the user interface
slightly so the choice between random symbol and random
QSO training is made using a selection popup list.
- Documentation cleanup. Moved all classes into a private
Java package. Ran the 100% Pure Java compatibility test.
- Moved the Mac-specific file utilities into a separate
class to simplify Windows compatibility. The file utilities
should now compile on all Java 1.1 implementations.
- Implemented an Applet version. This omits all file-related
capability (including the parameter state). The Applet
user gets a default code speed and no initial Koch state.
-
Added a non-package Main class to simplify Windows launching.
Also moved the source files into their package hierarchy and
implemented a ZIP distribution. Registered a MacOS creator
type and built a standard double-clickable application.
-
Reorganized the web page and wrote an article for
QST magazine.
-
2000.02.06: Send code example when the user clicks
on the symbol in the Koch list.
-
2000.02.16: Rewrote the confusion matrix display: it's much
faster now. Removed some menu options that haven't been
used (save trials, etc.)
-
2000.02.24 Changed the main window layout so it fits on a
Windows 640x480 display. Added a number of random text options to
augment Koch training. The "check" panel now shows the text that was
sent with errors marked in red.
-
2000.02.25 Cleaned up the trial dialog scrolling panes. Changed
the "Random" selection pull-down to make the window narrower.
-
2000.03.03 Reorganized the project folder. Moved the distribution
to
homepage.mac.com/k6mam/MorsePractice/MorsePractice.html. Removed
Audio support from the applet wrapper (it isn't needed and forces
the application user to have the MRJ-specific libraries on-hand. Use
reflection to get the AudioPlay classes in AudioSynthesizer.java
-
2000.03.05 Fighting Windows Java implementation bugs. Eventually
added a gratuitous image to force proper text alignment. Fixed
tiny random-access script typos.
-
2000.03.07 Finished fighting Windows and Mac. Gave up on MRJ
2.1.4 support, switching over to the 2.2 (PPC-only) application
builder. This works on my office iMac, while the earlier application
would not load. Cleaned up the web page and wrote a readme file.
-
2000.07.28: Rewrote the audio synthesis to support javax.sound
(Java 1.3). The synthesis class was split into two separate classes,
one with data and one with sun.audio (Mac and Java 1.1.8) support.
Added a second package that provides javax.sound (AudioClip)
support. Also, moved the "Options" menu into the dialog so
it was accessable to applet users and removed the 3D-panel
(it has problems on browsers that don't obey component z-order
display constraints).
Copyright © 1999-2000
Martin Minow. All Rights Reserved.
Permission to use, copy, modify, and redistribute this software and its
documentation for personal, non-commercial use is hereby granted provided that
this copyright notice and appropriate documentation appears in all copies. This
software may not be distributed for fee or as part of commercial, "shareware,"
and/or not-for-profit endevors including, but not limited to, CD-ROM collections,
online databases, and subscription services without specific license. The
author makes no expressed or implied warranty of any kind and assumes no
responsibility for errors or omissions. No liability is assumed for any incidental
or consequental damages in connection with or arising out of the use of the
information or program.