Making AirClick USB Plugins

Airclickusb_medIt should be fairly easy for someone with programming experience to create their own “Plugins” to extend the AirClick. It runs on the Microsoft .NET Framework 2.0, which means you can write plugins in any .NET capable language. Just add a reference to the actual AirClick.exe file, define that you are using the “AirClick” namespace, then create a derived class from the AirClick’s “Plugin” class. As you will see there will be several virtual methods you will have to define. These include accessor methods for the plugin’s name, author, description, executable name, and version. (NOTE: The only one of these attributes used at the present is the name, which appears in the AirClick menu. The others are to insure compatibility with potential future updates.)

To “tell” the AirClick software which button presses you are interested in knowing about, add a call to the “AddButton” method for each button press in your class’s constructor. Button presses are defined by an instance of the “Button” class. Here is a quick rundown of a Button’s constructor parameters:

ID – a unique integer ID given to the button. This ID is passed back also a paramter in the “Notify” method to tell a plugin which one of his buttons has been pressed.

Key – the button on the AirClick remote you want to know about. Values can be back, forward, play, voldown, or volup.

Modifier – a modifer key that must be held down along with the “Key”. Values can be back, forward, play, voldown, volup, or none.

Time – the number of milliseconds the “Key” must be held down in order to trigger this button press.

OnRelease – true if button is triggerd when it is released, false if it is triggered on push.

Name – short description of this button, such as “Play” or “Next Chapter”. (Presently not used, just there for potential future updates.)

ShowInMenu – whether or not this button’s name should appear in a list of this plugin’s functionality. (Presently not used, just there for potential future updates.)

Finally, the last thing you have to do is define the “Notify” method. This method is called by the AirClick software when a desired button press is found, and the ID of the found button pressed is passed to it.

There are a few more classes built in to more easily accomodate the making of Plugins. Their is the OSD class for using the AirClick’s on-screen display. It can display various combinatinations of strings, a progress bar, and generic player graphics. The player graphics are represented by the “DisplayGraphic” enumeration. The “Volume” class can get or set the system’s master volume, and the “WinMessages” class can send several different kinds of Windows messages to a windows with the given caption or class name. The messages it presently supports sending are “WM_APPCOMMAND”, “WM_APP”, “WM_COMMAND”, “WM_VSCROLL”, “WM_HSCROLL, “WM_SYSCOMMAND”, and “WM_USER”.

Once, you have built the plugin, just change the extension from .dll to .acp and place it in the AirClick’s “Plugins” folder. Restart the AirClick software, and it should appear in the AirClick’s menu.

Winamp 5.0 Bento Skin

The new Winamp skin is actually usable! I’ve always hated the modern skin and so have not installed it for who knows how long, preferring the classic sking and it’s darker colour.

Well I’ve just installed Winamp 5.0 and thought I’d try out the new Bento skin. The good news is it’s actually usable! Woo! Well done.

Hacking AirClick USB for Windows/PC

(updated below)

In the aftermath of changing to my new Cherry MX switched keyboard I have found myself missing the handy media buttons on the old membrane keyboard.

So I had a little google about (using google) and found the Griffin Technology AirClick USB. A handy little Human Interface Device, it has five buttons and a number of plugins that allow you to control various applications. Primarily I was interested in Winamp control, playing, pausing and changing tracks. I had a deeper look into it and one of the available plugins in Sean Wilson’s new version 2 software is a winamp plugin. Cool, so I bought one.

Works great. Until I went to change volume that is, it’s just too slow for my purposes.

In the release notes there is the following addition to the latest version mentioned:

Easier creation of additional Plugins using any .Net supporting language

Well fantastic, I can do that, perhaps I can write my own winamp plugin. Plenty of searching around their site later and there’s no help or info on doing any such thing. I emailed support and got back a plugin that used sendkeys to just send configurable keys to Windows. Not a lot of use if you happen to be typing at the time!

I found the developer of the Mac software and his blog. He’s posted ways to hack the Mac version, no go for PC though.

I then noticed that the .acp plugin files in AirClick’s plugin folder were just renamed .net 2.0 IL dlls so I emailed support again asking if there was any supporting source code for writing your own plugins.

While I was waiting for a response I had a quick fiddle with Lutz Roeder’s Reflector and Denis Bauer’s FileDisassembler plugin and generated a C# project from the winamp.acp plugin. It compiled with no trouble, so I renamed the .dll to .acp, dropped it in the pugins folder, restarted AirClick and everything worked. Fantastic. Now I can get on with hacking it.

A little bit of coding later and I’ve now got a volume control that smoothly accelerates from small changes to larger the longer you hold down a button.

Then the reply came back from support:

Unfortunately we do not have source code for the AirClick. This is info that doesn’t leave the doors of research and development.

Oh dear, really, well I’m screwed then.

*GRINS*

So top marks to Mr.Wilson and his code, but the usual non-technical nounce of the average support department proves to be a barrier yet again. Great product on the other hand.

Updated Information

I decided it was worth trying to contact Griffin again, so I penned a very similar email to the last one. This time I got a direct response from Sean Wilson, the creator of the PC AirClick software.

I have not written a formal SDK or Visual Studio template for writing

AirClick plugins yet, but I do have a txt file I wrote up real quick

to send to people who are interested in writing their own. I will

attach it with this email.  – Sean Wilson

Great stuff! So here’s a copy of that file for all you plugin makers.

Making Plugins

And here’s my modified Winamp plugin.

Quicktime standalone without iTunes download

I just reinstalled my machine recently and have not five minutes ago tried to run an mov file for the first time since.

Went to download Quicktime from Apple and it forces you to also download iTunes. Now iTunes isn’t evil I use it on Mac Mini, but if you do not want it or need it then why download it?

Found it here.

http://www.apple.com/quicktime/download/standalone.html

*update*

Now forwards you to: http://www.apple.com/quicktime/download/win.html where you have a choice of with or without iTunes.

Guitar Lessons – Learn to Play Guitar

I’ve discovered some fantastic guitar lessons, I’ve been practicing from their grade 1 lessons for a couple of days now and to be honest it’s been the first time I’ve actually practiced properly some of the things I guess I should have learned years ago, solid base things like decent timing and sight reading.

Recommend to anyone even for a brush up!

New Newsgroup

I’ve just picked up a new group on usenet. alt.music.home-studio. For anyone into recording in their home studio it seems to be a well informed and low noise place to hang out.

I’ve been broswing past posts this afternoon, there are some impressive recordings to be heard and some great advice and help.