Thursday, August 28, 2008


inkscape + latex = textext - Sweet, latex inside of the mighty inkscape.

arduino beats

little girl giant goes for a walk in the park

in the sky

I love my building, it's the tallest on campus and one of the newest. I'm up on the top floor, and they often bring tours of students by to check out the view.

Sweet. Life.

setup git

Setting up a new remote git repository is easy.

Here's my own personal howto:

(I) - Set up a git project

1) Make an empty project dir

cd test
mkdir info
cd info

2) Initialize this directory as a git project

git init

3) Copy all the files over that you want to use to start the project

cp ~/test/info/diary.txt .

4) Add these files to the index

git add .

5) Commit these changes

git commit -m "Initial commit"

(II) - Setting Up a Shared Repository

1) Make a new directory where the shared repository will live

mkdir ~/mDEV/info
cd ~/mDEV/info

2) Initialize the shared repository

git --bare init --shared
git --bare fetch /home/sness/test/info master:master

(III) - Interacting with the Shared Repository from a remote machine

1) Clone the project from the server

git clone q:/home/sness/mDEV/info

2) Update the project with the latest files (equivalent to "cvs update")

git pull origin

3) Add the files that have changed

git add file1 file2 file3

4) Commit the files

git commit

5) Push the changes to the server

git push origin

or if there is more than one branch on the server:

git push origin master



OPENTAPE - a free way to make and host your own web mixtape. Nice.


Wednesday, August 27, 2008


I'm working on the Audio Chord Detection section of MIREX 2008. Looks like a interesting challenge.


When Tecumseh was visiting, he told me about Praat, a program for doing phonetics by computer.

It's GPLed, you can download the source here, and download linux executables here.

The interface is Motif and a bit dated, but looks like it has some good stuff in there.


100 lines of C to parse a protocol buffer. Yes, try doing that with XML.

Friday, August 22, 2008


that go

libdl alsa static

I was trying to compile a program statically, and it required libasound. When I tried to compile it I got the following errors:

g++ -I/usr/sness/marsyas-debug/include/marsyas -g -static -I/usr/sness/include -c -o mirex_extract.o mirex_extract.cpp
g++ -g -static -I/usr/sness/include -o mirex_extract mirex_extract.o /usr/sness/marsyas-debug/lib/libmarsyas.a -L/usr/snes\
s/lib -lpthread -lasound -lmad
/usr/sness/lib/libasound.a(dlmisc.o): In function `snd_dlsym_verify':
/home/sness/down/alsa-lib-1.0.17a/src/dlmisc.c:115: undefined reference to `dlsym'
/usr/sness/lib/libasound.a(dlmisc.o): In function `snd_dlsym':
/home/sness/down/alsa-lib-1.0.17a/src/dlmisc.c:161: undefined reference to `dlsym'
/usr/sness/lib/libasound.a(dlmisc.o): In function `snd_dlclose':
/home/sness/down/alsa-lib-1.0.17a/src/dlmisc.c:85: undefined reference to `dlclose'
/usr/sness/lib/libasound.a(dlmisc.o): In function `snd_dlopen':
/home/sness/down/alsa-lib-1.0.17a/src/dlmisc.c:64: undefined reference to `dlopen'
collect2: ld returned 1 exit status
make: *** [mirex_extract] Error 1

Turns out I just needed to add -ldl to your LDFLAGS like this:

LIBS = -L/usr/sness/lib -lpthread -lasound -lmad -ldl

g++ -g -static -I/usr/sness/include -o mirex_extract mirex_extract.o /usr/sness/marsyas-debug/lib/libmarsyas.a -L/usr/sness/lib -lpthread -lasound -lmad -ldl

Thursday, August 21, 2008

video to audio

I've heard that

mplayer -dumpaudio -dumpfile out.mp3 file.flv

Works for extracting the audio from a video clip. It coredumped on my system, but the following did work:

mplayer -novideo -ao pcm
lame audiodump.wav npsh.mp3

For the most awesome video by Natalie Portman's Shaved Head Sophisticated Sideways Ponytail.

Wednesday, August 20, 2008


One of my performing names is:

DJ Infrasound

my new DJ name is:



odd bug

