[ale] Squeezelite + ecasound + sox on Beaglebone Black

Ian Forrest r.ian.forrest at gmail.com
Wed Jul 8 00:47:02 EDT 2015


Hey all,

I suspect that this is an easier question than I'm making it; I ran linux
forever before law school, but never got too creative with it, so please
forgive me if I'm missing something obvious.

I am using a Beaglebone Black running Debian as the brains of a stereo
setup. I am running squeezelite (a software player for the logitech media
server), piping it into ecasound for equalization and crossover filters,
and finally sox for dithered re-quantization so that everything can be sent
out to a dinky USB soundcard. This is all I plan on having the Beaglebone
do, at least for the time being.

I have a bash script that does all this, cobbled together from a really
great guide at
http://rtaylor.sites.tru.ca/2013/06/25/digital-crossovereq-with-open-source-software-howto/
. With a couple anonymizing modifications, it looks something like this:


#!/bin/sh
/home/debian/squeezelite -o - -u vL -a ::32:0 -n Speakers -s 192.168.x.x |
ecasound -q -z:mixmode,sum -x -a:pre -f:s32_le,2,44100 -i:stdin
-pf:/home/debian/ecasound/pre.ecp -o:loop,1 -a:woofer,fullrange -i:loop,1
-a:woofer -pf:/home/debian/ecasound/woofer.ecp -chorder:1,2,0,0
-a:fullrange -pf:/home/debian/ecasound/fullrange.ecp -chorder:0,0,1,2
-a:woofer,fullrange -f:f32_le,4,44100 -o:stdout | sox -q -c 4 -r 44100 -b
32 -e float -L -t raw - -e signed -c 4 -b 16 -t alsa surround40:Device
dither -s

This works. ./squeezelite.sh runs and is off to the races, makes pretty
noises, etc.

The problem is daemonizing it and having it run at startup. Something tells
me this is due to failure to understand scripting generally and pipes
specifically. For now, I have to start a putty session and run the script
myself. I have yet to find a good way to get it going automatically.

I have tried to modify the init.d script given here without luck (most
recently by just shoving my pipes in as squeezelite arguments):
http://www.computeraudiophile.com/blogs/k-man/configuring-beaglebone-black-run-squeezelite-452/

I have also tried a few named pipe experiments, all of which work in a
putty session, but none of which behave without me initiating them.

If possible, I'd like to do it all with a small change to the linked
script, rather than going off on my own. Anyone have thoughts on what that
modification might look like, or (more likely) what question I OUGHT to be
asking?

Thanks, and hope to see some of you all this Sunday.

Best regards,
Ian

-- 
R. Ian Forrest
(404) 236-9436
J.D. 2013, University of Kentucky College of Law
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20150708/c7fd7a0e/attachment.html>


More information about the Ale mailing list