| Andrew Cooke | Contents | Latest | RSS | Twitter | Previous | Next


Welcome to my blog, which was once a mailing list of the same name and is still generated by mail. Please reply via the "comment" links.

Always interested in offers/projects/new ideas. Eclectic experience in fields like: numerical computing; Python web; Java enterprise; functional languages; GPGPU; SQL databases; etc. Based in Santiago, Chile; telecommute worldwide. CV; email.

Personal Projects

Lepl parser for Python.

Colorless Green.

Photography around Santiago.

SVG experiment.

Professional Portfolio

Calibration of seismometers.

Data access via web services.

Cache rewrite.

Extending OpenSSH.

C-ORM: docs, API.

Last 100 entries

Have to add...; Culturally Liberal and Nothing More; Weird Finite / Infinite Result; Your diamond is a beaten up mess; Maths Books; Good Bike Route from Providencia / Las Condes to Panul\; Iain Pears (Author of Complex Plots); Plum Jam; Excellent; More Recently; For a moment I forgot StackOverflow sucked; A Few Weeks On...; Chilean Book Recommendations; How To Write Shared Libraries; Jenny Erpenbeck (Author); Dijkstra, Coins, Tables; Python libraries error on OpenSuse; Deserving Trump; And Smugness; McCloskey Economics Trilogy; cmocka - Mocks for C; Concept Creep (Americans); Futhark - OpenCL Language; Moved / Gone; Fan and USB issues; Burgers in Santiago; The Origin of Icosahedral Symmetry in Viruses; autoenum on PyPI; Jars Explains; Tomato Chutney v3; REST; US Elections and Gender: 24 Point Swing; PPPoE on OpenSuse Leap 42.1; SuperMicro X10SDV-TLN4F/F with Opensuse Leap 42.1; Big Data AI Could Be Very Bad Indeed....; Cornering; Postcapitalism (Paul Mason); Black Science Fiction; Git is not a CDN; Mining of Massive Data Sets; Rachel Kaadzi Ghansah; How great republics meet their end; Raspberry, Strawberry and Banana Jam; Interesting Dead Areas of Math; Later Taste; For Sale; Death By Bean; It's Good!; Tomato Chutney v2; Time ATAC MX 2 Pedals - First Impressions; Online Chilean Crafts; Intellectual Variety; Taste + Texture; Time Invariance and Gauge Symmetry; Jodorowsky; Tomato Chutney; Analysis of Support for Trump; Indian SF; TP-Link TL-WR841N DNS TCP Bug; TP-Link TL-WR841N as Wireless Bridge; Sending Email On Time; Maybe run a command; Sterile Neutrinos; Strawberry and Banana Jam; The Best Of All Possible Worlds; Kenzaburo Oe: The Changeling; Peach Jam; Taste Test; Strawberry and Raspberry Jam; flac to mp3 on OpenSuse 42.1; Also, Sebald; Kenzaburo Oe Interview; Otake (Kitani Minoru) move Black 121; Is free speech in British universities under threat?; I am actually good at computers; Was This Mansplaining?; WebFaction / LetsEncrypt / General Disappointment; Sensible Philosophy of Science; George Ellis; Misplaced Intuition and Online Communities; More Reading About Japan; Visibilty / Public Comments / Domestic Violence; Ferias de Santiago; More (Clearly Deliberate); Deleted Obit Post; And then a 50 yo male posts this...; We Have Both Kinds Of Contributors; Free Springer Books; Books on Religion; Books on Linguistics; Palestinan Electronica; Books In Anthropology; Taylor Expansions of Spacetime; Info on Juniper; Efficient Stream Processing; The Moral Character of Crypto; Hearing Aid Info; Small Success With Go!; Re: Quick message - This link is broken; Adding Reverb To The Echo Chamber; Sox Audio Tools

© 2006-2015 Andrew Cooke (site) / post authors (content).

Getting Jack Working

From: "andrew cooke" <andrew@...>

Date: Sat, 23 Jun 2007 18:06:20 -0400 (CLT)

Jack (Linux Audio) promises to be the solution to getting streaming audio
working from any source.  These are notes on my attempts to get it

- To start Jack use qjackctl.  This is a KDE GUI app.  It will start and
stop jack for you (the start and stop buttons).  When Jack doesn't start,
click the Message button to see why.

