Archive for July, 2007

LaTeX and tonemics

July 29th, 2007

A number of the people I’ve been working with on software for Welsh have academic papers available for download, and when you look at them you can see that they are using the LaTeX development of Donald Knuth’s TeX typesetting system.

So I decided it was time that I got at least a nodding acquaintance with these systems. The key feature of TeX is a programmable markup system, and it does seem as if once you know the details, you can do virtually anything with it. I won’t be in that category for some years, so I’m using the excellent Kile to ease my entry. There are other frontends available (eg Texmaker, Lyx).

The best way of checking something out is to try doing something real-world with it, so I decided to go back to some papers I’d written a looooong time ago and see how these might come out in LaTeX. These were on African linguistics, and since most African languages are tone-languages, having access to diacritics that will allow you to represent these is essential.

A bit of reading around led me to TIPA, a package developed by Rei Fukui at the University of Tokyo, which is aimed at allowing all the symbols of the International Phonetic Alphabet to be represented in LaTeX. It’s a wonderful piece of work, and comes with a very extensive manual. The best thing about it is that it provides symbols for representing up to 5 levels of tone.

By default, these are set up to use a right-hand stem bar for the tone – this seems to be the default in most work on Asian tone-languages. Here’s an example:
However, most work on African tone-languages tends not to use this system, probably because glides are a lot less frequent, and because the relative rather than absolute pitch-level seems to be more important in systematising tonal phenomena there. So ideally I needed some way to suppress the display of the tone stem bar.

Professor Fukui was kind enough to give me the magic formula to do this, and I reproduce it here in case it might be of benefit to someone else. All you need to do, after invoking the TIPA tone module as usual in the document preamble, is to add a couple of extra lines, so that the preamble now looks like this:

\documentclass[a4paper,10pt]{article}
\usepackage[tone]{tipa}
\usepackage{tipx}
\makeatletter
\renewcommand\@tonestembar{\setbox0\hbox{\tipaencoding \char’277}\hbox{\vrule height \ht0 depth \dp0 width 0pt}} % no stem
\makeatother

With this in place, the tones now come out like this:

Perfect. That means that you can then (for example) use:
mpf\'umu [ \tone{44} \tone{22} ]
to produce:
(the Koongo word for “chief” in Hazel Carter’s orthography) and give the standard indication of the pitch-contour.

Iriver T60 has a 1,000 file limit?

July 14th, 2007

With my second boy going on a long trip, he wanted a media-player that played off a standard battery rather than one of the rechargeable ones that you need to find an electricity source for. It also had to play ogg files, since that’s what our CD collection here is ripped into. Cowon, which is very supportive of Linux, used to do an excellent little player that ran on a AA battery (the G3), but the one I had had only 256Mb capacity, and the line seems to be discontinued now. So we finally settled on the Iriver T60, and even though it has 4Gb of storage, the player is not much bigger than the AAA battery that powers it. Very nice indeed, although the menu system isn’t as good as the G3’s.

I started loading on his favourite CDs from our music server, and ripped a Spanish course and put that on too. I just connected the player to the PC, and dragged and dropped. Our format is Artist, then Album, then Track. I put on about 10 CDs that evening, and tested them – all played fine.

Next morning, continuing the job, any new CDs I dragged and dropped wouldn’t play … Hmm – the others still did. Cue much head-scratching. I eventually moved the tracks up a level, so there were now just two levels (Album, Track) instead of three. That worked, and I thought the problem was solved, but no – add a few more and they wouldn’t play either.

Hmm. I’m using USB Mass Storage (UMS or Mass Storage Class, MSC). But this thing also uses Microsoft’s wacky MTP (Media Transfer Protocol). If it comes with that as default (the default can be changed via a firmware update), maybe it wants the joy of attachment to a legacy OS? So I fired up my wheezy old XP install, and added a few tracks using the Iriver software (not very good, btw). They seemed to play all right, so I dragged and dropped from XP (ie using UMS). They played too.

OK, back to Linux. I added a few more tracks there, and they seemed to be OK too. Added a lot more, and oops – some of these don’t play. There was steam coming out of my ears at this point, after spending most of the day on this wretched little contraption. So I sat and went through every single one of the 76 CDs I’d transferred there, and it was only the last 8 that wouldn’t play. Looking at the system menu, I noticed that the number of tracks listed was a suspiciously round 1,000.

Does this mean that the T60 can’t play more than 1,000 tracks, which seems a bit on the cramped side for a 4Gb player? It might be just about OK for mp3s, which tend to be around 5Mb apiece, but with oggs, which tend to be smaller (say 4Mb), it probably wouldn’t be.

Unfortunately (or fortunately for my sanity), the boy had to depart, and I have had no opportunity to test this further. But when he comes back, I’ll do a complete firmware upgrade and start again.

In the meantime, T60 buyers using OSS might like to be aware that one or all of these may apply:

  1. the T60 doesn’t like being connected UMS style to a Linux box;
  2. the T60 doesn’t like more than two levels of directory;
  3. the T60 doesn’t like to hold more than 1,000 files.