libTablet aims at becoming a (cross-platform) Java drawing tablet library that plays nice with Processing. It gives you easy access to your tablets pressure, tilt and rotational data in your sketches/ Java applications.
Since my most immediate requirement currently is to have it working on Mac OS X, it is yet not really cross-platform. However the plan is to wrap JTablet on Windows to provide a common interface for easier development/ deployment across these systems.
Releases
version 0.1
first draft, mac os x only
» Tablet-0.1.zip
Source
You can checkout the latest revision with subversion from the repository with:svn co http://svn.infostuka.org/rep/libTablet/trunk/ |
Useage
Simply create a PTablet object before you initialize your sketch, which you can then use to query your tablet for: pressure, tiltX, tiltY, rotation etc.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
import processing.opengl.*;
import infostuka.lib.tablet.p5.*;
PTablet tablet;
void setup ()
{
// ATTENTION - new PTablet() HAS to be created before calling size()
tablet = new PTablet(this);
size(800, 600, OPENGL);
}
void draw ()
{
if (mousePressed) {
float brushSize = tablet.pressure * 100f;
System.out.println("TILT " + tablet.tiltX + " " + tablet.tiltY + " ROT " + tablet.rotation + " THETA " + theta);
...
your drawing commands here
...
}
}
|
License
Copyright © Marcus Wendt 2008
This library is licensed under the GNU LGPL
Permalink

Good job!
I trying to use your tablet release with my wacom tablet in processing. I'm working on a powerPC machine and running processing 0135. I dropped the unzipped tablet file in my libraries folder in the processing folder. When I try to run your example sketch I run into problems. First off no sketch window comes up. Second I get a message in the console saying... Mar 19, 2008 8:52:55 PM infostuka.lib.tablet.TabletManager <init> INFO: PLATFORM: Mac OS X Mar 19, 2008 8:52:55 PM infostuka.lib.tablet.impl.MacTabletWrapper init INFO: loading JNI library... Exception in thread "Thread-2" java.lang.UnsatisfiedLinkError: /Users/Atone/Documents/Processing 0135/libraries/Tablet/library/libTablet.jnilib: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1676) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at infostuka.lib.tablet.impl.MacTabletWrapper.init(Unknown Source) I was wonder what i'm doing wrong. Have others run into this problem?
For Windows and Linux support, you can wrap JPen ( http://jpen.sf.net )
Oh, i just realized that my libTablet library is currently compiled as Intel only. It shouldnt be too hard to compile it as universal binary though ... i put it onto the list for the next release.
Hi marcus, JPen (http://jpen.sf.net) has a pluggable architecture and you are wellcome to develop a JPen provider for Mac OS X. You will gain a lot with the JPen infrastructure, and I will be happy to help you however I can. Cheers, Nicolas.
Nice work! Looking forward to seeing the Windows wrapper! Any idea when that will be released?
Hello Marcus, just wondering if you've had a chance to make a Mac OS X universal binary yet... look forward to checking out the library... thanks!
hi guys i know its been a while – i've been pretty busy these days... however we just finished one big project so it looks like i can squeeze in an update for libTablet before starting with the next job *phew ... ill let you know. m.
THANK YOU! It works like a charm.