Jochem van der Vorm Musings http://vorm.net/ Jochem van der Vormjoch3m@vorm.net Personal musings and rants on life, culture, music and technology vorm.net atom-generator 2012-02-06T23:00:56Z Helping the environment http://vorm.net/helping_the_environment 2008-02-02T19:00:00Z 2008-02-02T19:00:00Z

A lot of work is done in making linux suspend work better. For me it works perfect (from linux kernel 2.6.20 or so). Therefore I wanted to go a step further and let my class A, heavy power-using receiver switch off when my desktop computer suspends (to ram). And switch back on when my computer wakes up. The motivation is that I only listen music via my computer.

To achieve this I bought the Gembird Silver Shield, a USB-switchable power adapter. I was prepared to do some nice USB snooping and C programming to get this device working in linux, but (un)fortunately there was already a working utility for this device.

Configuration for suspend/hibernate is not so easy and documentation is sparse for the user mode utilities. Since it took me more than the usual googling I will summarize my conclusions here for later use. First the gnome-screensaver measures the idle time. After this timeout is expired the gnome-power-manager starts to measure his own timeout (so before suspend the two times will stack). When the gnome-power-manager times out it will look at the Inhibit flag. If there is no inhibiting (for example my rhythmbox pushes Inhibiting, because I do not want to suspend when music is playing) your computer will suspend.

Since a custom script should be added to switch the power-switch off via usb with sispmctl the suspend-backend is important. Gnome power manager can use multiple backends to go to suspend mode. This works via hal (the hardware abstraction layer). Configuration for this is in /usr/share/hal/information. HAL is responsible for calling the suspend-backend. The default suspend-backend on my machine is pm-utils. (which can be tested with pm-(suspend/hibernate/power-save etc.). I also have a package called hibernate (which can also suspend, confusing isnt' it?). A third one is suspend2 (which can also hibernate....). These backends have different ways of adding custom hooks.

To add a hook to hibernate I added a file called local in /etc/hibernate/scriptlets.d/. The API is as follows (ugly in my book):

# -*- sh -*-

UsbPowerSocketDown() {
      /usr/bin/sispmctl -f1
}
UsbPowerSocketUp() {
      /usr/bin/sispmctl -o1
}

AddUsbOptions() {
      AddSuspendHook 10 UsbPowerSocketDown
      AddResumeHook 10 UsbPowerSocketUp
      return 0
}

AddUsbOptions

Pm-utils has a much nicer API. To add a custom hook add a file to /etc/pm/sleep.d . This uses init style ordering. So look in /usr/lib/pm-utils/sleep.d/ for a proper number. I needed to talk to the usb-bus AFTER the modules were loaded, so a number lower than 50. So I added /etc/pm/sleep.d/10usbpoweroptions with content like this:

#!/bin/bash
case $1 in
    suspend)
        /usr/bin/sispmctl -f1 
    ;;
    resume)
        sleep 1
        /usr/bin/sispmctl -o1 
    ;;
esac

After all this fiddling it works like a charm! Now hopefully one standard will emerge; because how to achieve the same result with KDE I don't know. I had to manually patch rhythmbox to change calling (via dbus) the Inhibit method from org.gnome.powermanager to org.freedesktop.powermanagement (because i used a wrong combination of versions..), so this suggests a move in the right direction.

Dead on http://vorm.net/deadon 2007-04-03T21:00:00Z 2007-04-03T21:00:00Z

Good presentation on captchas by google. See this video. The group that is headed by the prof doing the presentation should easily be able to break current current used image captchas if their statements are true...

Perhaps I like it because perfectly reflects my own opinion though ;-).

Faraway voice http://vorm.net/farawayvoice 2006-06-14T21:00:00Z 2006-06-14T21:00:00Z

Hacked a bit more on audio captchas lately, but the source is not in releasable form right now.. Anyway, I now recognize the audio captchas from microsoft 95% correct and from google (also blogger/blogspot) 60%+ by tweaking the segmentation. captchas.net (35%) and paypal.com (10%) are also doable, but some improvements are still needed.

Time to add some neural network learning.

Foucault's Pendulum http://vorm.net/foucaultspendulum 2005-05-22T10:00:00Z 2005-05-22T10:00:00Z

