NSImage Templates

New Toolbar Style
Apple has made some aesthetic changes to buttons in Leopard. Specifically, toolbar buttons tend to be less glossy and use 2D black and white symbols instead of full color images. The reasoning given at WWDC 2007 was that they felt the user’s focus should be on the app’s content rather than being distracted by eye candy around the edges. Whether developers agree with this or not, a good Mac app should fit seamlessly with the rest of the user experience (unless you’re a member of the delicious generation).

Old School Toolbar
The older icon style hasn’t been nixed yet, as seen in this screenshot of console’s toolbar, but it clearly the emphasis is on the flat, 2D, black and white symbols (see also the new standard folder icons).

Apple has been making an effort to make it easier for developers to integrate the Mac’s new look and feel. For instance Leopard introduces image templates. Developers now have access to a whole bunch of standard images for their apps’ buttons. These are available from the Media tab in Interface Builder 3.0’s Library. It’s a snap to find the appropriate image for standard icons and drag it to your button. No more digging through Safari’s app bundle and scavenging button icons, wondering if you’ll get a nastygram from Apple some day for stealing their graphics.

Interface Builder 3’s Media Tab
Here’s the new Library in Interface Builder, showing some of the icons in the Media tab.

But, there are bound to be times when you need to make a custom icon for a button. The recommended way to do this for these kinds of button icons is by creating it with a vector app like Illustrator or InkScape and saving it as a PDF. This way they will be ready for resolution independence (bitmaps can also be used but make sure to create them much larger than you think you’ll need).

Interface Builder 3’s Media Tab for Project Specific Files
Here I’ve added an icon for a stop button as a pdf file to my Xcode project. Interface Builder automatically picks up this addition and shows it in the Media tab of the Library floater in the project’s library (the Xcode project is named TemplateImageButtons.xcodeproj). A note about the pdf you create: the document’s dimensions determine the border around the image in the button.

First attempt at the transport. Here’s a simple transport using the custom stop icon and the system-supplied NSRightFacingTriangleTemplate for the play button. Easy! We’re done. Wait. Something’s not quite right. Notice how the play button has a subtle grey tint to it, while the stop button is infinite black, like the monolith in 2001. When I first saw this I thought maybe the system supplied template images had some kind of tint built into them. But it turns out NSImage can be told that any image is a template and as long as it meets certain criteria, it’ll automatically add tinting as needed. The secret is making sure the image’s filename ends with Template. Renaming the stop icon pdf from TransportStopIcon.pdf to TransportStopIconTemplate.pdf is all it takes. The easiest way to do that is to contextual-click on the pdf file reference in the Xcode project and choose Rename. Interface Builder will get informed of the change, and Xcode will issue the proper SCM commands as well. This is newly minted stuff in IB, so some things are a tad clunky. For instance, you’ll need to drag your renamed icon onto the button again to get the change to stick. Also, I’ve noticed that IB sometimes shows missing image icons when I close the document and open it again.

Transport with stop icon as template image. Much better! Beyond simple tinting, the system will also create an embossed version of your template images for other button types, and create that blue glow around it for the active state of a button (for example, the View/Hide Mini-month button in iCal).

One caveat to this image template system is it expects the image to be black with a clear mask. I ran into this when trying to use a red circle graphic as an image template for a record button. It was converted to a medium grey image by NSImage. I’m looking into whether you can tell a template image to draw as a color but I think in this case I’ll have to create the various button state versions of the circle graphic manually.

I noticed a trend at WWDC this year of Apple adding more things like this to make developers’ lives easier. Although there were some poorly handled transitions (*cough* dropping Carbon 64-bit *cough*), this is one area I’m very glad to see Apple focus on.

More information:
NSImage Class Reference


netlabels-header.jpgSome time last year I followed this link from Cool Hunting to Alex Young’s Milieu blog about netlabels. Little did I know the world of new music it would open. A netlabel is is similar to a record label, except that it distributes its music primarily via the internet, often for free. I was suspicious at first about this concept. Wouldn’t it simply be a recipe for really bad music? Surprisingly, as I found out from the releases highlighted on Milieu, the answer is not always. In fact I’ve discovered some jaw-droppingly good music coming from netlabels — mostly electronica, but occasionally other genres are represented.
Continue reading “Netlabels”


