Getting JuK to output sound via ALSA

Linux: Linux sound is still a mess. Due to the ever-changing ’sound server of the week’ system used to decide how an app should output sound, it’s perfectly possible to have 3 apps on your desktop happily making noise at the same time, while another app complains about requiring exclusive access to /dev/dsp — or worse, hangs silently while it attempts to grab an exclusive lock on the device.

This page gives a reasonably good guide to getting software mixing working across (virtually) all apps, using ALSA software mixing and esd.

However, some cases are still very kludgy — in particular, JuK, the excellent KDE mp3 jukebox app, has a tendency to play poorly with others, requiring playback via no less than two sound servers — artsd and esd — to work correctly in the above setup. In addition, the support for mp3 files in artsd is buggy — it’s frequently unable to open certain mp3s, depending on how they were encoded.

Well, good news — the current release of JuK now supports direct playback from GStreamer via ALSA. Here’s how. By adding these lines:

[GStreamerPlayer]
SinkName=alsasink

to ~/.kde/share/config/jukrc, you can skip sending JuK mp3 playback via 2 sound servers, and just play directly to the hardware from the mp3 player. An improvement! Not quite optimal, and certainly not user-friendly — but getting there…

Tags: , , , , , , , , ,

Comments

kgst output to ALSA/Artsd/ESD instead of just OSS

Linux: Here’s a patch that adds support for ALSA/Artsd/ESD output from kgst, the KDE gstreamer middleware used by JuK.

Background: JuK is a great music player app for KDE. However, it hogs
the sound device while running, which means that nothing else gets access to play sound until the app is shut down. This is suboptimal.

The reason it does this is because it plays sound via this chain of components: juk -> kgst -> gstreamer -> sink. Unfortunately, the
kgst component doesn’t allow control over what output sink to use, instead hard-coding the string 'osssink' — the OSS drivers, for traditional Linux /dev/dsp sound. My laptop doesn’t support mixing in the sound hardware, which means I need to use a software mixer. 'osssink' doesn’t support software mixing, instead giving the caller exclusive access to the sound card, and other apps will just have to wait for it to finish.

(As to why JuK doesn’t just play mp3s by running ‘mpg321 name-of-file.mp3′, and let us specify the ‘-o’ switch to use, I wish I knew. (ObOldbieGripe: component-based architectures are full of this kind of needless over-complexity ;)

Anyway, the patch in the bug above lets the user provide an environment variable for a string for kgst to use instead of 'osssink'.

Tags: , , , , , , , , , ,

Comments

Making a Bootable CD from a Floppy Image

Tech: Troubleshooters: Making a bootable CD from a bootable floppy image.
Making a note of this for future reference — it should be handy next time I need to do a BIOS or firmware upgrade on my Thinkpad.

I ran into the need for this recently when trying to upgrade the BIOS on my Thinkpad running Linux, so hibernation would work. IBM don’t provide BIOS upgrade tools for Linux, so you have to keep a Windows partition around. (Yes, I pay the Windows Tax — I’ve been bitten by proprietary firmware upgrades requiring it in the past, as in this case.)

Amazingly, however, even after paying the Tax, the ‘non-diskette’ BIOS upgrade (ie. the standalone Windows app) doesn’t work from Windows XP! Instead, you get a hard hang when it tries to bring the machine down from XP to a single-app mode to perform the upgrade. Running from DOS similarly fails, because the BIOS upgrade app is a WIN32 application. Clever.

Eventually, I wound up reformatting my Windows partition, installing Windows 98 (!), and running the BIOS upgrade app from that worked fine. But next time around, I should be able to save myself a few hours of MCSE imitation by using this floppy-to-CD trick… here’s hoping. ;) PCs Are Hard.

Tags: , , , , , , , , , ,

Comments

Closed-group Filesharing

Net: So, it looks like closed-group filesharing will be appearing in several more implementations soon. NTK writes this week, ‘the big new (yet old) killer app this year is going to be a some dinky little program that lets you easily and selectively share individual files with groups and sub-groups of your friends.’

It’s interesting to see this — it’s been several years in the offing. So far, there seems to be two main angles: secure collaboration in a private workgroup, and private filesharing in a closed group, defined socially (I’ve taken to calling this the ‘playgroup’ ;).

Groove is an example of the ‘workgroup’ idea. However, to my mind it’s been crippled by a strict one-platform policy, and possibly because it’s proprietary, commercial software. Still, nice idea.

