WAITS

From Voidwarranties - Hackerspace Antwerp, Belgium
(Difference between revisions)
Jump to: navigation, search
(Volume, Volume, Turn up the volume!)
 
(3 intermediate revisions by one user not shown)
Line 8: Line 8:
  
 
-----
 
-----
I strongly protest against the chosen name, Tom is already the most common name in the space.--[[User:TomD|TomD]] 17:20, 19 August 2012 (CEST)
+
It is with deep regret and profound sadness that we inform you of the passing of TOM, whom WAITS replaced. Our most heartfelt sympathies and thoughts go to his family, colleagues and friends.
 
-----
 
-----
  
 
+
WAITS permanently sits at in silence at the end of the bar.  
TOM waits at in silence at the end of the bar.  
+
 
When someone pushes him, he quips out oneliners, setting the mood for the evening.
 
When someone pushes him, he quips out oneliners, setting the mood for the evening.
In doing so TOM is essential for the social atmosphere in the lounge.
+
In doing so WAITS is essential for the social atmosphere in the lounge.
TOM can turn any lame pun into an hilarious joke, a rambling story into a tragedy, and a sandwich into a banquet.
+
WAITS can turn any lame pun into an hilarious joke, a rambling story into a tragedy, and a sandwich into a banquet.
  
== Why TOM? ==
+
== Why WAITS? ==
 
* It is the only product you will ever need!
 
* It is the only product you will ever need!
 
* You can use it to adjust the MPD's volume!
 
* You can use it to adjust the MPD's volume!
Line 29: Line 28:
  
 
== How do we do it? (How do we do it?) ==  
 
== How do we do it? (How do we do it?) ==  
That's right, you too can be of a TOM. Follow these easy assembly instructions!
+
That's right, you too can be the proud owner of a WAITS. Follow these easy assembly instructions!
 
*You will need: a computer running X11 & a USB mouse
 
*You will need: a computer running X11 & a USB mouse
 
*Plug in the mouse, check xorg.log to find out it's name
 
*Plug in the mouse, check xorg.log to find out it's name
 
*Remap the buttons:  
 
*Remap the buttons:  
 
   xinput set-button-map "Logitech Optical USB Mouse" 51 52 53 54 55
 
   xinput set-button-map "Logitech Optical USB Mouse" 51 52 53 54 55
*configure xbindkeys to bind these buttons to actions
+
*configure xbindkeys to bind these buttons to actions. Write the following to ~/.xbindkeys
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
   "TOM 1"
+
   "WAITS 1"
b:51owowe
+
b:51
   "TOM 2"
+
   "WAITS 2"
 
b:52
 
b:52
   "TOM 3"
+
   "WAITS 3"
 
b:53
 
b:53
   "TOM mpc -q volume +10"
+
   "mpc -q volume +10"
 
b:54
 
b:54
 
   "mpc -q volume -10"
 
   "mpc -q volume -10"
 
b:55
 
b:55
 
</syntaxhighlight>
 
</syntaxhighlight>
* save the script in /usr/local/bin
+
* save the script to /usr/local/bin/WAITS
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
#!/bin/bash
 
#!/bin/bash
Line 56: Line 55:
 
for ((i=$volume; i > 0 ; i=i-10)); do mpc -q volume $i; done
 
for ((i=$volume; i > 0 ; i=i-10)); do mpc -q volume $i; done
 
mpc -q volume 0
 
mpc -q volume 0
paplay --volume=65536 /home/barputer/TOM/${1}.wav
+
paplay --volume=65536 /home/barputer/WAITS/${1}.wav
 
for ((i=0; i < $volume ; i=i+10)); do mpc -q volume $i; done
 
for ((i=0; i < $volume ; i=i+10)); do mpc -q volume $i; done
 
mpc -q volume $volume
 
mpc -q volume $volume
Line 67: Line 66:
 
</syntaxhighlight>
 
</syntaxhighlight>
 
* set the script as executable:
 
* set the script as executable:
   sudo chmod +x /usr/local/bin/TOM
+
   sudo chmod +x /usr/local/bin/WAITS
* copy your .WAV soundfiles to the directory specified in the script (/home/barputer/TOM/${1}.wav). Button 1 will play 1.wav, button 2 will play 2.wav ...  
+
* copy your .WAV soundfiles to the directory specified in the script (/home/barputer/WAITS/). Button 1 will play 1.wav, button 2 will play 2.wav ...  
 
