Tech
Building a Millisecond-Accurate Morse Engine in JavaScript (Syncing 600Hz Web Audio, SVG, and the Camera Torch)
Most Morse code generators on the web do two things wrong: they render signals as plain periods ( . ) and hyphens ( - )—which completely misrepresents the physical duration of the marks—and they play audio by chaining setTimeout calls.
If you have ever tried building a rhythm-based tool in the browser using setTimeout , you already know what happens. Within four or five words, main-thread jitter and browser timer throttling push the audio out of step with the UI.
While building Morse U...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to