Setting up the Library

To use the Code + Chords library in Processing, clone the repository and follow the compilation instructions below:

From the Readme to the processing/processing-library-template repository from which this repo was forked:

Clone your new repository to your Eclipse workspace

  • Open Eclipse and select the File → Import… menu item.
  • Select Git → Projects from Git, and click “Next >”.
  • Select “URI” and click “Next >”.
  • Enter your repository’s clone URL in the “URI” field. The remaining fields in the “Location” and “Connection” groups will get automatically filled in.
  • Enter your GitHub credentials in the “Authentication” group, and click “Next >”.
  • Select the “master” branch on the next screen, and click “Next >”.
  • The default settings on the “Local Configuration” screen should work fine, click “Next >”.
  • Make sure “Import existing projects” is selected, and click “Next >”.
  • Eclipse should find and select the  “processing-library-template” automatically, click “Finish.”

Set Up and Compile

Edit the Library properties:

  • Open the resources folder inside of your Java project and double-click the file. You should see its contents in the Eclipse editor.
  • Edit the properties file, making changes to items 1-4 so that the values and paths are properly set for your project to compile. A path can be relative or absolute.
  • Make changes to items under 5. These are metadata used in the automatically generated HTML, README, and properties documents.

Compile your Library using Ant

  • From the menu bar, choose Window → Show View → Ant. A tab with the title “Ant” will pop up on the right side of your Eclipse editor.
  • Drag the resources/build.xml file in there, and a new item “ProcessingLibs” will appear.
  • Press the “Play” button inside the “Ant” tab.
  1. BUILD SUCCESSFUL. The Library template will start to compile, control messages will appear in the console window, warnings can be ignored. When finished it should say BUILD SUCCESSFUL. Congratulations, you are set and you can start writing your own Library by making changes to the source code in folder src.
  2. BUILD FAILED. In case the compile process fails, check the output in the console which will give you a closer idea of what went wrong.


Errors may have been caused by:

  • Incorrect path settings in the file.
  • Error “Javadoc failed”. If you are on Windows, make sure you are using a JDK instead of a JRE in order to be able to create the Javadoc for your Library. JRE does not come with the Javadoc application, but it is required to create Libraries from this template.

After having compiled and built your project successfully, you should be able to find your Library in Processing’s sketchbook folder, examples will be listed in Processing’s sketchbook menu. Files that have been created for the distribution of the Library are located in your Eclipse’s “workspace/yourProject/distribution” folder. In there you will also find the “web” folder which contains the documentation, a .zip file for downloading your Library, a folder with examples as well as the index.html and .css file.

To distribute your Library please refer to the Library Guidelines.