User Tools

Site Tools


Reports, Notes

-This is mostly for me- Pixel Map Issues page has a few specifications about pixel[] vs. PImage.pixel[].

-Properties of the Processing Window

Data / Protocol Libraries


Available from

Easy install- download a zip from the above site, unpack it, place in Processing's “libraries” folder.

Seems to be an easy way to do message passing/recieving. An incoming message triggers an oscEvent, which calls the function void oscEvent(OscMessage theOscMessage).

You pass a “bundle”, which can contain multiple “messages”, each of which can have multiple “arguments” (Objects, byte arrays or any of the primitive types). There are simple methods for adding, removing and reading the messages in a bundle and the arguments in a message.

You can send to/recieve from as a test.

Supports TCP, UDP and MULTICAST protocols.

There isn't a good tutorial, and the reference guide is somewhat unclear at times (


Available from

Some of the services need keys, but they don't say which ones. That could be a pain later on.

The high points:

  • google- Full google searches. Unlike the google API, you don't have to have a key to use this (according to example on
  • msn- full MSN searches, including by category.
  • sentence- search google and yahoo, then search results for a given phrase.
  • yahooWeb - web search.

It can also grab data from:

  • allmusic- finds music based on “moods” and returns artist/album names. Also supports grabbing random artists/albums.
  • amazon- search stores by keyword or category. HUGE amounts of data returned, mostly to deal with the large number of possible categories and the properties of each category.
  • delicious- searches for query, returns article titles/authors.
  • feed- searches for articles on the news site Not fully functional.
  • foaf- searches for people at and returns a creepy amount of information about them. The site itself isn't fully functional, so I wouldn't expect this service to be.
  • hostinfo - returns available information about the given server.
  • proxy- “Uses NetUtil.getIPs() to scrape the proxies from the supplied page, then tests them and returns them if they work.”
  • shoutcast- searches, an online radio station from NullSoft.
  • tts- Pretty cool. Call the IBM t ext-to-speech demo with a string, returns a wav file of the given string spoken in a given voice.
  • urbansearch- definitions from
  • yahooImage - returns URLs, other info for images
  • yahooMap - latitude, longitude, city, country, address, zip.
  • yahooVideo - returns URLs, other info for videos.
  • youtube- URL, other info for videos.

Has some great utilities: WordUtil, NetUtil, ListUtil, WavePlayer, Dictionary, Thesaurus.

Google API

Available from:

I can't find the .jar that the library needs in any of the files I downloaded…

This looks promising:

It may be easier to use switchboard, since it (possibly) doesn't need a key or outside sources.


Processing's video library has a few problems.

  • No support for linux
  • Poor playback performance in Windows- only plays sound for the first 1-2 seconds, only plays 1 frame every 2-3 seconds.

I don't know how well it captures in Windows.

There is an alternative capture library: LibCV, available from This is (supposedly) platform-independent (that hasn't been tested).


-There is documentation, but you have to get pretty deep before you even do basic things. We could write a simplified/specialized tutorial on how to do a few specific things (MIDI manipulation, etc). Using the given tutorial might be a bad idea- it's a breadth-first tutorial that gives a lot of useless specifics early on while only skimming over the useful bits.

-There is video editing, but one suite (Framestein) requires Windows and the other (GEM) requires OpenGL, which the computers in 119 don't have. We get the following error when running ./configure:

checking for glInitNames in -lGL... no
checking for glInitNames in -lMesaGL... no
OpenGL is mandatory


-So far, nothing we have can create MIDIs except for the book's classes and PD.

-The SoundExplorer program from the book is quite neat and could come in handy. It's on the CD, under “intro-prog-java” → “bookClasses” (you'd do well to just copy the bookClasses folder). It works and compiles on the computers in 119, but its “main” method is commented out. You have to make sure that the copy on the student's computer is not write-protected, so that they can uncomment the “main” method and compile it. Or, you could edit the .java file so that it accepts the file name at run-time and opens it (this would allow you to make one build of SoundExplorer that could be used on all of the computers in 119).

-The compiled version: bookclasses_new.tar


-To use outside classes, the quick and dirty method is to just put the .java files in the “code” folder of your sketch.

