[HOWTO] Install SBaGen in Fedora

I am running Fedora 14 32 bit (and now Fedora 15 64 bit for which I have updated the article) and I wanted to install SBaGen for some binaural entertainment. So, here is how I did it:

Download

cd
mkdir sbagen
cd sbagen
wget http://uazu.net/sbagen/sbagen-1.4.4.tgz
tar xzvf sbagen-1.4.4.tgz
cd sbagen-1.4.4

Install dependencies

sudo yum install libmad-devel libvorbis-devel gcc

Run Build Script

For 32 bit:

./mk

For 64 bit:

wget "https://launchpadlibrarian.net/35151187/libvorbisidec_1.0.2+svn16259.orig.tar.gz"
tar xzvf "libvorbisidec_1.0.2+svn16259.orig.tar.gz"
cd "libvorbisidec-1.0.2+svn16259"
./autogen.sh
make
sudo make install
sudo ln -s /usr/local/lib/libvorbisidec.so.1 /usr/lib64/libvorbisidec.so.1
cd ..
cp /usr/lib64/libvorbisidec.so.1 libs/linux-libvorbisidec.a
cp /usr/lib64/libmad.so libs/linux-libmad.a
./mk

That should build a sbagen executable in the same directory. Run the following to verify:

./sbagen

It should output something like this:

SBaGen – Sequenced Binaural Beat Generator, version 1.4.4
Copyright (c) 1999-2007 Jim Peters, http://uazu.net/, all rights
reserved, released under the GNU GPL v2. See file COPYING.

Usage: sbagen [options] seq-file …
sbagen [options] -i tone-specs …
sbagen [options] -p pre-programmed-sequence-specs …

For full usage help, type ‘sbagen -h’. For latest version see
http://uazu.net/sbagen/ or http://sbagen.sf.net/

Now, copy it to /usr/bin/ and thats all.

sudo cp sbagen /usr/bin/

Now, you must be able to run it. Try running an example:

sbagen examples/basics/prog-chakras-1.sbg

If you get something along the lines of:

Can’t open /dev/dsp, errno X

You will need to prefix the command by padsp like this:

padsp sbagen examples/basics/prog-chakras-1.sbg

Hope this helps.

If you enjoyed this post, make sure you subscribe to my RSS feed!
  • Thanks for sharing!

  • Ryan Holloman

    Tried compiling in Xubuntu 11.10 using these instructions and get the following output:

    In file included from sbagen.c:220:0:oggdec.c: In function ‘looper_sched’:oggdec.c:602:8: warning: variable ‘update’ set but not used [-Wunused-but-set-variable]sbagen.c: In function ‘main’:sbagen.c:744:16: warning: ‘tmp[1]’ may be used uninitialized in this function [-Wuninitialized]sbagen.c:744:16: warning: ‘tmp[2]’ may be used uninitialized in this function [-Wuninitialized]/tmp/ccBGj00O.o: In function `init_sin_table’:sbagen.c:(.text+0x21a9): undefined reference to `sin’/tmp/ccBGj00O.o: In function `inbuf_start’:sbagen.c:(.text+0x3186): undefined reference to `pthread_create’/tmp/ccBGj00O.o: In function `inbuf_start.constprop.5′:sbagen.c:(.text+0x3271): undefined reference to `pthread_create’/tmp/ccBGj00O.o: In function `ogg_init’:sbagen.c:(.text+0x3b70): undefined reference to `pow’sbagen.c:(.text+0x3b85): undefined reference to `trunc’/tmp/ccBGj00O.o: In function `sinc_interpolate’:sbagen.c:(.text+0x9306): undefined reference to `sin’/tmp/ccBGj00O.o: In function `create_drop’:sbagen.c:(.text+0xa67f): undefined reference to `log’sbagen.c:(.text+0xa693): undefined reference to `exp’collect2: ld returned 1 exit status

    Open to suggestions for fixing this problem.

  • Ryan, I was facing the same problem. I guess position of -l flags depends on the compile version. Compiling directly (without mk script) can be done like this:gcc sbagen.c -o sbagen -DT_LINUX -lm -lpthread  and then:padsp sbagen examples/basics/prog-chakras-1.sbg should run one of the example scripts 🙂

  • bubba joe

    Animesh. Thank you for your post there. It’s kind of buried, so want to make it more visible.

    Worked for me.

    gcc sbagen.c -o sbagen -DT_LINUX -lm -lpthread

    running Ubuntu 12.10 64bit.