App Update & Widget Update 1.6.1

Just real quick: I released an update to my widgets that should fix searching at MacUpdate.com, now that they've remodeled their search again.

App Update
Widget Update

IMG0121.jpg

That's me presenting at Adobe Germany last Saturday. The picture was taken with an iPhone, so the quality is not the best.

Additionally, the photoset of my presentation at the Metalab last Friday is finally on Flickr, and thanks to @dChris' fantastic photography skills, the quality is amazing!

georg-2.jpg

@dChris shot a couple of nice photos during my presentation at Metalab on Friday.

I'll upload the whole set to Flickr once he sends me the high-res versions.

Edit: The full photoset is now on Flickr.

Public Babbling

Some busy days are up ahead. Tomorrow evening at 8:00pm, I'll be speaking about multi-touch at the Metalab, which is a Viennese hackerspace.

Afterwards, I need to get home quickly, get a bit of sleep, and then fly to Munich in the morning to speak again at the NUI/Adobe Multi-Touch Summit.

While the latter is already sold out, the former event is completely free, so if you're interested to hear me talk, be there tomorrow!

36481684110d3db9e96.jpg

(via k-l-e-v-o)

Cocotron and Third-Party DLLs

As you might have noticed, Touchsmart TUIO uses the amazing Cocotron in order to use parts of my Cocoa tracker code on the HP Touchsmart PC, which runs (yuck!) Windows Vista.

While Cocotron has its quirks and is far from a full-fledged drop-in replacement for Apple's frameworks at the moment, one issue that drove me particularly nuts was not a missing class or method, but the way the Cocotron toolchain links Nextwindow's API in.

I'm really not an expert on Windows internals, let alone their DLL library format. Nevertheless, I understand that in order to link the DLL properly, you do not link directly to it, but rather to LIB file, which seems to contain symbol addresses (or something) for the DLL.

Annoyingly, I couldn't get this to work with Cocotron's toolchain at all. No matter what I linked in (either the DLL or any of the multiple LIB files bundled with the API), the linker would happily succeed, but the application would crash on launch when calling a DLL function. Firing up GDB only told me that my code tried to call a function at a garbage address.

Now, I don't really have any ideas what's going wrong here. I already find the idea of cross-compiling a Windows app on a Mac pretty amazing. To come to the point, there's a pretty simple solution: Determine the address at which a DLL function is loaded dynamically at run-time, using Windows' GetProcAddress function.

Here's a simple code snippet to show you how this is being done rather elegantly in Touchsmart TUIO (explanation below).

static HMODULE _dllHandle = NULL;

#define NWAPI(funcName, ...)    ((GetProcAddress(_dllHandle, (funcName)))(__VA_ARGS__))

void initDll() {
    if (NULL == _dllHandle)
            _dllHandle = LoadLibrary("NWMultiTouch.dll");

    if (NULL == _dllHandle)
        fprintf(stderr, "DLL fail.\n");
}

void sampleDllCall() {
    NWAPI("GetConnectedDisplayInfo", 1, NULL);
}

Even though most devs will get the idea from the code alone, here's a quick run-down. First, we define a static variable to hold the DLL handle. It's static because we don't need the handle to be visible outside this source file.

Second, we define a macro that takes a function name and an arbitrary amount of arguments. The macro will expand to a code block that dynamically determines the function address and funnels all the arguments into a call to this address. Sweet. Third, we need to define an init method that has to be called when our app launches (actually, just before the first use of our macro). If you want to get fancy, you could a check whether the DLL is already loaded into the macro, so you wouldn't have to think about calling the init function explicity.

Fourth, we simply have a demo DLL call here, which shows you how to use the API. Of course, I don't know how expensive a call to GetProcAddress is, so you might want to cache function addresses for functions that you call repeatedly or that are in the critical path of your application.

Nevertheless, I think this is a somewhat elegant solution if you're having the same issue with Cocotron.

kissmkb.jpg

Apple is creating an ecosystem of the kind of customers I don’t want.

Garrett Murray, and I couldn't agree more.

THRU YOU | Kutiman mixes YouTube

What you are about to see is a mix of unrelated YouTube videos/clips edited together to create ThruYou. In other words - what you see is what your hear.

Touchsmart TUIO 1.0b1 released