-The elegant solution is to compile all of the .java files, then run

fastjar cvf jarFileName.jar -C /path/to/folder/ .

Put that file under Processing's “libraries” folder.

-Problems: see the “Including the Book's Classes” section under “Bugs and Workarounds”


-If you export applets, you can use different static sizes but you can't use variable sizes at all. I can try to write scripts to do this, which may or may not involve rewriting some Processing code…

-Once you export an application, you can use the .java files found in the “source” folder of the application. You have to first unpack the core.jar file and include the “processing” folder (put it in your PATH). The simple solution would be to put that folder in a globally included location (unless you want to teach the students about PATHS and including files). After that, you can use the .java file as normal- just put the files you need to use in the same folder. You can include this .java file, run it normally, etc.

Input and Output

-When you need input in Processing, you have to put it in the “data” folder. The exception is jm-Etude.

-Input for applications goes in the folder with the application.

-Input for applets goes in the folder with the applet.

-Output is saved:

  • Locally with applications (if at all? Having some trouble with linux applications doing output (Chromakey_6_6). Windows apps do it fine)
  • Not at all with applets (any attempts will crash it).
  • With Processing (folder “processing-0124”) when run in Processing.

-The exceptions of course, is when you give a fully qualified path name. Note: spaces (\ ) in linux paths fail, even when using double-blackslashes.

-When you export applets:

  • No wait()-ing is needed.
  • Pictures have to be in the same folder as index.html
  • Sound files don't have to be put anywhere- they are saved in a “data” folder in the .jar file.
  • You can't have output- no printing, no saving. Any attempts crash the applet.

-When you export applications:

  • No wait()-ing is needed.
  • Pictures have to be in the same folder as the application
  • Sound files don't have to be put anywhere- they are saved in a “data” folder in the .jar file under “lib”.
  • You can have output- files, printing, etc.


-Trying to install the .rpm of 1.2.4b, I get:

$rpm -i audacity-1.2.4b-4.2006.SoS.i586.rpm
error: Failed dependencies: is needed by audacity-1.2.4b-4.2006.SoS.i586 is needed by audacity-1.2.4b-4.2006.SoS.i586 is needed by audacity-1.2.4b-4.2006.SoS.i586 is needed by audacity-1.2.4b-4.2006.SoS.i586 is needed by audacity-1.2.4b-4.2006.SoS.i586 is needed by audacity-1.2.4b-4.2006.SoS.i586 is needed by audacity-1.2.4b-4.2006.SoS.i586 is needed by audacity-1.2.4b-4.2006.SoS.i586 is needed by audacity-1.2.4b-4.2006.SoS.i586 is needed by audacity-1.2.4b-4.2006.SoS.i586 is needed by audacity-1.2.4b-4.2006.SoS.i586

-Trying to build it, I get two errors. First, wxWidgets has to be installed. Second:

make: *** Warning:  Clock skew detected.  Your build may be incomplete.

which should go away after I run

make clean
find . -exec touch {} \;

but it doesn't.

In short, Audacity is not ready out-of-the-box on our systems.

MediaTools (from the book)

-I have to have root permission to install SqueakVM, which is needed for MediaTools.

Bugs and Workarounds

There are plenty of bugs mentioned above. This is a collection of bugs from other pages.


-Problems setting up Sonia: sound-response

-Problems with Sonia: sonia

-Bugs in jm-Etude: jm-Etude

