Processing Cookbook
👩🏼‍🍳

Processing Cookbook

Install the Sound Library

  1. Select Tools > Reference Tool
  2. image
  3. A Contribution Manager window will appear. Click the Libraries tab.
  4. image
  5. Click the All popup menu on the right.
  6. image
  7. Select the Sound category
  8. image
  9. Select the Sound library from the list of libraries, and click Install
  10. image

Visual Studio Code for Processing

Teaching VS Code to Recognize *.pde Files as Java

Visual Studio Code recognizes *.pde files (files that end in “.pde”) as text files. You can teach it that a these files as Java, This causes VS Code to display them as appears on the right, instead of on the left. It also allows you to format them (equivalent to Processing's “Auto Format” menu item), with the addition of another extension (the following recipe).

Language Mode: Text. Color Theme: Light.
Language Mode: Text. Color Theme: Light.
Language Mode: Java. Color Theme: Light.
Language Mode: Java. Color Theme: Light.

To teach it to recognize *.pde files as Java, install the Processing Language extension through one of these two mechanisms:

Method 1: Using the link. Click on the link. Click Install. Allow the page to open “Visual Studio Code”. Then follow step 4 below.

image

Method 2: Searching for the extension. Open Visual Studio Code. In the Visual Studio Code action bar (on the left), click the Extensions icon. Search for “Processing”. Click the “Processing Language” item in the results. Click on Install.

image

Once installed by using, the pane in Visual Studio Code should show the “Disable” and “Uninstall” buttons. (Don't click on either one! We want to keep it installed.)

image

Format Processing Sketches

VS Code can be configured to format sketch files. This changes them from the poorly-indented text on the left, to the text on the right. Formatting is triggered by a Format menu item. VS Code can also be configured to format a file every time that it is saved.

Installation:

  • Install the Language Support for Java extension. See the instructions in the “Teaching VS Code to Recognize *.pde Files as Java” for how to install an extension.
  • image
  • Download and install the Java development Kit from https://adoptopenjdk.net. You can leave the default Version and JVM selected, and simply click on Latest release.
  • VS Code will prompt to install the JDK, once the Language Support extension is installed.
    VS Code will prompt to install the JDK, once the Language Support extension is installed.

    Usage:

The web site. Click on Latest release.
The web site. Click on Latest release.