Several MS researchers helped kickstart the ‘playgroup’ idea with this paper: The Darknet and
the Future of Content Distribution
. Clay Shirky’s thoughts.

WASTE is the classic implementation of a ‘playgroup’ darknet, sadly killed off due to ownership issues. NTK state that it ‘was too crypto-tastic to succeed’, but I don’t see that — it was actually excellent software; in particular, its entirely-decentralised and public-key-crypto-based architecture worked surprisingly well in practice, even with NAT, firewalls and all that problematic stuff.

More of the up-and-coming projects — at least the ones that intend to take heed of ‘playgroup’ needs — need to take cues from this app. The only negative in their approach is that the ‘gating’ of new members is too relaxed; all it takes is for one existing member to accept them into the group, their public key is flooded out to all, and pretty much everyone is set to accept the new key by default.

Robert Kaye has written about his thoughts on how this all should work in this ETCON presentation and this O’Reilly Network article. I’m not sure that a loosely-coupled SSH-based system is easily deployable, though; IMO an ‘all-in-one’ app is easier to get installed and deployed.

iFolder is Novell’s new tool in development. This sounds pretty interesting, although it seems very strongly workgroup-oriented, as does Foldershare, a new Windows-only app from some ‘ex-AudioGalaxy staffers’, apparently.

Both operate by using some kind of file-sync algorithm, along the lines of rsync or Unison, to synchronise multiple copies of a dir across a network. (Here’s hoping it’s up to the standard of Unison.) So very large collections will be duplicated throughout the net — which may actually be quite cool for backups, but strikes me as bad news for users on slow links.

And finally, there’s Clevercactus Share — this sounds interesting, is cross-platform, and is now in beta, apparently. Haven’t seen it, though ;)

So far, techie details on the internals of the latter three systems are scant; it’ll be interesting to see how heavily they tilt towards the ‘workgroup’, how well they deal with firewalls and NAT, the extent of crypto use, etc. But nice to see more software entering the field…

Tags: , , , , , , , , , ,

Comments

Getting into KDE 3.2

Linux: I’m really getting into KDE 3.2. I’ve been looking for a music player that is better at handling large collections of MP3s better than the venerable XMMS, without much luck:

iTunes is, of course, the ‘gold standard’, but is Mac/Windows only, so that’s not going to work on my Linux machine.

Rhythmbox is getting there as an iTunes clone, but right now is woefully incomplete. It fails to play lots of my music, has serious interface shortcomings — you can rate songs, but then there’s no way to use those ratings, and you cannot edit any of the tag metadata in the released version.

JuK is the new KDE music player app. Initially, I wrote it off — it uses the clunky interface of ‘one big list’, at first glance.

But after Rhythmbox managed to confuse itself sufficiently so that it would only open as a 3-pixel-high window (seriously!), I gave JuK another try. Summary: it kicks ass.

It turns out that the multi-pane ‘artists, albums, and tracks’ mode of iTunes and Rhythmbox isn’t actually necessary, since JuK improves on it using a very nifty dynamic ‘Tree View’ mode.

Another nice feature is the MusicBrainz integration; it has built-in support for querying MB’s servers to get correct tag data for your music. In fact, its tagging support is fantastic — this is unsurprising, as it looks like it started off as a tagging app.

Being a well-written KDE app, it exposes some nifty scripting support via DCOP, and a quick look-over with KDCOP reveals a nice set of APIs — for example, running dcop juk Player playingString tells me the name of the track and artist playing right now. I’m not sure if there’s a way to register for callbacks on events like ‘track change’ just yet, here’s hoping…

No sign of rating support just yet, though; my dream player would allow me to rate my tracks, and then make a dynamic playlist which selects tracks by rating, playing the top-rated ones more often and never playing the bottom-rated ones. Here’s hoping it’s in the pipeline ;)

All in all, though, it looks like I’ll be giving JuK a try.

Tags: , , , , , , , , , ,

Comments

P2P and open proxies

Joe St. Sauver’s excellent presentation on open proxies has been updated. Interesting snippet: Morpheus 3.2 – the filesharing app — is shipping with proxy support. P2P Networks Try to Throw RIAA Off Their Trail (AtNewYork.com):

Morpheus will offer its users the option of connecting to its network via a public proxy server (define). A proxy server acts as an intermediary between two Internet users so that one user does not know the identity of the other. Morpheus won’t be hosting the proxy servers but will instead direct users to a ‘worldwide network’ of public proxies.

