Live dubstep + tabla + flutebox
I found this video on the Engine-EarZ Experiment YouTube channel. It’s a live dubstep collaboration between the Engine-EarZ and Nathan “Flutebox” Lee:
Filed under: beats, dubstep, EngineEarz, flutebox, tabla · 0 Comments
Proofs of a Conspiracy
Boing Boing has an excellent post on the Birth of the Illuminati, which traces the Illuminati conspiracy theory back to a book called Proofs of a Conspiracy against all the Religions and Governments of Europe, published in 1797.
Here is a scan of Proofs of a Conspiracy, scanned from the John Adams Library by the Internet Archive:
Filed under: archive, books, fnord · 0 Comments
Zara and her Tiger
Filed under: · 0 Comments
Hardware volume key support on XFCE
XFCE4 from Debian unstable (“sid”) does not seem to bind the hardware volume-up, volume-down, and mute keyboard buttons on my ThinkPad to any actions. It’s convenient to be able to control the sound card with these dedicated buttons – no twiddling around with the mouse to reach for a volume slider when NWA hits your playlist and the boss walks over. I suppose this is just a rough edge with the current XFCE integration; Gnome seems to handle this pretty well out of the box, but then again, Gnome is a bloated pig compared to XFCE. So here’s one way to make the buttons work in XFCE.
First, you’ll need to make sure some prerequisite packages are installed: the package that provides the “amixer” binary, and some variant of awk. Open an XFCE terminal window by clicking on the XFCE “mouse” logo in the XFCE panel, then clicking “Terminal”. Become root by running the following and entering your root password:
su -
Then install the appropriate packages — here’s how to do it in Debian:
apt-get install alsa-utils mawk
Once the packages are installed, drop root privileges:
exit
Then let’s pick a place for our scripts to live. This example will assume that they will go into a ‘bin’ directory underneath your home directory; so, let’s make sure that exists:
mkdir ~/bin
Now, on to the scripts. Copy and paste the following script as “~/bin/alsa-toggle-mute”. Probably the easiest way to do this with a stock Debian system is to start the ‘nano’ editor with:
nano ~/bin/alsa-toggle-mute
highlighting the script below, and then using your middle mouse button to paste the script into the nano terminal window, then using “Ctrl-x y ENTER” to save the file:
#!/bin/sh
#
# alsa-toggle-mute
#
##########################################################
#
# AMIXER: path to your 'amixer' binary
AMIXER=/usr/bin/amixer
#
# CONTROL: sound card control to adjust: run 'amixer' to find this
CONTROL="Master,0"
#
# LEVELKEY: pattern on 'amixer' output lines to search for that provides
# the current control level
LEVELKEY=Mono:
#
##########################################################
#
$AMIXER sset $CONTROL \
`$AMIXER sget $CONTROL |
awk "(/$LEVELKEY/) { if (\\$NF == \\"[on]\\") { print \\"mute\\" } else { print \\"unmute\\" } }"` > /dev/null
Make the script executable:
chmod 700 ~/bin/alsa-toggle-mute
Then attach it to the hardware mute button with the XFCE keyboard settings manager GUI. Click on the XFCE “mouse” logo that should be on the edge of your XFCE panel; click “Settings” from the pop-up menu; then click “Keyboard”. Click on the “Application Shortcuts” tab. Then click “Add”. XFCE will ask for a path to the command; enter the full path to your alsa-toggle-mute script, e.g., “/home/username/bin/alsa-toggle-mute” — of course, you will have to substitute your username in that command. XFCE will then pop up a box waiting for the “Command Shortcut” — at this point, press your hardware mute button.
That should be it! Your mute button should now work.
Now let’s add support for the volume-up button. Save this script to “~/bin/alsa-volume-up”:
#!/bin/sh
#
# alsa-volume-up
#
##########################################################
#
# OFFSET: amount to increment/decrement the control level: e.g., -1
# decrements the volume, 1 increments the volume; values with
# a greater absolute magnitude will decrement or increment the
# control level more quickly. Use "$1" if you wish to pass
# the offset in from command line parameters
OFFSET=1
#
# AMIXER: path to your 'amixer' binary
AMIXER=/usr/bin/amixer
#
# CONTROL: sound control to adjust: run 'amixer' to find this
CONTROL="Master,0"
#
# LEVELKEY: pattern on 'amixer' output lines to search for that provides
# the current control level
LEVELKEY=Mono:
#
# LEVELFIELD: awk field number of the current control level
LEVELFIELD=3
#
##########################################################
#
$AMIXER sset $CONTROL \
`$AMIXER sget $CONTROL | \
awk "(/$LEVELKEY/) { print \\$$LEVELFIELD + $OFFSET }"` > /dev/null
Make it executable:
chmod 700 ~/bin/alsa-volume-up
Attach it to the hardware volume up button by following the same instructions as for the mute script (above), but in place of “/home/username/bin/alsa-toggle-mute”, use “/home/username/bin/alsa-volume-up”. And rather than pressing the hardware mute button, press the hardware volume up button.
Then let’s handle the hardware volume down button. This time we will take a shortcut. Rather than copying and pasting another script, we’ll just copy and edit the volume-up script that you’ve already saved:
cp ~/bin/alsa-volume-up ~/bin/alsa-volume-down
Then edit the ~/bin/alsa-volume-down script in nano to change the line that reads “OFFSET=1″ to “OFFSET=-1″:
nano ~/bin/alsa-volume-down
.. edit the script, then use “CTRL-x y ENTER” to save.
Then, as before, attach the script to the hardware volume down button by following the same instructions as for the mute script (above), but in place of “/home/username/bin/alsa-toggle-mute”, use “/home/username/bin/alsa-volume-down”. And rather than pressing the hardware mute button, press the hardware volume down button.
Filed under: beats, code code, commandline, linux · 0 Comments






