* start xbindkeys
 
* start xbindkeys
 
   xbindkeys
 
   xbindkeys
 
* you probably want to execute the xinput and xbindkeys command at boot, for example in .xprofile.
 
* you probably want to execute the xinput and xbindkeys command at boot, for example in .xprofile.
 
  
 
== Volume, Volume, Turn up the volume! ==
 
== Volume, Volume, Turn up the volume! ==
Pulseaudio needs to be running, this is the case when the music is player.
+
<strike>Pulseaudio needs to be running, this is the case when the music is player.
However, we are still encountering some issues with pulseaudio.
+
However, we are still encountering some issues with pulseaudio.</strike> This should be solved since the pulseaudio setup on barputer was changed. Pulseaudio now runs as a system daemon.
  
 
== Bugs ==
 
== Bugs ==
When booting barputer TOM might change order with the touchscreen as to which one of them is the first input device (/dev/input/mouse0). This will cause the touchscreen to malfunction, probably because it is adressed as /dev/input/mouse0 in xorg.conf.
+
When booting barputer WAITS might change order with the touchscreen as to which one of them is the first input device (/dev/input/mouse0). This will cause the touchscreen to malfunction, probably because it is adressed as /dev/input/mouse0 in xorg.conf.
  
 
The buttons are also wired to pedals, which make and easier target to punch. But the mouse will not be recognized when these are plugged in.
 
The buttons are also wired to pedals, which make and easier target to punch. But the mouse will not be recognized when these are plugged in.

Latest revision as of 04:28, 6 September 2012


WAITS
What:
Tomwaits.jpg
Participants:
berz_, Tom Waits
Category:
Electronics
Locations:
at the bar



It is with deep regret and profound sadness that we inform you of the passing of TOM, whom WAITS replaced. Our most heartfelt sympathies and thoughts go to his family, colleagues and friends.


WAITS permanently sits at in silence at the end of the bar. When someone pushes him, he quips out oneliners, setting the mood for the evening. In doing so WAITS is essential for the social atmosphere in the lounge. WAITS can turn any lame pun into an hilarious joke, a rambling story into a tragedy, and a sandwich into a banquet.

Contents

Why WAITS?

How do we do it? (How do we do it?)

That's right, you too can be the proud owner of a WAITS. Follow these easy assembly instructions!

  xinput set-button-map "Logitech Optical USB Mouse" 51 52 53 54 55
  "WAITS 1"
	b:51
  "WAITS 2"
	b:52
  "WAITS 3"
	b:53
  "mpc -q volume +10"
	b:54
  "mpc -q volume -10"
	b:55
#!/bin/bash
STATE=$(ps ax | sed -n '/[0-9] paplay/p')
if [ "$STATE" = "" ]; then
	volume=$(mpc volume | sed 's/.*: *\([0-9]*\)%.*/\1/')
	echo $volume > /tmp/volume
	for ((i=$volume; i > 0 ; i=i-10)); do mpc -q volume $i; done
	mpc -q volume 0
	paplay --volume=65536 /home/barputer/WAITS/${1}.wav
	for ((i=0; i < $volume ; i=i+10)); do mpc -q volume $i; done
	mpc -q volume $volume
else
	volume=$(cat /tmp/volume)
	killall paplay
	for ((i=0; i < $volume ; i=i+10)); do mpc -q volume $i; done
	mpc -q volume $volume
fi
 sudo chmod +x /usr/local/bin/WAITS
 xbindkeys

Volume, Volume, Turn up the volume!

Pulseaudio needs to be running, this is the case when the music is player. However, we are still encountering some issues with pulseaudio. This should be solved since the pulseaudio setup on barputer was changed. Pulseaudio now runs as a system daemon.

Bugs

When booting barputer WAITS might change order with the touchscreen as to which one of them is the first input device (/dev/input/mouse0). This will cause the touchscreen to malfunction, probably because it is adressed as /dev/input/mouse0 in xorg.conf.

The buttons are also wired to pedals, which make and easier target to punch. But the mouse will not be recognized when these are plugged in.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox
Content Creation
Belgian Spaces