Friday 30 September 2011

Converting lossless WMA to WAV/FLAC in linux.


Which should work but is not succinct and involves redundant operations.

Firstly, if you do download wmp11-windowsxp-x86-enu.exe from Microsoft (where else ;¬) , you do not need to install it under Wine.

You do need Wine though, so get that first if you don't have it.

Instructions for Ubuntu, other distributions may differ.

Right click on the wmp11-windowsxp-x86-enu.exe file and choose:
Open With > Archive Manager.
Then in the Archive Manager extract and run WindowsXP-MSCompPackV1-x86.exe .

Then install foobar2000 under wine, it will be able to play and convert lossless WMA.


I am fairly sure that this is not the only way and that there may be a way to include WMA lossless functionality into some native app's but it certainly is easy.

I hope this saves somebody some time.

Life of Prime

I was bored and decided to investigate prime numbers for half an hour, as you do.
I downloaded the first 1000 primes from the internet somewhere and graphed them against their position in the list. I expected an upward curve roughly resembling an exponential, which is what I got.

There seems to be some periodicity (loose) between large and small gaps between prime numbers.

I then wondered about the distribution of the distance between prime numbers, this was interesting; by far the most common separation was 6.

This made me think about how things would look in base 6 as this may have an important role to play: it does. See http://en.wikipedia.org/wiki/Senary

In Base 6, Senary or Heximal, as I have found it called, all prime numbers finish with a 1 or 5. Specifically they are all part of a set defined as 6n+1, apart from the first few.

At first this sounded very interesting to me, perhaps there is a pattern, I thought; but on reflection it's kind of obvious that this would be the case. If we take the base 6 units. 0,1,2,3,4,5 and also 10 (6 becomes 10 in base 6) we can see why:

Anything ending in a zero is a multiple of 10.
Anything ending in a 2 or 4 is a multiple of 2.

Anything ending in a 3 is a multiple of 3 :¬)
In base 6; 3 is like 5 in normal decimal, so 5, 10, 15, 20 are all multiples are 5 despite every other one being an odd number, in base 6; 3, 10, 13, 20, 23 are all multiples of 3 as 10 is a multiple of 3.

So all that is left is those ending in 1 or 5 (in base 6).


I did decide to read up on Base 6 and its applications. It seems to be a very sensible numbering system and makes quite a few things easy to do, similar to a clock face calculating. Base 12 is similarily useful.
There is an article here from a proponent of base 6 mathematics: http://www.shackite.com/base-six/base-six.htm