www.eamoncaddigan.net

Content and configuration for https://www.eamoncaddigan.net
git clone https://git.eamoncaddigan.net/www.eamoncaddigan.net.git
Log | Files | Refs | Submodules | README

index.md (3123B)


      1 ---
      2 title: "2023, Day 25"
      3 date: 2023-12-25T16:07:25-08:00
      4 draft: false
      5 katex: true
      6 ---
      7 
      8 As I [already mentioned]({{< ref "2023-12" >}}), Morse Code encodes
      9 characters with signal duration: a message is composed of "dits" (short
     10 elements), "dahs" (long elements), and the pauses between them. Currently, I
     11 am dealing with these pauses.
     12 
     13 There are three kinds of pauses to think about: the pause between the dits
     14 and dahs that comprise a single character (the inter-element pause), the
     15 pause between characters in a word, and the pause between those words.
     16 
     17 The relationship between these units has been standardized; taking a dit as
     18 one unit:
     19 
     20 * A dah is three units
     21 * The pause between elements is one unit
     22 * The pause between characters is three units
     23 * The pause between words is seven units
     24 
     25 Since I'm working on a program to help learn Morse Code, it makes sense to
     26 start by presenting messages and a slower rate, eventually working up to the
     27 20 words per minute (WPM) speed that I'd like to reach[^20wpm]. But simply
     28 slowing down the entire transmission---longer dits, longer dahs, and longer
     29 pauses---leads to a well-recognized problem: at higher transmission speeds,
     30 people perceive Morse characters by pattern and not by counting dits and
     31 dahs, and slowing everything down prevents people from learning how to do
     32 this.
     33 
     34 [Farnsworth Timing](http://www.arrl.org/files/file/Technology/x9004008.pdf)
     35 addresses this. The timing of the dits, dahs, and inter-element pauses in a
     36 character are determined by a "character speed" (usually 18 WPM when
     37 practicing), and the pause between characters and words is adjusted to achieve
     38 a specified "transmission speed".
     39 
     40 These values are derived in the paper I linked above, but I'm copying them
     41 here for reference. For the following speeds (in words per minute):
     42 
     43 * _c_: character speed
     44 * _s_: transmission speed
     45 
     46 Then the following durations (in seconds) are given as:
     47 
     48 * One "unit" (for dits, dahs, and inter-element pauses)
     49 
     50 $$ u = \frac{1.2}{c} $$
     51 
     52 * Pause between characters
     53 
     54 $$ t_{c} = \frac{3}{19} \left( \frac{60}{s} - \frac{37.2}{c} \right) $$
     55 
     56 * Pause between words
     57 
     58 $$ t_{w} = \frac{7}{19} \left( \frac{60}{s} - \frac{37.2}{c} \right) $$
     59 
     60 ## Implementing this in uxn
     61 
     62 Before the [changes to the audio device]({{< ref "2023-18" >}}), the only
     63 way to start and stop playback in uxn was through the screen device, which
     64 supports a temporal resolution of 1/60 s (~16.7 ms). After plugging a
     65 reasonable range of speeds into the above formulas, it seems like this would
     66 actually be sufficiently accurate for Morse Code playback. I believe that
     67 the new audio device's `duration` port supports resolutions of approximately
     68 5.8 ms (256 samples / 44100 Hz), but it's trickier to play silences.
     69 
     70 I haven't decided whether to use the screen or audio device to handle
     71 playback. I'm pretty sure the next step is to try coding this up.
     72 
     73 [^20wpm]: This was the speed that was once required for the Amateur Extra
     74     Class license, the most advanced ham radio license in the US. The FCC
     75     has done away with the Morse Code requirement, but this feels like a
     76     good speed to target.