I ran into the following bug when trying to compile RtAudio on a Mac OSX 10.4 on a G4:

midiInOut.cpp: In function `int main()':
midiInOut.cpp:54: warning: jump to label `cleanup'
midiInOut.cpp:21: warning: from here
midiInOut.cpp:24: error: crosses initialization of `unsigned int nPortsOut'

There is a post on the CCRMA mailing list that discusses this.

Saturday, August 16, 2008



wget http options


I used this like:

wget --post-data="page=2"

zsh script to get all the pages is the next step.

russian mod




Shoes tutorial. { button "Push me" }

Nice GUI framework from why.


An online and interactive latex equation builder.






sensacell - walk on it, it senses you and lights up. neato!

Friday, August 15, 2008

Burning Away the Winter Blues

Lec 4 | MIT 6.002 Circuits and Electronics, Spring 2007

Fantastic demo at the end of the lecture!

MVC Public Service Announcement #5 : Outdated HTML

How to Make a Linux Screencast

How to create a Linux screencast


There are two ravens that often sit in a tree outside my window at the lab. What amazing birds.

Here are some differences between crows and ravens.

c++ string to char*

How to convert a C++ string to a char* from a post at devx.

std::string s="hello";
const char *p = s.c_str(); // get const char * representation
int len = strlen(p);

Thursday, August 14, 2008


I've been playing with my Arduino this weekend, and I'm reallllly digging it. I did quite a bit with my Make Controller a couple months ago, and had a lot of fun, but this Arduino is even cooler. Really easy to setup, with an interface very similar to the Processing interface. Really excellent examples and documentation, and shows how important it is to have really well written examples and sample programs to get you going.

A serial communication program for accessing a microcontroller-based data-acquisition system
POSIX Threads Programming
Arduino - Smoothing analog input
ASCIITable - Demonstrates the advanced serial printing functions by generating a table of characters and their ASCII values in decimal, hexadecimal, octal, and binary.
Graph with Processing
Wiring - Similar to Arduino
Arduino grows up and learns to talk! by Lady Ada
Serial Programming Guide for POSIX Operating Systems
C++ Sockets Library

g + a


littleBits - little circuit boards that you can attach together. want have.

sith cat

octopus attack


Steve Yegge : Build what you know.

Exactly what I'm doing.


Venus Scalar Data - From the Venus project here at UVIC.

Wednesday, August 13, 2008


cmake --help
cmake --help-full
cmake --help-command-list
cmake --help-command ENABLE_TESTING
cmake --help-command ADD_TEST

ccmake debug

If you want to enable the "-g" flag to add debugging symbols when using ccmake (for example in the new Marsyas build system, you don't set the "MARSYAS_DEBUG" flag to "ON", instead you change the "CMAKE_BUILD_TYPE" to "Debug".


find not

When you use find, sometimes you want to not show some of the results. You can prepend the "-not" prefix for this:

find . -name '*CMake*' -not -name "*svn*"

Finds all files that have "CMake" and don't have "svn" in their name.

new era


mammatus clouds

Tuesday, August 12, 2008

debugging symbols

To tell if a file has been compiled with debugging symbols, just go

gdb file


gdb file.o

If it has debugging symbols you'll see something like:

devi 391 [~/mDEV/mirex2008] % gdb mirex_kea
GNU gdb Red Hat Linux (6.6-35.fc8rh)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...
Using host libthread_db library "/lib/".

If it doesn't have debugging symbols you'll see something like:

devi 1847 [~/marsyas/debug] % gdb /usr/bin/gv
GNU gdb Red Hat Linux (6.6-35.fc8rh)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...

warning: Missing the separate debug info file: /usr/lib/debug/.build-id/d6/54aa184d96b7219e549a595f6fd21b79bd2c98.debug
(no debugging symbols found)
Using host libthread_db library "/lib/".

ccmake -g

If you have a CMake project in C++ and want to compile with debugging flags, often you can just set the "CMAKE_DEBUG" flag in ccmake to "ON". Sometimes this isn't set up in the project you're working on, so you could also:






press "t" (to toggle the advanced mode)
and set the options you want by hand.

Another useful tidbit with CMake is that if you:

make VERBOSE=1

ccmake will show you the full command line that it is using to compile.

Thanks Graham!

lhc rap


Pronounced like marillion, sness brings you cantillion, a Cantillation research tool to help researchers from around the world collaborate together in investigating partially notated works of diverse oral traditions.

The paper that describes this research is:

Daniel Peter Biro, Steven Ness, Matthew Wright, W. Andrew Schloss and George Tzanetakis Decoding the Song: Histogram-Based Paradigmatic and Syntagmatic Analysis of Melodic Formulae in Hungarian Laments, Jewish Torah Trope, Tenth Century Plainchant and Koran Recitation EMUS Expressivity in MUsic and Speech : IRCAM - Institut de Recherche et de Coordination Acoustique/Musique - Paris, France

music discovery

Top 5 music discovery tips for the unhip, unmotivated - Music-Information Retrieval in action

latex book

Write a book with LaTeX. Awesome, perfect for the Marsyas Cookbook that I'm writing.


Self-organizing maps and Music are what I'm going to be doing for my M.Sc. project, here's some links:

Self-organizing maps - From the source in Finland
Self Organizing Map at wikipedia
Self Organizing Maps from Tom Germano
Description of Kohonen's Self-Organizing Map
Self-Organizing Maps - A Tourist's Guide to Neural Network (re)Presentation(s)
Teuvo Kohonen - The inventor of SOMs

libsvm and weka

If you are running Weka and get an error when trying to run the LibSVM classifier, try adding the libsvm.jar file to your jar path:

java -classpath $CLASSPATH:weka.jar:libsvm.jar weka.gui.GUIChooser

For me this looks more like:

java -classpath /usr/sness/weka-3-5-7/weka.jar:/usr/sness/WLSVM/lib/libsvm.jar weka.gui.GUIChooser

LibSVM and Weka
ntegrating LibSVM into Weka Environment

Monday, August 11, 2008


This is just where my friend visited. Wow.


In praise of the ampersand


I just launched The Orchive, a huge audio archive of over 20,000 hours of Orca song, of which we have over 6000 hours digitized and up on the website. It comes from audio recorded at the Orcalab.

Check it out and please let me know what you think.


Mmmm, Livid Looper.

And now that I got a student activation for Max/MSP 5, I can try it out.

I'm really digging Max/MSP, I got it hooked up to the RadioDrum last week, and made a patch to do some DubStep with the help of Matt and Manj. Some sweet sweet bass sounds were heard in the lab after hours on Friday.

latex tips


Mechanochromic compounds, which undergo a change in color or luminescence when solid samples are crushed or ground, can serve as detectors of mechanical action, but examples of such compounds are rare. Ito et al. synthesized a compound in which two C6F5Au groups are linked by a para CN(C6H4)NC ligand, and found that its photoluminescence changes from blue to yellow after grinding. Like other such compounds, its original luminescent state is restored upon dissolution and recrystallization, and this process could be repeated for 20 cycles without any decrease in luminescence. Structural and spectroscopic studies indicate that the long-lived blue emission in the crystal is intramolecular in origin and phosphorescent (a localized intraligand ?-?* transition), whereas the yellow emission appears to arise from an amorphous phase characterized by aurophilic interactions: intermolecular interactions between gold atoms. -- PDS

J. Am. Chem. Soc. 130, 10.1021/ja8019356 (2008).



TicGit is a simple ticketing system, roughly similar to the Lighthouse model, that is based in git. It provides a command line client that uses the 'git' gem to keep it's ticketing information in a separate branch (called 'ticgit') within your existing git repository. All the data is file based and rarely changing, decreasing the likelihood of a merge issue. Right now, ticket branch merges need to be done manually and separately, but I'll write a tool that helps pretty soon.


Telemegaphone Dale - stands seven metres tall on top of the Bergskletten mountain overlooking the idyllic Dalsfjord in Western Norway.

When you dial the Telemegaphon's phone number the sound of your voice is projected out across the fjord, the valley and the village of Dale below.


The 100 Most Common English Words - See how many of the 100 most common words in the English language you can guess in 5 minutes...

python docstring


Raphael is a small JavaScript library that should simplify your work with vector graphics on the web. In case you want to create your own specific chart or image crop-n-rotate widget, you can simply achieve it with this library.

Raphael uses SVG and VML as a base for graphics creation. Because of that every created object is a DOM object so you can attach JavaScript event handlers or modify objects later. Rapha?l?s goal is to provide an adapter that will make drawing cross-browser and easy. Currently library supports Firefox 3.0+, Safari 3.0+, Opera 9.5+ and Internet Explorer 6.0+.

rubylib zsh

Sunday, August 10, 2008

sh serial

while true
read LINE < /dev/ttyUSB0
echo $LINE

or just:

tail -f /dev/ttyUSB0

read the port

Read data from a serial port in C++:

1> open the port:

fd = open("/dev/ttyS0", O_RDWR | O_NOCTTY | O_NDELAY);
if (fd == -1)
* Could not open the port.

2> read the port:
while ((nbytes = read(fd, bufptr, buffer + sizeof(buffer) - bufptr - 1)) > 0)
bufptr += nbytes;
if (bufptr[-1] == '\n' || bufptr[-1] == '\r')

3> writing the port:
if (write(fd, "AT\r", 3) < 3)


Marsyas Threads

which are derived from:

STK Threads

They're a cross-platform implementation of threads that use pthreads on Unix and an equivalent library on Windows.

POSIX Threads at Wikipedia
POSIX thread (pthread) libraries
POSIX Threads Programming


Setting up WPA_PSK with Fedora 8 instructions:

iwconfig wpa_passphrase myssid waylongkeythelongerthebetterbecausewecareaboutsecurityalot
eth1 essid "myssid"
ifup eth1
wpa_supplicant -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf


Chris Cannam, the author of some great music software including Sonic Visualiser.

Friday, August 08, 2008

tee time

Advanced usage of tee

Must learn this.


He who is of calm and happy nature will hardly feel
the pressure of age, but to him who is of an opposite
disposition youth and age are equally a burden.

- Plato, The Republic


Writing code for testing some good points.

robot clock

A clock via robot that is reminiscent of Stonehenge.

in the mood

in the mood, a rhythmbox plugin by Charlotte Curtis that uses Marsyas as it's engine for doing similarity matching of songs.


Thursday, August 07, 2008




about:config - hacks for firefox.



StickDuino - USB Stick Sized Arduino Clone
SMT Soldering Tutorials


Davix - a live CD for data analysis and visualization.


MzSpectralFlux - Really nice webpage to describe this Sonic Visualiser plugin.


Craig Stuart Sapp author of the most excellent Mazurka Vamp plugins.


latex orphans

How to get rid of orphans and windows in Latex.

An orphan is the first line of a paragraph on the last line of a page.

The last line of the paragraph on a new page is a widow.




noit o' mnain worb - is a particle automaton which employs pressure as its main computational mechanism.


Eureka Car Park wayfinding system. Big huge painted words on the walls. I love it.

xcalc slide rule


LHC might produce particles in the future that prevent it from ever operating. Hmm.

Wednesday, August 06, 2008


"The best stuff didn't come from guys knowing what they were doing, it came from guys who really tried hard and cared like hell"

From TweetDeck via Cali Lewis.




Matthias Mauch and his personal webpage. He's a researcher in MIR.


Software Downloads for neat things in Music Information Retrieval at Queen Mary's university.


Guy Steele on Programming Languages.

Tuesday, August 05, 2008


1d tetris

tetris in one dimension. lol.


To convert an audio file that has two channels to one with just one channel:

sox in.wav -c1 out.wav

Monday, August 04, 2008


Passionates from bokardo, and the original post from Scoble.



levelhead is a spatial memory game.



dd_rescue - Like dd, dd_rescue does copy data from one file or block device to another, but gives you some more options for damaged files or filesystems.

Friday, August 01, 2008


An interesting story by George Dyson about inverting the von Neumann matrix.

ieee latex

arduino interfacing

oscon proceedings

The OSCON 2008 proceedings.


rbibtex - A bibtex parsing library written in pure ruby.

Nice. I'm going to use this for my new bibliography management system, people will be able to feed it in bibtex and it will keep track of it in a Rails application. Will be built for teams of people who collaborate on papers and want to have a central location to keep track of their papers.