Sunday, May 30, 2010

Better firewire audio support comes to Maverick

Maverick Meerkat development has started with some big changes on the professional audio front. Last week JACK2 (aka jackdmp) has finally replaced the original JACK in Ubuntu. And that's not all! There are FFADO packages, updated to work with the new firewire stack (alias Juju), which in turn is fully supported by the Maverick kernel. The news made me immediately upgrade to Maverick as soon as I've noticed a new libffado source upload in the Maverick changes feed... For now, I am very pleased with the result. But using JACK2 with a Juju-powered backend may require a little bit of work, that I am going to describe below.

First of all, the new FFADO packages currently fail to build on Maverick, because of a Python policy violation (bug 586821). A fix is underway, but I didn't want to wait and built a quick-and-dirty workaround package. If you like workarounds too, feel free to install libffado binaries from my PPA.

Second, to use the new firewire stack, FFADO needs at least libraw1394-2.0.5, which is also missing from Maverick. Hopefully the new version will be merged or synced from Debian soon (bug 586918), but if you don't want to wait again, you can install the package from my PPA as well. That will work.

Next, the old firewire stack has to be blacklisted. Simply edit /etc/modprobe.d/blacklist-firewire.conf to look like:

blacklist ohci1394
blacklist sbp2
blacklist dv1394
blacklist raw1394
blacklist video1394

#blacklist firewire-ohci
#blacklist firewire-sbp2


Finally, run "sudo update-initramfs -k all -u" and reboot. That's it... One thing to remember is that Juju creates device nodes with /dev/fw* paths without write access by default. This is easily fixed by a little udev tweak (example configuration may be found here).

Just to be safe, I also updated my rtirq settings to increase the priority of firewire_ohci IRQ service. It will not make things faster right now, because rtirq requires a realtime kernel, which has not been updated for Maverick (yet).

I like the fact, that all existing JACK applications work without any extra configuration or recompilation. This includes QJackCtl, Qtractor, SuperCollider, JAMin, energyXT... Only Renoise  started to hang and produce bad noises, until I switched the "Realtime audio CPUs" parameter to 1. Most likely it has something to do with JACK's own multicore support.

Some applications may also display strange port names (like firewire_pcm:0500000000000000_Unknown5_out). Luckily, JACK provides port aliases in the "system:playback_N" form. Aliases seem to work transparently for connecting/disconnecting ports, but QJackCtl will only display them if you set the appropriate option in the setup dialog.

Audio streaming is generally stable most of the time, but I've heard glitches with both the internal firewire controller (Ricoh R5C832 rev 05) and an ExpressCard controller (Texas Instruments XIO2200). So, I would not recommend performing live with Maverick right now. Nevertheless, it is great to see the progressing firewire audio support in Ubuntu. Juju migration is one of the Maverick development targets, and there is a blueprint to track the process.

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...

Sunday, November 23, 2008

Back in Black

There are several big changes in Sced expected in the near future, so today I'm releasing the latest stable 0.4 version, that does not introduce any new features, but has fixes for a couple of long-standing bugs.

It's worth mentioning however, that this version is a lot more compatible with stock and third-party style schemes for Gedit. That means, that your SuperCollider code is going to look cool and stylish, even with the darkest of them... Oh, and quite a number of themes is already available through this page at GNOME Live. Go and check them out!



One more thing. In order to make your Gedit even more great and powerful, make sure you also get the fullscreen plugin and the gedit-plugins package from your distro. The former enables the fullscreen mode for the distraction-free coding (or some live demos, perhaps), and the latter has some neat extensions like bracket completion and tabbar-disabler for an even cleaner workspace!

The Sced tarball itself is available through the usual location and the Debian/Ubuntu packages should be already in the PPA at the time of writing. Just in case you missed the installation instructions, check the following post for a short tutorial. And, of course, your feedback is much appreciated.