[PD] TWAIN - scanner - pd

IOhannes m zmoelnig zmoelnig at iem.at
Mon Mar 26 15:28:35 CEST 2007


hi.

Jiri Heitlager | dadata.org wrote:
> 
> So far I only came acrosse the SANE project a JAVA lib. called Morena
> and ofcourse TWAIN.
> I  assume that nobody is going to hand  me a ready made code, so I am
> thinking how I should aproach this. Here's how I think the basic should
> be like.
> 
> 1) make an JAVA app that reads in the scanner data (continously, lamp
> should always be on!)
> 2) format the data into OSC and send it via UDP
> 3) set PD up to listen to a specific port.

i would set up pd to listen on the port _before_ sending data to it
(swap #2 and #3)


whether this is a good setup depends on "the data" you want to send.
(you are rather vague about that).

if the data is more complex (images,...) i would suggest to NOT use OSC
to directly send the data (even though OSC itself can afaik handle
blobs, pd/OSCx is not so good at it).

personally i would just setup a "server" process (be it written in java,
python, C or whatever) which continously reads in the data (either via a
cron-job, or an internal or external loop), store it on the harddisk and
then tell pd where it should look for the data.
mostly i use pdsend for this, but that is why a lot of my servers are
written in bash (hey, it's fun...); you might as well send the
push-command directly from your java-app.


mf.asdr
IOhannes




More information about the Pd-list mailing list