Vitavonni

Sun, 27 Apr 2008

BPM Tap Toy

Since I didn't find a similar tool for Linux, I've hacked together a tiny tool to do BPM counting. The usual stuff: tap any key with the music to get a BPM estimation. There is no music analysis done.

Screenshot of BPM Tap Toy

To achieve better results, my tool uses an exponentially weighted average. It also computes a confidence interval. So if the song changes tempo (and quite some jazz songs do) or doesn't keep the tempo constantly (live music with human drummers often shows some tempo drift. It's just the drum computers that keep their speed very well...) - the tool can handle that quite well, while also not being overly sensitive to tapping errors (as you can see in the image).

I figure there might be even better estimation tricks (e.g. doing some error detection and removing them), but this one was just very simple to implement. And by looking at the graph and the error interval it's quite easy to check that you didn't any recent mistakes and the result is okay.

The Python code is about 158 lines SLOC, and a small UI description generated with Glade. It's built with PyGTK and uses Cairo for the plots, so it should be very platform independant and even run on Windows.

Download will be available sometime when I get around to clean it up a little. There is for example still the code in there to compute plain averages, which can't handle songs with multiple tempos at all.

[Update: it now also has a tiny 'flasher' icon that will show you the current tempo estimation. This is great for checking the quality of the result - if it keeps on flashing in sync with the music after you've stopped tapping, it's good. I was also pointed to GNU GTick which is a full featured metronome application and also has a tap button.]

[category: /en/linux | Permalink]

Fri, 25 Apr 2008

Alsa and pluggable devices

Any ALSA experts around that can help me with the following setup?

I want to create a virtual device that does the following: - send the audio data to my regular onboard sound devices - when I plug in some USB audio device, send it there as well OR just there

The difficult part is the plugging part. There is an example in the Wiki how to use two cards as one. This works, but only if the USB audio device was plugged in before starting the audio application and it is not unplugged either.

