I hear people who do Morse code can do this too
November 1, 2010 7:01 PM   Subscribe

I want my computer to play a note for each key I press on the keyboard while typing homework/chats/etc. Hopefully, eventually I will be able to listen to the notes and tell what is being typed. Is there a program that will let me do this?
posted by rebent to Computers & Internet (12 answers total) 30 users marked this as a favorite
Best answer: Well, you could probably build this pretty easily using SuperCollider...I'm assuming you could be running SuperCollider in the background though, so it could capture keypresses while you are doing other stuff. I'm not 100% sure this is possible but it's worth looking into because otherwise it's trivial.
posted by dubitable at 7:21 PM on November 1, 2010

Off topic... but...


I'm just interested. This is an interesting and unusual idea.
posted by raygan at 7:30 PM on November 1, 2010

Response by poster: no reason, other than it would be very novel and interesting :)
posted by rebent at 7:31 PM on November 1, 2010

Best answer: Yeah, actually, I just found a demo program that does exactly what you want, but just for 'j,' and as I'm typing this message, every time I hit 'j' it's creating a sine wave at 800mhz. Neat. It would be simple to extend it to put pitches at every unique keystroke.

If you download SuperCollider it's in the help files at UGens -> Synth control -> KeyState.

If you want to try going this route I'd be happy to help you with more of the coding, assuming you're not a coder...if you are, well, there ya go.

(sclang code in case you want to see it:)

// execute the code below to find out a key's keycode
// the char and keycode of any key you press will be printed in the post window
w = SCWindow.new("I catch keystrokes");
w.view.keyDownAction = { arg view, char, modifiers, unicode, keycode;  [char, keycode].postln; };

// then execute this and then press the 'j' key
w.front; // something safe to type on
{ SinOsc.ar(800, 0, KeyState.kr(38, 0, 0.1)) }.play;

posted by dubitable at 7:32 PM on November 1, 2010

Response by poster: But also, I suppose, when I am copying out of a book, I don't want to have to look up periodically to make sure I hit all the right keys. I am a pretty fast typist, but if my fingers are out of order, then all that typing is for nothing.
posted by rebent at 7:33 PM on November 1, 2010

Response by poster: dubitable, thanks a lot! I will try that out when the homework I am (theoretically) working on is done. :) (yay grad school)
posted by rebent at 7:34 PM on November 1, 2010

You're very welcome, glad I could help! If you need a hand just me-mail me.
posted by dubitable at 7:36 PM on November 1, 2010

Yeah, actually I have a proposal if you are interested rebent, which is that we collaborate on this (I've already thought of a bunch of possible UI features like setting certain qwerty combinations to various modes or scales, being able to change octaves, change things around from saw to sine wave to changing the envelope on various notes...etc. etc. etc.) and put it up on projects as an open source SC3 plug-in or whatever.

If it's too much to think about that's cool too, just thought it would be a fun thing to do and seems like there is real interest.

I'm also really interested in finding out if you can start recognizing typed sequences through pitch combinations. I've got about five tones mapped right now (got lazy...) and it's fun whenever I hit one of those, but I'm not sure I'm recognizing them very well. Maybe you have to train yourself first some how. Or maybe I would recognize them if more were mapped though, or if they were mapped in different patterns, or with more strikingly different timbres...you could also set things up so different combinations ("words..." haha) produced certain chords or consonant intervals if you got them spelled right, and more dissonant intervals if wrong...

Now I'm getting a bit crazy, but this is a really fun idea to think about. I'm sure there's other angles on it too. Anyways, let me know what you think. Sorry to digress so much from the question at hand...
posted by dubitable at 8:34 PM on November 1, 2010

This seems to be a different take on text to speech. With normal speech, each letter represents a vocal sound and combined we hear words. I think the end result of this might be hearing the equivalent of "bee ay tee ess eff ell wy" ("bats fly"), just more obfuscated by having tones of instead of pronounced letters.
posted by mnemonic at 9:22 PM on November 1, 2010

There's a neat project on SourceForge called KeyBored.
posted by Earl the Polliwog at 10:57 PM on November 1, 2010

This is a rather fascinating idea. It would take some fiddling once the base program is ironed out, but if the right tones are selected, I'm sure that you would be able to pick out errors through the dissonance. In other words, the sound progression should be able to have a standard pattern to it, and human minds are very well wired to deal with pattern recognition. (This isn't even touching the idea of creating music from it. I'm also curious to see what would happen with this in reverse, where you take the manuscript of House of the Spirits, for example, and have it play the equivalent sounds.)

The question of chords is also an interesting one. That said, near as I know there's nothing already out there, so you'll have to roll your own or get people together to work on it.
posted by CrystalDave at 12:36 PM on November 2, 2010

If you find a solution to this (for the non-programmer), please share!
posted by vegetable100% at 6:41 PM on November 2, 2010

« Older I don't want to be an Ambivalent Terrorist!   |   NosyFriendFilter Newer »
This thread is closed to new comments.