morsegen and morse2ascii: Since we’re on the subject

I have a couple of other small Morse telegraphy tools in my list, and since we covered cwcp in the last post, it’s probably a good time to throw them into the mix. Here’s morsegen, from Luigi Auriemma.

2014-12-18-6m47421-morsegen

As you can see, morsegen is very straightforward, and really only reads text files and converts the contents into dash-or-dot sequences. No flags or frills, unless you consider the readout of Luigi’s fixed header to be a frill.

In that sense, I would prefer morsegen work a little more like morse, and accept text either as a target, or through a pipe. morsegen seems hard-coded to look for a target file, and read through that.

Which is all neither here nor there, and perhaps if you like, you can ask Luigi’s permission to adjust morsegen. I wonder if that wouldn’t make morsegen nearly identical to morse, though.

Here’s something a little more ambitious, by the same author: morse2ascii.

2014-12-18-6m47421-morse2ascii

The inner workings of morse2ascii are beyond me, but suffice to say that it reads through a wav file, senses the tones, and converts them into text. You can see the analysis and the results in the screenshot, taken from a random sound file borrowed from The Internet. πŸ˜•

As far as I can tell, as someone unskilled in the art of decoding Morse telegraphy, morse2ascii is doing a good job. The file I borrowed was supposedly a training session, working through basic letters and digits before moving into specific sequences. It looks right, anyway.

morse2ascii has the same arrangement as morsegen though, and won’t accept strings and wants a target file. So if you want to stream audio through morse2ascii, you might need to first capture the broadcast, then feed it to morse2ascii. I leave it to you to solve.

Both programs compile and run fine in Arch; morse2ascii is in AUR if you prefer. Debian has both prepackaged. Debian users get all the cool toys. … πŸ˜‰

Advertisements

4 thoughts on “morsegen and morse2ascii: Since we’re on the subject

  1. Ander GM

    If you are into morse code, here there are some stations to tune : http://websdr.ewi.utwente.nl:8901/m.html

    Use a lightweight webkit browser, like surf. If it doesn’t work, I could send you a proper patch to Surf in order to listen to html5 audio πŸ™‚ (and webgl too, if you want to test Mesa 7.1 in your newer machines πŸ˜‰ ) .

    With pulseaudio and paprefs, you can create a lookback playing/recording audio device easily. BUT, If you don’t wan’t pulse, you can do it with alsamixer:

    http://manual.audacityteam.org/o/man/tutorial_recording_computer_playback_on_linux.html

    You can record it with sox and send the pipe to “morse”

    http://radio.linux.org.au/pkgdetail.phtml?sectpat=morse&ordpat=&descpat=&pkgid=419

    Later I’ll send you a nice script to decode morse from the websdr station .

    Sorry if you need X; I couldn’t find any ncurses interface to websdrs, even with JSON and Python 😦

    1. K.Mandla Post author

      Thanks for the links; I’m not so much a Morse code fan, except that I like to try out unusual tools. I’ll see what I can do with those links. πŸ™‚

  2. aluigi

    Hi, you can use – as input file to read the data from stdin.
    Example: echo hello | morsegen –
    It works in the same way for both the tools.

    1. K.Mandla Post author

      Of course! Why didn’t I think of that?! πŸ˜• Thanks, I should have tried that. My mistake. Thanks! πŸ™‚

Comments are closed.