Gunnar WindsurfingIn the mid-eighties my parents gave me a Bic BeBop windsurf board for my birthday (pictured: me sailing it last year. Note the new wave neon 80’s look… ignore my awkward posture). I don’t remember if I’d been asking for one or if it was a total out-of-left-field thing but I do remember the first few tries. One of the most frustrating experiences of my life to that point. The sail was so heavy to pull up out of the water. Trying to balance on what seemed like a 2×4 while yanking that big sail up required so much coordination. Once the sail was up I’d have so much momentum that’d fall backward with the sail landing on top of me in the water. Or I’d manage to sheet in only to get slammed down by the wind on the other side. A couple of hours of this would pass and I’d finally notice that’d I’d drifted almost to the other side of the lake.

Slowly, over the course of a couple of summers, I started to get a feel for it. I’d be just about ready to give up and then get a taste for what it could be like: a 30 second rush of pure adrenaline as the board whipped forward, followed by the inevitable uncoordinated plunge. This is exactly the kind of random reward our brains seem wired to get addicted to: it’s how slot machine operators make all their money on late night gamblers. Only this was outdoors and only resulted in sore muscles, not an empty bank account and baggy eyes. That electrifying half-minute was enough for me to pull myself back on the board and start uphauling the sail once again. My focus was so intense that I wouldn’t notice until that evening the cuts and bruises on my feet and knees from my clumsy attempts to get on the board as quickly as possible. Eventually those bursts would extend to minutes at a time, the sail would seem to get lighter as I learned to let the water slowly fall off it before hauling it up and the board became more and more stable as I understood where to put my feet and how to keep enough wind in the sail to keep from falling over. I learned some technique, like tacking (turning around while stepping around the front of the mast) and planing (gaining enough speed that the board lifts up and skims across the surface of the water).

Twenty-plus years into this sport I still experience the same thrill and catch glimpses of what the next level of skill will be like. It’s a pretty solitary activity (although there’s great camaraderie among windsurfers onshore) and there’s something about harnessing the wind directly with your own body that is incredibly meditative, therapeutic and stimulating at the same time. I’m very happy that my nephew, Erik, has taken an interest in windsurfing and I’ve seen his excitement when he gets going for a few seconds.

I am sailing my trusty old board (the whole rig is in surprisingly good condition after all these years; most of the decals are still intact and I’ve managed to not tear the sail). The wind is just starting to pick up after being fickle for most of the afternoon. It’s been mostly cloudy so far this summer so the lake hasn’t had much of a chance to warm up: added incentive not to fall in. But I’m focused on the wind. I’m on a broad reach, getting a feel for the conditions. There’s a lull but I’ve come to realize over the years that there’s always a pocket about this far from shore. Sure enough I see the telltale ripples just ahead and I sheet out a bit to anticipate the sudden pull. I ease the sail back in a bit and in no time I’m planing. I hook into the harness line on the boom. This is still a new thing for me even though I’ve been using a harness for a few years. Especially the first few times I go out in a season I’m acutely aware of the probability that I’ll be catapulted by an unforeseen gust. But this time I feel fairly secure. I sheet in some more, lean back, and commit most of my weight to the harness. I step back on the board and the wind picks up some more. I’m constantly making minute corrections in the angle of the sail as the wind and the waves change the weight balance. Aside from a single fishing boat in the distance I have the entire lake to myself. I hear the waves slap against the bottom of the board and the wind hiss through my ears and feel myself hurtle across the surface of the infinite blackness of the water reflecting the shifting clouds above and I have no thoughts racing through my brain — just the intent focus on maintaining this balance. It is glorious and blissful and thrilling and familiar and surprising. My breaths seem to take in twice as much oxygen as normal. I look back at the shrinking buildings I left behind a few minutes ago and the rounded mountain behind them set against brilliant, clear blue. For a moment, all that exists is this moment.

Podcast #9: The Poconos

I improvised this piece on my keyboard, in two passes. What gives it its interesting texture is a little Pd patch I created, which sits between the keyboard and Logic. It takes chords and sends each pitch automatically to the individual instruments. Successive notes are sent in round robin fashion, alternating between the 4 instruments. So even when I played a single line melody on the keyboard, the result was a tapestry of different instruments alternating the notes of the tune. Continue reading “Podcast #9: The Poconos”

