Magic Trackpad and Kineme MultitouchPatch

leegrosbauer's picture

Is the Kineme MultitouchPatch compatible with the Magic Trackpad? I inquire because Macworld is reporting that other third party multitouch enhancers, which do work with laptops and the Magic Mouse, are nonetheless not currently working with the new Magic Trackpad.

smokris's picture
Re: Magic Trackpad and Kineme MultitouchPatch

The Kineme MultitouchPatch uses the (private) MultitouchSupport.framework. So if that API hasn't changed much, and if the "Magic Trackpad" adheres to that API, then there's a good chance it should work as-is. (And if not, I'd like to try to make it work.)

leegrosbauer's picture
Re: Magic Trackpad and Kineme MultitouchPatch

Good. There have been a few online postings, my own included, that simply assumed that Kineme MultitouchPatch(es) would work with the Magic Trackpad, but Macworld's early test report got me to being uncertain. My own trackpad is scheduled for delivery by noon on the day after tomorrow. I'll certainly report back in as soon as I have it in hand. Keeping my fingers crossed.

Regarding that API, it wouldn't surprise me if some inquiries about it emerged, now that it's been mentioned. Not sure if that's good, bad or otherwise ... but I have nonetheless seen postings online expressing some interest in learning about it. Just thought I'd make mention of that circumstance.

harrisonpault's picture
Re: Magic Trackpad and Kineme MultitouchPatch

Happy to report that Kineme Multitouch works with the Magic Trackpad. Just installed it on an iMac 2009 w/SL 10.6.4. Only thing is, the patch only looks at the first multi-touch device on the system. With a Magic Mouse and a Magic Trackpad you can have both operational on the OS, but the patch will select the first one activated. Maybe it could get a device selector like the HID patch in an upcoming release?

harrisonpault's picture
Re: Magic Trackpad and Kineme MultitouchPatch

Also, btw, the new pad appears to max out at 11 simultaneous touches, just like the laptop trackpad.

leegrosbauer's picture
Re: Magic Trackpad and Kineme MultitouchPatch

I would agree with harrisonpault's assesments. Everything seems to be working, and working as described above. I would add that I also ran a wired mouse concurrently with the Magic Trackpad and Magic Mouse, seemingly without any problems. Not too sure how useful the three together are, but the trackpad combined with either mouse seems like a good combination; trackpad for controlling multitouch imagery activation and movement, with simultaneous pointing and clicking capability of the mouse which is useful in QC Inspector windows and third party composition hosts.

usefuldesign.au's picture
Re: Magic Trackpad and Kineme MultitouchPatch

So following on from the suggestion on the create_digital_motion thread:

Is it or would it be possible to separate the Magic TrackPad data stream from the cursor driver ie. make it a custom device for QC that didn't effect mouse events at the OS level but provided stuff to QC as per the MultiTouch Patch

goto10's picture
Re: Magic Trackpad and Kineme MultitouchPatch

Quote:
Is it or would it be possible to separate the Magic TrackPad data stream from the cursor driver

I'm interested in confirmation on this as well. $69,- is not a lot of money, but I'd have no other use for it if it didn't have that functionality.

harrisonpault's picture
Re: Magic Trackpad and Kineme MultitouchPatch

You can use an HID Input patch to make the Magic Trackpad exclusive to QC. This will have the desired effect of making button presses on the pad inoperative outside of the QC context. In System Preferences, you can turn off all the gee-whiz gesture stuff for the trackpad. What you cannot do is turn off the visible OS cursor tracking on the screen.

I am not using a macbook with a builtin trackpad, so I cannot comment on how separable multiple trackpad devices are in Sys Pref. Do you get two trackpad panels with separate preferences (good), or do all trackpads share the same prefs (bad)? I'm using a pair of Magic devices: mouse and pad.

In any case, this isn't what I would call robust and consistent behavior for the HID "Exclusive" toggle, but I think the Magic Trackpad could work as a separate input device for performance in many circumstances.

goto10's picture
Re: Magic Trackpad and Kineme MultitouchPatch

Cool. Thanks for that info! It's a bit of a shame you can't completely separate the data. When performing with two people we still might really get into eachother's way if the cursor gets taken over. But I guess that's about all you can expect for a $69,- piece of kit.

usefuldesign.au's picture
Re: Magic Trackpad and Kineme MultitouchPatch

goto10 wrote:
But I guess that's about all you can expect for a $69,- piece of kit.
I think you can expect somebody will write a small bit of code to split the Magic Trackpad bluetooth data-stream from going directly to OS events. This isn't a hardware issue.

I'm surprised there isn't a USB version or port on the only version, not everybody wants the prospect of a power nor a signal failure at a mission-crucial moment. Just read Apple Q&A page and it has sleep mode and batteries last a few months and claims range of 30' so I guess that's pretty safe.

cwright's picture
Re: Magic Trackpad and Kineme MultitouchPatch

I kinda hope someone works that out too -- having exclusive access seems quite useful.

usefuldesign.au's picture
Re: Magic Trackpad and Kineme MultitouchPatch

My first idea for Magic Trackpad was to put an overlay (thin rigid plastic perhaps) over the top with labels and areas for touch switches and sliders and dial turning areas.

I'm looking to do a room lighting and A/V 'controls breakout box' to drive a QC app for a hall running 24/7 on a MacMini. Would make a good solution for any lecture hall where you have a bunch of different gear wired to the podium. Have the QC app running in the background driving the soft swtiches and the presentation in the foreground.

I was thinking arduino + pots, toggles etc (arh my soldering iron is rusty), then thinking iTouch/iPad (but then would have to pay for hardware and software development costs), at $69 MTP is looking sweet, simple to develop and a fast result. Just need that isolation, although in a QC app built with AppBuilder one could just hide the cursor and go fullscreen / cover the menubar zone on the the Magic Touch.

I'm wondering if the touch will work through plastic or require cutouts in required areas. some of those iPhone bumpers have a screen cover don't they??

gtoledo3's picture
Re: Magic Trackpad and Kineme MultitouchPatch

You might want to consider some kind of really cheap midi controller instead. It does work through a layer (the trackpad). I think the idea of a touch control is cool, but the pad is sort of a small footprint, and might not be that robust for anything that's sufficiently complex. It would still be cool to experiment with for sure. It could definitely handle faders, keys, etc...

harrisonpault's picture
Re: Magic Trackpad and Kineme MultitouchPatch

Hmmm, I think that OS X trackpads generate both NStouch events and NSmouse events. Some of the mouse events (e.g., mouseMoved event) get through to other contexts even though the HID Exclusive is enabled in QC. Maybe there is more can be done in the HID patch Settings, but I'm not on OS X atm.

usefuldesign.au's picture
Re: Magic Trackpad and Kineme MultitouchPatch

I have a Behringer2000 but it a bit pricy for this client (who will not use 2nd hand gear) and not exactly what I want either. It's hard to find the right mix of toggles, dials and faders (which need servo-feedback if you a using source multiplexing and smokris's patch doesn't do that far as I know (but that's okay cause B2000 has 8 sliders and 8 dials). Behringer2000 is probably closest fit so far or a combination of Presso jog/shuttle controller and a midi switch-bank.

