[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: clicking in cw program



Eric Krohn wrote:
I've been using the cw program from sarge (2.2-7) with sound card output.
Every dit and dah sounds with a bit of a click at the beginning and end.
It gets very annoying as the wpm increases (dits and dahs get shorter
relative to the duration of the clicks).

Yes, this is due to a bad sound generation in the unixcw library : basically the sine wave is hard-keyed, instead of fading in and out softly. That's not the library's only problem : it also happens to use an unusual sample rate (8192 Hz, instead of the standard 8000) which breaks the sound on many soundcards : it only sounds like a sine wave with my Sound Blaster Live, but sounds horribly broken played on a i8x0 device, and also with an OPL3SA2. I guess if you can hear a sine, you're lucky to have an open-minded sound device.

I've dabbled with the code in the library to try to fix it a little, just so it works for me, but I've given up. The sample rate issue is easy to fix, but implementing of the fading in and out isn't so obvious because the sound generation algorithm is clumsy and overly complex for a reason that eludes me (for example, it generates silences by generating a 0Hz wave, instead of simply nulling the amplitude. It's strange). I reckon that portion of the library deserves to be re-written, but I don't have enough interest in unixcw to be bothered, I have more than enough Morse functionalities with my own projects. Correcting it shouldn't take more than an hour or two though.

--
Pierre-Philippe Coupard <pcoupard@easyconnect.fr>
Software Engineer
--
"Shelter," what a nice name for for a place where you polish your cat.



Reply to: