07 October 2017

Home Run #497: MacBook Woe 8

Originally published on 31 May 2006.

Home Run #496: MacBook Woe 7

Originally published on 30 May 2006.

Home Run #495: MacBook Woe 6

Originally published on 25 May 2006.

Home Run #494: MacBook Woe 5

Originally published on 24 May 2006.

Home Run #493: MacBook Woe 4

Originally published on 23 May 2006.

Home Run #492: MacBook Woe 3

Originally published on 18 May 2006.

Home Run #491: MacBook Woe 2

Originally published on 17 May 2006.

Home Run #490: MacBook Woe 1

Originally published on 16 May 2006.

01 October 2017

Building sndpeek on Ubuntu 16.04

I've been quite impressed with the selection of real-time audio spectrogram applications available on Android, my favorite being Spectroid. But finding something equivalent for Linux has been challenging. The best I've come up with to date is sndpeek from Princeton University. It took some doing to get it to compile, so I thought I would document what I needed to do to get it done since the page I found to help me out was written over six years ago.

I built sndpeek 1.4 on an Ubuntu 16.04 box, and there were some library installs, and source and makefile modifications that needed to be done. The standard suite of developer tools were already installed on my box (gcc, make, etc.).

The following libraries needed to be installed for me to be able to build sndpeek: sndfile, asound, glut, and xmu. They were but and apt install away.
$ sudo apt install libsndfile1-dev libasound2-dev freeglut3-dev libxmu-dev
I had to include stdlib in marsyas/LPC.cpp to get it to compile by adding the following near the top of the file:
#include <cstdlib>
I did not have to modify the other source file mentioned in the other reference.

Finally, I had to add pthread to the list of libraries in makefile.alsa.
LIBS=-L/usr/X11R6/lib -lglut -lGL -lGLU -lasound -lXmu -lX11 -lXext -lXi -lm -lpthread -lsndfile
I was building with the ALSA libraries. If you're using a different sound library, you may have to modify a different makefile.

Once I made those changes, I was able to successfully build a working copy of sndpeek 1.4 by running make in the src/sndpeek directory of the downloaded sndpeek project.
$ make alsa
Sndpeek runs quite sprightly on my system. It is very responsive to inputs. A limiting factor is that I cannot play sounds on the same computer as sndpeek is running, making demonstrations of sound visualization a multi-device project. I am still comparing generating sound on my computer and chromcasting Spectroid, and generating sound on the Andorid device and projecting my computer screen to see which would work better.