Is it possible to have a playback indicator in OSX menubar? On my iPhone, until iOS 6, anytime music is playing a play symbol appears (and disappears when no music is playing). 

How can I achieve a similar effect in the menu bar of OSX Mountain Lion?
Here is sample code for doing this in Cocoa (you can paste it in a new XCode project and build it) : 

AppDelegate.h :

    NSStatusItem* statusItem;


AppDelegate.m :

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
    [[NSDistributedNotificationCenter defaultCenter] addObserver:self
                                                        selector:@selector(iTunesNotification:)
                                                            name:@"com.apple.iTunes.playerInfo"
                                                          object:nil]; //registering for notifications from iTunes

    [NSApp setActivationPolicy:NSApplicationActivationPolicyProhibited]; //No icon in the dock, menubar only

    statusItem = [[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength]; // For the icon in the status bar
}

- (void) iTunesNotification:(NSNotification *)note {
    NSDictionary *information = [note userInfo];
    NSString* state = [information objectForKey:@"Player State"];

    if([state isEqualToString:@"Paused"]) {
        //hiding the indicator
        [statusItem setTitle:@""];
    } else if ([state isEqualToString:@"Playing"]) {
        //showing the indicator
        [statusItem setTitle:@"▶"];
    }
}


The only flaw i could see in this sample is i'm using a character for the play icon and not a image. It could be a problem when the encoding messes something up.