Tuesday, August 18, 2009

Scan Tailor package

I didn't expect this to happen in the Karmic release cycle, and I'm very happy, that I actually managed to do it. Today is the day, when my first package has made its way into Ubuntu! Well, not exactly the first, since I have uploaded several sponsored bugfixes in the past, but this is my first real Ubuntu package made from scratch, that has passed all of the Ubuntu requirements. This would not be possible without people from #ubuntu-motu, who have been constantly helping out and correcting (sometimes really stupid) mistakes! Thank you, guys!

And now I'd like to introduce this little piece of software. It is quite a nice application, called Scan Tailor by Joseph Artsimovich et al. and it's purpose is to cleanup and arrange raw document scans into sets of pages, ready for OCR, assembling into a book or printing. For an idea of what it looks like, here's a couple of screenshots:


In short, if you've been looking for an application for cropping, deskewing and splitting your scans in Linux, well... There is one and a very good one! Also, besides being a very useful tool for anybody digitizing moderate to large amounts of text, Scan Tailor rocks, because it shows the essential signs of a true UNIX app:

  • It does one thing and does it well.
  • It is suitable for processing both tiny and massive amounts of data.
  • It does most of the work for you, yet still allows manual control over everything.
  • It is free and open source.
Last, but not least, it is very friendly and fun to use. And you can try out this amazing application by simply clicking an apturl link, if you have Karmic installed and there are builds for Jaunty in my Launchpad PPA as well. It's still got a picky FTBFS on armel, but I hope, that I shall be able to track it. This is where the things are starting to get really exciting!

Sunday, March 15, 2009

Open source acceleration on r600/r700

Well, this is something that we, Radeon owners, have surely been waiting for. Thanks to the hard work of X.org and Ubuntu developers, an open source driver with 2D and XVideo acceleration support has recently hit the repositories (changelog). But, unfortunately, the driver still depends on kernel support, that has not been uploaded yet.

Anyway, if you don't want to wait for the kernel packages, the X.org wiki has cool instructions on building the latest DRM from source, and they just worked for me like a charm! For some extra confidence, I also did a "depmod -a" and "update-initramfs -u" after copying the modules in their places.

If everything goes well, here's what you'll get in your Xorg.0.log:

(==) RADEON(0): Using EXA acceleration architecture
(II) RADEON(0): Acceleration enabled


And of course, the difference is easily noticeable. Especially if you like moving and switching windows :) The video support is also outstanding. Even high resolution clips (like Big Buck Bunny or the Ruby videos) play VERY smoothly and are quickly switched into and out of fullscreen. Really cool! And they say, EXA acceleration should work with radeonhd as well by now, but I haven't tried this myself yet.

Monday, March 9, 2009

aoTuV Beta5.7

Just in case, you'd like to try out the latest beta on Linux and need a static binary, here's mine - oggenc-aotuvb5d.bz2.

FLAC and Kate support included!

Saturday, January 31, 2009

Python 3.0 / Hex On!

This week, I've started playing with Python 3.0 (aka Py3k). The final 3.0 version had been released in December, so there is only a release candidate available in the Intrepid repositories, but I didn't care. In fact, it was dead easy to install - simply apt-get install python3 and you're all set!

Among the things, that amazed me the most, is a new fractions module (actually existing since Python 2.6), that provides support for rational numbers! What are rational numbers good for? Well, they're invaluable for pretty much anything, that involves just intonation, to say the least!

For example, here's how I've managed to code a simple Hexany generator in almost no time! Roughly speaking, a hexany is created from several prime (or not so prime) numbers, that are multiplied together in pairs to form a set. To get a scale out of it, the resulting numbers should be divided by a chosen "base note" and reduced to the octave range. So, first of all, we'll need a simple octave reduction function:
def octave_range(fr):
    if fr <= 0: raise ValueError("Invalid frequency ratio")
    elif fr > 2: return octave_range(fr / 2)
    elif fr < 1: return octave_range(fr * 2)
    else: return fr
Now, let's define a "base note" and use set comprehension (another Py3k feature) to fill the CPS with permutations of numbers from the Wikipedia example:
nums = [2, 3, 5, 7]
base = 5 * 7
cmps = {a * b for a in nums for b in nums if a != b}
And thanks to the fractions support, the final step is also going to be the easiest:
from fractions import Fraction
hexany = [octave_range(Fraction(note, base)) for note in cmps]
hexany.sort()
The code is also suitable for producing dekanies and other scales, based on Wilson's combination product sets. I still have to figure out the proper ways of using them in music though :P

Monday, January 26, 2009

Updates

There's not much to write about, but here are several quick updates to keep this feed alive... First of all, Sced source code has been moved to the SuperCollider SVN tree, so any further development is going to continue out there... Another good news is that our favourite text editor - gedit is probably going to have some kind of D-Bus interface for the 2.26 release. So things like ScedDocument (and other means of feedback from sclang) could be finally made possible.

I have moved the few Russian posts in this blog into ratzez.blogspot.com, thanks to the Blogger import and export feature. It means, that from now on, I shall continue writing in English here and the secondary blog will be in Russian. Looks like it also makes the Blogger interface more convenient, 'cause the engine does not seem to respect the browser language anyway...

And yet one more thing, just in case you'd like to add a little Human look to your code... It can be done with a couple of Ubuntu-coloured themes for GtkSourceView. They're not quite polished yet, but already seem to nicely fit an all-human environment...