ICMC 2006
My GAANN fellowship will be sending me to New Orleans in November for the International Computer Music Conference (ICMC). I'm pretty psyched about this. I've never been to an academic conference, and I've certainly never been to a conference about Computer Music. It's going to be a blast, and it's going to be very informative. Hopefully I'll be able to network with some people in the field working on research similar to my own (which will begin in earnest in January, since my coursework is (almost) done after this semester). There will be Computer Music conferences, and I'll be sure to catch some good old New Orleans Jazz too.
I haven't asked yet, but I'm hoping GAANN will send me to the Linux Audio Conference in Berlin next year, too.
On Sequencers
I get the impression that most users of MIDI sequencers step record. At least, the writers of the sequencers pay little attention to live recording. For evidence, I cite the abundance of tracker sequencers available for Linux, and the three major sequencers for Linux (IMHO) which all fall short in the relatively simple task of accomodating people like me who prefer to record things live: Rosegarden, Muse, and Seq24.
Live recording is not complicated. You need a few basic features, and you need to make them accessible from the keyboard without touching the mouse. Here's an excellent UI model (that makes me drool):
And here's a list of those basic features:
- FF, REW, Stop, Play, Record
- Replace and overdub modes.
- Punch
- Loop
- Metronome
- Lead-in of 2, 1, or 0 measures. My old Roland JW-50 from 1992 did a great job with this. You had the option of no lead-in but you also had the option of key-triggered recording. That is, you press record, and the thing starts recording the moment you start playing. This is extremely useful.
- Track muting and solo
- 16 tracks
- Variable speed (percent of tempo) for slow and fast recording.
- Undo
That's it. Most sequencers have some or perhaps even most of these features, but leave out essential aspects such as no mousing, replace recording, no lead-in, and not crashing. Rosegarden goes a step further and makes the simple things that you take for granted difficult as well (but it does everything else under the sun and it's hard to justify not using it).
Seq24 is unique in its failure because it is oriented at realtime performance. Note that word, "performance". It could perhaps just as easily be good at realtime recording if it tried, and then in spite of its loop and pattern-based approach it would still be an excellent sequencer for us non-pattern junkies. (Sequence a Bach organ fugue in a tracker, I dare you.)
If I have the honor of speaking to someone who is writing or improving a sequencer, please consider the keyboardists and take my thoughts into consideration. Believe it or not, the lack of these basics will drive a keyboardist crazy just as fast as mousing will drive a CLI junkie crazy. Which is quite ironic as most step-recording Linux sequencer developers are probably CLI junkies.
mpd
I have a laptop and I often use it at home, on the couch. I have a workstation on the other side of the room that my wife frequently uses (which is one of the reasons why I mostly use the laptop), which has decent speakers. I like to listen to music. I think you can see where I'm going with this.
In the past we've used various media players. The one that worked best for remote control was xmms with a homebrew xmlrpc client I made, and now that I have lirc working that would be another option for remote control. But my wife kept closing xmms and xmms is lame anyway. I got into quod libet for a little while but even though there's several ways to control it apart from the gui, it's still not very remote friendly.
Von and I have kicked around the idea for a better music player many times, and the other day I had an epiphany: it should be a sort of stereo daemon, with clients connecting over the network and driving it. I've learned that most good ideas I have have already been had, so I searched a bit and sure enough, mpd. mpd is nifty, wholesome, and flexible. Your wife can't close it, you can control it with simple command-line, ncurses, gtk, qt, etc. clients (still need a good osx client, but the ncurses one is good enough for a cli junkie like me). If I have music playing and she wants to stop it, she just has to fire up her client if necessary and hit stop. No fuss, no excuses. If she's closed her client and left the room and I want music I don't have to stand up, futz around with ssh, nohup, and DISPLAY, or even think two thoughts. I just fire up my client and hit play. Highly recommended.
Thingamagoop
The Thingamagoop (as featured on Music Thing) is a work of art. It's ingenious. It's hilarious. If it could it would eat chunky bacon. Be sure to watch the video.