iMesh apparently may also include this support, too, in an upcoming version.

Tags: , , , , , , , , ,

Comments

SARS genome decoding ‘couldn’t have been done without mail’

just got back from a super-quick booze-soaked weekend visit to Ben in SF. It was so good to visit a city once again, and get the opportunity to paint the town red, hit the bars, eat in plentiful cheap restaurants, and generally enjoy city life (which I’ve been missing massively since the move from Dublin). But now back in post-suburban Irvine to cope with the hangover.

Also got to meet up with Komal, one of my co-workers up there — which was cool. Unfortunately it was a super-speedy weekend whistle-stop tour though, so having a good social meet-up with all the guys will have to wait until the next visit. ;)

Net: ‘The Canadian scientists who broke the genetic code for SARS … say they couldn’t have done it without the Internet. … The key to that collaboration was ordinary e-mail‘.

It also turns out the ProMED mailing list was the central point at which SARS reports were collated in the early stages, even despite evasion and cover-up by the Chinese state.

So there you go — as usual, SMTP is the killer app — or in this case, a life-saving app! All the more reason to figure out ways to deal with spam and return SMTP to its top spot in the protocol pantheon.

Good thing the FTC Spam Forum went so well, then. Sounds like there was unprecedented agreement between the non-spam folks, clear understanding of the issues by quite a few of the Washington denizens, and maybe even some good footage of the other side digging holes for themselves.

Health: US, Asian Airlines Disagree on SARS. Me, I just wish the airlines would stop being so bloody cheap, and bring in more fresh air rather than recirculating. ;)

Date: Sun, 04 May 2003 12:20:16 -0400
From: STEPHEN JONES (spam-protected)
To: (spam-protected) (spam-protected)
Subject: Internet is a good thing says Steve Jones clone

Internet played a key role in decoding SARS genome, scientists say

DENNIS BUECKERT

OTTAWA (CP) - The Canadian scientists who broke the genetic code for SARS just weeks after the disease appeared say they couldn’t have done it without the Internet.

Scientists from the Michael Smith Genome Sciences Centre of the B.C. Cancer Agency say their achievement relied on rapid communication with scientists around the world. The key to that collaboration was ordinary e-mail, said Steven Jones of the Vancouver-based research agency in a teleconference Thursday sponsored by Science magazine.

“Within a day of us having a press release announcing our participation in the sequencing we had an amazing amount of e-mail from scientists all around the world,” Jones said.

As soon as the sequence was decoded, the B.C. researchers posted it on the Internet.

“People were, within minutes of that, able to download the sequence and analyse it in their own laboratories and their own computers,” Jones said.

“The Internet has had a profound impact on how this data has been shared and how scientists have collaborated.”

A short time later, researchers at the Atlanta Centers for Disease Control published the sequence of a coronavirus taken from another SARS patient.

The genetic coding for the two viruses were virtually identical, boosting confidence that the coronavirus was in fact the causal agent.

Now both sequences are posted on the World Wide Web for the benefit of researchers in many countries racing to find a reliable test for SARS, and a vaccine to prevent it.

Scientists say the speed of the decoding was amazing.

The first reports of the new disease came from China in November, and on March 13 cases were reported in Toronto and Vancouver. The sequences were posted on the net on April 15.

By contrast, it took years to identify the agents behind diseases like AIDS and hepatitis C.

Mel Crajdon of the B.C. Centre for Disease Control said all evidence points to the coronavirus as being the cause of SARS, despite some seemingly contradictory findings.

Earlier this week Frank Plummer, who heads the National Microbiology Laboratory in Winnipeg, said he was puzzled by the number of people who show evidence of the SARS coronavirus but not symptoms of the disease.

Crajdon suggested the apparent anomaly is due to imperfect understanding of how the disease presents itself, as well as lack of reliable tests for the presence of the virus.

“I’m not surprised by the results that have been obtained to date and I think that they will rapidly improve,” he said.

More than 5,400 cases of SARS have been diagnosed worldwide, with at least 394 deaths. In Canada, there have been 23 deaths, all in the Toronto area.

  • - -

On the Net:

SARS sequences: http://sciencemag.org/features/data/sars

SARS data: http://aaas.org

SARS Comments: http://eurekalert.org

Tags: , , , , , , , , ,

Comments