# Libraries

**URL:** https://discourse.processing.org/c/p5js/p5js-libraries/20.md?page=9

[Latest](https://discourse.processing.org/latest.md) · [Categories](https://discourse.processing.org/categories.md) · [Tags](https://discourse.processing.org/tags.md)

**Page:** 10

---

## [How P5.js use the Box2D of Processing?](https://discourse.processing.org/t/how-p5-js-use-the-box2d-of-processing/25272)

<div class="topic-metadata">

**Author:** [@NeoRei](https://discourse.processing.org/u/NeoRei)\
**Replies:** 2\
**Last updated:** [November 8, 2020, 5:22am UTC](https://discourse.processing.org/t/how-p5-js-use-the-box2d-of-processing/25272 "2020-11-08T05:22:27Z")

</div>

i can’t use the Box2D !Help

---

## [Sound loading/ index.html error](https://discourse.processing.org/t/sound-loading-index-html-error/25087)

<div class="topic-metadata">

**Author:** [@ucsduni](https://discourse.processing.org/u/ucsduni)\
**Replies:** 4\
**Last updated:** [November 2, 2020, 4:34am UTC](https://discourse.processing.org/t/sound-loading-index-html-error/25087 "2020-11-02T04:34:10Z")

</div>

I am having an issue getting my canvas to load when I am using the preload function with a sound. The code is producing a output that just says “Loading…” I think this is an issue with my index.html, but I’ve been trying…

---

## [P5.sound from web server](https://discourse.processing.org/t/p5-sound-from-web-server/24979)

<div class="topic-metadata">

**Author:** [@ylh](https://discourse.processing.org/u/ylh)\
**Replies:** 3\
**Last updated:** [October 31, 2020, 5:52pm UTC](https://discourse.processing.org/t/p5-sound-from-web-server/24979 "2020-10-31T17:52:59Z")

</div>

Most sound examples demonstrate how to play an mp3 file. I want to use Oscillators. Oscillators work well locally but I can’t seem to get a remote browser to play. Are there security issues?

---

## [Using this code for exhibition. how to make the size of file smaller?](https://discourse.processing.org/t/using-this-code-for-exhibition-how-to-make-the-size-of-file-smaller/24997)

<div class="topic-metadata">

**Author:** [@yejincolor](https://discourse.processing.org/u/yejincolor)\
**Replies:** 1\
**Last updated:** [October 29, 2020, 7:13pm UTC](https://discourse.processing.org/t/using-this-code-for-exhibition-how-to-make-the-size-of-file-smaller/24997 "2020-10-29T19:13:22Z")

</div>

changing pixelated dot size by distance Hi, I am a beginner at coding and I just made this code using some references. In this code, the webcam recognizes the distance of people using PoseNet. And the size of dots gets…

---

## [Getting error message using ml5js with p5js](https://discourse.processing.org/t/getting-error-message-using-ml5js-with-p5js/24980)

<div class="topic-metadata">

**Author:** [@maddyna](https://discourse.processing.org/u/maddyna)\
**Replies:** 1\
**Last updated:** [October 28, 2020, 10:40pm UTC](https://discourse.processing.org/t/getting-error-message-using-ml5js-with-p5js/24980 "2020-10-28T22:40:57Z")

</div>

the errors I got: Uncaught TypeError: Cannot read property ‘split’ of undefined (: line 57) model is loaded Error: Failed to execute ‘texImage2D’ on ‘WebGL2RenderingContext’: The image element contains cross-origin da…

---

## [Can't get audioIn in Android browsers (apparently solved)](https://discourse.processing.org/t/cant-get-audioin-in-android-browsers-apparently-solved/24832)

<div class="topic-metadata">

**Author:** [@rvalla](https://discourse.processing.org/u/rvalla)\
**Replies:** 1\
**Last updated:** [October 23, 2020, 10:53am UTC](https://discourse.processing.org/t/cant-get-audioin-in-android-browsers-apparently-solved/24832 "2020-10-23T10:53:14Z")

</div>

Hi everyone, I am working in a little simulation to guide users to record sound. I am testing p5.sound here (the code is this). The sketch works records and triggered a local download correctly on Firefox, Brave, Opera…

---

## [Send data to p5.js from another program](https://discourse.processing.org/t/send-data-to-p5-js-from-another-program/24717)

<div class="topic-metadata">

**Author:** [@kkscr](https://discourse.processing.org/u/kkscr)\
**Replies:** 1\
**Last updated:** [October 19, 2020, 4:08pm UTC](https://discourse.processing.org/t/send-data-to-p5-js-from-another-program/24717 "2020-10-19T16:08:06Z")

</div>

Hello ! I have some code written in C for a robot, and I would like to make a simulation with processing. I want to send data ( the coordinate of a few robots on a map) from my C program to a processing instance. In an…

---

## [P5.js and P5js-Sound on Android Studio with Webview](https://discourse.processing.org/t/p5-js-and-p5js-sound-on-android-studio-with-webview/24288)

<div class="topic-metadata">

**Author:** [@nxmusic](https://discourse.processing.org/u/nxmusic)\
**Replies:** 0\
**Last updated:** [October 2, 2020, 3:16pm UTC](https://discourse.processing.org/t/p5-js-and-p5js-sound-on-android-studio-with-webview/24288 "2020-10-02T15:16:17Z")

</div>

Hi! Only p5.js in Webview with android studio works ok, but when I add p5sound code only appears the loading… message Anyone have experience using p5 sound in android studio? Thaaaaaaanks

---

## [Sketch not working in Chrome](https://discourse.processing.org/t/sketch-not-working-in-chrome/24272)

<div class="topic-metadata">

**Author:** [@alsumwas](https://discourse.processing.org/u/alsumwas)\
**Replies:** 0\
**Last updated:** [October 1, 2020, 3:24pm UTC](https://discourse.processing.org/t/sketch-not-working-in-chrome/24272 "2020-10-01T15:24:51Z")

</div>

I made this simple sketch and it will not open in Chrome after I export it from the p5.js web editor. Any suggestions? http://do.art.gvsu.edu/interactive21/sound/index.html

---

## [Button not working as expected](https://discourse.processing.org/t/button-not-working-as-expected/24273)

<div class="topic-metadata">

**Author:** [@alsumwas](https://discourse.processing.org/u/alsumwas)\
**Replies:** 0\
**Last updated:** [October 1, 2020, 3:31pm UTC](https://discourse.processing.org/t/button-not-working-as-expected/24273 "2020-10-01T15:31:24Z")

</div>

The sketch below works fine in the p5.js web editor but when I export it and upload it to the server the buttons do not work properly. Button c and d are the colors I want them to be but a, b, e, and f are the default c…

---

## [Average captured image flow on p5.js?](https://discourse.processing.org/t/average-captured-image-flow-on-p5-js/24222)

<div class="topic-metadata">

**Author:** [@villares](https://discourse.processing.org/u/villares)\
**Replies:** 0\
**Last updated:** [September 29, 2020, 2:16pm UTC](https://discourse.processing.org/t/average-captured-image-flow-on-p5-js/24222 "2020-09-29T14:16:15Z")

</div>

I work mostly with Processing Java and Python modes, where I’m used to have OpenCV to calculate average image flow. Is there something that will provide a ready-to-use average image flow vector (like opencv.getAverageFlo…

---

## [Bug Bounty- Audio in IOS](https://discourse.processing.org/t/bug-bounty-audio-in-ios/23984)

<div class="topic-metadata">

**Author:** [@hikinghack](https://discourse.processing.org/u/hikinghack)\
**Replies:** 5\
**Last updated:** [September 25, 2020, 7:34pm UTC](https://discourse.processing.org/t/bug-bounty-audio-in-ios/23984 "2020-09-25T19:34:10Z")

</div>

Hi! I made this little game for kids for the Smithsonian in Panama to teach about FFT functions and how scientists use spectrograms to identify animals in audio. But it doesn’t work on safari or chrome on iphones or ipad…

---

## [First project.. guidance with code for my music practice?](https://discourse.processing.org/t/first-project-guidance-with-code-for-my-music-practice/23836)

<div class="topic-metadata">

**Author:** [@HelloGoodPi](https://discourse.processing.org/u/HelloGoodPi)\
**Replies:** 1\
**Last updated:** [September 18, 2020, 10:11am UTC](https://discourse.processing.org/t/first-project-guidance-with-code-for-my-music-practice/23836 "2020-09-18T10:11:05Z")

</div>

Hey forum! Thanks for taking the time to read this! So i’m trying my first piece of code, with very little experience… My aim is to make a simple code that will show a letter/ note on screen (A to G) allong with an aud…

---

## [Seriously and p5serial](https://discourse.processing.org/t/seriously-and-p5serial/23853)

<div class="topic-metadata">

**Author:** [@paolopastorino](https://discourse.processing.org/u/paolopastorino)\
**Replies:** 0\
**Last updated:** [September 14, 2020, 3:59pm UTC](https://discourse.processing.org/t/seriously-and-p5serial/23853 "2020-09-14T15:59:26Z")

</div>

Hi to everyone, I am new here and i have not much experience in coding. I have a problem whit seriously.js library: i’ve copied the sketch from D. Shiffman tutorial about the library and then i’ve tried to change some …

---

## [Translate causing error](https://discourse.processing.org/t/translate-causing-error/23833)

<div class="topic-metadata">

**Author:** [@SamuelCobb](https://discourse.processing.org/u/SamuelCobb)\
**Replies:** 7\
**Last updated:** [September 14, 2020, 11:52pm UTC](https://discourse.processing.org/t/translate-causing-error/23833 "2020-09-14T23:52:12Z")

</div>

hey guys, I have a very short piece of code which I am trying to write, but it seems that the translate function is causing some sort of error. anyone know why? function setup() { cnv = createCanvas(400, 400, WEBGL); …

---

## [Video Cropping - Teachable Machine](https://discourse.processing.org/t/video-cropping-teachable-machine/23805)

<div class="topic-metadata">

**Author:** [@ergoego](https://discourse.processing.org/u/ergoego)\
**Replies:** 2\
**Last updated:** [September 12, 2020, 11:37pm UTC](https://discourse.processing.org/t/video-cropping-teachable-machine/23805 "2020-09-12T23:37:00Z")

</div>

So I created a model at https://teachablemachine.withgoogle.com/train/image. I generate the model, get the p5.js code, and it all works great. But there’s just one big problem. I trained all of my data on a cropped vide…

---

## [Ml5js posenet single mode still return multiple face key points](https://discourse.processing.org/t/ml5js-posenet-single-mode-still-return-multiple-face-key-points/23636)

<div class="topic-metadata">

**Author:** [@stephanschulz](https://discourse.processing.org/u/stephanschulz)\
**Replies:** 0\
**Last updated:** [September 2, 2020, 3:00pm UTC](https://discourse.processing.org/t/ml5js-posenet-single-mode-still-return-multiple-face-key-points/23636 "2020-09-02T15:00:21Z")

</div>

I have set detectionType: 'single' and feed my video in this way poseNet.singlePose(video); It’s true that only one skeleton get’s detected but when 2 people are present body parts key-points get scattered between these…

---

## [Trying to play one random video after another in one screen](https://discourse.processing.org/t/trying-to-play-one-random-video-after-another-in-one-screen/11418)

<div class="topic-metadata">

**Author:** [@pelinkiliboz](https://discourse.processing.org/u/pelinkiliboz)\
**Replies:** 7\
**Last updated:** [August 27, 2020, 8:13am UTC](https://discourse.processing.org/t/trying-to-play-one-random-video-after-another-in-one-screen/11418 "2020-08-27T08:13:59Z")

</div>

Hello! I’m fairly new to programming and for my graduation project I’m trying to create a sketch on p5js that plays one random video after another from an array of videos. I can’t seem to figure out the way to play the…

---

## [Want to store data from array to file in p5.js](https://discourse.processing.org/t/want-to-store-data-from-array-to-file-in-p5-js/23498)

<div class="topic-metadata">

**Author:** [@iamgsshetty](https://discourse.processing.org/u/iamgsshetty)\
**Replies:** 1\
**Last updated:** [August 26, 2020, 8:21am UTC](https://discourse.processing.org/t/want-to-store-data-from-array-to-file-in-p5-js/23498 "2020-08-26T08:21:06Z")

</div>

let video; let posNet; let pose; let skeleton; var a=0,b=0,c=0; var rec\_pose=\[\]; var rec\_skeleton=\[\]; var fs=require(‘fs’) function setup() { createCanvas(1400, 700); video=createCapture(VIDEO); video.hide(); …

---

## [Ccapture with up to date p5js](https://discourse.processing.org/t/ccapture-with-up-to-date-p5js/23467)

<div class="topic-metadata">

**Author:** [@Hapiel](https://discourse.processing.org/u/Hapiel)\
**Replies:** 2\
**Last updated:** [August 24, 2020, 10:28pm UTC](https://discourse.processing.org/t/ccapture-with-up-to-date-p5js/23467 "2020-08-24T22:28:16Z")

</div>

Hi guys, I was trying to work out how to save animations with ccapture, a js library. I couldn’t get it to work, so I looked up an example that uses p5 and ccapture and found one here. After getting confused for a long…

---

## [How to use \*require.js\* to load another library inside p5](https://discourse.processing.org/t/how-to-use-require-js-to-load-another-library-inside-p5/23362)

<div class="topic-metadata">

**Author:** [@watermelon2020](https://discourse.processing.org/u/watermelon2020)\
**Replies:** 1\
**Last updated:** [August 22, 2020, 9:38am UTC](https://discourse.processing.org/t/how-to-use-require-js-to-load-another-library-inside-p5/23362 "2020-08-22T09:38:01Z")

</div>

Hi, I’d like to use the ‘require.js’ library in p5.js to load another library, say ‘fast-csv’ I’ve done locally: npm install fast-csv modify the index.html to include the ‘require’: \<script src=“https://cdnjs.cloudf…

---

## [Help running PeerJS 'Hello World' example (in Web Editor)](https://discourse.processing.org/t/help-running-peerjs-hello-world-example-in-web-editor/23403)

<div class="topic-metadata">

**Author:** [@ottenm](https://discourse.processing.org/u/ottenm)\
**Replies:** 1\
**Last updated:** [August 21, 2020, 1:38pm UTC](https://discourse.processing.org/t/help-running-peerjs-hello-world-example-in-web-editor/23403 "2020-08-21T13:38:33Z")

</div>

I’m struggling to get the following example of p5js/PeerJS up and running: https://editor.p5js.org/creativecoding/sketches/a9tDT2M1\_ I open the same page in 2 different windows and launch the first one as-is, including…

---

## [How to start 2 node servers](https://discourse.processing.org/t/how-to-start-2-node-servers/23390)

<div class="topic-metadata">

**Author:** [@stephanschulz](https://discourse.processing.org/u/stephanschulz)\
**Replies:** 3\
**Last updated:** [August 21, 2020, 1:46am UTC](https://discourse.processing.org/t/how-to-start-2-node-servers/23390 "2020-08-21T01:46:55Z")

</div>

I am using p5js and ml5js to run a local project that tracks a person and saves images to a local folder. For this to work I have to use https://github.com/ml5js/ml5-data-and-models-server to serve the ml models locally…

---

## [Integrate P5.js canvas into bootstrap template](https://discourse.processing.org/t/integrate-p5-js-canvas-into-bootstrap-template/23371)

<div class="topic-metadata">

**Author:** [@chanof](https://discourse.processing.org/u/chanof)\
**Replies:** 1\
**Last updated:** [August 20, 2020, 12:10am UTC](https://discourse.processing.org/t/integrate-p5-js-canvas-into-bootstrap-template/23371 "2020-08-20T00:10:52Z")

</div>

Im trying to insert a P5.js sketch inside a bootstrap div as you can see in the code below, with an empty sketch canvas it works properly, but with the sketch that I want to add I’m unable to get it into div, centered …

---

## [P5.Score: Cannot read property 'start' of undefined](https://discourse.processing.org/t/p5-score-cannot-read-property-start-of-undefined/15305)

<div class="topic-metadata">

**Author:** [@m4rinos](https://discourse.processing.org/u/m4rinos)\
**Replies:** 8\
**Last updated:** [August 18, 2020, 6:25pm UTC](https://discourse.processing.org/t/p5-score-cannot-read-property-start-of-undefined/15305 "2020-08-18T18:25:53Z")

</div>

Hi, I’m new to this community and p5 so forgive me if I ask something silly, but here is my problem. I have a part with a phrase and I’m now trying to add the part to a score because I want to be able to play more parts…

---

## [Webcam freezing issue in Safari (iOS and OSX)](https://discourse.processing.org/t/webcam-freezing-issue-in-safari-ios-and-osx/21598)

<div class="topic-metadata">

**Author:** [@crafah](https://discourse.processing.org/u/crafah)\
**Replies:** 1\
**Last updated:** [August 18, 2020, 4:28pm UTC](https://discourse.processing.org/t/webcam-freezing-issue-in-safari-ios-and-osx/21598 "2020-08-18T16:28:12Z")

</div>

Hi, Experiencing a weird issue trying to run a facetracking sketch across platforms. In Chrome and Firefox the project works perfectly. In Safari (both desktop and mobile versions), however, the webcam sometimes refuses…

---

## [Tutorial: Locked Rotation with p5.easycam](https://discourse.processing.org/t/tutorial-locked-rotation-with-p5-easycam/23295)

<div class="topic-metadata">

**Author:** [@SamuelCobb](https://discourse.processing.org/u/SamuelCobb)\
**Replies:** 0\
**Last updated:** [August 16, 2020, 3:59pm UTC](https://discourse.processing.org/t/tutorial-locked-rotation-with-p5-easycam/23295 "2020-08-16T15:59:57Z")

</div>

Hey guys, I just wanted to share my experience and my newfound knowledge of easycam. This idea started when I wanted to smoothly move around a physics sim that I am working on. The freeness of the camera was slightly to…

---

## [P5.gui theme change](https://discourse.processing.org/t/p5-gui-theme-change/23161)

<div class="topic-metadata">

**Author:** [@SamuelCobb](https://discourse.processing.org/u/SamuelCobb)\
**Replies:** 1\
**Last updated:** [August 10, 2020, 9:21am UTC](https://discourse.processing.org/t/p5-gui-theme-change/23161 "2020-08-10T09:21:14Z")

</div>

Hey guys, I’ve been playing around with p5.gui to make one of my sims more user friendly. Although p5.gui is incredibly simple to use and I really love the ease of use. My problem is, it’s colour scheme isn’t exactly th…

---

## [Porting MQTT MessageReceived function from Processing to p5](https://discourse.processing.org/t/porting-mqtt-messagereceived-function-from-processing-to-p5/22944)

<div class="topic-metadata">

**Author:** [@dantewong](https://discourse.processing.org/u/dantewong)\
**Replies:** 1\
**Last updated:** [August 5, 2020, 10:56pm UTC](https://discourse.processing.org/t/porting-mqtt-messagereceived-function-from-processing-to-p5/22944 "2020-08-05T22:56:42Z")

</div>

Hi. I’m very new to coding. I’m currently working on an MQTT project that involves an Arduino (Esp32) with sensors sending data (publishing) to an MQTT Broker and Processing picking up that data (subscribing)from the MQ…

---

## [Element play method raised an error asynchronously](https://discourse.processing.org/t/element-play-method-raised-an-error-asynchronously/22955)

<div class="topic-metadata">

**Author:** [@Hepyrian](https://discourse.processing.org/u/Hepyrian)\
**Replies:** 1\
**Last updated:** [August 3, 2020, 6:34pm UTC](https://discourse.processing.org/t/element-play-method-raised-an-error-asynchronously/22955 "2020-08-03T18:34:47Z")

</div>

Hi everyone! I’m working on a larger sketch that needs to be able to play videos and control them with p5.touchgui elements. As you’ll see when you open my sketch, the video will only sometimes play, and a lot of the ti…

[Previous page](https://discourse.processing.org/c/p5js/p5js-libraries/20.md?page=8)

[Next page](https://discourse.processing.org/c/p5js/p5js-libraries/20.md?page=10)
