Gentoo Archives: gentoo-user

From: Bill Longman <bill.longman@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Typewriter sound
Date: Tue, 17 Aug 2010 23:12:26
Message-Id: 4C6B1732.2030505@gmail.com
In Reply to: Re: [gentoo-user] Typewriter sound by Mick
1 On 08/17/2010 02:44 PM, Mick wrote:
2 > On Tuesday 17 August 2010 20:34:05 Albert Hopkins wrote:
3 >> On Tue, 2010-08-17 at 20:43 +0200, meino.cramer@×××.de wrote:
4 >>> Bill Longman <bill.longman@×××××.com> [10-08-17 20:16]:
5 >>>> On 08/17/2010 10:56 AM, Albert Hopkins wrote:
6 >>>>> On Tue, 2010-08-17 at 19:20 +0200, meino.cramer@×××.de wrote:
7 >>>>>> Hi,
8 >>>>>>
9 >>>>>> on YouTube there was a Blender-2.5 tutorial with audio.
10 >>>>>> There was an interesting detail: While there were spoken
11 >>>>>> instructions one can hear one typing on its keyboard.
12 >>>>>> Each hit on one of the keys made the sound of an old
13 >>>>>> typewriter (no, it was not the sound of the legendary
14 >>>>>> "IBM Model M" keyboard ;) ).
15 >>>>>>
16 >>>>>> How can I achieve this?
17 >>>>>> What software can I use to make this geeky feature to
18 >>>>>> come true.
19 >>>>>> Unfortunately I have no idea, how to name this kind
20 >>>>>> of what(?) ...
21 >>>>>>
22 >>>>>> Thank you very much for any hint in advance!
23 >>>>>> Best regards,
24 >>>>>> mcc
25 >>>>>
26 >>>>> There probably a number of ways to do this.
27 >>>>>
28 >>>>> A cheap and easy way would be to use xev to monitor a window and then
29 >>>>> pipe the stderr to a a program that waits for a keypress event and
30 >>>>> then plays an apropriate.
31 >>>>>
32 >>>>> A less cheap way would be to have our program do what xev does
33 >>>>> instead of using a pipe.
34 >>>>
35 >>>> Or you could set your X keyclick using xset.
36 >>>
37 >>> Hi,
38 >>>
39 >>> thanks a lot for your replies! :)
40 >>> Is there any program already, which does this?
41 >>> A daemon or...<insert missing words here>
42 >>>
43 >>> Best regards,
44 >>> mcc
45 >>
46 >> Well I found out that when you pass window id to xev it does not trap
47 >> keyboard presses per-sé. But there is another way...
48 >>
49 >> Anway the following is a quick hack (in python). It pretty much works
50 >> except it also seems to trap mouse presses. I got the .wav file at
51 >> http://www.soundjay.com/typewriter-sounds.html
52 >>
53 >> I tried using 'xset c' but it basically does nothing for me. My guess
54 >> is that it does work it basically sends the a BELL to the console.
55
56 My thinking was that you could enable the system bell through the sound
57 system (there's a kernel setting for it) and then just change the sound
58 to whatever the typewriter sound is. Kinda cruddy, but it might be worth
59 trying....