Jamulus and Ubuntu Linux

October 11, 2021

For quite some time I’ve been using Jamulus, to allow me to play music with other musicians over the internet: it’s a really good (and free) distributed system, where musicians play in real time with other musicians (1). Each musician uses a Jamulus client, and this communicates with a Jamulus server. There’s lots of servers in lots of different places, divided up into a number of genres (I use the Jazz genre most of the time). The critical thing is that the delay between the musicians client and the server is low – best to be less than 60 ms, preferably a lot less. And it really needs to use a wired connection to your local (household) router, to avoid delays caused by the wireless connection. I often play with musicians in different countries in western Europe, using servers located in London, Berlin or other parts of western Europe.

I set up a server in my own house, wired to my router, and set up to be visible from outside, so others can use it too. This uses a headless Raspberry Pi 4: a nice little machine that sits beside my router, and just seems to keep running and running.

The reason for this post, however, is my solution to a hardware problem. My original client system was an ancient and very heavy Mac Pro (early 2008), and an even older MOTU 828 (about 2003 or so) firewire interface, both old and out-of-date equipment from my University, long since replaced with more recent kit. This worked spectacularly well for a long time: however, I then had problems with the firewire interface failing sometimes. Being stingy, I initially decided to purchase another equally ancient MOTU 828 (for all of £50!): this worked for about a week, until the same problems happened again. I concluded that the issue was with the Mac Pro, and I wasn’t about to try to mend this. It didn’t really owe me anything.

In the meantime, I’d been interested in using a Raspberry Pie as a desktop. But when I tested it, it was just too sluggish for me. But I knew that one might be able to get a faster ARM-based 64 bit computer, particularly since Apple were now selling them. However, being tight-fisted, I wasn’t keen on buying a new Apple machine.

A little investigation led me to the Odroid N2+ machine. It has “a quad-core ARM Cortex-A73 CPU cluster and a dual core Cortex-A53 cluster with a new generation Mali-G52 GPU”, and is much, much cheaper than a Mac! (of course, you have to supply a monitor, keyboard, mouse etc., but still…). It runs Ubuntu 20.4, which is perhaps not as nice as MacOS 11, but as someone who used Unix on a 25 by 80 terminal for years I wasn’t too worried about this. In fact, the Ubuntu user interface is really quite nice.