At $69, just add another for a few more controls (when we can receive independent data streams per patch that is!!). Also it can have front face designed just how you want which is a bit more flexible than a midi controller but you're right about the size limitation I think.

gtoledo3's picture
Re: Magic Trackpad and Kineme MultitouchPatch

What I find to be really_awesome is the prospect of using the iPad as a control surface. It's really too bad that we can't use QC to program GUI stuff to send events to the Desktop. It's just that I could whip up a GUI with faders and buttons in QC in a few minutes...

usefuldesign.au's picture
Re: Magic Trackpad and Kineme MultitouchPatch

Absolutely!!

One method and I've only just started looking into it is the WebApp route (javascript & HTML based). It has a lot of draw-backs compared to the quality a programmer can currently get with Cocoa and we potentially could get with an iOS-Safe-Mode subset of QC and some nice interactions macros.

One of the most popular uses for iPad aside from PDF and content I've been reading is as a company metrics screen that people have beside there PC or in the car or on the factory floor. A bunch of important data, well visualised and constantly updated. QC would make an excellent environment to do that kind of thing.

I wish Apple saw it this way ;)

gtoledo3's picture
Re: Magic Trackpad and Kineme MultitouchPatch

I don't know if data visualization, especially 2D-which is almost all data visualization, is a reason for having QC available for iOS, because it can already be handled. I'm not arguing that I wouldn't rather use QC.