Podcast #8: Anenome

It’s 2 AM. Long past last call. The evening is winding down. Everyone’s a little tired, a little buzzed, a little pensive, but happy to be warm and not entirely alone. The band goes to one last song.

Continue reading “Podcast #8: Anenome”

Current Trends in Web Design

Tendrils - RawberryWhen I resurrected proppe.org a few months ago I decided to focus on the content of the site and not worry too much about the visual style (although I still chuckle at the bored man watching the clock on the front page that leads to this blog). Having been out of the web design loop for a long while, I decided to take a look at what was out there to get an overview of current trends. Here is a small catalog of the patterns that seem to be prevalent today.
Continue reading “Current Trends in Web Design”

Lake Aloha Hike

[thumb:47:l:]This weekend Nathan and I hiked to Lake Aloha, in the Sierras, and camped overnight. We took the Pacific Crest Trail from Lower Echo Lake, about a six mile trek and 1000 ft. of elevation gain. Doesn’t sound like much, but with the weight of our packs it was quite challenging. However, the views were breathtaking as I hope will come through a bit in these photos. Continue reading “Lake Aloha Hike”


Ok ok. I know. I said last week to tune in this week (actually that was two weeks ago). And yet, there’s still no new music to post. Why is this? Well, a few things. One was attending the Apple Worldwide Developer Conference (WWDC), which started early, thus disrupting my morning creative time. The other was attending no fewer than four music/dance events. The third was my choice of composition theme — to study harmony. So, while not much output was made, a lot of input was … input. I saw a ton of electronic music performed as part of the Zero One festival in San Jose, and the Bleeding Edge Festival at the Montalvo Arts Center in Saratoga with Nathan, and a truly inspiring piece called ORBIT at the Intersection for the Arts.

It was quite interesting to see the different ways in which performers deal with doing electronic music live, in a way that an audience can relate with. Watching people on stage twiddle knobs (or finger a laptop trackpad), especially when it’s impossible to correlate the twiddling with something audible, can be a mind numbingly dull experience. Many performers add live video, projected on a large screen behind the performance, which interacts with the music in some way. Frank Bretschneider was one of the more compelling examples. His music was great to start with — strongly in the IDM domain (ore more specifically, microscopic music), but full of surprises yet with a recognizable beat. The first 5 minutes were actually very repetitive, with a blue screen and a horizontal white line that scanned down the screen in sync to a pop when it hit the top again. But just as I was ready to leave, things started shifting, and new elements, both visual and aural started to appear. The entire piece was completely abstract, but after that initial shift I was captivated. It reminded me a bit of the early German abstract animator, Oskar Fischinger. It also reminded of me how much can be done with a limited palette.

A couple of the performances also incorporated dance and acting with live music and video. The first was Troika Ranch at Zero One. Troika Ranch is a dance collective started by fellow CalArts alumns, Mark Coniglio (who was also a teacher of mine) and Dawn Stoppiello. This piece featured some stunningly beautiful synthesis of dance, with live interactive video and music. For me the most effective moments were the ones that seemed to use the technology in the most childlike manner — a dancer making “bloop” sounds which generated video bubbles which floated from the top of her head, another scene where a dancer’s movements were traced with an animated caligraphic pen, while the music shifted and swayed.

ORBIT was such a great piece because it had so much heart, and had such moments of pure stage magic. I really have to thank Ally for introducing me to it. Technology was used in service of the story and the art, rather than the other way around as these kinds of pieces can so easily slip into. I can’t really describe it and do it justice (which is sort of unfair since Saturday was its last performance; read the Chronicle review for an overview), but I will say keep an eye out for Erika Shuch and her collaborators.

So, no podcast this week, but I have a feeling all this input will be churning in my brain and will end up splattered in bits and pieces in some future posts.

Electronica Podcast Roundup #1

Travel and jet lag got the better of me the last couple of weeks, so no new podcast yet. Instead, why not give one of these a try? Tune in again next week.

