MORSE is a Morse code training program for Unix‐like systems. It is based on an old MS‐DOS program from 1996 for Soundblaster Pro. This Unix incarnation is not quite as featureful as the DOS one, but it’s still useful.
http://matsp888.no-ip.org/~mats/hamradio/software/morse/
Every piece of open source software is useful - it works very well and produces nice sounding code.
Here are two tiny suggestion to make it follow the principle of least surprise:
When I played around with it, of course I wanted to see how fast it goes and set the speed to 999 WPM which worked just as expected. In calc_samples you decrease the rise / decay time from the default value of 5 ms to something that makes more sense if otherwise the rise + decay would, at that speed, not allow that the full volume is reached. The new rise/decay time was 0,600601 ms.
I then entered the menu to set the tone parameters, but it didn't accept just pressing enter, when I wanted to confirm this value again (after changing the frequency). That's because the lowest allowed value for the rise / decay time is 1 ms and I had to enter a value of 1 or greater manually.
Another surprise came when exiting: While in the menu both upper and lower case letters work, to confirm to quit a "Y" didn't do it, it had to be "y".
Nitpicking? You bet! Feel free to ignore :-D
73
Fabian