FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 08-17-2010, 09:44 PM
Mick
 
Default Typewriter sound

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
 
Old 08-17-2010, 10:14 PM
Paul Hartman
 
Default Typewriter sound

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
 
Old 08-17-2010, 10:47 PM
 
Default Typewriter sound

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
 
Old 08-17-2010, 11:11 PM
Bill Longman
 
Default Typewriter sound

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....
 
Old 08-17-2010, 11:17 PM
Albert Hopkins
 
Default Typewriter sound

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
 
Old 08-17-2010, 11:41 PM
Albert Hopkins
 
Default Typewriter sound

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
 
Old 08-17-2010, 11:44 PM
Albert Hopkins
 
Default Typewriter sound

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
 
Old 08-18-2010, 03:42 AM
Paul Hartman
 
Default Typewriter sound

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.
 
Old 08-18-2010, 03:53 AM
Dale
 
Default Typewriter sound

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

:-) :-)
 
Old 08-18-2010, 01:45 PM
Grant Edwards
 
Default Typewriter sound

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??
 

Thread Tools




All times are GMT. The time now is 03:57 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org