2011-02-17

Morse Code Reader

I wanted to make a Morse code reading application for some time now. Here's my first attempt, it listens to the signal through the phone's mic and translates it to text:



I'm sure there are all kinds of advanced signal processing techniques that I should be using, but for now I went with the simplest, most naive approach. And it sort of works, except when it doesn't. What I do is I keep an exponential moving average of the signal's volume and I decide that the signal is currently "high" when the average is above a threshold and "low" when it's below it. The threshold is set based on recent peak volume. Then I try to decide what the length of a dot and a dash is, interpret the input accordingly, and finally translate the dots and dashes to letters. The application adapts to changing volume and speed within reasonable limits (it should work up to about 40 WPM).



I was hesitant about putting the application on Android Market, as I only tested it on my phone and it quite often fails at translating Morse code. Then again, it's not like I have anything to lose by getting 1-star reviews and insulting comments, so why not.

Here's a Market link.

6 comments:

  1. It works pretty well, congratulations.

    73 from Denis, F6GKQ

    ReplyDelete
  2. wow. this is excelent. ever thought about doing one that detect light?

    ReplyDelete
  3. Hi, I tried your app but it does crash at opening on an archos 43 tablet

    ReplyDelete
  4. Thanks very much! It works but two simple menu options would really help. One is to set or freeze the signal's volume level. This way I could transmit a few codes and set the red line near the mid line way above the floor noise. This mains between breaks or user pauses it will not start decoding background noise. Second, a menu option to set the pulse with of a dah and a dit. This way a newb and have long dahs and dits when and the decode will still work. This could just be a learn option menu where the it asks for a dah and then asks for a dit and records the pulse duration +/- a bit of time based on scale. These to changes should make this a dead on Morse code decode app.

    ReplyDelete
  5. Hi !

    Works very well with Samsung Galaxy SIII
    Can you write same app to IOS ???

    Regards from Portugal.

    ReplyDelete