PDA

View Full Version : Apple magic trackpad and OSCulator?



theDIY
09-21-2010, 11:35 PM
I know this may be wishful thinking on my part, but wouldn't it be great if OSCulator could harness the data from Apple's newish Magic Trackpad (http://www.apple.com/magictrackpad/) much in the same way it deals with Wacom tablets, including the ability to divert the data from mouse control?


The Magic Trackpad apparently has the ability to sense up to 11 individual points of contact, including the area of each point of contact. I can think of numerous applications of this sort of touch data for musical performance...


There are already some ways of using the trackpad data available, such as an external for Max/MSP, which are rounded up in this Create Digital Motion post from a few months ago:


http://createdigitalmotion.com/2010/07/apple-magic-trackpad-as-multi-touch-input-and-cross-platform-multi-touch/


...but I would much prefer the ability for "one-stop-shopping" regarding piping data from multiple controllers into applications needing such control. It would be wonderful to have Wiimote, Wacom, and Multitouch trackpad data all coming in through OSCulator.


Cheers,


Scott

camille
09-22-2010, 02:53 PM
Hi Scott,


It's nice to see you around.

Thanks for the suggestion, I think this is a great idea!


Best,

Cam

theDIY
09-22-2010, 06:57 PM
Thanks, Cam! I've been lurking, but haven't actually been using OSCulator much lately. I was pushing myself to use the computer less, especially for performance, but I've now officially bored of that :D


RE: the Magic Trackpad, the code which the TUIO trackpad program, Tongseng, and the Max/MSP external are based on is available free, and the author seems happy to allow the code to be used in other stuff, too:


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


...But in my internet sleuthing, it seems no one has figured out a way to stop the Magic Trackpad from being picked up by the mouse pointer. I was able to get my internal trackpad on my MBP to stop sending data to the mouse pointer with some success (using the option "ignore trackpad when external mouse is plugged in" in the Universal Access pref pane) using the Max/MSP standalone Trackpadsynth by the guy who made Fingerpinger external for Max. It also works with the TUIO widget, whose messages get picked up by OSCulator even with the "ignore trackpad..." option ticked, no problem. But I fear this solution won't work for the Magic Trackpad, as there won't be an option to ignore ITS input present in the Universal Access pref pane.


The author of the code above suggests using a terminal command to kill the dock , but that seems like a very un-elegant solution to me...


Cheers!


-Scott

theDIY
09-22-2010, 09:57 PM
The author of the code above suggests using a terminal command to kill the dock , but that seems like a very un-elegant solution to me...


Er, the above is to alleviate the effects of system gestures and connection to the mouse pointer; forgot to mention :)

camille
09-22-2010, 10:15 PM
Hey Scott,


Thanks for the code snippet, much interesting. I see that it is making use of a private framework, which means that the code could break on any Mac OS X update. In the meantime I will have a look if there is not a more conventional way of accessing this device …


Cheers :-)

Cam

camille
09-23-2010, 09:22 AM
Hey Scott,


Do you have a MagicTrackpad or a recent MacBook with a large trackpad?


Best,

Cam

camille
09-23-2010, 06:00 PM
Ah ah you piqued my curiosity, so I tried and got something running.

Not yet production ready, but worth a try. Would you like?

theDIY
09-26-2010, 09:19 PM
Hi Cam!!



Do you have a MagicTrackpad or a recent MacBook with a large trackpad?


I have a unibody MBP, and as of yesterday, a couple Magic Trackpads. I am pretty interested in finding a convenient way of using data from more than one Magic Trackpad simultaneously ... I have this vision of three 'Pads in a side-by-side array for use in performance, so I decided to get an extra Trackpad to facilitate testing.


