Sound card


As stated elsewhere on this website, I am interested in radio techniques. So it seemed only natural to want to use a PC’s sound card to decode Morse Code. But how?

Morse Code decoding and FFT

    My RIPE interpreter allows me to write code in “C” and to expose the code to the interpreter. So in RIPE I handle the GUI things, and the basic interface to the sound card, but I pass the buffer of read in digitised sound samples to a “C” routine to run a Fast Fourier Transform, the results are then passed via RIPE to the display in the form of a waterfall. I implemented FFTs of various size (32, 64, 128, 256, 512), and at various sampling rates and sample size (8 bit, 16 bit). I hoped that by picking the correct “bin” I would have a decision basis for a Morse Code tone-on/off decision.

    Its a shame that I do not understand FFTs a bit better. One: the poor old PC was overloaded whan handling FFTs based on 256 samples of higher, two: you really must consider the characteristics of the morse signal (symbols per second).

    Whilst the resulting waterfall display looks impressive if you speak/whistle/sing in to the microphone, I have had no choice but to “think” again.

Morse Code decoding and Goertzel

    About 4 months ago (spring 2013) I stumbled upon the Goertzel algorithm. This is far less demanding in processing power than the FFT. By using 2 such algorithms in parallel, but overlapped, I think that I now have a tone-on/off indicator that seems good. Currently the screen output is a simple dot that sweeps across the screen and moves up for tone-on, and down for tone-off. It actual works and I can “read” the Morse off the screen. But the system is not too good if the analogue input is too strong. So I need to think again, again.

Morse Code generation

    As always, just for fun (basically I am inquisitive by nature), I wrote a sound card based Morse Code generator. Actually it is a 8 or 16 bit sine wave generator. But by sticking a “switch” between the outgoing samples and the sample buffer I have a Morse Code generator. But I had to think carefully about the switching point to avoid “chirp”.

I am already wondering how to modify the Morse Code decoder (Goertzel) to decode RTTY. But I suppose that I should learn to crawl before I try to run.

But but but then I could use the same principle for radio FAX reception (weather charts), and then for Slow Scan TV, and then I could.... (stop dreaming!).


[Technical Details] [Installation] [Books] [Download] [File Shrinker] [Infix to RPN] [Sound card]