Obviously, switching the configuration files on plug events is another possibility, but again this requires applications to be restarted. :-(

What I want to achieve is simple: when I plug in the USB device, I want to switch my music playback there (since it will be connected to my stereo). System events, voice calls etc. however should remain on the system audio.

If you have any solution, please send me an email at erich AT debian DOT org.

(And yes, I know about PulseAudio, and I use it. But only on top of ALSA)

[category: /en/linux | Permalink]

Thu, 24 Apr 2008

Stupid restrictions - DHL label printing

Sometimes, companies come up with the most stupid restrictions. And unfortunately, other companies enable them to do that.

In this particular case, the DHL parcel service and Acrobat teamed up: You can buy and print shipping labels online with DHL. I thought I'd give that a try, especially since there is a 24h dropbox nearby.

The label can be printed either using a Java applet or a PDF file. It thought PDF - sounds great. But it isn't. It's a very special PDF file. It has a scriped printing button that will print with the default settings (so it comes out at a completely different printer that I would have wanted to print it). In fact I would have expected the printing dialog to come up, and thought the button had not functioned at all. Also I could probably not have used it if I had opened the PDF file in a different PDF viewer. At my own laptop I might not even have Adobe Reader anymore - I use Evince. It's faster and has a much better UI. But I don't have a printer, so I used a computer at the university which used Acrobat by default, fortunately.

And: you may only print the real shipping label once. Only 'sample' labels can be printed arbitrarily often. This is counted on the server side, btw., and also applies to the Java applet.

Apparently you also must not rename the PDF file (WTF?) and you need to be online to print the file. So you can't save the PDF file and take it to an offline computer that does have a printer...

Dear DHL: have you heard of that ancient technology called 'Photocopiers', sometimes also dubbed 'Xerox'? You know... lots of people still have these. Heck, I figure I could even use Adobe Reader to print the label into another PDF file with the print restrictions removed...

So you gain nothing by preventing multiple printouts, but you can seriously annoy users (e.g. when their printer malfunctions)

Please stop imposing such stupid restrictions on users.

[category: /en/web | Permalink]

Tue, 22 Apr 2008

Debian in the Google Summer of Code 2008

The Summer of Code wiki page in the Debian Wiki has been updated with an overview of the projects that made the race for the 13 slots we have.

A separate press release (containing a short paragraph on what each project is about) is in preparation and will be out soonish.

Sat, 19 Apr 2008

Debian in the Google Summer of Code 2008

We've received another of the last minute slots (thanks to those organizations which returned some of their assigned slots) to a total of 13 this year.

We have received some very good application, and we'll be able to fill these 13 slots easily with very good applications working on a variety of topics.

The results will be published on Monday, since there may still be minor changes in which students are accepted or who didn't make it to the top slots.

Google Summer of Code 2008

Wed, 09 Apr 2008

Boycott Olympia!

Olympia Handcuffs

In my opinion, the protests in London and Paris were great.

China wants to use Olympia for promoting itself. All this is just a huge image campaign. This is why we should remind people on how cruel that regime is and how little it cares for human rights.

Human rights are more important than the olympic torch.

Turning a chinese PR campaign into a PR disaster is good.

This is not about sports. Sports is what you do at home, not what is on TV. When I go dancing with my friends, that is sports. When I sit in front of the TV, it is not. I will not be watching the Olympics. When IOC representatives talk about it all being "only about sports" they lie - it's all about money.

This is not out of disrespect for the athletes, but I cannot tolerate China using the Olympics as image campaign for being an equal member of the international community. All the new stadiums and so on - they're trying really hard to give the impression of a new china - when they actually have not changed at all.

We need to signal China that if they want to be treated equally, they need to adhere to the same standards as all others - respecting human rights is the bare minimum, free elections and democracy are the next important step then.

P.S. Please also do not buy Olympia swag. It's reported to be manufactured at less than half of the minimum wage even in China! It's pure exploitation!

Note that I'm talking about a consumers' boycott, not an athletes' boycott. I do think that the athletes go there for the competitions.

P.P.S. I don't think the Olympic games are fair anyway - I believe that many athletes are using doping (just the detection methods are insufficient). Otherwise we would not see new world records each year. And I believe the IOC is corrupt and maybe actually criminal; all they actually care about are their revenue streams, not the sports either.

P.P.P.S. This blog is representing my own opinion only. Therefore it does not have or need a comment function. Use your own blog if your opinion differs.

[category: /en | Permalink]

Tue, 08 Apr 2008

Licensing software

If you are writing free software, choose your license appropriately. This can make a big difference with respect to adoption of your software.

I'll just show you an excerpt from a Debian changelog:

* DFSG version of Mono 1.9
  + Deleted the mcs/class/System.Web.Extensions/ directory as
    mcs/class/System.Web.Extensions/System.Web.Script.Serialization/JSON/*.cs
    is licensed under Creative Commons Attribution 2.5 which is not
    DFSG-free.

Debian policy doesn't allow us to include Creative Commons Attribution 2.5 in the main Debian archive, since that license doesn't meet the Debian Free Software Guidelines, which are part of our social contract. Therefore we must and will remove such code.

debian-legal summary for "main" Creative Commons licenses

Creative Commons is aware of these issues:

Creative Commons recommends and uses free and open source licenses for software.
And then they suggest to use GPL. While there is a link in the right side menu to the Creative Commons page on licensing Software, they IMHO don't make this obvious enough. Their license chooser should include a central link "if you intend to license software, read this".

Creative Commons even includes "wrappers" for common licenses: CC GPL, CC LGPL, CC BSD

So if you like Creative Commons because of this pretty "commons deed" human-understandable version of the license they offer, just use these wrappers. The "legal code" links will actually take you to the GNU or Opensource.org license pages.

I'm not aware of a good reason to use an opensource license other than GPL, LGPL or 3-clause BSD, depending on how you want to allow your opensource code to be used in combination with non-free software. If you are contributing to a bigger project, choosing the same license as the main project is although a very good idea.

[category: /en/linux | Permalink]

Tue, 01 Apr 2008

Ubuntu to rename top level directories

[Yes, this post was written on April 1st and is not to be taken serious.]

The usability experts of Ubuntu have finally started to handle the single most mentioned usability issue with Linux: the top level directory names.

Quoting Finn C. Tional from the Ubuntu Usability Group:

It's one of the mysteries of Unix that the directory named "usr" is not for user data, and the directory named "etc" while looking like random stuff thrown together stores all the important config files. [...] This is probably the single most confusing hurdle for new Unix users. [...] We need to finally tackle this, before people are too used to these odd directory names.

Therefore, they propose the following renaming scheme:

/bin      /system/executables
/boot     /system/boot
/dev      /system/devices
/etc      /system/config
/lib      /system/libraries
/home     /users
/media    /storage
/mnt      /storage
/proc     /system/processes
/root     /users/Administrator
/sbin     /system/executables/admin
/tmp      /system/temporary
/usr      /system/applications

They'll include a patch for the GNU C library as well as for AppArmor to redirect the old path names to the new ones. Given the existing filename matching already done by AppArmor the overhead is expected to be neglible at least for AppArmor enabled systems. SELinux enabled systems will remain unchanged, since the user won't be allowed to see anything potentially irritating in the root directory anyway, but will be confined to his user directory.

Since there are a dozen applications that will need changes to accomodate the new naming scheme, expect these changes only to be included with Ubuntu 10.4 (also lovingly named Ubuntu X) scheduled for April 2010.

Other distributions are expected to follow up with these changes in 2011.

P.S. Yeah, the Ubuntu folks really need to think this throuh some more. Russel pointed out that "My System" is even easier to understand; after all this is not about someone elses system or some systematic error or whatever. I figure he's right. How about "My Computer" than this lowercase (pessimistic?) "system" directory they're proposing there!

Menu
[planet.debian]
[planet.xmlhack]
[planet SELinux]
[munichblogs]
[email]
[RSS 2 feed]
[English RSS 2]
Categories
< April 2008 >
SuMoTuWeThFrSa
   1 2 3 4 5
6 7 8 9101112
13141516171819
20212223242526
27282930   
Archives
2010-Mar
2010-Feb
2010-Jan
2009-Dec
2009-Nov
2009-Oct
2009-Sep
2009-Aug
2009-Jul
2009-Jun
2009-May
2009-Apr
2009-Mar
2009-Feb
2009-Jan
2008-Dec
2008-Nov
2008-Oct
2008-Sep
2008-Aug
2008-Jul
2008-May
2008-Apr
2008-Mar
2008-Feb
2008-Jan
2007-Dec
2007-Nov
2007-Oct
2007-Sep
2007-Aug
2007-Jul
2007-Jun
2007-May
2007-Apr
2007-Mar
2007-Feb
2007-Jan
2006-Dec
2006-Nov
2006-Oct
2006-Sep
2006-Aug
2006-Jul
2006-Jun
2006-May
2006-Apr
2006-Mar
2006-Feb
2006-Jan
2005-Dec
2005-Nov
2005-Oct
2005-Sep
2005-Aug
2005-Jul
2005-Jun
2005-May
2005-Apr
2005-Mar
2005-Feb
2005-Jan
2004-Dec
2004-Nov
2004-Oct
2004-Sep
2004-Aug
2004-Jul
Other links:
Swing and the City - Lindy Hop in Munich