I've just uploaded Touchsmart TUIO, my bridge application between the HP Touchsmart's screen and TUIO multitouch applications.

Actually, this should not only work with Touchsmart PCs, but with any PC equipped with a Nextwindow touch screen.

Contrary to my usual focus, this runs on Windows XP/Vista (because that's what the Touchsmart ships with).

As usually, the source is available, too.

More info about this project (as well as a video) is available here: http://gkaindl.com/software/touchsmart-tuio

By the way, this project is (partly) responsible for the unusual silence on this blog lately!

We're All Gonna Die - 100 meters of existence

An old NUI community update showed up in NetNewsWire today for some reason (probably changed GUUIDs). However, I haven't noticed this video before in which Touché is being used as a tracker. Nice stuff!

While Touché isn't explicitly mentioned, you can tell it's being used by the second demo app being the Coverflow demo that comes with it, which uses the Touché embedded framework, which in turn means that it can only be used with the Touché tracker.

I particularly like the Youtube comment about the fast response time of the tracker. This will get even better soon, since I have purchased a copy of Intel's C/C++ Compiler as well as their Math Kernel Library and Performance Primitives, which will be integrated into Touché in the near future (some quick testing has already shown considerable speed-ups just by compiling libdc1394 and OpenCV with icc instead of gcc and some compiler flag magic!). Don't worry, though, Touché will still be a 32/64-bit universal app that runs on PowerPC Macs as well. Stay tuned for more news about this!

Sprite Database

Awesome site that collects 2D sprites from old videogames. Some of them are insanely detailed and artful.

The Bunny with an API

A week ago I learned about a cute bunny with an unpronounceable name: Nabaztag. With its persistent WiFi-connection, a complete web application to feed it with data and even an open API, it's needless to say I couldn't resist getting one.

Apart from its lovely bunny ears that it can wiggle at will, it's equipped with a couple of RGB LEDs (yes, there are 3 emitters per LED, forming a formidable RGB gamut), an RFID reader, a microphone for voice recognition and a speaker. This allows for a couple of really cool tricks it can perform.

Its ears and LEDs are perfectly suited for a very calm (as some researchers put it) way of relaying information about events around me to my perceptive periphery: As an example, a LED or ear movement choreography can tell me whether rain is expected in the next couple of hours, or how my stock portfolio is doing right now, or that I should get ready to leave for an appointment soon. It's like the well-known art-piece-evolved-into-consumer-product AmbientOrb, only more useful and fun.

There's even an app that can "marry" two bunnies, so that when one's ears are moved, the other one's are moved to the same position, no matter where the two bunnies are geographically. This is meant to be used by lovers as a very subtle way of saying "I'm thinking of you" - adorable!

Similarly, you can use its speaker and text-to-speech capabilities to have it tell you little pieces of information aloud, such as the time of the day, a weather forecast, your latest tweets, or items from an RSS feed. It can even play podcasts, streaming radio or your own music.

Using the RFID reader and accompanying tags, you can also have it "sniff" your everyday things (keys, packs of cigarettes, xbox360 controllers, whatever) and provide context-sensitive information or tasks. Some people might have it set up so that it updates their twitter status when they're picking up their controllers to play a couple of games online, others might like to have it tell them items from their to-do list when they pick up their keys in the morning to leave - the possibilities are endless.

Apart from that, it can randomly blurp about its mood, do tai-chi exercises with its ears and a couple of other entertaining tricks.

From a technical perspective, setting it up was a breeze: It creates an ad-hoc WiFi network in configuration mode, allowing you to connect to it with your browser to supply your WiFi details. WEP and WPA (but not WPA2) encryption standards are supported. There was a problem with DNS-resolution on my Airport Extreme router, but the online FAQ had this one covered, so I was up and running in minutes.

By the way, here's a picture of the cute little bugger. I named him Kurt Gödel (or kurt.goedel, in canonical form) — I'm really that nerdy.

Georg Kaindl's nabaztag bunny

As if all of this wasn't already cool enough, there's also an open API available, so you can write your own apps and functionalities at will. This is, at least for me, the killer argument to adopt your own bunny.

Verdict: Highly recommended.

holiday.jpg

Sorry for posting all these spam images lately, but this has to be the coolest one I've ever seen.

I found this in my junk mailbox today.