Can I reuse some Processing core code?

I’ve been studing the Nature of Code book and reached the section on Perlin Noise. I got an idea - I can use Perlin noise to generate a table of audio wave tables that I can load into sample-based music programs.

I want to write a tutorial about this. I wrote a Java program that works, but I borrowed the Perlin functions from Processing.

I want to share example on github under the LGPL. Can I use the code that I borrowed from here, if I give the proper credit? What exactly to I need to do?

1 Like

Processing does not use actual Perlin noise. The Processing noise function was borrowed from a demo coding group and shares similar design ideas with Perlin noise but is possibly a little more efficient. If you search, you might be able to find the discussion of its origin.

If you want actual Perlin noise, or the somewhat better (faster at higher dimensions) simplex noise that Ken Perlin came up with a few years later, there are web sites out there with cleaner implementations. https://github.com/KdotJPG/OpenSimplex2 is one of the better ones which has implementations in several languages including Java.

1 Like

Hi @damaru

I agree with everything @scudly said. Also, the discussion about the nature of noise() in Processing and p5.js is here: noise() is not Perlin noise · Issue #7430 · processing/p5.js · GitHub

To answer your specific question: the core libraries of Processing are licensed under LGPL 2.1. This means you can reuse the code under these conditions:

  • You must clearly state any significant changes you made to the software.
  • You must also provide access to the source code of the parts you modified, under the same LGPL 2.1 license.

You can find more details about Processing’s licensing here.

1 Like