Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
BASH script for playing mp3 through Bauer filter
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
nikodll
n00b
n00b


Joined: 26 May 2004
Posts: 15
Location: Minsk, BY

PostPosted: Thu Jan 20, 2011 10:07 am    Post subject: BASH script for playing mp3 through Bauer filter Reply with quote

I just would like to publish here my script to play *.mp3 files using Bauer stereophonic-to-binaural DSP library preprocessing (optimizes sound for listening music using headphones).
It uses media-libs/libbs2b, mpg123, xterm and aplay (alsa player), so one would need either to install those or to slightly adjust the script, luckily the latter is quite simple.
Code:

emerge media-libs/libbs2b media-sound/alsa-utils x11-terms/xterm media-sound/mpg123


It also can be used to play an individual file as well as a whole directory, just choose "Open with..." in Nautilus, and subsequently "h" to get help with navigation in mpg123

Code:

#!/bin/sh

ARG=$1
TEMPFILE=/tmp/bs2b-play.tmp

#echo testing ${ARG}
if [ -d "${ARG}" ]
then
        ls -w1 -C "${ARG}"/*.mp3 > ${TEMPFILE}
else
        echo "${ARG}" > ${TEMPFILE}
fi;

xterm -geometry 80x17 -e "mpg123 --title -C -@ ${TEMPFILE} | bs2bstream | aplay -f S16_LE -c2 -r44100"


I hope someone will find this useful.
_________________
Gentoo people
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum