How do I import Processing libraries in Visual Studio Code?

I’m using processing in visual studio code, and want to import a library.

Since visual studio code lacks the contribution manager found in the processing IDE, I’m not sure how to do it. As far as I understand, libraries are meant to be located in a “libraries” folder within the sketch folder.

I want to import the sound library, and have found the git for it here: processing-sound/src/processing/sound at main · processing/processing-sound · GitHub

Now, do I just copy files from the git to my libraries folder? If yes, what files needs to be included? Are there other steps I need to take, like setting up a setup file for instance?

Hello,

Assuming you are using (from your other post):

Install libraries with the Processing IDE first or manually.

If it works in the Processing IDE you can then run it with VS Code as the editor and launch it.

This helped me get started:

:)

1 Like

Thanks for the feedback, I looked at the Processing IDE file structure as reference and found that the Sound library needs to be located in the Documents/Processing/libraries folder, not the sketch folder.

In case someone run into the same problem as me, I incidentally had the same sketch file name as a class in the sound library causing an error when building the sketch. Changing sketch/folder name fixed it.

Hey @Erik! Our pr05 grantee @diyaayay is currently working on a new VSCode extension for Processing 4. Would you be interested to check out the prototype when it’s ready for testing?

—Raphaël

4 Likes