The fact that QC provides a kind of quick prototyping interface is desirable, and Android has added this ability now. That's what's kind of sad to me... to see Google actually add a quick programming abstraction interface before Apple, when Apple already had it available.

The fact that QC is extensible via plugins make it a great tech in general, but plugins need to be able to be handled in composition or baked in so that stuff can be portable.

I think the other main legit reason is that Apple doesn't really have another framework that handles 3D graphics.

I agree with the general picture you paint though, because I think that QC has a great deal of potential if it can be pushed towards having aspects that are easily understood by marketing designers in the same way that Adobe products are, so that they can start incorporating QC as an element in marketing materials. It makes sense that companies would find an abstracted interface appealing for programming iOS stuff, if it made sense to designers, and I think it would be a good thing for Apple if companies were drawn to using Apple tech as an integral part of their presentations and business strategies.

The problem is that this needs to be balanced with the needs of heavy duty programmers.

Everybody has their pet ideas for QC I guess... some make me want to gag ;-) I'm not sure the vision is there sometimes (no slag to cwright, not necessarily talking about him or apple, or even other on the board...)...

usefuldesign.au's picture
Re: Magic Trackpad and Kineme MultitouchPatch

I go along with everything you said there, George.

I would say doing any kind of prototyping or slick visual interface in QC would be a whole lot easier than making a webApp and then have iPad load it.. The web app route would necessitate downloading/buying a 3rd party set of JS interface elements (some good ones out there with sliders etc) or building from scratch in code. In QC we can make a slider/dial/visualiser easily and have it look just how we want in almost any conceivable way and have it change appearance in realtime.

The DOM structure of a web app has it advantages too though in terms of how an HTML page will self organise to a certain degree even when an element is added or taken away whereas QC would require a relocation of every element.

If android is doing that kind of thing already that's a bit sad for QC — it was ready ages ago (as you said). I don't think cwright has been made Head of QC Vision Department just yet, so he wont be reading anything into this discussion I'm sure haha ;)

I firmly believe in the potential of QC as a full blown Application IDE/Prototyping Tool targeting visual programming and visual applications with a few additional tools and paradigms (as discussed other other threads). It's actually more than half way there I think.

gtoledo3's picture
Re: Magic Trackpad and Kineme MultitouchPatch

Just to make sure my statement is less ambiguous, I was just referring to users and their ability to perceive QC as a tool to do various things with, and the process it takes to attain an end result, or to use QC to amplify things they are already doing, and conversely, the slow crawl on increasing the amount of non-trivial things that can be done with QC. As it stands, nothing new has really happened since the plugin API was introduced. I'm not trying to throw SL patches out the window, because they are convenient, and there might be a few unique things that can be done, but they all have problems, and if I was pressed I feel that I could do whatever it was in Leopard.

To me, that just makes the next level of "step up" that QC has to take be a little bigger jump.

dust's picture
Re: Magic Trackpad and Kineme MultitouchPatch

can someone confirm how to get magic trackpad working with qc multi-touch. the hid only seems to show a single xy pointer. i tried only using magic trackpad but it seems only my laptop trackpad works ? can anyone confirm this working that also has a stock trackpad ? seems qc is getting confused. im going to see if the apples light table example will work with magic track pad. i want to project onto the magic trackpad like this.

gtoledo3's picture
Re: Magic Trackpad and Kineme MultitouchPatch

Don't use HID, use the multitouch patch.

...unless I'm misreading something with your scenario.

HID doesn't support multitouch, as far as I know. The only multitouch support for QC is from the Kineme Multitouch patch.

Again, if something is going over my head, apologies in advance.

dust's picture
Re: Magic Trackpad and Kineme MultitouchPatch

im using the kineme multi-touch patch but for what ever reason qc doesn't want to recognize my magic trackpad. the trackpad on my mbp works fine but not the magic trackpad. it seems people confirm the magic trackpad working but its not for me. so thought maybe setting exclusive HID like mentioned above might work but didn't for me ?

