28 October 2017
21 October 2017
14 October 2017
07 October 2017
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.
Finally, I had to add pthread to the list of libraries in makefile.alsa.
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.
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-devI 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 -lsndfileI 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 alsaSndpeek 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.
Labels:
programming,
stem
Subscribe to:
Posts (Atom)