Drawing Tablet Library For Processing

marcus • March 18th, 2008

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

CC - Some rights reserved

Copyright © Marcus Wendt 2008
This library is licensed under the GNU LGPL

 

Permalink

 

Tags

+devices +java +library +processing

9 Responses to Drawing Tablet Library For Processing

  1. microbians
    Good job!
  2. Adam
    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?
  3. David
    For Windows and Linux support, you can wrap JPen ( http://jpen.sf.net )
  4. Marcus
    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.
  5. Nicolas
    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.
  6. ds
    Nice work! Looking forward to seeing the Windows wrapper! Any idea when that will be released?
  7. Bill
    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!
  8. Marcus
    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.
  9. MOVAX
    THANK YOU! It works like a charm.

Reply

3d 4-space abstract aesthetic system aesthetics algorithm alien ambient ambisonics animation architecture art artificial audio audio research black&white book caskets classic clicks & cuts climate code color competition computer-vision conceptual art consoles cpp culture ddr design devices digtial fabrication documenta documentation drawing dynamics electricity electromagnetism electronics environment event exhibition experimental exploration fashion festival film flocking folk food fractal furniture gamedev generative genetic geometry glitch graphic hacks haptics hardware history hyperspace ideas illustration images inspiration installation instrument intelligence interactive interieur japan java knowledge management landscape library life light liquid live london math micro minimal minimalism modernism monochrome motion motion graphics multiples music naming nature nervous ink networked networking opensource osx painting paper particles performance personal photography physics playful politics press print processing processing.org programming quotes recipes research retro romance ruby science scripts sculpture SENDUNG.net shopping snippets social software sound space space exploration craft space exploration craft orbiter supercollider swiss systems technology theory theremin toys transformed travel tricks typography universe video visual vj water web2.0 xcode