- My first error was about a missing libportaudio18.  While it was
present, it turned out I had the 32 bit library installed (with 64 bit
Jack).  The SUSE dependencies didn't pick this up - you need to look very
carefully at the installed version (click on the tabs bottom right in

- Next error was about /dev/shm/jack-0 already existing.  This seems to be
a permissions thing related to running as root.  So don't run as root.

- Next error was a problem with access rights to /dev/shm (btw /dev/shm
seems to be some kind of dynamic memory thing - don't mess with it, it's
started automatically by SUSE.  If you delete the shm directory the best
way to get it back is reboot; mkdir doesn't seem to do the right thing). 
I fixed that with chmod 666 /dev/shm/jack-shm-registry (as root)

- Next error indicated that realtime play wasn't possible.  You can
disable this in qjackctl's "setup" menu.  However, jack.play seemed to
want to set it (I was using jack.play to test if anything was working). 
Fix here is to add the following lines to /etc/security/limits.conf:
@audio          -       rtprio          90
@audio          -       nice            -10
@audio          -       memlock         4000000
and then add the user to that group (YAST group management - select the
audio tickbox).  Finally log out and in again (type "groups" on the
command line to check you are a member of the audio group).

- Oh, and earlier I had disabled ARTS (the KDE sound thing) by clicking in
the appropriate checkbox of the KDE "Configure Desktop" GUI.  I did this
because the qjackctl message box was scrolling lots of ARTS related
messages.  I also restarted alsa with /etc/init.d/alsasound restart (Jack
uses ALSA to talk to hardware).

- So with those fixes jack.play works (it gives a misleading error on ogg
files, saying they are corrupted, but works fine with flac).  However
there was no sound.  Clicking on the "Connect" button of qjackctl you can
drag the jack.play thing on the left to the soundcard thing on the right. 
This connects them and you hear something!

- To add volume control, start jackmix, delete the connections you made
earlier, and instead connect jack.play to the mixer input.  Then connect
the mixer output to the sound card.  Finally twiddle knobs on the mixer
until you hear something.

That gets basic files to play.  That's it so far.  Amarok crashes.


Amarok with Jack

From: "andrew cooke" <andrew@...>

Date: Sat, 23 Jun 2007 18:44:03 -0400 (CLT)

- Install libxine-jack

- Start ARTS if you killed it earlier.  Without it, Amarok won't start,
and it doesn't seem to cause any harm (well, at various points I restarted
ALSA and Jack as well...)

- In the Amarok config select the jack output plugin (from the xine engine

- That's it.  Amarok automatically makes the connection to the output card.


Alsa, but no Flash, Jack

From: "andrew cooke" <andrew@...>

Date: Sat, 23 Jun 2007 21:45:53 -0400 (CLT)

To get Alsa to connect to Jack put the following in ~/.asoundrc:

# convert alsa API over jack API
# use it with
# % aplay foo.wav

# use this as default
pcm.!default {
    type plug
    slave { pcm "jack" }

# pcm type jack
pcm.jack {
    type jack
    playback_ports {
        0 alsa_pcm:playback_1
        1 alsa_pcm:playback_2
    capture_ports {
        0 alsa_pcm:capture_1
        1 alsa_pcm:capture_2

I was expecting flash (the browser plugin) would work with Jack too (it
uses Alsa), but it doesn't.  The reason is (I think) a 32/64 bit conflict.
 I'd forgotten but I'm running 32 bit Firefox so that the multimedia works
OK.  It's possible to change to 64 bit, but you still need to run flash in
a wrapper as 32bit.

One solution would be to move Jack to 32 bit.  But that means either
breaking dependencies or reinstalling nearly everything (ie KDE) as 32

So no streaming of Pandora.

No streaming of anything yet, of course.  Next I need to look at getting
airport working (well, after I've reinstalled Firefox to get back to 32


Jack to Airport

From: "andrew cooke" <andrew@...>

Date: Sun, 24 Jun 2007 19:23:51 -0400 (CLT)

Assuming that you have JustePort compiled correctly, and the Airpoert
Express configured, you can then connect Jack to the Airport using

- Install ecasound from YAST (assuming SUSE)
- Change the Jack sampling to 44100Hz
- Use the following command on the command line:
    ecasound -i jack -o stdout | mono JustePort.exe - 0
- In qjackctl, connect xine (for example, from Amarok) to ecasound

That's it.  Music comes out of speakers.


Streaming Audio and Jack

From: "andrew cooke" <andrew@...>

Date: Mon, 25 Jun 2007 08:55:14 -0400 (CLT)

Unfortunately the streaming with Airport isn't that great.  There are
occasional jumps and about every 15mins the connection goes down, meaning
I need to restart and reconnect the ecasound process.  I think the problem
is that (1) it's not trivial to drive an external DAC which is using a
separate clock (I assume) to my server and (2) the JustePort software is
more a demo of the crypto crack than an attempt at making a reliable, good
sounding audio streamer.

That's frustrating.  But one possible solution to my particular
circumstances is to switch to headphones and use internet streaming.  With
Jack this turns out to be pretty trivial.  I needed to install and
configure icecast (which I've done before - it's trivial) and then add

I use the following config file with oddcast:
ServerPassword=i changed this of course
#YP Settings
ServerName=Andrew's music
ServerDescription=Music for Andrew
#Advanced Settings

Then it's just a case of starting as:
> oddcastv3 -c oddcast.cfg JackMix:out_1 JackMix:out_2
(I am using jackmix for volume control - it also provides a nice
"connection point" so each source and destination can connect/start/stop
as required).

The only gotcha in all this was that the mount point has to be /stream.ogg
and not /stream (mplayer and xmms seem to get confused otherwise).

So, in case you're not seeing the wood for the trees, this lets you use a
player like Amarok as the source for streaming radio (instead of having to
use ices or whatever).


jjjuste V 1.0 Released

From: "andrew cooke" <andrew@...>

Date: Wed, 11 Jul 2007 21:20:48 -0400 (CLT)

I just released an Airport Express client for Jack:


Comment on this post