Posted in audio | no comments |
Summer of Code 2006
It's official! I am one of the recipients of Google's Summer of Code grant. That means I get paid $4500 to improve Ardour according to my proposal over the summer. Combined with the GAANN fellowship I've received this means I can spend most of the time this summer writing code for Ardour and studying for quals.
My proposal was to modify Ardour so that plugins can be applied to regions instead of just tracks, both for realtime processing and bounced to disk. This is a feature I have sorely missed in Ardour, as it is an important tool for making electronic music and musique concrete efficiently. The other half is to add undo/redo serialization of the current undo system to allow unlimited undo across program instances.
I'm really excited for this opportunity. It will be my first serious involvement with a big and important open source project as a developer. I've often told myself I needed to get involved with one, and now I have an ideal opportunity to do just that.
There are two other SoC recipients for Ardour. One is adding basic MIDI recording and playback, and the other is doing a Windows port.
Posted in cs | 3 comments |
ruby/audio 0.1.1
Ladies and Gentlemen, I bring you ruby/audio 0.1.1. This is primarily a bugfix release, but you fill find a few documentation and feature enhancements as well. Enjoy!
Posted in cs | no comments |
PortAudio for OS X
PortAudio is a portable cross-platform API. But it seems like none of the developers has access to a mac because the docs for getting started with PortAudio on OS X are a sorry joke.
I took the liberty of figuring it all out in XCode and creating a
PortAudio.framework which is a piece
of cake to use. Download it, move the resulting PortAudio.framework folder to
/Library/Frameworks, include as #include <PortAudio/portaudio.h>, and link
with -framework PortAudio. If you use XCode, include the same way and just
add the framework to your project and it takes care of the linking.
If you want the XCode project that I used, contact me. I don't have any qualms about sharing it, I'm just too lazy. I didn't change any code, I just made an XCode project to build the framework. Incidentally, all the documentation and READMEs and license files are still in the framework, which is just a folder which you can browse in the finder.
Enjoy!
Posted in audio, mac | 2 comments |
Convergent Rounding
The rounding they taught you in elementary school has an eventual bias. i.e. over time you find that you've rounded up more often than you've rounded down. Bias is a bad thing, especially in DSP and other numerically-intensive computing.
Convergent rounding is one good way to eliminate this bias. It works the same as regular rounding except that instead of rounding 0.5 up, you round 0.5 to the nearest even number. So 1.5 goes to 2.0, 2.5 goes to 2.0, etc.
A quick tutorial on short fixed-point programming in C. The decimal point is between bits 15 and 14, and bit 15 is your sign bit. So, you have a range of 1-2^-15 to -1. So 0.5 is 0x4000, and -0.5 is 0xC000 (two's complement). Now, when you multiply two numbers together you get twice as many bits of precision, so multiplying two shorts gives you an int, and in that int the decimal point is between bits 30 and 29, and bits 30 and 31 are sign bits. We want to round at bit 15 so we can fit the result back into a short. Clear as mud?
The point of this post is to get this C code out there, because as simple as it seems it was a devil to debug:
int cround(int a)
{
if (a & 0x3fff)
a += 0x4000; // normal rounding
else
a += (a>>1) & 0x4000; // convergent rounding
return a & 0xffff8000;
}
If you don't see why this works (I didn't when I first read the "add half of the lsb uf the upper part" algorithm), then fill out this truth table as an excercise:
0.00
0.01
0.10
0.11
1.00
1.01
1.10
1.11
Here's an example of the function in use:
short x,y;
int a;
x = 0x7ffd; // x = almost 1
y = 0x4000; // y = 1/2
a = x*y; // a = 0x1fff4000
a = cround(a); // a = 0x1fff0000
x = a>>15; // x = 0x3ffe
Posted in audio, cs | no comments |
Juk
I've been giving Juk a try, and here's my somewhat brutal assessment. First let me say I love taglib, which seems to be by the same guy that wrote Juk. So I'm sure Juk will catch up with its features and become a great program. I don't really have any major gripes with the UI, which is high praise coming from me. I just don't find it to be stable enough for normal use. I'm looking at version 2.2.2.
The first thing you notice is that you have to pretty much install all of KDE to get Juk. This is an oft-debated issue that I'm not going to address further at this juncture.
The second thing I noticed is that it kept crashing on me. All. The. Time. Maybe it's just my karma; I tend to bring out the worst in software. Some of the bugs are reproducible, others seemed to be random, but for awhile I was crashing the thing every couple of minutes, literally. Once I learned what not to do, we started getting along better.
The complete instability is the primary reason I won't be using Juk in the near future, but the second reason is almost as compelling - it tends to skip. Ok, maybe it's not a skip, but a jump or a underrun, but the old terminology dies hard. Incidentally, I wasn't too keen about having to use artsd, I have no idea what akode is but I bet it's a bad idea, and gstreamer seems to underrun on OGGs for some reason. So basically, Juk isn't able to play music smoothly and that's not good enough for me. (Hint: a nice fat buffer is not a problem for music players!)
Now for what I liked. I already told you I like taglib, and Juk's tagger didn't disappoint me (aside from its being one of the more crashable aspects of the program). Its MusicBrainz support means this is the only program I've found so far that I can get to run that supports MusicBrainz, and it does so well. I wish there was more information about just how it made the matches though. In some cases I don't know which of the 10 versions of a song I've got, so I don't dare tag it with one of the versions, but if I knew the acoustic fingerprint was almost a perfect match, (much more so relatively speaking than the others) that might give me more confidence. I also like the automatic tree of Artist, Genre, and Albums, and the playlist stuff. I like random album mode. I dislike that turning random on and off is so hard. I found that it wasn't obvious which set of music was being considered for play at any time, but I like the history and queue interfaces.
In short, I like Juk but I won't be using it because of stability issues. I did use it to organize my tags, though. For renaming files, I think I'm going to write my own script as I have very strange (but simple) ideas about how the filestructure should be. I think Juk's renaming comes close to the ease and power of EasyTag though. Incidentally, if EasyTag did MusicBrainz, I probably never would have looked at Juk, in spite of EasyTag's odd interface. That would have been a loss, because I trust Juk (or rather, taglib) much more than I do EasyTag not to mess my files up, in spite of the lack of any experience that would cause me to distrust EasyTag.
Posted in audio | no comments |
ruby-taglib on Debian
Ruby-taglib works great on Debian. Grab
Mahoro (which also looks very handy) and follow
the instructions. Then grab ruby-taglib and do sudo ruby setup.rb.
The only thing to watch out for is that ruby-taglib requires the C bindings to taglib, which are in a separate debian package. You want libtagc0-dev, not just libtag1-dev.
Taglib is extremely cool, and is going to assist me in reorganizing my music collection. I'll try to remember to bore you with the details once I'm done.
Posted in audio | no comments |
