home *** CD-ROM | disk | FTP | other *** search
-
- SendMorse is a little program I kinda "whipped up" for 2 purposes:
-
- 1. Learn more about the audio.device (translate: learn something,
- *anything* about the audio.device)
- 2. Practice my very ailing Morse code.
-
- Thus, here it is in its glorious entirety. (Gag). Note that it's
- very heavily based on Rob Peck's "audio.c" from Chapter 8 of his book.
- Very heavily.....
-
- For those who think I have a weird Makefile -- not ALL of us can have
- hard disks. This make works very quickly as it throws everything into
- ram:. Note the odd location of c.lib. I have c32.lib on my SYS1 disk,
- so I had to put c.lib on my work disk....
-
-
- To use it: say "SendMorse [-sendrate] <filelist>". It will send the
- files in the file list at the given word rate. Default is 5.
-
- Joe Larson (that's still me -- joe@dayton)
- November 12, 1988
- Golden Valley, Mn.
-
- -------------------Little Notes Follow Hereafter----------------------
- A few little notes concerning timings for those who want to fiddle...
-
- There are a few items that may be worth fiddling with.
-
- 1. The wave form. I used a short sine wave sample that took me
- about 20 seconds on my calculator. However, it clicks a little
- at the start of each dit or dah. I don't know why. I hope
- someone tells me.....
-
- 2. The MORSE_PERIOD value. This defines the period of the sample.
- (See the discussion on the audio.device for a definition of
- this.) Higher values mean lower frequency.
-
- 3. The calculations for ditlength, ditcycles and dahcycles. I
- decided that I didn't want longer dits and dahs at slower speeds
- but would just add more spacing between letters and words. Thus,
- ditcycles is a constant and dahcycles is 3*ditcycles. You may
- want to fiddle with these, but I think it works out well.
-
- Ditlength, though, was originally how long a dit was supposed
- to be. And I was using a ditlength pause between dits and
- dahs and 3*ditlength between letters. I have a constant defined
- somewhere that is the number of ditlengths between words (currently
- 6). This item is in 20 millisecond increments, as that's what
- the Delay() function *seems* to use.
-
- Because of all this, the sendrate appears to be maybe a little
- higher than you ask for. That is, the default of 5 WPM on a 20
- character sample SHOULD take about 48 seconds but seems to be a
- little closer to 35 or 40. You can add a little fudge factor
- if you like -- I'm not too concerned about it.....
-
- 4. Channel allocation. I only use one channel. I should probably
- have used Rob's "GetAnyStereoPair" rather than just grabbing
- a single channel, but that's the way it goes.
-