March 29, 2024, 06:08:42 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Morse Test

Started by GWS, April 08, 2017, 09:21:28 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

GWS

Hi Folks,

Here's a Morse practice program by an unknown Spanish author, that I found in my archives from many years ago.

I've altered it quite a bit 'cos I couldn't get the original to work at all well.

It suffered from a common problem - using a keyboard to 'send' morse is clumsy ::)

Timing is all over the place compared to using a proper morse key, and so obtaining the required timing accuracy is difficult.  My original Morse program suffered from the same problem.

I decided to modify this little program to incorporate a statistical trick.  For a given sending speed of 'w' words per minute, the average timing for a 'dit' is (1200.0 / w) msec.

Assuming a normal statistical distribution, the longest expected 'dit' would be twice this, and the shortest, half the average value.

So I modified the program to take account of these likely variations as the user bounces the Enter (Return) key up and down.

That improved the response considerably  :)

It's still possible to upset the character recognition if you hold the Enter key down too long, or you send too fast.  I've set the program for an average of 8 words per minute, but it's fairly flexible.

I don't think it's possible to send recognisable Morse using a keyboard much faster than 8 wpm.

Anyway, I think this program is much better than my original Morse program. :)

My daughter Kim thought it might be even better if two keys were used - maybe the left and right arrow keys.

The left one would send continuous 'dahs' and the right one 'dits' - much like a paddle key.  I'll have to try this to see if it works, although I was never very good at handling a paddle key  ;D

Best wishes, :)

Graham


Tomorrow may be too late ..

GWS

Hi,

In case anyone would like to compare my modified version with the original program, here it is ..  :)

The only difference in the latest version, is the inclusion of a statistical measure for how long a 'dit' and 'dah' should be, as you press and release the Enter key ..

all the best, :)

Graham
Tomorrow may be too late ..

Rock Ridge Farm (Larry)

Kool - I like playing with Morse.
Just wish I had time - so much to do and time is passing so fast.

Larry

GWS

Hi Larry,

Hope you are well .. and maybe stopped climbing over wet tractors ..  :)

Don't tell me about time - it flies by, and as you get older you wonder how much time you have left to do interesting things.

It's got that I get up in the middle of the night to do something useful - not enough hours in a day.

Best wishes, :)

Graham

Tomorrow may be too late ..

Brian

Well, I'm glad I wasn't the radio operator on the Titanic. I haven't even managed to get the SOS sequence yet! It's harder than you may think it is, this Morse'ing around

Anyway, here is Graham's program converted to IWB (405kb compiled, down to 94kb)

Brian

GWS

April 10, 2017, 12:47:26 PM #5 Last Edit: April 10, 2017, 12:55:52 PM by GWS
Hi Brian,

Looks like your conversion worked OK ..  :)

You missed a bit though .. you forgot to include the 'tone.wav' file  ;D

It's the same sound file, so you could copy it across from the CB folder .. otherwise, I've attached a zip file for it.

Funny thing about the tone.wav file, which I don't understand, is that it works fine in the program, but Windows Media Player makes no sound when you attempt to play it.  Weird.

Hand sent Morse isn't easy, even with a proper Morse key.  There are always variations in timing the lengths of characters and spaces.  Some amateurs use machine generated code - efficient, but sort of cheating ..  :)

Best wishes, :)

Graham

[Comment: Ah, now I understand why Media Player makes no sound - the tone.wav file (when loaded into Audacity) shows it contains only 1 cycle of tone lasting 0.001 second  :o
But I've still no idea how it was generated]
Tomorrow may be too late ..

Brian

Graham,
I purposely left out the bitmaps and wav file as they were already in your distribution
Brian

GWS

OK Brian .. that's fine. :)

It gave me a chance to explain the strange wav file.  I'd not seen a sound file so short before.
I also found that the Audacity program has a feature for generating a tone of any frequency and length.  It's quite a useful program .. ;D

Best wishes,

Graham
Tomorrow may be too late ..

Egil

Great example Graham!

But for producing morse code audio I think using the methods Sapero demonstrated in his RTTY example several years ago is a better approach: http://www.ionicwind.com/forums/index.php?topic=3443.msg27490#msg27490

Using morse code is great fun. When I did my compulsary military service (more than 50 years ago!!! :-\), I even took part in a high speed contest. Those were the days....
And for years our local radio club participated in a friendly contest called "Strait Key Night" or something similar.
I am still able to receive morse code at speeds around 150 - 170 characters per minute whithout problems, but must admit that my sending speed has deteriorated over the years. It's similar to playing a musical instrument. You never master a piano whithout rehearsals...

So, except for the blinking part, I have not yet been able to produce any decent morse code with your program Graham...


Regards,
Egil.
Support Amateur Radio  -  Have a ham  for dinner!

GWS

Hello Egil,

Glad to see you back online - I hope you are well .. :)

I'm sure you're right about Sapero's RTTY approach - but for me, pretty well all of Sapero's code was incomprehensible ..  ::)  Much too complicated.

If I can't build an application with basic Basic - as with a hammer, saw, plane and screwdriver - I find a simpler method.  It might not be as fast or efficient, but I find simple methods more satisfying.

Anyway, this little program, tapping slowly on a keyboard, was never going to be of any use to an expert such as yourself.  Heck, 10 or 12 wpm is about my limit ..  ;D

all the best, :)

Graham

Tomorrow may be too late ..

Egil

Hi Graham,

QuoteIt might not be as fast or efficient, but I find simple methods more satisfying

I quite agree, and that's my main reason for using CB so much. And only once I have had speed problems with a CB program. That was when I fed the computer via a comport with hex coded data from an external ADSB decoder (airplane "secondary" radars), using the CB comport library made by Paul Turley. The amount of data was so extensive that the program was not able to process them properly.
Using almost identical code with IWB and MiniBasic fortunately worked well.
I have often thought of looking closer into the CB version of that code to see if rewriting the code could rectify the problems. But never got around to do it.

QuoteGlad to see you back online - I hope you are well ..
Thanks Graham, the doctors have now given me a "clean bill of heath". I hope they are right this time so crossing my fingers...


73's
Egil

Support Amateur Radio  -  Have a ham  for dinner!

Brian

Hello,

Couldn't resist! My updated code shows a Morse Keyer until the Enter key is pressed

Brian

GWS

Egil,

Quotethe doctors have now given me a "clean bill of heath"
;D

That's excellent news Egil ..

Yes, you can bump up against speed limits in CB if there is intensive processing - but it doesn't happen often.

Brian,

You're very naughty  ;D  But that's a lovely key ..  :P

Graham
Tomorrow may be too late ..

Egil

Quote from: GWS on April 11, 2017, 08:27:51 AMYes, you can bump up against speed limits in CB if there is intensive processing - but it doesn't happen often.

Today I discoverred it happen for the second time in ten years...
When playing around  with your morsetest program, I am just too fast for the decoding part. But when I tried Brian's IWB version, the problems were gone.
Guess that demonstrates the difference in processing speed between an interpreter and compiled code.

But only twice in ten years is not bad!!!
It only proves that with modern computers there is no difference between the two methods of programming.


Egil
Support Amateur Radio  -  Have a ham  for dinner!

Egil

Had another radio ham visiting here today, and told him him about this discussion.
He had learned morse code in pretty much the same way as Graham. And when he wanted to speed up a little, he used this software for training: http://www.justlearnmorsecode.com

The only thing I miss is that there is no way to send morse directly from the keyboard.


Egil
Support Amateur Radio  -  Have a ham  for dinner!