-All of the computers in 119 have soundcards “Intel ICH”, according to alsamixer. According to the PCI Soundcard Matrix (, this card doesn't have MIDI support. I was wonderdering if there was even on-board MIDI support, but nothing shows up:

[rtomlinson@dagonet ~]$aplaymidi -l
ALSA lib seq_hw.c:446:(snd_seq_hw_open) open /dev/snd/seq failed: No such file or directory
Cannot open sequencer - No such file or directory

The book's example MIDI program works, though. Will the above problem affect anything?

Including the Book's Classes

Packaged a .jar, but it doesn't work. Whether or not you include the .jar, Processing complains about not finding the needed classes. An example, from MovieMaker:

C:/DOCUME~1/Reed/LOCALS~1/Temp/build52673.tmp/ Semantic Error: The file "FrameSequencer.class" was found in directory "C:\Documents and Settings\Reed\Desktop\Multimedia\processing-0124\processing-0124\libraries\book\library\book.jar\" specified in the CLASSPATH. However, that class file specifies the type "FrameSequencer".

C:/DOCUME~1/Reed/LOCALS~1/Temp/build52673.tmp/ Semantic Error: Type "FrameSequencer" was not found.

C:/DOCUME~1/Reed/LOCALS~1/Temp/build52673.tmp/ Semantic Error: Type "Picture" was not found.

If you put all of the book's .java files in the code folder or in the folder with your .pde file (which makes them new tabs), it works (whether or not you import the .jar file). This is true on both Linux and Windows.

loadImage Bug in Linux

More details here: Issues with loadImage

One solution is still to wait() after loading an image- the program seems to need time to catch up.

A more permanent fix, also very easy, is Manually Building Processing with one minor change: in app/, comment out the line “applet.setupFrameResizeListener();” around line 325. I have no idea why this works… Doesn't always work.

I tried using different renderers before stumbling across a bug report- “Bug 282: blank screen on linux when running programs” (this is where I got the above fix). Turns out this is probably a threading issue, and that the program does, in fact, need a bit of time to catch up before drawing the first frame. Fry called this a high priority and wanted to fix it before 1.0, but it doesn't look like that happened.



-OpenGL fails on my box due to driver issues with DRI. On the boxes in 119, there are no such issues, and it still fails. Software problem.

-OpenGL Issues:

  • Initial readings of pixels[] with loadPixels() are incorrect (rgb at pixel[0] of a test picture is different with OpenGL than it is with Java2D). This is true in Windows, as well. This is sporatic- not always true.
  • Changes to pixels[] are not saved properly when you call updatePixels(). In fact, what is written to pixels[] seems random. Also true in Windows.
  • In Run mode, with code in Basic mode: Picture pops up for a moment and then the window goes black. Not true in Windows (picture comes up, but is un-altered).
  • In Run mode, with code in Continuous mode: Picture continues to display, but it's still un-altered (or appears to be). This is true even if you include noLoop() in setup(). Also true in Windows.
  • In Present mode, with code in either Basic or Continuous mode: You see an un-altered picture, remains visible. Also true in Windows.

-Fry posted on the Processing forum:;action=display;num=1159145356
Re: OPENGL and pixels[]
« Reply #1 on: May 9th, 2005, 3:17pm »
some of the updatePixels() stuff with opengl broke right before beta so it's been causing trouble, you may just be running into those bugs."

-Fry's priorities must be elsewhere- it's been two years and we have the same problems as described in the forum post.


-Works perfectly with 3D things. But when it comes to the image() function, it just doesn't work in Linux. In Basic and Continuous modes, running in both Run and Present modes, we get nothing but a grey screen. It's not the same as the blank screen error in Java2D- we can change the color of this grey background. In Java2D, we couldn't do that. So, it's dislaying, but it's not displaying the pictures. Could be a coding error…

-I haven't found any bug reports or forum posts.

-Works perfectly in Windows.

-Looking further (mainly at the example 3D-Image → Explode), it doesn't look like P3D can do any sort of picture rendering- the method used in that example is to read the color of each pixel of the picture and draw a rectangle of that color in the corresponding position.

Other Bugs

Transforms like rotate() and scale() only seem to work 1/2 the time under Linux (all the time in Windows? 1/2 the time in Run mode but always in Present mode?). No explanation, and no bug reports. Try the different renderers (we know Java2D has problems with pixel operations) → Problem: At the moment, Java2D is the only working renderer. I can't seem to recreate this… it seems to work now (??)

We need to fix these renderer issues. Is the OpenGL behavior a driver issue? Why doesn't P3D work at all under Linux (works perfectly under Windows)?

Window size bugs: properties_of_the_processing_window


We can't do any of the following:

  • Shear
  • Clip into fancy shapes (in the book, they clip to an ellipse)

Everything else in graphics works (at least some of the time with transforms). In most cases, it's almost a direct correspondence between the book's examples and the Processing code. In many cases, it's even easier in Processing.

reports.txt · Last modified: 2007/08/30 13:53 (external edit)