A little work on the net showed that you need to install Ubuntu studio, with the low latency kernel, Jack to connect different audio software together, and Jamulus itself. I also installed Reaper, my favourite DAW. These were all straightforward, installed using apt. Jamulus itself had to be built (for the ARM 64 architecture), but there were instructions in the downloadable tarball. (You could also try the installation scripts at https://github.com/jamulussoftware/installscripts, but I didn’t notice them till just now!).

So how well does it work? Obviously, I had to replace my MOTU 828 as well, and I had a Rubix 44 which I now use. I believe that most USB audio interfaces will work (but note that Jamulus always uses 48K samples/second). Once I had sorted out some problems (I had loopback enabled, accidentally on the interface…), and learned how to use Jack (easy, once you know how!), off it went. And I could use Reaper at the same time with minimal increase in latency, allowing me to add echo or reverb, or to use a VST piano sound from a MIDI input. That was something that the old Mac Pro couldn’t quite manage.

Altogether? I’m really impressed with the Odroid N2+. I’m learning more about how to use Ubuntu (I can remember how to use vi, and lots of Unix terminal commands, but for everyday use, one can work very well using the mouse-based user interface that comes with Ubuntu). I get a lot less dropout in the sound than I did: I’d always assumed this was coming from the network, but now I realise some of it was from the Mac Pro not being up to the job.

I’ve bought another Odroid N2+, just to play with it (I don’t want to risk stopping the first one from being available for playing and recording music). I’ve connected the old disks from the Mac Pro (all 3 Terabytes) using a USB 3 cradle, and I can read and write to them (in their native Mac format). I’m thinking that having a number of small machines round the house for specific tasks is the way forward, now that one can get powerful systems for about £100!

(1) For the technically minded, the crucial thing is that it uses the UDP protocol: for technical details, see this paper by Volker Fischer.

“Prosecco for breakfast”

December 23, 2020

At Dunblane Folk Club, we have gone virtual, and hold a Facebook Watch Party on Sunday nights. After the last one, one of our stalwarts, Terry O’Neil said that at Christmas she would be having prosecco for breakfast. Now, there’s a well known tune called “Whisky for Breakfast”, so I reckoned that “Prosecco for Breakfast” would be a good title for a tune. Perhaps a jig…

And here it is.

and here’s a piano version…aaargh.. I can’t upload sounds to this page. I have put it on SoundCloud: here’s the link to it.

Hassibi et al’s (Deepmind) protein folding predictor

December 1, 2020

I’ve been using the protein folding problem as an example of a really hard problem in computing for a long time: that and real-time weather forecasting have been used by many as part of the case for supercomputers making a real difference.

This new work is an improvement on their 2018 technique (see https://www.nature.com/articles/s41586-019-1923-7.epdf), and is based on deep learning and gradient descent. Now their 2020 technique is an improvement on this (see https://deepmind.com/research/open-source/computational-predictions-of-protein-structures-associated-with-COVID-19 and https://deepmind.com/blog/article/alphafold-a-solution-to-a-50-year-old-grand-challenge-in-biology).

Whys does this matter? Proteins are absolutely central to life on Earth: they are the building blocks of all living entities. Proteins are complex (very complex) molecules made from strings on amino acids, but their behaviour is tightly loud up with their spatial conformation. So if one knows the string of amino acids, one might be able to predict their behaviour. However, their behaviour (what they will react with, how they will change their conformation in electric fields etc.) is very hard to predict from their chemical structure – it needs their conformation as well.

This new advance starts to make determining their structure directly look more possible. And this matters not just for understanding the behaviour of existing proteins, but for predicting the behaviour of synthesised proteins as well.

The beginning and the end

November 9, 2020

I heard a programme on Radio 4 (UK) today (Monday 9 November 2020: Start the Week with Roger Penrose, Carlo Rovelli and Helen Czerski, introduced by Andrew Marr), and I think I understood it as…

Once the Universe decays (transforms) into a form in which there are no baryons (particles with mass), but only photons which move at the speed of light, everything will be everywhere all at once, and spacetime will cease to exist. This could be interpreted as a collapse of all the energy in the Universe to a single point, whence the big bang starts (again? or just the once?)

I found this (i) comprehensible and (ii) wonderful.

Meanwhile, I’ve just put together the sponge mix that will turn into sourdough bread tomorrow. The beginning of a new loaf.

playing jazz in lockdown

November 7, 2020

sometimes i play jazz on jamulus, with other people: tonight with some bostonians though the latency was very high.

but now i’m back playing, late at night to the dog.

it’s more interesting jazz, less just standards, but monk stuff.

the dog seems happy enough.

more of an audience than we sometimes got even before lockdown.

Happiness is a kitchen sink that drains.

October 20, 2020

On Sunday night, the sink in the kitchen finally stopped draining. It’s been draining slowly for weeks, on and off for months. Caustic soda and boiling water has kept it more or less usable. But on Sunday it finally gave up. So under the sink I went, and dismantled the fittings there – a bit complicated, as there’s a dishwasher as well. But I took it all to bits: but the under-sink piping was all in working order: the problem was further down.

Now that’s happened before: I put some concentrated drain cleaner (nasty stuff) down the pipe at the very bottom, and that resulted in cracking and popping sounds, along with a very nasty smell. But I didn’t have any so I tried pushing down with a piece of cable. It went about 1 metre, and stopped. No dice. Time to call in the experts.

Monday morning, called the plumber. I was really pleased when he turned up an hour or two later. He tried the acid technique: no dice. He tried his pipe rods. Nothing. So it was time to go under the floor. Fortunately, there’s a hatch in the kitchen, so after removing all the furniture and the flooring under he went. It was nasty down there: the pipe was leaking, including all the acid that the plumber had tried. The drain pipe itself has come partly loose, and the result was that water was flowing (or rather not flowing) downhill and then up before it reached the main drainage.

After more attempts at unblocking the pipe, the plumber eventually decided on replacing it: a nasty job, because the under-floor area was wet with a mixture of acid and waste. But that worked, and the new pipe now slopes all the way downwards. The old pipe was blocked for a long way. All this took the plumber till mid-afternoon, and even he described it as a bit of a nightmare!

But at last we had a usable kitchen again.

Happiness is a kitchen sink that drains!

Velasquez’s “Las Meninas”

July 14, 2020

In my last post, I mentioned completing a jigsaw: it was of Velasquez’s Las Meninas, that my wife had bought when we visited the Prado in Madrid a few years ago. She had given it to her sister, but her sister and husband had never managed to complete it. So when they heard I’d broken a finger, and couldn’t play music or ride my bicycle, they sent it to us.

This was a difficult jigsaw, with 1000 pieces: so many parts of it are similar in colour, and often a piece shows just a little image, and it is very hard to tell where it might go. So we started it, found the corners and edge pieces, and assembled the frame, Then we went for parts that we were reasonably sure we could identify, and then tried the bits between. This took a long time – and we went away for a short holiday when we were near the end (and I was near the end of my tether – quite happy to give up).

But returning to it after a week away, I finished it quite easily. We are fortunate that we had space in the conservatory, where there’s a lot of light: it would have been even harder by artificial light. Still it’s done.

I found that getting it right in the end meant looking for anything that seemed not quite right, and then swapping pieces (or even sets of pieces) so that it did look right. It seemed to me to have something in common with debugging a computer program, looking for bugs, and fixing them, but within a very constrained environment.

I enjoyed it a lot: and I really learned to appreciate Velasquez’s art at the same time. Still, perhaps the next jigsaw will have slightly fewer pieces!

Back from holiday in Alnmouth.

July 12, 2020

Way back in January in what seems to have been a different world we booked a week’s holiday in Alnmouth, Northumberland.

It took us a little while to adjust, having been under lockdown – or near lockdown – for about three months. But we managed. We spent as much time as possible on the beach, where the 2 metre social distancing was very straightforward. Lussa (the dog) loved the beach, where there were lots of other dogs as well as a few people. The pubs were not really open – just the beer gardens and then only in good weather and not for very long. But our son and his fiancé came to see jus staying in their own camping van a few miles down the coast, and bicycling to our little apartment.

The highlight was actually eating a meal out! In Craster at the Jolly Fisherman which specialises in crab, in their garden where it was almost too hot. Not something we were used to at all. Our cottage was small but had a nice little courtyard which was both dog-secure and entirely out of the wind.

Now we’re back: here in Scotland outdoor bars are open, and shops too, though one must wear a mask in shops (not in bars: that would make drinking a little difficult). We’ve managed a coffee across the road at the Riverside, and I finished a very tricky jigsaw we started not long after I broke my finger.

One day we’ll go further field, but for now we’ll simply stay here. Back to practising music, playing with Jamulus, learning Ivrit and generally living.

Broken finger

June 7, 2020
The dog that broke my finger.

The Airedate Terrier

Last Tuesday, I tried to catch our Airedale Terrier (terror?) who has become unhappy about coming back at the end of her outings. Unfortunately, I caught the middle finger of my left hand in her collar, and when she ran, she broke the bone above the top joint. It’s been x-rayed, and it has a splint: the medics reckon 6 weeks to repair.

It’s not sore now, and the swelling has come down. I’m treating it with comfrey poultices from time time (nearly daily), and that does seem to help. It’s a better colour now, though still a long way from better.

This has put paid to me playing the clarinet for now altogether: you can’t play it with one hand. I can still play some piano – I have full use of the right hand, but I need to be really careful with what I do with the left. I can play single notes, or even octaves, but once I start playing, I tend to get carried away, and forget that I can’t use the middle finger at all. Still, better than nothing.

I”ve been using Jamulus in this lockdown, and have put up a server on the Google cloud in London. They allow one to rack up US$300 of usage for free, presumably hoping that by the time yo’ve done that, you’ll need the system. I may well… meanwhile, I do use it to jam with people both locally and in this part of Europe. Further away, the latency gets too long, and it becomes impossible to interact properly. Still, better than nothing.

And for the Dunblane Folk Club, we use the Facebook watch party facility on the Dunblane Folk Club Facebook page: people upload videos of them singing or storytelling or playing a tune, and then someone (often John Symon, sometimes me) puts these videos together in a sequence. At the same time, there’s a chat going on between this listening. It’s quite fun, better than nothing….

Anyway: I have to run it tonight, in an hour or so….. The finger will, I suppose, get better: not handy, I was enjoying getting on with the clarinet. I’ll just have to cope, like with the lockdown.

Why falling into the river is sometimes a good thing…

April 12, 2020

Yesterday (lockdown day 12, Saturday), I got up, and did my yoga stretches as usual. Except it wasn’t as usual: I did something that hurt my back, and between that and being a bit miserable and self-pitying with the lockdown, I was not in a good mood. So when I read Facebook about the five stages of a pandemic, and looked at people’s postings about how they were coping, without a trace of miserableness, my mood was not exactly positive.

It was nonetheless a lovely morning, and out we went with the dog, Lussa. We were just arriving at the park, when to maintain social distancing, I decided to go down to the river Allan, which is quite low just now, so that the rocks near the bank are sticking out. To help convince Lussa to come to me I went on to a rock a little further out. On came Lussa, which was good, because she’s been a little afraid of water. Then it was time to come back onto terra firma but the rocks were very slippy, and down I sat into the water.

Now, you might think this would make my mood even worse, but it had exactly the opposite effect. I realised that there’s enjoyment to be had in any sensation, the sensation of being very much alive (and in this case, very wet too). So on my wife went with the dog, and I went home to change, much cheered up by falling into the river.