morse script 0

I've been trying to think of good little projects or challenges to undertake, probably in bash, that'd help me develop my knowhow, so when I was in the bath reading Tales of Pirx the Pilot by Stanislaw Lem it gave me the idea of a little morse code testing script.

The idea is that it beeps out letters at you and you have to enter the letter you think it is. I guess that then builds to using a file of dictionary words and then maybe sentences from your e-books or whatever, but one step at a time!

I have a vague, aspirational notion that this could be worth submitting to Linux Voice, who are soliciting for writers at the moment. might be pie in the sky, but maybe worth a shot.

So, what's my approach?

Well, my first thought was to use bash, rather than python or antything. I'm looking for a real basic angle.

Are there any built-in commands that use the system beep? It seems not in my Arch install, but I quickly find that my instinct to type "beep" is not misguided. A quick pacman -S beep and chmod 4755 /usr/bin/beep later, I have a cli beep command with a bunch of options.

Next, I transcribe the morse alphabet and base 10 digits into a text file, representing dots as 0 and dashes as 1.

My plan is to use grep, or some read command to extract the strings line by line and convert them to beeps.

This is as far as I'm at right now. Next steps are:

* take user input and play back the morse
* write bash function that randomly selects a letter of the alphabet
* select words from /usr/share/dict and challenge the user
* select sentences from... somewhere. or maybe irc channel?


Comments

Popular posts from this blog

no sound in Papers Please

pdf to png/jpg/etc

Crunchbang Changes