Saturday 20 March 2010

The FUNKY Keyer

Having added automatic CQ call functions to my homebrew keyer, I was reminded just how much I dislike the mechanical sound of machine-generated CW. It is so strict, so metronomic, so life-less. I much prefer the wonderful lilting sounds you sometimes hear from F or I stations sending CW – the patterns of their Romance languages seem to impress themselves on the rhythm of their fists – add in a little chirp and drift to the mix and I’m in heaven!

Naive transcription of a loop of Clyde Stubblefield's 'Funky Drummer' break

This all put me in mind of drum machines, which were criticised for sounding lifeless and artificial BECAUSE THEY WERE TOO PRECISE. Real drummers don’t play everything exactly on the beat – rather their timing may be slightly late or early, making the rhythm sound subtly different. Some of this timing error is accidental – but some of it is a point of style, deliberately changing the “feel” or “groove” of a rhythm.

I decided that’s what was needed to give my keyer some groove – to make it funky! I needed to add in some random timing errors, to make it sound more like my straight key. That way, it doesn’t sound so grating on my ear. More importantly, I’m sure more people would answer a more natural-sounding CQ as opposed to a dry, machine-generated call (I know I certainly would).

Trouble is, it takes some effort to generate random timing effects inside a rule-based, deterministic system like a PIC – it’s counter-cultural!

Fortunately, I had already written a pseudo-random noise generator in PIC assembler, that I could “cut-and-paste” directly into the keyer code. The code implemented a Linear Feedback Shift Register to generate a pseudo-random sequence, and I used the bottom few bits of this as an additive component of (one of) my loop counters (perhaps I should say one of Ed’s timers – as that segment of the code was modified from the original work from Ed Skelton EI9GQ). In other words, I made a “funky timer”.

In my keyer, all aspects of the timing of a morse code sequence are influenced in the same way by this timer – dot and dash length, inter-element gap, inter-character gap, inter-word gap etc. Here’s the new “Funky Timer” routine…

(apologies for the code, which is neither pretty nor optimized - it just works!)

The code generates a “maximum length sequence” for a 15 bit shift register (I “threw away” the last bit of the 16 I’m actually using to simplify the feedback logic). Assuming the timer routine is called at 8 Hz (enough for pretty fast CW) that is still over an hour before the sequence repeats. Most of my QSOs are shorter than that!

Whilst I'd got the "random element" in the keyer, I decided to randomly change the message, as well as its timing. I added a random addition prosign "CQ" amidst the sequence of "cq"s and I added an alternative ending of "AR k" to replace the "pse k" (there's something false about a machine saying 'please').

So – how does it sound? I like the effect – but I’ll leave it for you to judge…

Here’s the original strict-tempo “no errors” CQ call…

Now for some samples of the keyer with random timing errors (remember - this is a machine generating CW with random "Funky" timing - each automated call from my Funky Keyer sounds slightly different than the last, but there are fixed recordings of typical "funky" calls below).

Here's what I call a "natural" sound...

and here's the call with way too much timing error (the op has been drinking!).

Parameter values in the Funky Timing routine associated with these samples are as follows...

SampleMaskFixed Constant

I have the "natural" settings programmed into my Funky Keyer at the moment.

Of course, I have kept the strict timing routines in the keyer to generate code when I use my Bencher paddle - but my Funky keyer also includes a straight key input which preserves all the idiosyncrasies of my sloppy (and not-very-funky) fist!

By the way - my name “The Funky Keyer” is a reference to “The Funky Drummer”, a James Brown track which includes a drum solo by Clyde Stubblefield (seen in picture right).

This solo is (claimed to be) the most sampled piece of music – a testament to the fact that it oozes the sort of “groove” that’s referred to above - which is precisely why it has been sampled and sequenced to escape the boring sound of naive drum machines!

Listen to (a loop of) Clyde's famous break here…

..-. ..- -. -.- -.-- !

...-.- de m0xpd


  1. Paul - For me, of the three samples, your "Funky CW" is the easiest to "read". It is very representative of the hand-crafted cw that one will till actually experience on 40m. Often times I will be working out in the shop and listening to an old rather broadly tuning receiver while "reading the mail." The swing will make it easier to focus on one particular QSO out of several being received at the same time. Keep up the good work! 73's (72's, also) Bruce - KK0S

  2. Hello Paul.

    Just read about your new project at SolderSmoke blog.

    Such a great idea, my respect! It is very unusual to make an aforethought mistakes for fist's personalization and I like your solution so much.

    Funny, I'm still using an old TTL keyer with very unstable RC oscillator without any dividing, so my code is funky anyway. It is a big challenge to send up to 50 WPM using that drifting keyer!

    73! Andy UU1CC (HSC as well as SKCC member)