As for other solutions, apparently the Max/MSP external is capable of enumerating more than one apple multitouch source, and supports the Magic Trackpad (link (http://www.anyma.ch/blogs/research/2010/08/10/fingerpinger-works-with-the-magic-trackpad/)). I just tried using the TUIO translator application, Tongseng, with the Magic Trackpad, and it doesn't seem to work. The code which the above two solutions were based on, which I linked above, (but here's the link again: link) (http://www.steike.com/code/multitouch/

), it doesn't seem to have been updated to work with the Magic 'Pad, either.


I'm looking forward to trying out your efforts; bring it on!!! :D


Cheerz,


Scott

theDIY
09-26-2010, 09:45 PM
BTW: I found a simple "hardware hack" on the Max/MSP forum to keep from clicking the integrated Magic Trackpad button (physically preventing the mouse pointer from clicking on things it shouldn't be clicking on while madly mashing on the 'Pad, presuming "tap to click" is turned off). All you have to do is put a taller set of self-adhesive rubber bumper "feet" next to the two feet already present on the bottom of the 'Pad. Those preexisting feet are what cause the physical click when you press down on the 'Pad's surface, and by taking them out of contact with the surface on which you set the 'Pad, you defeat the click. Works great!

camille
09-26-2010, 10:52 PM
I have not though about supporting many of them, but that is indeed a good idea.

I'll check the links out very soon.

As soon as I have something decent I'll send you a beta build, thanks!


Cam

theDIY
10-01-2010, 07:58 PM
Sounds good, Cam! I look forward to whatever you have up your sleeve. Hit me with it whenever you're ready!


Scott

camille
10-04-2010, 08:35 PM
Hey Scott,


I've made some progress on this side, and I'm able to translate the trackpad's data into a 2d tuio blurb, which is cool. You have access to x/y coordinates, angle of touch, and even the size and shape of the touch.

You can indeed either use it as interpreted TUIO or raw TUIO and forward it to another software.


However …

I had to use undocumented code to enable this to work, and it is obviously not super stable.

The most important problem is that I had to provide my own mouse locking system and it works only when OSCulator is frontmost. This is a limitation from Apple. There use to be a hack but it doesn't work anymore.


So, I will send you something you can play with, but I am not going to release that feature until I found a better to way to lock the mouse properly. Currently it fights with the Wacom way of locking the mouse (which is I believe the correct way of doing that, but not everybody has a Wacom tablet …).


Best,

Cam

theDIY
10-07-2010, 03:04 AM
Hiya Cam,


I figured it would be difficult to prevent apple multitouch devices from sending their events to the mouse pointer, as it seems no one else working with apple multitouch data is able to do so yet, either.


The physical hack I posted about above is only good for the Magic 'Pad; I guess one could do something similar for the MBP trackpad, though. IIRC, there is a set screw under the trackpad which defines the pressure needed to trigger a click, and it can be set to the point where it is effectively impossible to click by pressing down on the pad. But, this is a rather brutish way of solving the problem of mouse interaction, and a pain to revert back to normal. And still, there is the problem of it moving the cursor around and/or triggering gestures, which while less bothersome, is still annoying. I'll keep my fingers crossed that you'll be able to find a way around this, or that Apple makes public a solution to the problem.


In any case, I'm amazed that you have been able to get something up and running so quickly! I really appreciate all of your efforts, and can't wait to try it out!


Cheers,


Scott

camille
10-11-2010, 03:33 PM
I've just sent you an email with an alpha version of the multitouch driver.

If someone wants to help me test this and give his/her opinion on the multitouch controller support, please let me know !

fatkidpopular
10-14-2010, 01:10 AM
I'm EXTREMELY interested in this, so am also EXTREMELY willing to help test..

camille
10-14-2010, 09:35 AM
alright fatkid, I'll send you an email.

modul8tor
10-26-2010, 12:54 PM
Hi Camille, i will buy a magic trackpad this week, so definitively interested in testing it. Thanks.

theDIY
01-27-2011, 11:02 AM
Hey Cam,

I just noticed that the Max/MSP external for using the Magic Trackpad with Max has been updated to allow more than one simultaneous 'pad input at a time. I haven't tested this yet (as my Max demo expired a while ago), but the fact that it seems to support multiple pads at once seems pretty promising. I doubt that it uses a different method of obtaining the multitouch data from the OS, however, and it still doesn't provide any help in locking the mouse pointer in a more effective way. Here's a link to the downloads for the updated external & source:

http://www.anyma.ch/2009/research/multitouch-external-for-maxmsp/

Cheers!:cool:

camille
01-31-2011, 04:42 PM
Good stuff Scott, I'll have a look at this.

JayVe Montgomery
03-06-2011, 01:24 AM
Hello Camille,
I am eager for you to work out the issues with the Magic Track Pad for Osculator. I got it half working in Max For Live but not without the edit window being open.
Keep me noted as a tester.

Thanks for your work.

Juggla
04-30-2011, 09:50 PM
is there any update to this? I would love to use my magic trackpad in Osculator!

camille
05-01-2011, 01:20 AM
Good question.

I've done some experiments to some extent and I didn't like the result.
The problem lies in the way Mac OS let you 'lock' the mouse: the mouse pointer can only be locked when OSCulator is the foremost application, unlike when you are using a Wacom tablet where the mouse can be locked at all times which is much more logical.
Also, access to the Magic Trackpad makes use of undocumented code in Mac OS, and in my opinion this solution has not proen to be very robust.

I'm just hoping that Apple will make their multitouch framework public and provide a way to control mouse locking that is more useful. I'll have a look at Lion to see if I can find anything better.

Best,
Cam

theDIY
05-01-2011, 03:09 AM
Great to hear you are still thinking of ways to add this functionality to OSCulator, Cam! Hopefully Lion will bring some new options to deal with multitouch events in an easier way. I'll keep my fingers crossed!

Mestre André
07-05-2013, 11:19 PM
Hi! I'm very interested in this possibility... I noticed this thread is from 2008... so... did it happen? hehehe

camille
07-08-2013, 12:46 PM
Hi André,

Yes it did but it was really a hack and was not working properly.
For example there was no way for ignoring mouse input from the Magic Trackpad, so the mouse would move as you touch the Trackpad, which made the multi-touch input ususable really.

The Magic Trackpad would be a great device if only Apple made it sufficiently programmable.


Best,
Camill

XxSexyxx
09-11-2017, 11:45 PM
I know this is oldddd, but IMPORTANT, this is the kind of science the bigggger companies fail to take serious nowadays.

I personally don't think „ignoring actions“ and „substituting mouse inputs“ etc, is that relevant at all, you could eventually substitute such things with BTT anyways … but what everyone still misses is a way to simply control eg, a MIDI parameter through a gesture – take for example the ROTATE GESTURE or THREE FINGER SWIPE UP or PINCH etc, it's a pity that all we magic trackpad owners do have the coolest XY-pad right in front of us every day, but it does not do what a musician would really need.

Logic Pro 9 for example listens to the ROTATE GESTURE by default and it's assigned to control the selected track's level, but Apple failed here once, because apparently when using LATCH, TOUCH, WRITE etc, it – for whatever reason – seems to fail to initialize immediately after starting playback respectively were there overall tremendous issues with the multi-touch recognition, as Logic repeatedly freezes for no reason when using that gesture (that's why i have to keep this rotate gesture disabled in OS X's system preferences).

Yeah, I am a fan of the Magic Trackpad, generally speaking (especially in combination with BTT), and yeah, I am still using Logic Pro 9.
Keep up the great work, Mr. Camille. If you need a beta tester for this HID>MIDI conversion implementation, I'd be happy to help out :)