gtoledo3's picture
Re: Magic Trackpad and Kineme MultitouchPatch

Did you try making sure the trackpad was connected, and then QC is started?

dust's picture
Re: Magic Trackpad and Kineme MultitouchPatch

yeah i tried running some of the examples. like mentioned above i tried by not touching the built in trackpad and using the external but nothing. the same thing happens when i try to run my tuio trackpad program as well. i think its just because i have two trackpads and qc is picking the built in.

dust's picture
Re: Magic Trackpad and Kineme MultitouchPatch

well after some testing in xcode it seems the magic trackpad responds to the standard apple touch phase events. so thats good news.

i will have to investigate kinemes references to apples private multi-touch frameworks to understand this a bit more. maybe for my system a device selection is needed ?

dust's picture
Re: Magic Trackpad and Kineme MultitouchPatch

well after some testing with my machine using the kineme's reference to the private multitouch support frameworks, i can confirm that the magic trackpad does work for me running snow leopard 10.6.5

it seems the reason it isn't working for me in qc is that i have two trackpads and the multi-touch plugin seems to be only using the default device reference.

so with a slight modification to the og source from...

http://steike.com/code/multitouch/

i am now able to get raw touch data from my magic trackpad. as it was steike's source did not accommodate for more than one device.

so this still doesn't get me any closer to being able to use it with qc. but am relieved that it is a simple fix. so im leaving this code to the powers that be...

#include <unistd.h> 
#import <Foundation/Foundation.h> 
#include <CoreFoundation/CoreFoundation.h> 
#include <ApplicationServices/ApplicationServices.h> 
 
typedef struct { 
   float x; 
   float y; 
}mtPoint; 
 
typedef struct { 
   mtPoint position; 
   mtPoint velocity; 
}mtReadout; 
 
 
typedef struct 
{ 
   int frame;
   double timestamp;
   int identifier;
   int state;
   int unknown1;
   int unknown2; 
   mtReadout normalized; 
   float size; 
   int unknown3;  
   float angle;    
   float majorAxis;
   float minorAxis; 
   mtReadout mm;  
   int unknown5[2];
   float unknown6;
}Touch; 
 
 
typedef void *MTDeviceRef; 
typedef int (*MTContactCallbackFunction)(int,Touch*,int,double,int); 
 
MTDeviceRef MTDeviceCreateDefault(); 
CFMutableArrayRef MTDeviceCreateList(void); 
 
 
void MTRegisterContactFrameCallback(MTDeviceRef, MTContactCallbackFunction); 
 
void MTDeviceStart(MTDeviceRef, int); 
 
void printData(int nFingers, Touch *data) { 
   int i; 
   for (i=0; i<nFingers; i++) { 
      Touch *f = &data[i]; 
      printf("Finger: %d, frame: %d, timestamp: %f, ID: %d, state: %d, PosX: %f, PosY: %f, VelX: %f, VelY: %f, Angle: %f, MajorAxis: %f, MinorAxis: %f\n", i, 
            f->frame, 
            f->timestamp, 
            f->identifier, 
            f->state, 
            f->normalized.position.x, 
            f->normalized.position.y, 
            f->normalized.velocity.x, 
            f->normalized.velocity.y, 
            f->angle, 
            f->majorAxis, 
            f->minorAxis); 
   } 
} 
 
int touchCallback(int device, Touch *data, int nFingers, double timestamp, int frame) 
{ 
   printf("Device: %d ",device); 
   printData(nFingers, data);   
 
   return 0; 
} 
 
int main(void) { 
   int i;   
   NSMutableArray* deviceList = (NSMutableArray*)MTDeviceCreateList();
   for(i = 0; i<[deviceList count]; i++) { 
   MTRegisterContactFrameCallback([deviceList objectAtIndex:i], touchCallback); 
   MTDeviceStart([deviceList objectAtIndex:i], 0);} 
 
   sleep(-1); 
   return 0; 
} 

leon's picture
Re: Magic Trackpad and Kineme MultitouchPatch

Hi Dust. Great you posted here the code - Steike has closed now that server - 2019 now -, but I don't know how to use/integrste that code. Where does it go?