Smug logo small@2x

Capo 2.1.9

• Chris Liscio

It was an odd coincidence that Capo 2.1.9 was released on the same day as Capo 1.3 for iOS. I submitted both products on the same day, and fully expected the Mac update to take twice as long. I'm glad to see things seem to be improving with Mac App Store review times.

But I digress!

Capo 2.1.9 is a major bugfix release that primarily addresses the slow scrolling in Capo. This performance issue was on my mind since 2.0, and I've had a desire to rewrite "everything" in the spectrogram for a long time now. Capo 2.1.8 forced my hand to jump on that project early, because it was pushing 2x as many pixels through the pipe on Retina display Macs.

The bottleneck was in the rendering of the spectrogram. I do a fair bit of compositing there, and Quartz / CoreAnimation just weren't able to push pixels quickly enough. OpenGL is great at the sort of things I wanted to do, so that seemed to be the obvious solution to my problem.

Capo generates its spectrogram as a black-and-white "intensity map" which I would use as a mask to draw its colour atop the background grid (which is also composited.) I also use a multiplier on the intensity map to adjust the display intensity so that users can bring out the details in their songs.

Any of you with OpenGL chops can see that this stuff is perfect for shaders. The multiplications can be done with a uniform intensity value that is used as a multiplier on the spectrogram intensity map. Hell, I could even work in the HSL colour space if I wanted to (and I do, though that will be more likely to show up in FuzzMeasure first.)

To accomplish all this, I had to perform a major reorganization of the code that draws everything between the metadata/HUD (left side of the window) and the effects (right side of the window.) The "meat and potatoes" of the UI, if you will.

I also decided to adopt the system-supplied scroll view (and its fantastic disappearing scrollers) to power all this nonsense. I actually have seven NSScrollViews (that overlap!) synchronized with one another to pull this off!

Oh, and while I was in there, I enabled ARC and got tighter memory footprint in the process. Why not, right?!

Coming out at the other end of this, I'm really happy with the improved code base. I feel a huge weight lifted off my shoulders, and I feel much better about moving forward with the features that users have been clamouring for.

If you haven't already, go get the Capo 2.1.9 update, and see the improvements for yourself. And, as always, stay tuned for more…