Some rights reserved by Feuillu (http://www.flickr.com/photos/feuilllu/) These weeks, with much pleasure, I have been reading Umberto Eco's Foucault's Pendulum. The writer truly knows a lot about history, philosophy, literature, different cultures and is very erudite. So besides enjoying the good plot, reading Foucault's Pendulum learns me a lot. However, on one thing the writer is a bit off. In the beginning of the book the main person tries to break into a computer by writing a (inefficient) computer program which generates anagrams of 'JHVH'.

Accidentally two weeks before reading this passage I wrote for my DND group a small program which solves a similar question in general. Since this group is too lazy to solve puzzles, I put the program on line; it is called rotx. Perhaps someone can make good use of it. It finds all rotx puzzles (with x = [1..25]) which deliver again a known word.

So, for example layout is the 'encrypted' version of fusion (rot6, so a->h, b->i, c->j, d->i, e->k, f->l, etc.), curly -> wolfs, arena - river, etc.

In dutch some solutions are urnen -> lieve, opaal -> hitte, knijp -> bezag and kerk->gang.

To use rotx you need a wordlist, for example as generated by aspell:

   aspell --lang=en dump master | ./rotx - > rotated.txt

The output (in the example above copied to rotated.txt) contains all rotated words which can also be found in the original wordlist..

The first incarnation of the program was in bash/sed/tr and awfully slow. (I had to try though, "No premature optimization!"). It should take two weeks to process a 1.5 MB English wordfile. (Eco's Basic script should take what, years??). Enter C++ and STL. The direct approach (rotating all words through the entire alphabet and looking all results up in the original list) should still take around 20 hours. So I cooked up an algorithm which uses more memory, but finishes in approximately 15 seconds on my old and crusty AMD duron 850!

The source can be found at /downloads/rotx.cc.html.

Let's stick together http://vorm.net/letssticktogether 2004-02-22T11:00:00Z 2004-02-22T11:00:00Z

As can be seen on my software page, I started a new command line music player, called mms. It depends on noxmms and is a fork of xmms-shell. It is written in C++ and is public domain software.

Man on the corner http://vorm.net/manonthecorner 2003-10-05T10:00:00Z 2003-10-05T10:00:00Z

Finally updated my site a bit, to reflect my current situation. First, I graduated, with a nice mark. So now I am a master of science (the name implies more control over the universe than you have in reality ;-). Further I updated my CV. People who are interested in this, can download my latex sty file and my cv latex file, to come up with a PDF with the same layout as my curriculum vitae.

Also I plan on releasing some of my bash script files, currently I am working on ralbum a small utility to play random albums from my music collection.

Graduation http://vorm.net/graduation 2003-08-03T10:00:00Z 2003-08-03T10:00:00Z
In january 2002 I started graduating at the TU Delft. I obtained my degree in August 2003. My study was Applied Physics, my group works on Acoustics.

Mostly all research carried out within the group deals with array technology. Main research topics are spatial sound reproduction, based on the concept of Wave Field Synthesis (WFS) and microphone array technology for the directional recording and analysis of audio and noise.

Transform coding of audio impulse responses

The goal of this research is to develop a coding structure which allows thecompression of impulse responses to a ratio much higher than current audiocoders or the algorithm by Sonke. The compression type is lossy, which meansthat the coded version of the impulse response will not contain all informationof the original. The amount of reduction that can be reached depends on two principles. The first is based on the characteristics of the human hearingsystem. A time-frequency analysis is done to compare the impulse response topsychoacoustic masking properties of the human ear, just as in audio coders.

Coded impulse responses

Secondly the characteristics of impulse responses are used to reach a meaningfulreduction of data, by discriminating between the various parts of a impulseresponse such as the direct sound, early reflections and the reverberation. Thisis done by carefully constructing a filter bank. In our model there will befree parameters, such as the number of frequency bands, the size of the windows and the quantization of the parameters which effect the quality of the compression. The difference between the compressed and the original impulse responses will be perceptually evaluated with listening tests.

The proposed model must be able to apply to a wide range of impulse responses(measured and artificially constructed) and must be practical in use. Thusencoding speed on mode computers must be of the order of magnitude ofreal-time and decoding must be even faster than real-time.

You can download my final report. I also held a presentation about this topic. My sheets (in PDF) can be downloaded in color or black/white here.If you want to do something related to my work, feel free to contact me.

I threw it all away http://vorm.net/ithrewitallaway 2003-07-20T10:00:00Z 2003-07-20T10:00:00Z

Since the first july I am a full time clerc. I have made my work from my hobby, so it is needless to say I'm rather happy with it.

Nevertheless I still have to graduate for my Applied Physics title. My graduation will take place on 25 august 2003. Everyone who knows me personally is invited to stop by. A talk about my subject Transform coding of Impulse Responses Using Perceptual Analysis starts at 14:00 and I will buy you drinks at 20:00 (if my mark is positive ;-)). More information about the location will follow, more information about the subject can be found on my graduation page.

Working class hero http://vorm.net/workingclasshero 2003-06-08T10:00:00Z 2003-06-08T10:00:00Z

I have been working on my thesis this month and things are finally coming together a bit. I updated my graduation page with my research goal and the latest draft of my thesis report.

Furthermore I found 22 volunteers who participated in my listening test, using the latest version of the perceptive listening testes. I fixed some bugs along the way, the most evil by negating the SIGPIPE instruction. It is version 0.07 now, so still use it at your own risk. Some prelimenary results of this test can be found in my report. Again thanks, to all the participants!

Fixxxer http://vorm.net/fixxxer 2003-02-20T11:00:00Z 2003-02-20T11:00:00Z

Today I fixed some bugs in my Perceptive Listener Tester. You can find version 0.05 on my software page. I also included a sample configuration files, so you may find out how it actually works ;-). Documentation will perhaps be provided in a later stadium.