Radio 360 (iTunes)
radio360.png“Music for Strange Moments.” They appear to be a label, but they also play artists on Ninjatune, Sub Pop and others. They seem to focus on electronica with vocals, which is a nice change after listening to hours of instrumental electronic music. They have a slightly annoying habit of playing their audiomark in the background in the middle of ever other song or so, and also using the dreaded computer voice to announce track info. Their segue music is by someone named DJ Darkhorse. It’s nice that they have created a recognizable format, but I think these could be shortened. All in all a very enjoyable and consistent podcast. The latest episode is particularly good — it’s called “Best of Part One.” Not sure what part one is, or when part two starts, but it’s groovy.

betterPropaganda (iTunes)
BetterPropaganda.gif“Music mix of the best and newest sounds from the most forward-thinking record labels out there.” This is put together (monthly I think) by Jonah Sharp, who seems to be an interesting figure in the experimental and electronica scenes. Each episode seems to center around a theme (eg. acoustic guitar). I’ve listened to a couple. One was excellent. The other I just wasn’t into. Yet I’m intrigued.

Electronic Periodic (iTunes)
electronicperiodic.jpg“Our aim is to produce free, quality podcasts compiled from electronic compositions in various styles including ambient, IDM, electro, trance and experimental.” For a “periodic”, it’s pretty irregular of late (January, April, two in July). However, it’s good, drone-ish ambient music which sometimes goes more into the IDM territory.

Percussion Lab Presents (iTunes)
PercussionLabMAY06small.png“Percussion Lab is a 24/7 stream of the illest underground electronic and hip hop music. Every month we feature live and DJ sets by established and up and coming artists and DJs.” The quality of this one really depends on the particular DJ that’s “spinning” (somehow I doubt the person is really spinning vinyl for the podcast, but you never know). That being said, the last few have been solid (perhaps good enough to forgive them for the use of the old chestnut “illest”). The last episode highlighted artists playing at the BAPLab festival in Brooklyn, which took place on July 22 (missed it by a week).

CLD THE E (rss) (last.fm)
cldthee.jpg“The streaming to escape from tomorrow. Electronica IDM Techo: from Tokyo Japan.” It made my day Friday when I discovered that my favorite internet radio station had a podcast. I’ve discovered so much great music listening to this stream over the years. Sometimes it goes so far afield that I have to switch to something else, but that’s what I like about it. It’s incredibly eclectic. If you want to challenge your ears, this is your gauntlet… eh.. thrown down.

Podcast #7: Beat Oriented

Continuing with the generic titles, I bring you “Beat Oriented.” When people ask me what kind of music I write, I usually end up drawing a line between “serious” music and “beat oriented.” This sketch falls right in the middle of the latter category.

I didn’t know it would end up this way when I started, but in a way it’s a retro track, bringing back ye olde sounde of 1997 – 98. There’s definitely a lot of Propellerheads in there along with Chemical Brothers. With the tempo cracked cranked up to 152 bpm, it’s a little bit drum & bass as well. Hopefully there’s a little bit of me lurking about.

The main percussion track is an acoustic drum kit which I just played a standard 4/4 beat at 120 bpm. A little boring, so I thought I’d see what happened if I sped it up. Sort of nice, but very busy since the snare rang pretty long. I played with the amplitude envelope of the sampler plug-in (Logic’s EXS24) until it had the right punch (effectively cutting the sound short before it had a chance to play the whole sample). That was fun, playing with that setting while the track played, so I recorded an automation track while doing that. That gave it a nice organic constantly changing texture, so I added some more automation of other parameters, including the attack time (which makes it sound almost reversed), and the filter cutoff and resonance. Since these parameters affected the kick and hi-hat as well, the whole drum track changes quite a bit as it progresses. I also added a bit crusher, and automate the bypass on it so that in select places the drums go very lo-fi. Cliché? Yes. But fun nonetheless. It’s just a sketch, so why not go with it?

I knew right away that I wanted that cheesy ’70s cop show bass line, so I recorded a clavinet simulation with an auto-wah and some distortion. Crunchy distorted organ was the next logical sound. This procedure continued as I layered sounds and took things away, etc.

The electric guitar at the end is a canned loop, which is there as a placeholder to remind me to record something later. Actually, this whole track is a placeholder to remind me to record something later.

Have fun.