* [gentoo-user] Typewriter sound
@ 2010-08-17 17:20 meino.cramer
2010-08-17 17:56 ` Albert Hopkins
2010-08-17 22:14 ` [gentoo-user] " Paul Hartman
0 siblings, 2 replies; 40+ messages in thread
From: meino.cramer @ 2010-08-17 17:20 UTC (permalink / raw
To: Gentoo
Hi,
on YouTube there was a Blender-2.5 tutorial with audio.
There was an interesting detail: While there were spoken
instructions one can hear one typing on its keyboard.
Each hit on one of the keys made the sound of an old
typewriter (no, it was not the sound of the legendary
"IBM Model M" keyboard ;) ).
How can I achieve this?
What software can I use to make this geeky feature to
come true.
Unfortunately I have no idea, how to name this kind
of what(?) ...
Thank you very much for any hint in advance!
Best regards,
mcc
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [gentoo-user] Typewriter sound
2010-08-17 17:20 [gentoo-user] Typewriter sound meino.cramer
@ 2010-08-17 17:56 ` Albert Hopkins
2010-08-17 18:13 ` Bill Longman
2010-08-17 22:14 ` [gentoo-user] " Paul Hartman
1 sibling, 1 reply; 40+ messages in thread
From: Albert Hopkins @ 2010-08-17 17:56 UTC (permalink / raw
To: gentoo-user
On Tue, 2010-08-17 at 19:20 +0200, meino.cramer@gmx.de wrote:
> Hi,
>
> on YouTube there was a Blender-2.5 tutorial with audio.
> There was an interesting detail: While there were spoken
> instructions one can hear one typing on its keyboard.
> Each hit on one of the keys made the sound of an old
> typewriter (no, it was not the sound of the legendary
> "IBM Model M" keyboard ;) ).
>
> How can I achieve this?
> What software can I use to make this geeky feature to
> come true.
> Unfortunately I have no idea, how to name this kind
> of what(?) ...
>
> Thank you very much for any hint in advance!
> Best regards,
> mcc
There probably a number of ways to do this.
A cheap and easy way would be to use xev to monitor a window and then
pipe the stderr to a a program that waits for a keypress event and then
plays an apropriate.
A less cheap way would be to have our program do what xev does instead
of using a pipe.
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [gentoo-user] Typewriter sound
2010-08-17 17:56 ` Albert Hopkins
@ 2010-08-17 18:13 ` Bill Longman
2010-08-17 18:43 ` meino.cramer
0 siblings, 1 reply; 40+ messages in thread
From: Bill Longman @ 2010-08-17 18:13 UTC (permalink / raw
To: gentoo-user
On 08/17/2010 10:56 AM, Albert Hopkins wrote:
> On Tue, 2010-08-17 at 19:20 +0200, meino.cramer@gmx.de wrote:
>> Hi,
>>
>> on YouTube there was a Blender-2.5 tutorial with audio.
>> There was an interesting detail: While there were spoken
>> instructions one can hear one typing on its keyboard.
>> Each hit on one of the keys made the sound of an old
>> typewriter (no, it was not the sound of the legendary
>> "IBM Model M" keyboard ;) ).
>>
>> How can I achieve this?
>> What software can I use to make this geeky feature to
>> come true.
>> Unfortunately I have no idea, how to name this kind
>> of what(?) ...
>>
>> Thank you very much for any hint in advance!
>> Best regards,
>> mcc
>
> There probably a number of ways to do this.
>
> A cheap and easy way would be to use xev to monitor a window and then
> pipe the stderr to a a program that waits for a keypress event and then
> plays an apropriate.
>
> A less cheap way would be to have our program do what xev does instead
> of using a pipe.
Or you could set your X keyclick using xset.
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [gentoo-user] Typewriter sound
2010-08-17 18:13 ` Bill Longman
@ 2010-08-17 18:43 ` meino.cramer
2010-08-17 19:34 ` Albert Hopkins
0 siblings, 1 reply; 40+ messages in thread
From: meino.cramer @ 2010-08-17 18:43 UTC (permalink / raw
To: gentoo-user
Bill Longman <bill.longman@gmail.com> [10-08-17 20:16]:
> On 08/17/2010 10:56 AM, Albert Hopkins wrote:
> > On Tue, 2010-08-17 at 19:20 +0200, meino.cramer@gmx.de wrote:
> >> Hi,
> >>
> >> on YouTube there was a Blender-2.5 tutorial with audio.
> >> There was an interesting detail: While there were spoken
> >> instructions one can hear one typing on its keyboard.
> >> Each hit on one of the keys made the sound of an old
> >> typewriter (no, it was not the sound of the legendary
> >> "IBM Model M" keyboard ;) ).
> >>
> >> How can I achieve this?
> >> What software can I use to make this geeky feature to
> >> come true.
> >> Unfortunately I have no idea, how to name this kind
> >> of what(?) ...
> >>
> >> Thank you very much for any hint in advance!
> >> Best regards,
> >> mcc
> >
> > There probably a number of ways to do this.
> >
> > A cheap and easy way would be to use xev to monitor a window and then
> > pipe the stderr to a a program that waits for a keypress event and then
> > plays an apropriate.
> >
> > A less cheap way would be to have our program do what xev does instead
> > of using a pipe.
>
> Or you could set your X keyclick using xset.
>
Hi,
thanks a lot for your replies! :)
Is there any program already, which does this?
A daemon or...<insert missing words here>
Best regards,
mcc
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [gentoo-user] Typewriter sound
2010-08-17 18:43 ` meino.cramer
@ 2010-08-17 19:34 ` Albert Hopkins
2010-08-17 21:44 ` Mick
2011-08-31 15:18 ` Space Cake
0 siblings, 2 replies; 40+ messages in thread
From: Albert Hopkins @ 2010-08-17 19:34 UTC (permalink / raw
To: gentoo-user
On Tue, 2010-08-17 at 20:43 +0200, meino.cramer@gmx.de wrote:
> Bill Longman <bill.longman@gmail.com> [10-08-17 20:16]:
> > On 08/17/2010 10:56 AM, Albert Hopkins wrote:
> > > On Tue, 2010-08-17 at 19:20 +0200, meino.cramer@gmx.de wrote:
> > >> Hi,
> > >>
> > >> on YouTube there was a Blender-2.5 tutorial with audio.
> > >> There was an interesting detail: While there were spoken
> > >> instructions one can hear one typing on its keyboard.
> > >> Each hit on one of the keys made the sound of an old
> > >> typewriter (no, it was not the sound of the legendary
> > >> "IBM Model M" keyboard ;) ).
> > >>
> > >> How can I achieve this?
> > >> What software can I use to make this geeky feature to
> > >> come true.
> > >> Unfortunately I have no idea, how to name this kind
> > >> of what(?) ...
> > >>
> > >> Thank you very much for any hint in advance!
> > >> Best regards,
> > >> mcc
> > >
> > > There probably a number of ways to do this.
> > >
> > > A cheap and easy way would be to use xev to monitor a window and then
> > > pipe the stderr to a a program that waits for a keypress event and then
> > > plays an apropriate.
> > >
> > > A less cheap way would be to have our program do what xev does instead
> > > of using a pipe.
> >
> > Or you could set your X keyclick using xset.
> >
>
> Hi,
>
> thanks a lot for your replies! :)
> Is there any program already, which does this?
> A daemon or...<insert missing words here>
>
> Best regards,
> mcc
>
>
Well I found out that when you pass window id to xev it does not trap
keyboard presses per-sé. But there is another way...
Anway the following is a quick hack (in python). It pretty much works
except it also seems to trap mouse presses. I got the .wav file at
http://www.soundjay.com/typewriter-sounds.html
I tried using 'xset c' but it basically does nothing for me. My guess
is that it does work it basically sends the a BELL to the console.
--- 8< CUT HERE ---------------------------------------------------
import sys
import subprocess
soundfile = 'typewriter-key-1.wav'
def main():
window_id = sys.argv[1]
cmd = ['xev', '-id', window_id]
p1 = subprocess.Popen(cmd, stdout=subprocess.PIPE)
while True:
line = p1.stdout.readline()
if line.find('atom 0x14d') > -1:
subprocess.Popen(['aplay', soundfile],
stderr=open('/dev/null',
'w'))
if __name__ == '__main__':
main()
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [gentoo-user] Typewriter sound
2010-08-17 19:34 ` Albert Hopkins
@ 2010-08-17 21:44 ` Mick
2010-08-17 23:11 ` Bill Longman
2011-08-31 15:18 ` Space Cake
1 sibling, 1 reply; 40+ messages in thread
From: Mick @ 2010-08-17 21:44 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 2804 bytes --]
On Tuesday 17 August 2010 20:34:05 Albert Hopkins wrote:
> On Tue, 2010-08-17 at 20:43 +0200, meino.cramer@gmx.de wrote:
> > Bill Longman <bill.longman@gmail.com> [10-08-17 20:16]:
> > > On 08/17/2010 10:56 AM, Albert Hopkins wrote:
> > > > On Tue, 2010-08-17 at 19:20 +0200, meino.cramer@gmx.de wrote:
> > > >> Hi,
> > > >>
> > > >> on YouTube there was a Blender-2.5 tutorial with audio.
> > > >> There was an interesting detail: While there were spoken
> > > >> instructions one can hear one typing on its keyboard.
> > > >> Each hit on one of the keys made the sound of an old
> > > >> typewriter (no, it was not the sound of the legendary
> > > >> "IBM Model M" keyboard ;) ).
> > > >>
> > > >> How can I achieve this?
> > > >> What software can I use to make this geeky feature to
> > > >> come true.
> > > >> Unfortunately I have no idea, how to name this kind
> > > >> of what(?) ...
> > > >>
> > > >> Thank you very much for any hint in advance!
> > > >> Best regards,
> > > >> mcc
> > > >
> > > > There probably a number of ways to do this.
> > > >
> > > > A cheap and easy way would be to use xev to monitor a window and then
> > > > pipe the stderr to a a program that waits for a keypress event and
> > > > then plays an apropriate.
> > > >
> > > > A less cheap way would be to have our program do what xev does
> > > > instead of using a pipe.
> > >
> > > Or you could set your X keyclick using xset.
> >
> > Hi,
> >
> > thanks a lot for your replies! :)
> > Is there any program already, which does this?
> > A daemon or...<insert missing words here>
> >
> > Best regards,
> > mcc
>
> Well I found out that when you pass window id to xev it does not trap
> keyboard presses per-sé. But there is another way...
>
> Anway the following is a quick hack (in python). It pretty much works
> except it also seems to trap mouse presses. I got the .wav file at
> http://www.soundjay.com/typewriter-sounds.html
>
> I tried using 'xset c' but it basically does nothing for me. My guess
> is that it does work it basically sends the a BELL to the console.
>
>
> --- 8< CUT HERE ---------------------------------------------------
> import sys
> import subprocess
>
> soundfile = 'typewriter-key-1.wav'
>
> def main():
> window_id = sys.argv[1]
> cmd = ['xev', '-id', window_id]
>
> p1 = subprocess.Popen(cmd, stdout=subprocess.PIPE)
> while True:
> line = p1.stdout.readline()
> if line.find('atom 0x14d') > -1:
> subprocess.Popen(['aplay', soundfile],
> stderr=open('/dev/null',
> 'w'))
>
>
> if __name__ == '__main__':
> main()
xset b on
or
xset c on
do not work here either.
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [gentoo-user] Typewriter sound
2010-08-17 17:20 [gentoo-user] Typewriter sound meino.cramer
2010-08-17 17:56 ` Albert Hopkins
@ 2010-08-17 22:14 ` Paul Hartman
2010-08-17 22:47 ` meino.cramer
` (2 more replies)
1 sibling, 3 replies; 40+ messages in thread
From: Paul Hartman @ 2010-08-17 22:14 UTC (permalink / raw
To: gentoo-user
On Tue, Aug 17, 2010 at 12:20 PM, <meino.cramer@gmx.de> wrote:
> Hi,
>
> on YouTube there was a Blender-2.5 tutorial with audio.
> There was an interesting detail: While there were spoken
> instructions one can hear one typing on its keyboard.
> Each hit on one of the keys made the sound of an old
> typewriter (no, it was not the sound of the legendary
> "IBM Model M" keyboard ;) ).
>
> How can I achieve this?
I have not tried it, but a Google search showed me this:
http://github.com/colszowka/linux-typewriter
BTW - I have Unicomp keyboards (modern version of IBM Model M) and
they are loud and awesome ;)
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [gentoo-user] Typewriter sound
2010-08-17 22:14 ` [gentoo-user] " Paul Hartman
@ 2010-08-17 22:47 ` meino.cramer
2010-08-18 3:42 ` Paul Hartman
2010-08-17 23:17 ` Albert Hopkins
2010-08-18 16:06 ` meino.cramer
2 siblings, 1 reply; 40+ messages in thread
From: meino.cramer @ 2010-08-17 22:47 UTC (permalink / raw
To: gentoo-user
Paul Hartman <paul.hartman+gentoo@gmail.com> [10-08-18 00:20]:
> On Tue, Aug 17, 2010 at 12:20 PM, <meino.cramer@gmx.de> wrote:
> > Hi,
> >
> > on YouTube there was a Blender-2.5 tutorial with audio.
> > There was an interesting detail: While there were spoken
> > instructions one can hear one typing on its keyboard.
> > Each hit on one of the keys made the sound of an old
> > typewriter (no, it was not the sound of the legendary
> > "IBM Model M" keyboard ;) ).
> >
> > How can I achieve this?
>
> I have not tried it, but a Google search showed me this:
> http://github.com/colszowka/linux-typewriter
>
> BTW - I have Unicomp keyboards (modern version of IBM Model M) and
> they are loud and awesome ;)
>
Hi,
thanks a lot for all your help! :)
I will try it out all ! :))
By the way (the same way! ;))
I am in search of such an "model m" IBM-keyboard. A colleque
yesterday calls me and said, that he found one for me in the
PC-junk at the basement of the building he is working in.
Hopefully it is one which is 1.) fully working and 2.)
with german keyboard layout. Fingers crossed.
Currently I am using a Cherry MX 1000 G80 keyboard -- since
15 years now without any kind misfunctional behaviour (I mean:
the keyboard shows no misfunction... ;). It is one with
a big roung AT-connector (pre PS2-era).
The typewriter sound "project" is just kind of joke: I am
imaging the face of people on the phone, when I say: "Oh,
wait a moment...I will look into the database..." and
then: "clack, clackclack, clack, clackclackclack" -- they
will here a typewriter <grin>.
Happy hacking!
best regards,
mcc
PS: Here is a nice description of the "buckling
spring" mechanism in action:
http://www.plope.com/Members/chrism/25_years_of_the_model_m
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [gentoo-user] Typewriter sound
2010-08-17 21:44 ` Mick
@ 2010-08-17 23:11 ` Bill Longman
0 siblings, 0 replies; 40+ messages in thread
From: Bill Longman @ 2010-08-17 23:11 UTC (permalink / raw
To: gentoo-user
On 08/17/2010 02:44 PM, Mick wrote:
> On Tuesday 17 August 2010 20:34:05 Albert Hopkins wrote:
>> On Tue, 2010-08-17 at 20:43 +0200, meino.cramer@gmx.de wrote:
>>> Bill Longman <bill.longman@gmail.com> [10-08-17 20:16]:
>>>> On 08/17/2010 10:56 AM, Albert Hopkins wrote:
>>>>> On Tue, 2010-08-17 at 19:20 +0200, meino.cramer@gmx.de wrote:
>>>>>> Hi,
>>>>>>
>>>>>> on YouTube there was a Blender-2.5 tutorial with audio.
>>>>>> There was an interesting detail: While there were spoken
>>>>>> instructions one can hear one typing on its keyboard.
>>>>>> Each hit on one of the keys made the sound of an old
>>>>>> typewriter (no, it was not the sound of the legendary
>>>>>> "IBM Model M" keyboard ;) ).
>>>>>>
>>>>>> How can I achieve this?
>>>>>> What software can I use to make this geeky feature to
>>>>>> come true.
>>>>>> Unfortunately I have no idea, how to name this kind
>>>>>> of what(?) ...
>>>>>>
>>>>>> Thank you very much for any hint in advance!
>>>>>> Best regards,
>>>>>> mcc
>>>>>
>>>>> There probably a number of ways to do this.
>>>>>
>>>>> A cheap and easy way would be to use xev to monitor a window and then
>>>>> pipe the stderr to a a program that waits for a keypress event and
>>>>> then plays an apropriate.
>>>>>
>>>>> A less cheap way would be to have our program do what xev does
>>>>> instead of using a pipe.
>>>>
>>>> Or you could set your X keyclick using xset.
>>>
>>> Hi,
>>>
>>> thanks a lot for your replies! :)
>>> Is there any program already, which does this?
>>> A daemon or...<insert missing words here>
>>>
>>> Best regards,
>>> mcc
>>
>> Well I found out that when you pass window id to xev it does not trap
>> keyboard presses per-sé. But there is another way...
>>
>> Anway the following is a quick hack (in python). It pretty much works
>> except it also seems to trap mouse presses. I got the .wav file at
>> http://www.soundjay.com/typewriter-sounds.html
>>
>> I tried using 'xset c' but it basically does nothing for me. My guess
>> is that it does work it basically sends the a BELL to the console.
My thinking was that you could enable the system bell through the sound
system (there's a kernel setting for it) and then just change the sound
to whatever the typewriter sound is. Kinda cruddy, but it might be worth
trying....
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [gentoo-user] Typewriter sound
2010-08-17 22:14 ` [gentoo-user] " Paul Hartman
2010-08-17 22:47 ` meino.cramer
@ 2010-08-17 23:17 ` Albert Hopkins
2010-08-17 23:41 ` Albert Hopkins
2010-08-18 16:06 ` meino.cramer
2 siblings, 1 reply; 40+ messages in thread
From: Albert Hopkins @ 2010-08-17 23:17 UTC (permalink / raw
To: gentoo-user
On Tue, 2010-08-17 at 17:14 -0500, Paul Hartman wrote:
> I have not tried it, but a Google search showed me this:
> http://github.com/colszowka/linux-typewriter
>
> BTW - I have Unicomp keyboards (modern version of IBM Model M) and
> they are loud and awesome ;)
>
This is a weird script. It's a ruby script that creates a web server,
but the web server listens for...
It runs a python script that uses python-xlib to listen for key presses,
and when a key is pressed it uses curl to open the connection to the
ruby script.. when the ruby script receives a request it plays a sound.
So really it's the Python script that's doing all the work... If you can
just try downloading the python script[1] and replacing 'curl
http://localhost:4567/key' with 'aplay myfile.wav'
[1]
http://github.com/colszowka/linux-typewriter/blob/master/bin/keypress.py
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [gentoo-user] Typewriter sound
2010-08-17 23:17 ` Albert Hopkins
@ 2010-08-17 23:41 ` Albert Hopkins
2010-08-17 23:44 ` Albert Hopkins
0 siblings, 1 reply; 40+ messages in thread
From: Albert Hopkins @ 2010-08-17 23:41 UTC (permalink / raw
To: gentoo-user
On Tue, 2010-08-17 at 19:17 -0400, Albert Hopkins wrote:
>
> This is a weird script. It's a ruby script that creates a web server,
> but the web server listens for...
>
> It runs a python script that uses python-xlib to listen for key presses,
> and when a key is pressed it uses curl to open the connection to the
> ruby script.. when the ruby script receives a request it plays a sound.
>
> So really it's the Python script that's doing all the work... If you can
> just try downloading the python script[1] and replacing 'curl
> http://localhost:4567/key' with 'aplay myfile.wav'
>
> [1]
> http://github.com/colszowka/linux-typewriter/blob/master/bin/keypress.py
Here is my edit of his Python script. Basically the original author was
making the wrong Python call to call aplay and, instead of looking up
the documentation, he decided to create a ruby script that creates a web
server to he can connect to it and play audio files :S
Anyway this version seems to work for me. I modified it a bit to play a
different file when the ENTER key is pressed and to mask aplay's output.
Again, I acquired the wav files from:
http://www.soundjay.com/typewriter-sounds.html
-a
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [gentoo-user] Typewriter sound
2010-08-17 23:41 ` Albert Hopkins
@ 2010-08-17 23:44 ` Albert Hopkins
2010-08-18 14:14 ` Stefan G. Weichinger
2010-08-18 16:20 ` meino.cramer
0 siblings, 2 replies; 40+ messages in thread
From: Albert Hopkins @ 2010-08-17 23:44 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 145 bytes --]
On Tue, 2010-08-17 at 19:41 -0400, Albert Hopkins wrote:
> Here is my edit of his Python script.
... which I actually forgot to attach :|
-a
[-- Attachment #2: keypress.py --]
[-- Type: text/x-python, Size: 1444 bytes --]
#!/usr/bin/env python
## A tiny, nifty script for playing musical notes on each keypress.
##
## Copyright Sayan "Riju" Chakrabarti (sayanriju) 2009
## me[at]sayanriju[dot]co[dot]cc ##
## Released under WTFPL Version 2
## (DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE)
## Copy of license text can be found online at ## http://sam.zoy.org/wtfpl/COPYING
## http://rants.sayanriju.co.cc/script-to-make-tick-tick-sound-on-keypress
from Xlib.display import Display
import subprocess
import time
KEYPRESSFILE = 'typewriter-key-1.wav'
RETURNFILE = 'typewriter-line-break-1.wav'
notes=[440,494,523,587,659,698,784]
ZERO,SHIFT,ALT,CTL=[],[],[],[]
ENTER = [0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
for i in range(0,32):
ZERO.append(0)
if i==6:
SHIFT.append(4)
else:
SHIFT.append(0)
if i==4:
CTL.append(32)
else:
CTL.append(0)
if i==8:
ALT.append(1)
else:
ALT.append(0)
ignorelist=[ZERO,ALT,SHIFT,CTL]
def main():
disp = Display() # connect to display
while 1: #event loop
keymap = disp.query_keymap()
if keymap not in ignorelist:
filename = RETURNFILE if keymap == ENTER else KEYPRESSFILE
subprocess.Popen(['aplay', filename], stderr=open('/dev/null',
'w'))
time.sleep(0.1)
if __name__ == '__main__':
main()
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [gentoo-user] Typewriter sound
2010-08-17 22:47 ` meino.cramer
@ 2010-08-18 3:42 ` Paul Hartman
2010-08-18 3:53 ` Dale
2010-08-18 15:56 ` [gentoo-user] " meino.cramer
0 siblings, 2 replies; 40+ messages in thread
From: Paul Hartman @ 2010-08-18 3:42 UTC (permalink / raw
To: gentoo-user
On Tue, Aug 17, 2010 at 5:47 PM, <meino.cramer@gmx.de> wrote:
> By the way (the same way! ;))
> I am in search of such an "model m" IBM-keyboard. A colleque
> yesterday calls me and said, that he found one for me in the
> PC-junk at the basement of the building he is working in.
> Hopefully it is one which is 1.) fully working and 2.)
> with german keyboard layout. Fingers crossed.
Unicomp owns the patent from the original IBM/Lexmark Model M
keyboards, they still make & sell modern versions (with USB and
Windows keys, if you want, also versions with PS/2 or without windows
keys are available). And you can buy it with German configuration. You
can even buy it with quiet keys, but what is the point of that?? ;)
They are made in the USA but can be shipped worldwide.
This is the model I have (in black with grey keys):
http://pckeyboards.stores.yahoo.net/customizer.html
It is the same size and weight like the old keyboards, very heavy,
each key cap can be removed, it is loud & clicks nicely and is very
awesome. For USD$69 I think it is a bargain, I type on the computer
every day and this keyboard is simply perfect to me. After using cheap
$5 and $10 keyboards for so many years, now I will never go back to
those.
Their website is http://www.pckeyboard.com and they have other
keyboard variations such as a Linux keyboard.
I highly recommend it for anyone who likes a huge and loud keyboard
that feels incredible. :)
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [gentoo-user] Typewriter sound
2010-08-18 3:42 ` Paul Hartman
@ 2010-08-18 3:53 ` Dale
2010-08-18 13:45 ` [gentoo-user] " Grant Edwards
2010-08-18 15:56 ` [gentoo-user] " meino.cramer
1 sibling, 1 reply; 40+ messages in thread
From: Dale @ 2010-08-18 3:53 UTC (permalink / raw
To: gentoo-user
Paul Hartman wrote:
> On Tue, Aug 17, 2010 at 5:47 PM,<meino.cramer@gmx.de> wrote:
>
>> By the way (the same way! ;))
>> I am in search of such an "model m" IBM-keyboard. A colleque
>> yesterday calls me and said, that he found one for me in the
>> PC-junk at the basement of the building he is working in.
>> Hopefully it is one which is 1.) fully working and 2.)
>> with german keyboard layout. Fingers crossed.
>>
> Unicomp owns the patent from the original IBM/Lexmark Model M
> keyboards, they still make& sell modern versions (with USB and
> Windows keys, if you want, also versions with PS/2 or without windows
> keys are available). And you can buy it with German configuration. You
> can even buy it with quiet keys, but what is the point of that?? ;)
> They are made in the USA but can be shipped worldwide.
>
> This is the model I have (in black with grey keys):
> http://pckeyboards.stores.yahoo.net/customizer.html
>
> It is the same size and weight like the old keyboards, very heavy,
> each key cap can be removed, it is loud& clicks nicely and is very
> awesome. For USD$69 I think it is a bargain, I type on the computer
> every day and this keyboard is simply perfect to me. After using cheap
> $5 and $10 keyboards for so many years, now I will never go back to
> those.
>
> Their website is http://www.pckeyboard.com and they have other
> keyboard variations such as a Linux keyboard.
>
> I highly recommend it for anyone who likes a huge and loud keyboard
> that feels incredible. :)
>
>
I think I got a old IBM AT/XT keyboard out in my shop. It has the wrong
connector tho. Those things are pretty loud. You are right, they are
heavy tho. Hmmm, could buy a adapter I guess.
Oh, I threw out the old 14" hard drives a while back. I had two of
those too. o_O
Dale
:-) :-)
^ permalink raw reply [flat|nested] 40+ messages in thread
* [gentoo-user] Re: Typewriter sound
2010-08-18 3:53 ` Dale
@ 2010-08-18 13:45 ` Grant Edwards
0 siblings, 0 replies; 40+ messages in thread
From: Grant Edwards @ 2010-08-18 13:45 UTC (permalink / raw
To: gentoo-user
On 2010-08-18, Dale <rdalek1967@gmail.com> wrote:
> I think I got a old IBM AT/XT keyboard out in my shop. It has the wrong
> connector tho. Those things are pretty loud. You are right, they are
> heavy tho. Hmmm, could buy a adapter I guess.
I still use an IBM AT keyboard every day. Everything else from that AT
has long since been recycled, but the keyboard still works great after
almost 25 years.
--
Grant Edwards grant.b.edwards Yow! Why is it that when
at you DIE, you can't take
gmail.com your HOME ENTERTAINMENT
CENTER with you??
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [gentoo-user] Typewriter sound
2010-08-17 23:44 ` Albert Hopkins
@ 2010-08-18 14:14 ` Stefan G. Weichinger
2010-08-18 15:10 ` Peter Ruskin
2010-08-18 16:20 ` meino.cramer
1 sibling, 1 reply; 40+ messages in thread
From: Stefan G. Weichinger @ 2010-08-18 14:14 UTC (permalink / raw
To: gentoo-user
Am 18.08.2010 01:44, schrieb Albert Hopkins:
> On Tue, 2010-08-17 at 19:41 -0400, Albert Hopkins wrote:
>> Here is my edit of his Python script.
>
> ... which I actually forgot to attach :|
funny stuff.
Unfortunately I get
# ./keypress.py
Traceback (most recent call last):
File "./keypress.py", line 11, in <module>
from Xlib.display import Display
ImportError: No module named Xlib.display
What should I emerge??
;-)
thx, s
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [gentoo-user] Typewriter sound
2010-08-18 14:14 ` Stefan G. Weichinger
@ 2010-08-18 15:10 ` Peter Ruskin
2010-08-18 16:46 ` Stefan G. Weichinger
0 siblings, 1 reply; 40+ messages in thread
From: Peter Ruskin @ 2010-08-18 15:10 UTC (permalink / raw
To: gentoo-user
On Wednesday 18 August 2010 15:14:34 Stefan G. Weichinger wrote:
> Am 18.08.2010 01:44, schrieb Albert Hopkins:
> > On Tue, 2010-08-17 at 19:41 -0400, Albert Hopkins wrote:
> >> Here is my edit of his Python script.
> >
> > ... which I actually forgot to attach :|
>
> funny stuff.
>
> Unfortunately I get
>
>
> # ./keypress.py
> Traceback (most recent call last):
> File "./keypress.py", line 11, in <module>
> from Xlib.display import Display
> ImportError: No module named Xlib.display
>
> What should I emerge??
>
> ;-)
>
> thx, s
python-xlib
--
Peter
========================================================================
Gentoo Linux: Portage 2.2_rc67 kernel-2.6.35-gentoo-r1
AMD Phenom(tm) 9950 Quad-Core Processor gcc(Gentoo: 4.4.4-r1)
KDE: 3.5.10 Qt: 3.3.8b
========================================================================
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [gentoo-user] Typewriter sound
2010-08-18 3:42 ` Paul Hartman
2010-08-18 3:53 ` Dale
@ 2010-08-18 15:56 ` meino.cramer
1 sibling, 0 replies; 40+ messages in thread
From: meino.cramer @ 2010-08-18 15:56 UTC (permalink / raw
To: gentoo-user
Paul Hartman <paul.hartman+gentoo@gmail.com> [10-08-18 17:12]:
> On Tue, Aug 17, 2010 at 5:47 PM, <meino.cramer@gmx.de> wrote:
> > By the way (the same way! ;))
> > I am in search of such an "model m" IBM-keyboard. A colleque
> > yesterday calls me and said, that he found one for me in the
> > PC-junk at the basement of the building he is working in.
> > Hopefully it is one which is 1.) fully working and 2.)
> > with german keyboard layout. Fingers crossed.
>
> Unicomp owns the patent from the original IBM/Lexmark Model M
> keyboards, they still make & sell modern versions (with USB and
> Windows keys, if you want, also versions with PS/2 or without windows
> keys are available). And you can buy it with German configuration. You
> can even buy it with quiet keys, but what is the point of that?? ;)
> They are made in the USA but can be shipped worldwide.
>
> This is the model I have (in black with grey keys):
> http://pckeyboards.stores.yahoo.net/customizer.html
>
> It is the same size and weight like the old keyboards, very heavy,
> each key cap can be removed, it is loud & clicks nicely and is very
> awesome. For USD$69 I think it is a bargain, I type on the computer
> every day and this keyboard is simply perfect to me. After using cheap
> $5 and $10 keyboards for so many years, now I will never go back to
> those.
>
> Their website is http://www.pckeyboard.com and they have other
> keyboard variations such as a Linux keyboard.
>
> I highly recommend it for anyone who likes a huge and loud keyboard
> that feels incredible. :)
>
Hi Paul,
yes, I saw the sites/homepages of both sellers before. Unfortunately
shipping costs to germany is high and payment is complex.
If they only would have a distributor here in germany...
But with little luck, next week a colleque will give me one
of those really old, sturdy, heavy, loud and WONDERFUL original
IBM keyboards. Fingers crossed that is a "Model M" with buckling
springs, german layout and all functional!
Happy hacking!
Best regards,
mcc
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [gentoo-user] Typewriter sound
2010-08-17 22:14 ` [gentoo-user] " Paul Hartman
2010-08-17 22:47 ` meino.cramer
2010-08-17 23:17 ` Albert Hopkins
@ 2010-08-18 16:06 ` meino.cramer
2 siblings, 0 replies; 40+ messages in thread
From: meino.cramer @ 2010-08-18 16:06 UTC (permalink / raw
To: gentoo-user
Paul Hartman <paul.hartman+gentoo@gmail.com> [10-08-18 00:20]:
> On Tue, Aug 17, 2010 at 12:20 PM, <meino.cramer@gmx.de> wrote:
> > Hi,
> >
> > on YouTube there was a Blender-2.5 tutorial with audio.
> > There was an interesting detail: While there were spoken
> > instructions one can hear one typing on its keyboard.
> > Each hit on one of the keys made the sound of an old
> > typewriter (no, it was not the sound of the legendary
> > "IBM Model M" keyboard ;) ).
> >
> > How can I achieve this?
>
> I have not tried it, but a Google search showed me this:
> http://github.com/colszowka/linux-typewriter
>
> BTW - I have Unicomp keyboards (modern version of IBM Model M) and
> they are loud and awesome ;)
>
Hi,
I am still searching for a specific typewriter sound -- the one I heard
in the background of the video of the blender tutorial.
It sounds like a pure mechanical typewriter. And it sounds like
one is typeing onto a paper, which was put into the typewriter with
a little gap between the paper and the rubber platen roller (hopefully
I got these words right...), so each hit onto one of the keys is followed
with a little "PENG!" (or should I call it "BANG!") when the type
hits the paper and hammers it against the roller.
Little literarty "shoots" somehow. The incarnation of rhetorical power
in some way...;)
Does someone know of more typewrite sounds? I searched the net and
found another source but the sound wasn't there...
Keep hacking!
Best regards,
mcc
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [gentoo-user] Typewriter sound
2010-08-17 23:44 ` Albert Hopkins
2010-08-18 14:14 ` Stefan G. Weichinger
@ 2010-08-18 16:20 ` meino.cramer
2010-08-18 16:43 ` Albert Hopkins
1 sibling, 1 reply; 40+ messages in thread
From: meino.cramer @ 2010-08-18 16:20 UTC (permalink / raw
To: gentoo-user
Albert Hopkins <marduk@letterboxes.org> [10-08-18 04:16]:
> On Tue, 2010-08-17 at 19:41 -0400, Albert Hopkins wrote:
> > Here is my edit of his Python script.
>
> ... which I actually forgot to attach :|
>
> -a
>
> #!/usr/bin/env python
> ## A tiny, nifty script for playing musical notes on each keypress.
> ##
> ## Copyright Sayan "Riju" Chakrabarti (sayanriju) 2009
> ## me[at]sayanriju[dot]co[dot]cc ##
> ## Released under WTFPL Version 2
> ## (DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE)
> ## Copy of license text can be found online at ## http://sam.zoy.org/wtfpl/COPYING
> ## http://rants.sayanriju.co.cc/script-to-make-tick-tick-sound-on-keypress
>
> from Xlib.display import Display
> import subprocess
> import time
>
> KEYPRESSFILE = 'typewriter-key-1.wav'
> RETURNFILE = 'typewriter-line-break-1.wav'
>
> notes=[440,494,523,587,659,698,784]
>
> ZERO,SHIFT,ALT,CTL=[],[],[],[]
> ENTER = [0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
> for i in range(0,32):
> ZERO.append(0)
> if i==6:
> SHIFT.append(4)
> else:
> SHIFT.append(0)
> if i==4:
> CTL.append(32)
> else:
> CTL.append(0)
> if i==8:
> ALT.append(1)
> else:
> ALT.append(0)
>
> ignorelist=[ZERO,ALT,SHIFT,CTL]
>
> def main():
> disp = Display() # connect to display
>
> while 1: #event loop
> keymap = disp.query_keymap()
> if keymap not in ignorelist:
> filename = RETURNFILE if keymap == ENTER else KEYPRESSFILE
> subprocess.Popen(['aplay', filename], stderr=open('/dev/null',
> 'w'))
> time.sleep(0.1)
>
>
> if __name__ == '__main__':
> main()
Hi,
I checked the script -- it works :)
But it is to slow (my computer is to slow, I am too fast?)
I can press twice the number of keys which got "sounded" by
the script.
Or is something wrong with the setup of my sound interface?
My computer is a Athlon XP2 64 (32 bit Gentoo) 3800+, so I
think, that it is not /that/ slow :)
Any ideas?
Best regards,
mcc
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [gentoo-user] Typewriter sound
2010-08-18 16:20 ` meino.cramer
@ 2010-08-18 16:43 ` Albert Hopkins
0 siblings, 0 replies; 40+ messages in thread
From: Albert Hopkins @ 2010-08-18 16:43 UTC (permalink / raw
To: gentoo-user
On Wed, 2010-08-18 at 18:20 +0200, meino.cramer@gmx.de wrote:
> I checked the script -- it works :)
> But it is to slow (my computer is to slow, I am too fast?)
> I can press twice the number of keys which got "sounded" by
> the script.
> Or is something wrong with the setup of my sound interface?
> My computer is a Athlon XP2 64 (32 bit Gentoo) 3800+, so I
> think, that it is not /that/ slow :)
> Any ideas?
> Best regards,
> mcc
I can't say. It works fine on the two machines I tested on (not
super-fast machines but "modern").
-a
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [gentoo-user] Typewriter sound
2010-08-18 15:10 ` Peter Ruskin
@ 2010-08-18 16:46 ` Stefan G. Weichinger
0 siblings, 0 replies; 40+ messages in thread
From: Stefan G. Weichinger @ 2010-08-18 16:46 UTC (permalink / raw
To: gentoo-user
Am 18.08.2010 17:10, schrieb Peter Ruskin:
> python-xlib
thank you, works now, it's fun (for a while ... ;-) )
S
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [gentoo-user] Typewriter sound
2010-08-17 19:34 ` Albert Hopkins
2010-08-17 21:44 ` Mick
@ 2011-08-31 15:18 ` Space Cake
2011-08-31 15:41 ` [gentoo-user] " Grant Edwards
2011-08-31 15:54 ` [gentoo-user] " Volker Armin Hemmann
1 sibling, 2 replies; 40+ messages in thread
From: Space Cake @ 2011-08-31 15:18 UTC (permalink / raw
To: gentoo-user
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
2010-08-17 21:34 keltezéssel, Albert Hopkins írta:
> On Tue, 2010-08-17 at 20:43 +0200, meino.cramer@gmx.de wrote:
>> Bill Longman <bill.longman@gmail.com> [10-08-17 20:16]:
>>> On 08/17/2010 10:56 AM, Albert Hopkins wrote:
>>>> On Tue, 2010-08-17 at 19:20 +0200, meino.cramer@gmx.de
>>>> wrote:
>>>>> Hi,
>>>>>
>>>>> on YouTube there was a Blender-2.5 tutorial with audio.
>>>>> There was an interesting detail: While there were spoken
>>>>> instructions one can hear one typing on its keyboard. Each
>>>>> hit on one of the keys made the sound of an old typewriter
>>>>> (no, it was not the sound of the legendary "IBM Model M"
>>>>> keyboard ;) ).
>>>>>
>>>>> How can I achieve this? What software can I use to make
>>>>> this geeky feature to come true. Unfortunately I have no
>>>>> idea, how to name this kind of what(?) ...
>>>>>
>>>>> Thank you very much for any hint in advance! Best regards,
>>>>> mcc
>>>>
>>>> There probably a number of ways to do this.
>>>>
>>>> A cheap and easy way would be to use xev to monitor a window
>>>> and then pipe the stderr to a a program that waits for a
>>>> keypress event and then plays an apropriate.
>>>>
>>>> A less cheap way would be to have our program do what xev
>>>> does instead of using a pipe.
>>>
>>> Or you could set your X keyclick using xset.
>>>
>>
>> Hi,
>>
>> thanks a lot for your replies! :) Is there any program already,
>> which does this? A daemon or...<insert missing words here>
>>
>> Best regards, mcc
>>
>>
>
> Well I found out that when you pass window id to xev it does not
> trap keyboard presses per-sé. But there is another way...
>
> Anway the following is a quick hack (in python). It pretty much
> works except it also seems to trap mouse presses. I got the .wav
> file at http://www.soundjay.com/typewriter-sounds.html
>
> I tried using 'xset c' but it basically does nothing for me. My
> guess is that it does work it basically sends the a BELL to the
> console.
>
>
> --- 8< CUT HERE
> --------------------------------------------------- import sys
> import subprocess
>
> soundfile = 'typewriter-key-1.wav'
>
> def main(): window_id = sys.argv[1] cmd = ['xev', '-id',
> window_id]
>
> p1 = subprocess.Popen(cmd, stdout=subprocess.PIPE) while True: line
> = p1.stdout.readline() if line.find('atom 0x14d') > -1:
> subprocess.Popen(['aplay', soundfile], stderr=open('/dev/null',
> 'w'))
>
>
> if __name__ == '__main__': main()
>
>
>
Guys, this is awesome :) Let's make an ebuild and put in portage :)
L:
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJOXlDCAAoJECu/a/sBwapoXS0IAMKolA55zV/mAQqlwe/qvk1w
HyVpirrOYYYQOsdJChnvYfpgWBUT0F8uwEaO1pLGdlACrN0VHYJMk45nC8PBtKkL
gkrnR0Q0Ew6bZ1DeXjd2x+jZEN5Am6vQCHxLd85OJfTvIM7Ahc+FdJWtfhcaO8IF
hXppxITOQ9hCH+iEhel6TTq4wAQjX/i0C6RsF9RTGbocAzCdpZSs/RPffQiHuScv
IBrKOxLCQ2TACmdYmbK47vCKH6rgsNDENWD19g9zVouHHtXLeBnavG42wV46qCUW
OmNoKFA00ZXmuVUhpyUhhLSv6D4n5w7TFKdNXFof6Whf6/9X82oVe4yQCgbC+E8=
=R2iT
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 40+ messages in thread
* [gentoo-user] Re: Typewriter sound
2011-08-31 15:18 ` Space Cake
@ 2011-08-31 15:41 ` Grant Edwards
2011-08-31 15:54 ` [gentoo-user] " Volker Armin Hemmann
1 sibling, 0 replies; 40+ messages in thread
From: Grant Edwards @ 2011-08-31 15:41 UTC (permalink / raw
To: gentoo-user
On 2011-08-31, Space Cake <spacecakex@gmail.com> wrote:
>>>>> A cheap and easy way would be to use xev to monitor a window and then
>>>>> pipe the stderr to a a program that waits for a keypress event and
>>>>> then plays an apropriate.
Thats how I did it in Python:
------------------------------------------------------------------------
#!/usr/bin/python
import sys
import subprocess
soundfile = 'typewriter-key-1.wav'
def main():
window_id = sys.argv[1]
cmd = ['xev', '-id', window_id]
p1 = subprocess.Popen(cmd, stdout=subprocess.PIPE)
while True:
line = p1.stdout.readline()
if line.find('KeyPress event') > -1:
subprocess.Popen(['aplay', soundfile],stderr=open('/dev/null','w'))
if __name__ == '__main__':
main()
----------------------------------------------------------------------
I don't remember where I got the typewriter-key-1.wav file from.
It's amusing for about 30 seconds.... ;)
--
Grant Edwards grant.b.edwards Yow! FUN is never having to
at say you're SUSHI!!
gmail.com
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [gentoo-user] Typewriter sound
2011-08-31 15:18 ` Space Cake
2011-08-31 15:41 ` [gentoo-user] " Grant Edwards
@ 2011-08-31 15:54 ` Volker Armin Hemmann
2011-08-31 16:20 ` Space Cake
2011-08-31 16:27 ` [gentoo-user] " Grant Edwards
1 sibling, 2 replies; 40+ messages in thread
From: Volker Armin Hemmann @ 2011-08-31 15:54 UTC (permalink / raw
To: gentoo-user
Am Mittwoch 31 August 2011, 17:18:26 schrieb Space Cake:
> 2010-08-17 21:34 keltezéssel, Albert Hopkins írta:
> > On Tue, 2010-08-17 at 20:43 +0200, meino.cramer@gmx.de wrote:
> >> Bill Longman <bill.longman@gmail.com> [10-08-17 20:16]:
> >>> On 08/17/2010 10:56 AM, Albert Hopkins wrote:
> >>>> On Tue, 2010-08-17 at 19:20 +0200, meino.cramer@gmx.de
> >>>>
> >>>> wrote:
> >>>>> Hi,
> >>>>>
> >>>>> on YouTube there was a Blender-2.5 tutorial with audio.
> >>>>> There was an interesting detail: While there were spoken
> >>>>> instructions one can hear one typing on its keyboard. Each
> >>>>> hit on one of the keys made the sound of an old typewriter
> >>>>> (no, it was not the sound of the legendary "IBM Model M"
> >>>>> keyboard ;) ).
> >>>>>
> >>>>> How can I achieve this? What software can I use to make
> >>>>> this geeky feature to come true. Unfortunately I have no
> >>>>> idea, how to name this kind of what(?) ...
> >>>>>
> >>>>> Thank you very much for any hint in advance! Best regards,
> >>>>> mcc
> >>>>
> >>>> There probably a number of ways to do this.
> >>>>
> >>>> A cheap and easy way would be to use xev to monitor a window
> >>>> and then pipe the stderr to a a program that waits for a
> >>>> keypress event and then plays an apropriate.
> >>>>
> >>>> A less cheap way would be to have our program do what xev
> >>>> does instead of using a pipe.
> >>>
> >>> Or you could set your X keyclick using xset.
> >>
> >> Hi,
> >>
> >> thanks a lot for your replies! :) Is there any program already,
> >> which does this? A daemon or...<insert missing words here>
> >>
> >> Best regards, mcc
> >
> > Well I found out that when you pass window id to xev it does not
> > trap keyboard presses per-sé. But there is another way...
> >
> > Anway the following is a quick hack (in python). It pretty much
> > works except it also seems to trap mouse presses. I got the .wav
> > file at http://www.soundjay.com/typewriter-sounds.html
> >
> > I tried using 'xset c' but it basically does nothing for me. My
> > guess is that it does work it basically sends the a BELL to the
> > console.
> >
> >
> > --- 8< CUT HERE
> > --------------------------------------------------- import sys
> > import subprocess
> >
> > soundfile = 'typewriter-key-1.wav'
> >
> > def main(): window_id = sys.argv[1] cmd = ['xev', '-id',
> > window_id]
> >
> > p1 = subprocess.Popen(cmd, stdout=subprocess.PIPE) while True: line
> > = p1.stdout.readline() if line.find('atom 0x14d') > -1:
> > subprocess.Popen(['aplay', soundfile], stderr=open('/dev/null',
> > 'w'))
> >
> >
> > if __name__ == '__main__': main()
>
> Guys, this is awesome :) Let's make an ebuild and put in portage :)
>
> L:
why?
man xset
really guys. Why do it the long, hard and stupid way if there have been
simple, built in solutions for longer than some of you live?
--
#163933
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [gentoo-user] Typewriter sound
2011-08-31 15:54 ` [gentoo-user] " Volker Armin Hemmann
@ 2011-08-31 16:20 ` Space Cake
2011-08-31 16:27 ` [gentoo-user] " Grant Edwards
1 sibling, 0 replies; 40+ messages in thread
From: Space Cake @ 2011-08-31 16:20 UTC (permalink / raw
To: gentoo-user
On 2011. aug. 31., szerda, 17.54.15 CEST, Volker Armin Hemmann wrote:
> Am Mittwoch 31 August 2011, 17:18:26 schrieb Space Cake:
>> 2010-08-17 21:34 keltezéssel, Albert Hopkins írta:
>>> On Tue, 2010-08-17 at 20:43 +0200, meino.cramer@gmx.de wrote:
>>>> Bill Longman <bill.longman@gmail.com> [10-08-17 20:16]:
>>>>> On 08/17/2010 10:56 AM, Albert Hopkins wrote:
>>>>>> On Tue, 2010-08-17 at 19:20 +0200, meino.cramer@gmx.de
>>>>>>
>>>>>> wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> on YouTube there was a Blender-2.5 tutorial with audio.
>>>>>>> There was an interesting detail: While there were spoken
>>>>>>> instructions one can hear one typing on its keyboard. Each
>>>>>>> hit on one of the keys made the sound of an old typewriter
>>>>>>> (no, it was not the sound of the legendary "IBM Model M"
>>>>>>> keyboard ;) ).
>>>>>>>
>>>>>>> How can I achieve this? What software can I use to make
>>>>>>> this geeky feature to come true. Unfortunately I have no
>>>>>>> idea, how to name this kind of what(?) ...
>>>>>>>
>>>>>>> Thank you very much for any hint in advance! Best regards,
>>>>>>> mcc
>>>>>>
>>>>>> There probably a number of ways to do this.
>>>>>>
>>>>>> A cheap and easy way would be to use xev to monitor a window
>>>>>> and then pipe the stderr to a a program that waits for a
>>>>>> keypress event and then plays an apropriate.
>>>>>>
>>>>>> A less cheap way would be to have our program do what xev
>>>>>> does instead of using a pipe.
>>>>>
>>>>> Or you could set your X keyclick using xset.
>>>>
>>>> Hi,
>>>>
>>>> thanks a lot for your replies! :) Is there any program already,
>>>> which does this? A daemon or...<insert missing words here>
>>>>
>>>> Best regards, mcc
>>>
>>> Well I found out that when you pass window id to xev it does not
>>> trap keyboard presses per-sé. But there is another way...
>>>
>>> Anway the following is a quick hack (in python). It pretty much
>>> works except it also seems to trap mouse presses. I got the .wav
>>> file at http://www.soundjay.com/typewriter-sounds.html
>>>
>>> I tried using 'xset c' but it basically does nothing for me. My
>>> guess is that it does work it basically sends the a BELL to the
>>> console.
>>>
>>>
>>> --- 8< CUT HERE
>>> --------------------------------------------------- import sys
>>> import subprocess
>>>
>>> soundfile = 'typewriter-key-1.wav'
>>>
>>> def main(): window_id = sys.argv[1] cmd = ['xev', '-id',
>>> window_id]
>>>
>>> p1 = subprocess.Popen(cmd, stdout=subprocess.PIPE) while True: line
>>> = p1.stdout.readline() if line.find('atom 0x14d') > -1:
>>> subprocess.Popen(['aplay', soundfile], stderr=open('/dev/null',
>>> 'w'))
>>>
>>>
>>> if __name__ == '__main__': main()
>>
>> Guys, this is awesome :) Let's make an ebuild and put in portage :)
>>
>> L:
>
> why?
> man xset
>
> really guys. Why do it the long, hard and stupid way if there have been
> simple, built in solutions for longer than some of you live?
I can't achieve the same with xset :) but this solution is working very
well, this is a really important project showing the power of
opensource :)
L:
^ permalink raw reply [flat|nested] 40+ messages in thread
* [gentoo-user] Re: Typewriter sound
2011-08-31 15:54 ` [gentoo-user] " Volker Armin Hemmann
2011-08-31 16:20 ` Space Cake
@ 2011-08-31 16:27 ` Grant Edwards
2011-08-31 16:49 ` Paul Hartman
1 sibling, 1 reply; 40+ messages in thread
From: Grant Edwards @ 2011-08-31 16:27 UTC (permalink / raw
To: gentoo-user
On 2011-08-31, Volker Armin Hemmann <volkerarmin@googlemail.com> wrote:
> why?
> man xset
Can you explain further?
I've read the xset man page, I've tried the 'c' option, and it does
absolutely nothing. To the best of my recollection, the 'xset c'
command has never done anything on any X11 machine I've used in the
past 15+ years. I have vague memories of it having done something on
Sun 3 hardware 20 years ago, but all it did was turn a "click" on/off.
> really guys. Why do it the long, hard and stupid way if there have been
> simple, built in solutions for longer than some of you live?
What solution is that?
--
Grant Edwards grant.b.edwards Yow! I'm using my X-RAY
at VISION to obtain a rare
gmail.com glimpse of the INNER
WORKINGS of this POTATO!!
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [gentoo-user] Re: Typewriter sound
2011-08-31 16:27 ` [gentoo-user] " Grant Edwards
@ 2011-08-31 16:49 ` Paul Hartman
2011-08-31 17:46 ` Grant Edwards
0 siblings, 1 reply; 40+ messages in thread
From: Paul Hartman @ 2011-08-31 16:49 UTC (permalink / raw
To: gentoo-user
On Wed, Aug 31, 2011 at 11:27 AM, Grant Edwards
<grant.b.edwards@gmail.com> wrote:
> I've read the xset man page, I've tried the 'c' option, and it does
> absolutely nothing. To the best of my recollection, the 'xset c'
> command has never done anything on any X11 machine I've used in the
> past 15+ years. I have vague memories of it having done something on
> Sun 3 hardware 20 years ago, but all it did was turn a "click" on/off.
My guess is that maybe it depends on either:
a) your keyboard having a speaker built-in
b) old school pc-speaker in your computer
but maybe I'm wrong. :)
^ permalink raw reply [flat|nested] 40+ messages in thread
* [gentoo-user] Re: Typewriter sound
2011-08-31 16:49 ` Paul Hartman
@ 2011-08-31 17:46 ` Grant Edwards
2011-08-31 18:50 ` Paul Hartman
0 siblings, 1 reply; 40+ messages in thread
From: Grant Edwards @ 2011-08-31 17:46 UTC (permalink / raw
To: gentoo-user
On 2011-08-31, Paul Hartman <paul.hartman+gentoo@gmail.com> wrote:
> On Wed, Aug 31, 2011 at 11:27 AM, Grant Edwards
><grant.b.edwards@gmail.com> wrote:
>> I've read the xset man page, I've tried the 'c' option, and it does
>> absolutely nothing. ?To the best of my recollection, the 'xset c'
>> command has never done anything on any X11 machine I've used in the
>> past 15+ years. ?I have vague memories of it having done something on
>> Sun 3 hardware 20 years ago, but all it did was turn a "click" on/off.
>
> My guess is that maybe it depends on either:
>
> a) your keyboard having a speaker built-in
I believe that's how it worked with Sun3 keyboards.
> b) old school pc-speaker in your computer
Even then, how do you play a recorded sound file containing a
typeblock-hitting-platen sound through that speaker? It was connected
to a timer-counter output pin not a D/A converter (unless you count
timer/counter output pin as a 1-bit D/A converter).
> but maybe I'm wrong. :)
--
Grant Edwards grant.b.edwards Yow! This ASEXUAL PIG
at really BOILS my BLOOD
gmail.com ... He's so ... so
... URGENT!!
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [gentoo-user] Re: Typewriter sound
2011-08-31 17:46 ` Grant Edwards
@ 2011-08-31 18:50 ` Paul Hartman
2011-08-31 20:18 ` Grant Edwards
0 siblings, 1 reply; 40+ messages in thread
From: Paul Hartman @ 2011-08-31 18:50 UTC (permalink / raw
To: gentoo-user
On Wed, Aug 31, 2011 at 12:46 PM, Grant Edwards
<grant.b.edwards@gmail.com> wrote:
>> b) old school pc-speaker in your computer
>
> Even then, how do you play a recorded sound file containing a
> typeblock-hitting-platen sound through that speaker? It was connected
> to a timer-counter output pin not a D/A converter (unless you count
> timer/counter output pin as a 1-bit D/A converter).
I think it just made the generic "beep" (or a beep short enough and
low enough in tone to sound similar to a click) not playing a custom
sound file.
^ permalink raw reply [flat|nested] 40+ messages in thread
* [gentoo-user] Re: Typewriter sound
2011-08-31 18:50 ` Paul Hartman
@ 2011-08-31 20:18 ` Grant Edwards
2011-08-31 21:58 ` Paul Hartman
2011-09-04 12:55 ` Alex Schuster
0 siblings, 2 replies; 40+ messages in thread
From: Grant Edwards @ 2011-08-31 20:18 UTC (permalink / raw
To: gentoo-user
On 2011-08-31, Paul Hartman <paul.hartman+gentoo@gmail.com> wrote:
> On Wed, Aug 31, 2011 at 12:46 PM, Grant Edwards
><grant.b.edwards@gmail.com> wrote:
>>> b) old school pc-speaker in your computer
>>
>> Even then, how do you play a recorded sound file containing a
>> typeblock-hitting-platen sound through that speaker? It was connected
>> to a timer-counter output pin not a D/A converter (unless you count
>> timer/counter output pin as a 1-bit D/A converter).
>
> I think it just made the generic "beep" (or a beep short enough and
> low enough in tone to sound similar to a click)
I checked, and I do have the old standard PC-speaker connected to the
motherboard, and "xset c" still does nothing.
> not playing a custom sound file.
Which is what the OP asked for.
--
Grant Edwards grant.b.edwards Yow! Why don't you ever
at enter any CONTESTS,
gmail.com Marvin?? Don't you know
your own ZIPCODE?
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [gentoo-user] Re: Typewriter sound
2011-08-31 20:18 ` Grant Edwards
@ 2011-08-31 21:58 ` Paul Hartman
2011-09-01 0:57 ` Grant Edwards
2011-09-04 12:55 ` Alex Schuster
1 sibling, 1 reply; 40+ messages in thread
From: Paul Hartman @ 2011-08-31 21:58 UTC (permalink / raw
To: gentoo-user
On Wed, Aug 31, 2011 at 3:18 PM, Grant Edwards
<grant.b.edwards@gmail.com> wrote:
> On 2011-08-31, Paul Hartman <paul.hartman+gentoo@gmail.com> wrote:
>> On Wed, Aug 31, 2011 at 12:46 PM, Grant Edwards
>><grant.b.edwards@gmail.com> wrote:
>>>> b) old school pc-speaker in your computer
>>>
>>> Even then, how do you play a recorded sound file containing a
>>> typeblock-hitting-platen sound through that speaker? It was connected
>>> to a timer-counter output pin not a D/A converter (unless you count
>>> timer/counter output pin as a 1-bit D/A converter).
>>
>> I think it just made the generic "beep" (or a beep short enough and
>> low enough in tone to sound similar to a click)
>
> I checked, and I do have the old standard PC-speaker connected to the
> motherboard, and "xset c" still does nothing.
>
>> not playing a custom sound file.
>
> Which is what the OP asked for.
Hey, it wasn't my idea. Talk to Volker for more details about the
xset-as-typewriter-sound idea. :) I didn't reply to the OP. I only
replied about xset (non-)functionality, where it sounds like we're in
agreement that it just sounds the system bell (or whatever you call
it).
^ permalink raw reply [flat|nested] 40+ messages in thread
* [gentoo-user] Re: Typewriter sound
2011-08-31 21:58 ` Paul Hartman
@ 2011-09-01 0:57 ` Grant Edwards
2011-09-01 2:43 ` Paul Hartman
` (2 more replies)
0 siblings, 3 replies; 40+ messages in thread
From: Grant Edwards @ 2011-09-01 0:57 UTC (permalink / raw
To: gentoo-user
On 2011-08-31, Paul Hartman <paul.hartman+gentoo@gmail.com> wrote:
>> I checked, and I do have the old standard PC-speaker connected to the
>> motherboard, and "xset c" still does nothing.
>>
>>> not playing a custom sound file.
>>
>> Which is what the OP asked for.
>
> Hey, it wasn't my idea. Talk to Volker for more details about the
> xset-as-typewriter-sound idea. :)
I'm still waiting for him to defend his snide remarks about how we
were all stupid for doing things other than using xset...
> I didn't reply to the OP. I only replied about xset
> (non-)functionality, where it sounds like we're in agreement that it
> just sounds the system bell (or whatever you call it).
No, it doesn't do that for me, and I don't ever remember being able to
get it to do so. I just tried on a couple different systems (all of
which have a "pc speaker", and 'xset c' doesn't do anying.
Does 'xset c' work for you?
--
Grant
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [gentoo-user] Re: Typewriter sound
2011-09-01 0:57 ` Grant Edwards
@ 2011-09-01 2:43 ` Paul Hartman
2011-09-01 13:53 ` Grant Edwards
2011-09-01 14:22 ` Frank Steinmetzger
2011-09-01 16:36 ` Volker Armin Hemmann
2 siblings, 1 reply; 40+ messages in thread
From: Paul Hartman @ 2011-09-01 2:43 UTC (permalink / raw
To: gentoo-user
On Wed, Aug 31, 2011 at 7:57 PM, Grant Edwards
<grant.b.edwards@gmail.com> wrote:
> Does 'xset c' work for you?
Well, it "works" as far as it sets the key click value successfully
(if you "xset q" you can see if it's set) but there's no noises made
by my computer. Looking more at xset it seems it's really just for
setting the volume on keyboards with built-in speakers (which I
haven't seen for probably 20 years). Luckily(?) my keyboard is so loud
it can be heard from the other side of the house. :)
^ permalink raw reply [flat|nested] 40+ messages in thread
* [gentoo-user] Re: Typewriter sound
2011-09-01 2:43 ` Paul Hartman
@ 2011-09-01 13:53 ` Grant Edwards
0 siblings, 0 replies; 40+ messages in thread
From: Grant Edwards @ 2011-09-01 13:53 UTC (permalink / raw
To: gentoo-user
On 2011-09-01, Paul Hartman <paul.hartman+gentoo@gmail.com> wrote:
> On Wed, Aug 31, 2011 at 7:57 PM, Grant Edwards
><grant.b.edwards@gmail.com> wrote:
>> Does 'xset c' work for you?
>
> Well, it "works" as far as it sets the key click value successfully
> (if you "xset q" you can see if it's set) but there's no noises made
> by my computer.
Exactly.
> Looking more at xset it seems it's really just for setting the volume
> on keyboards with built-in speakers (which I haven't seen for
> probably 20 years). Luckily(?) my keyboard is so loud it can be heard
> from the other side of the house. :)
At home I'm still using the keyboard that came with my 8MHz IBM PC-AT.
It makes plenty of noise -- though it's still quieter than the
original IBM PC keyboard.
--
Grant Edwards grant.b.edwards Yow! Look! A ladder!
at Maybe it leads to heaven,
gmail.com or a sandwich!
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [gentoo-user] Re: Typewriter sound
2011-09-01 0:57 ` Grant Edwards
2011-09-01 2:43 ` Paul Hartman
@ 2011-09-01 14:22 ` Frank Steinmetzger
2011-09-01 18:58 ` Mick
2011-09-01 16:36 ` Volker Armin Hemmann
2 siblings, 1 reply; 40+ messages in thread
From: Frank Steinmetzger @ 2011-09-01 14:22 UTC (permalink / raw
To: gentoo-user
Am Donnerstag, 1. September 2011, 00:57:37 schrieb Grant Edwards:
> > I didn't reply to the OP. I only replied about xset
> > (non-)functionality, where it sounds like we're in agreement that it
> > just sounds the system bell (or whatever you call it).
>
> No, it doesn't do that for me, and I don't ever remember being able to
> get it to do so. I just tried on a couple different systems (all of
> which have a "pc speaker", and 'xset c' doesn't do anying.
>
> Does 'xset c' work for you?
I haven't tested it here, but do you have the speaker enabled in the kernel?
(CONFIG_INPUT_PCSPKR)
--
Gruß | Greetings | Qapla'
This sentence no verb.
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [gentoo-user] Re: Typewriter sound
2011-09-01 0:57 ` Grant Edwards
2011-09-01 2:43 ` Paul Hartman
2011-09-01 14:22 ` Frank Steinmetzger
@ 2011-09-01 16:36 ` Volker Armin Hemmann
2011-09-01 19:11 ` Grant Edwards
2 siblings, 1 reply; 40+ messages in thread
From: Volker Armin Hemmann @ 2011-09-01 16:36 UTC (permalink / raw
To: gentoo-user
Am Donnerstag 01 September 2011, 00:57:37 schrieb Grant Edwards:
> On 2011-08-31, Paul Hartman <paul.hartman+gentoo@gmail.com> wrote:
> >> I checked, and I do have the old standard PC-speaker connected to the
> >> motherboard, and "xset c" still does nothing.
> >>
> >>> not playing a custom sound file.
> >>
> >> Which is what the OP asked for.
> >
> > Hey, it wasn't my idea. Talk to Volker for more details about the
> > xset-as-typewriter-sound idea. :)
>
> I'm still waiting for him to defend his snide remarks about how we
> were all stupid for doing things other than using xset...
>
> > I didn't reply to the OP. I only replied about xset
> > (non-)functionality, where it sounds like we're in agreement that it
> > just sounds the system bell (or whatever you call it).
>
> No, it doesn't do that for me, and I don't ever remember being able to
> get it to do so. I just tried on a couple different systems (all of
> which have a "pc speaker", and 'xset c' doesn't do anying.
>
> Does 'xset c' work for you?
if xset does not work for you and you are using KDE: there is an option in
system-settings.
I am sure there is one for gnome in their config tool too.
You guys are still re-inventing wheels.
--
#163933
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [gentoo-user] Re: Typewriter sound
2011-09-01 14:22 ` Frank Steinmetzger
@ 2011-09-01 18:58 ` Mick
0 siblings, 0 replies; 40+ messages in thread
From: Mick @ 2011-09-01 18:58 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 1375 bytes --]
On Thursday 01 Sep 2011 15:22:29 Frank Steinmetzger wrote:
> Am Donnerstag, 1. September 2011, 00:57:37 schrieb Grant Edwards:
> > > I didn't reply to the OP. I only replied about xset
> > > (non-)functionality, where it sounds like we're in agreement that it
> > > just sounds the system bell (or whatever you call it).
> >
> > No, it doesn't do that for me, and I don't ever remember being able to
> > get it to do so. I just tried on a couple different systems (all of
> > which have a "pc speaker", and 'xset c' doesn't do anying.
> >
> > Does 'xset c' work for you?
>
> I haven't tested it here, but do you have the speaker enabled in the
> kernel? (CONFIG_INPUT_PCSPKR)
I have set:
$ cat /usr/src/linux/.config | grep PCSPKR
CONFIG_PCSPKR_PLATFORM=y
CONFIG_INPUT_PCSPKR=y
and can confirm that it doesn't click of beep, despite me setting it to do so:
$ xset -q | grep key
auto repeat: on key click percent: 80 LED mask: 00000000
auto repeating keys: 00ffffffdffffbbf
$ xset -q | grep bell
bell percent: 50 bell pitch: 400 bell duration: 100
Another box of mine used to beep (I like having the bell turned on to remind
me that I am typing rubbish ;) but some months ago it stopped doing so. I
never bothered looking into it and assumed that some change in Xorg caused
this.
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 40+ messages in thread
* [gentoo-user] Re: Typewriter sound
2011-09-01 16:36 ` Volker Armin Hemmann
@ 2011-09-01 19:11 ` Grant Edwards
0 siblings, 0 replies; 40+ messages in thread
From: Grant Edwards @ 2011-09-01 19:11 UTC (permalink / raw
To: gentoo-user
On 2011-09-01, Volker Armin Hemmann <volkerarmin@googlemail.com> wrote:
> You guys are still re-inventing wheels.
You keep saying that, and we keep asking what the "simple solution" is.
Why won't you answer?
--
Grant Edwards grant.b.edwards Yow! I'd like MY data-base
at JULIENNED and stir-fried!
gmail.com
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [gentoo-user] Re: Typewriter sound
2011-08-31 20:18 ` Grant Edwards
2011-08-31 21:58 ` Paul Hartman
@ 2011-09-04 12:55 ` Alex Schuster
1 sibling, 0 replies; 40+ messages in thread
From: Alex Schuster @ 2011-09-04 12:55 UTC (permalink / raw
To: gentoo-user
Grant Edwards writes:
> On 2011-08-31, Paul Hartman <paul.hartman+gentoo@gmail.com> wrote:
>> On Wed, Aug 31, 2011 at 12:46 PM, Grant Edwards
>> <grant.b.edwards@gmail.com> wrote:
>>>> b) old school pc-speaker in your computer
[...]
>> I think it just made the generic "beep" (or a beep short enough and
>> low enough in tone to sound similar to a click)
>
> I checked, and I do have the old standard PC-speaker connected to the
> motherboard, and "xset c" still does nothing.
Does the speaker actually work? Is the pcspkr module loaded?
Wonko
^ permalink raw reply [flat|nested] 40+ messages in thread
end of thread, other threads:[~2011-09-04 12:56 UTC | newest]
Thread overview: 40+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-17 17:20 [gentoo-user] Typewriter sound meino.cramer
2010-08-17 17:56 ` Albert Hopkins
2010-08-17 18:13 ` Bill Longman
2010-08-17 18:43 ` meino.cramer
2010-08-17 19:34 ` Albert Hopkins
2010-08-17 21:44 ` Mick
2010-08-17 23:11 ` Bill Longman
2011-08-31 15:18 ` Space Cake
2011-08-31 15:41 ` [gentoo-user] " Grant Edwards
2011-08-31 15:54 ` [gentoo-user] " Volker Armin Hemmann
2011-08-31 16:20 ` Space Cake
2011-08-31 16:27 ` [gentoo-user] " Grant Edwards
2011-08-31 16:49 ` Paul Hartman
2011-08-31 17:46 ` Grant Edwards
2011-08-31 18:50 ` Paul Hartman
2011-08-31 20:18 ` Grant Edwards
2011-08-31 21:58 ` Paul Hartman
2011-09-01 0:57 ` Grant Edwards
2011-09-01 2:43 ` Paul Hartman
2011-09-01 13:53 ` Grant Edwards
2011-09-01 14:22 ` Frank Steinmetzger
2011-09-01 18:58 ` Mick
2011-09-01 16:36 ` Volker Armin Hemmann
2011-09-01 19:11 ` Grant Edwards
2011-09-04 12:55 ` Alex Schuster
2010-08-17 22:14 ` [gentoo-user] " Paul Hartman
2010-08-17 22:47 ` meino.cramer
2010-08-18 3:42 ` Paul Hartman
2010-08-18 3:53 ` Dale
2010-08-18 13:45 ` [gentoo-user] " Grant Edwards
2010-08-18 15:56 ` [gentoo-user] " meino.cramer
2010-08-17 23:17 ` Albert Hopkins
2010-08-17 23:41 ` Albert Hopkins
2010-08-17 23:44 ` Albert Hopkins
2010-08-18 14:14 ` Stefan G. Weichinger
2010-08-18 15:10 ` Peter Ruskin
2010-08-18 16:46 ` Stefan G. Weichinger
2010-08-18 16:20 ` meino.cramer
2010-08-18 16:43 ` Albert Hopkins
2010-08-18 16:06 ` meino.cramer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox