# Libraries

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

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

**Page:** 18

---

## [How do I include p5-dom when importing from npm module/instance mode?](https://discourse.processing.org/t/how-do-i-include-p5-dom-when-importing-from-npm-module-instance-mode/7893)

<div class="topic-metadata">

**Author:** [@davidjj](https://discourse.processing.org/u/davidjj)\
**Replies:** 1\
**Last updated:** [January 28, 2019, 5:26am UTC](https://discourse.processing.org/t/how-do-i-include-p5-dom-when-importing-from-npm-module-instance-mode/7893 "2019-01-28T05:26:46Z")

</div>

The instructions for including p5 libraries just says to include them in the head file. However, I’m using it instance mode, for use with react, like: componentDidMount() { import("p5").then((p5) =\> { …

---

## [Collision with curved vertex](https://discourse.processing.org/t/collision-with-curved-vertex/7818)

<div class="topic-metadata">

**Author:** [@animofa](https://discourse.processing.org/u/animofa)\
**Replies:** 4\
**Last updated:** [January 28, 2019, 1:02am UTC](https://discourse.processing.org/t/collision-with-curved-vertex/7818 "2019-01-28T01:02:11Z")

</div>

Hello everyone, I am trying to make a simple game where one object is moving between to curvedVertexes. Now I want to add an event incase the object is colliding with the obstacles aka the curvedVertexes. I have found …

---

## [Ml5 style transfer using p5](https://discourse.processing.org/t/ml5-style-transfer-using-p5/7180)

<div class="topic-metadata">

**Author:** [@byou](https://discourse.processing.org/u/byou)\
**Replies:** 1\
**Last updated:** [January 27, 2019, 9:51pm UTC](https://discourse.processing.org/t/ml5-style-transfer-using-p5/7180 "2019-01-27T21:51:16Z")

</div>

Hello, I’m running into a strange problem when trying out the ml5 style transfer example and wonder if anyone might have any idea why. My models are being loaded and performing the transfer fine, but when I get the styl…

---

## [Use the audiocontext as audio input in p5.js](https://discourse.processing.org/t/use-the-audiocontext-as-audio-input-in-p5-js/7879)

<div class="topic-metadata">

**Author:** [@rob1](https://discourse.processing.org/u/rob1)\
**Replies:** 0\
**Last updated:** [January 27, 2019, 2:20pm UTC](https://discourse.processing.org/t/use-the-audiocontext-as-audio-input-in-p5-js/7879 "2019-01-27T14:20:23Z")

</div>

I am implementing a syntheziser wich uses the nodes of the audio-api to generate sound and my goal is to visualize it using p5. I currently have a script that analyzes audio with fft and visualizes the frequencies with …

---

## [Trying to get p5.sound library to work with Observable](https://discourse.processing.org/t/trying-to-get-p5-sound-library-to-work-with-observable/7825)

<div class="topic-metadata">

**Author:** [@Job](https://discourse.processing.org/u/Job)\
**Replies:** 0\
**Last updated:** [January 25, 2019, 12:14am UTC](https://discourse.processing.org/t/trying-to-get-p5-sound-library-to-work-with-observable/7825 "2019-01-25T00:14:59Z")

</div>

So for this weekend’s Global Game Jam, I was thinking of using Observable together with p5.js for an easy developer environment. With a little help from Mike Bostock I now have a neat little notebook template for a basic…

---

## [Getting p5.gif.js working in the p5.js web editor](https://discourse.processing.org/t/getting-p5-gif-js-working-in-the-p5-js-web-editor/7787)

<div class="topic-metadata">

**Author:** [@jgl](https://discourse.processing.org/u/jgl)\
**Replies:** 2\
**Last updated:** [January 24, 2019, 4:44pm UTC](https://discourse.processing.org/t/getting-p5-gif-js-working-in-the-p5-js-web-editor/7787 "2019-01-24T16:44:13Z")

</div>

Hi All, I’m trying to get the example here: Working in the p5.js web editor. You can see it not running here: https://editor.p5js.org/jgl/sketches/xpBHHsWz9 It’s currently erroring with: “InvalidStateError: An att…

---

## [Trimming Audio File Using P5.js](https://discourse.processing.org/t/trimming-audio-file-using-p5-js/7731)

<div class="topic-metadata">

**Author:** [@ahmedali](https://discourse.processing.org/u/ahmedali)\
**Replies:** 3\
**Last updated:** [January 24, 2019, 5:50am UTC](https://discourse.processing.org/t/trimming-audio-file-using-p5-js/7731 "2019-01-24T05:50:46Z")

</div>

Hi I have a question that can I trim the audio file that I recorded using p5.js?. I had to trim the first 3 seconds of my recorded file.May you help me.I will be very thankful to all of you after this act of kindness, Th…

---

## [Problem camera when running on Windows](https://discourse.processing.org/t/problem-camera-when-running-on-windows/7417)

<div class="topic-metadata">

**Author:** [@codnpix](https://discourse.processing.org/u/codnpix)\
**Replies:** 3\
**Last updated:** [January 19, 2019, 1:59pm UTC](https://discourse.processing.org/t/problem-camera-when-running-on-windows/7417 "2019-01-19T13:59:14Z")

</div>

Hello, I developed this little game at school with p5js and P5playJS libraries. The game works globally fine but I got many bug reports from people trying to running it with a Windows computer : The camera doesn’t follo…

---

## [Muting p5 sound, while still receiving data](https://discourse.processing.org/t/muting-p5-sound-while-still-receiving-data/3475)

<div class="topic-metadata">

**Author:** [@elginskye](https://discourse.processing.org/u/elginskye)\
**Replies:** 1\
**Last updated:** [January 17, 2019, 3:13pm UTC](https://discourse.processing.org/t/muting-p5-sound-while-still-receiving-data/3475 "2019-01-17T15:13:35Z")

</div>

Hi, I’m wondering if it’s possible using the p5 sound library to get data from an mp3 file, using fft.analyze();, but then prevent the actual audio file from being output through the computer speakers. The reason: I …

---

## [Save Images and Train them and get results](https://discourse.processing.org/t/save-images-and-train-them-and-get-results/7581)

<div class="topic-metadata">

**Author:** [@ankit](https://discourse.processing.org/u/ankit)\
**Replies:** 0\
**Last updated:** [January 17, 2019, 7:14am UTC](https://discourse.processing.org/t/save-images-and-train-them-and-get-results/7581 "2019-01-17T07:14:43Z")

</div>

We are using ‘imageClassifier’ and ‘featureExtractor’ methods to recognize images using ml5-library and p5.js. We have successfully recognized the images with your Pre-trained model. We are successfully implemented feat…

---

## [Adding reverb to microphone input and play it through speakers?](https://discourse.processing.org/t/adding-reverb-to-microphone-input-and-play-it-through-speakers/7415)

<div class="topic-metadata">

**Author:** [@AndreasRef](https://discourse.processing.org/u/AndreasRef)\
**Replies:** 1\
**Last updated:** [January 11, 2019, 1:14pm UTC](https://discourse.processing.org/t/adding-reverb-to-microphone-input-and-play-it-through-speakers/7415 "2019-01-11T13:14:18Z")

</div>

Hi I am wondering if it is possible to use p5js and the p5sound library to do the following: Get user input through the microphone Add reverb to the signal Output the wet signal (input + reverb) through the computers …

---

## [Use createVideo with vimeo or youtube assets](https://discourse.processing.org/t/use-createvideo-with-vimeo-or-youtube-assets/7386)

<div class="topic-metadata">

**Author:** [@fgraux](https://discourse.processing.org/u/fgraux)\
**Replies:** 5\
**Last updated:** [January 10, 2019, 3:52pm UTC](https://discourse.processing.org/t/use-createvideo-with-vimeo-or-youtube-assets/7386 "2019-01-10T15:52:05Z")

</div>

Hi there I’m trying to use p5.js and seriously.js to display a vimeo video chromakeyed in a canvas. video = createVideo(’//player.vimeo.com/video/…’); But the wevbsite returns an error : "Access to video at ‘…’ (red…

---

## [How to take screenshots of the canvas?](https://discourse.processing.org/t/how-to-take-screenshots-of-the-canvas/6824)

<div class="topic-metadata">

**Author:** [@jnsjknn](https://discourse.processing.org/u/jnsjknn)\
**Replies:** 2\
**Last updated:** [January 6, 2019, 7:21pm UTC](https://discourse.processing.org/t/how-to-take-screenshots-of-the-canvas/6824 "2019-01-06T19:21:57Z")

</div>

Is there a way in the p5.js web editor to take and save several screenshots of the canvas automatically? For example every x frames or according to some other programmed rule?

---

## [Messy code and issues in it](https://discourse.processing.org/t/messy-code-and-issues-in-it/7107)

<div class="topic-metadata">

**Author:** [@tojoco](https://discourse.processing.org/u/tojoco)\
**Replies:** 3\
**Last updated:** [January 3, 2019, 7:22am UTC](https://discourse.processing.org/t/messy-code-and-issues-in-it/7107 "2019-01-03T07:22:19Z")

</div>

Im making a program like the amazon echo using p5.speech. My code is not only messy and confusing but every time it hears speech it runs the else instead of what is supposed to happen let carl = 'hey carl'; var value = …

---

## [Looking for a p5.js Color Chooser widget](https://discourse.processing.org/t/looking-for-a-p5-js-color-chooser-widget/6868)

<div class="topic-metadata">

**Author:** [@grege2](https://discourse.processing.org/u/grege2)\
**Replies:** 6\
**Last updated:** [December 24, 2018, 10:12am UTC](https://discourse.processing.org/t/looking-for-a-p5-js-color-chooser-widget/6868 "2018-12-24T10:12:14Z")

</div>

Hi all, Happy Christmas Eve ! Coding away on Christmas Eve, sad eh? But it’s actually a great time to make some progress on hobbies. Got the day off, everything is ready for Christmas. Anyone know a Color Chooser in Ja…

---

## [Setting socket data over draw background || scope problem?](https://discourse.processing.org/t/setting-socket-data-over-draw-background-scope-problem/6780)

<div class="topic-metadata">

**Author:** [@Honkitonkie](https://discourse.processing.org/u/Honkitonkie)\
**Replies:** 5\
**Last updated:** [December 23, 2018, 6:36pm UTC](https://discourse.processing.org/t/setting-socket-data-over-draw-background-scope-problem/6780 "2018-12-23T18:36:51Z")

</div>

Hi, I just created this account because i spent two entire afternoons trying to debug the following code: (As of now it doesn’t work (but i feel like it should)) With the risk of asking a question with an obvious answe…

---

## [Fuzziness when switching sketches](https://discourse.processing.org/t/fuzziness-when-switching-sketches/6717)

<div class="topic-metadata">

**Author:** [@Zuii](https://discourse.processing.org/u/Zuii)\
**Replies:** 2\
**Last updated:** [December 18, 2018, 3:17am UTC](https://discourse.processing.org/t/fuzziness-when-switching-sketches/6717 "2018-12-18T03:17:59Z")

</div>

Hello, I working on a kind of master sketch that can switch between sketches easily. The functionality is working great but for some reason when I switch to a different sketch it gets kinda fuzzy. My program is setup l…

---

## [Help with P5.js and ML5.js](https://discourse.processing.org/t/help-with-p5-js-and-ml5-js/6446)

<div class="topic-metadata">

**Author:** [@zack](https://discourse.processing.org/u/zack)\
**Replies:** 1\
**Last updated:** [December 12, 2018, 2:03am UTC](https://discourse.processing.org/t/help-with-p5-js-and-ml5-js/6446 "2018-12-12T02:03:12Z")

</div>

Hello Community :slight\_smile: I’ve been playing with p5.js and the new ml5.js machine learning library. I’m having an issue using a p5 image as an input for the ml5 style transfer function. Maybe someone can help me fi…

---

## [Auto-updating and downloading libraries](https://discourse.processing.org/t/auto-updating-and-downloading-libraries/6008)

<div class="topic-metadata">

**Author:** [@ThatIsAPseudo](https://discourse.processing.org/u/ThatIsAPseudo)\
**Replies:** 1\
**Last updated:** [December 3, 2018, 1:19pm UTC](https://discourse.processing.org/t/auto-updating-and-downloading-libraries/6008 "2018-12-03T13:19:51Z")

</div>

Hello there ! I was wondering if that is possible to ask index.html to look for the libraries online through the CDN, and if these are not available (because of server connexion failure, airplane mode,…) it uses local l…

---

## [How to get pitch of human voice](https://discourse.processing.org/t/how-to-get-pitch-of-human-voice/5833)

<div class="topic-metadata">

**Author:** [@emma](https://discourse.processing.org/u/emma)\
**Replies:** 5\
**Last updated:** [December 2, 2018, 7:30am UTC](https://discourse.processing.org/t/how-to-get-pitch-of-human-voice/5833 "2018-12-02T07:30:58Z")

</div>

I’m trying to make a sketch that find the pitch of a human voice (speaking or singing). I thought I was headed in the right direction, but I’m getting stuck. Here is my strategy: Loop through all the frequencies in th…

---

## [Array question in JS](https://discourse.processing.org/t/array-question-in-js/5875)

<div class="topic-metadata">

**Author:** [@flamo](https://discourse.processing.org/u/flamo)\
**Replies:** 8\
**Last updated:** [November 25, 2018, 5:54am UTC](https://discourse.processing.org/t/array-question-in-js/5875 "2018-11-25T05:54:20Z")

</div>

I’m building a p5 library and I’m new to JavaScript. I’m confused by the JavaScript closure and array system. I don’t understand why I get undefined object “field” in for loops. Ps: I’m using the math.js eval to transla…

---

## [Save sound p5.sound](https://discourse.processing.org/t/save-sound-p5-sound/1985)

<div class="topic-metadata">

**Author:** [@sribarr](https://discourse.processing.org/u/sribarr)\
**Replies:** 1\
**Last updated:** [November 18, 2018, 9:28pm UTC](https://discourse.processing.org/t/save-sound-p5-sound/1985 "2018-11-18T21:28:55Z")

</div>

How to save sound recordings to a different folder other than the downloads

---

## [Ask google for gps by giving street adress?](https://discourse.processing.org/t/ask-google-for-gps-by-giving-street-adress/5585)

<div class="topic-metadata">

**Author:** [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Replies:** 6\
**Last updated:** [November 17, 2018, 7:41pm UTC](https://discourse.processing.org/t/ask-google-for-gps-by-giving-street-adress/5585 "2018-11-17T19:41:45Z")

</div>

How can I Ask google for gps by giving street adress? I got a bunch of Adresses and like to retrieve the gps data for the houses. Adresses are from germany like street, house number, zip code, city. Thanks a ton! Chr…

---

## [Using p5.js functions with Node.js](https://discourse.processing.org/t/using-p5-js-functions-with-node-js/5431)

<div class="topic-metadata">

**Author:** [@Sarah](https://discourse.processing.org/u/Sarah)\
**Replies:** 2\
**Last updated:** [November 14, 2018, 8:11am UTC](https://discourse.processing.org/t/using-p5-js-functions-with-node-js/5431 "2018-11-14T08:11:51Z")

</div>

Hi, I’ve been experimenting with Node.js and socket.io, and I am now trying to use them together by making a simple shooter game. Currently, I have a server file, which handles all the game logic and updates the game (…

---

## [Record audio from sketch P5](https://discourse.processing.org/t/record-audio-from-sketch-p5/5382)

<div class="topic-metadata">

**Author:** [@magapascansky](https://discourse.processing.org/u/magapascansky)\
**Replies:** 1\
**Last updated:** [November 9, 2018, 3:59pm UTC](https://discourse.processing.org/t/record-audio-from-sketch-p5/5382 "2018-11-09T15:59:55Z")

</div>

Hello! I am developing a sketch with p5.js that simulates playing drums and my idea is to play drum sounds when you press keys (already done) and to be able to record it. The only recording examples/tutoriales that I’v…

---

## [The request status was: 0 ()](https://discourse.processing.org/t/the-request-status-was-0/5295)

<div class="topic-metadata">

**Author:** [@bitome](https://discourse.processing.org/u/bitome)\
**Replies:** 2\
**Last updated:** [November 8, 2018, 6:00am UTC](https://discourse.processing.org/t/the-request-status-was-0/5295 "2018-11-08T06:00:26Z")

</div>

hi, using a sound example file from the p5 website I get this error when i try to run it on my computer, it worked yesterday but its stuck on loading now, even though i’m using the same code and running it through bracke…

---

## [Drawing that follows the movement of a QR code in front of the webcam](https://discourse.processing.org/t/drawing-that-follows-the-movement-of-a-qr-code-in-front-of-the-webcam/5281)

<div class="topic-metadata">

**Author:** [@MG001](https://discourse.processing.org/u/MG001)\
**Replies:** 1\
**Last updated:** [November 7, 2018, 5:17pm UTC](https://discourse.processing.org/t/drawing-that-follows-the-movement-of-a-qr-code-in-front-of-the-webcam/5281 "2018-11-07T17:17:12Z")

</div>

Hello, I want to create a p5.js sketch that makes it possible to draw via the movement of a QR code (or with something like that) in front of the webcam. For example I saw this: https://kylemcdonald.github.io/cv-examp…

---

## [P5.js // node server not working](https://discourse.processing.org/t/p5-js-node-server-not-working/4766)

<div class="topic-metadata">

**Author:** [@codingking03](https://discourse.processing.org/u/codingking03)\
**Replies:** 9\
**Last updated:** [October 25, 2018, 11:56pm UTC](https://discourse.processing.org/t/p5-js-node-server-not-working/4766 "2018-10-25T23:56:51Z")

</div>

Here I thought I copied these two videos exactly and it worked all the way until this moment of the second video. here is what I am seeing:

---

## [P5.sound playing sound from samples](https://discourse.processing.org/t/p5-sound-playing-sound-from-samples/4414)

<div class="topic-metadata">

**Author:** [@a931eric](https://discourse.processing.org/u/a931eric)\
**Replies:** 1\
**Last updated:** [October 24, 2018, 7:04pm UTC](https://discourse.processing.org/t/p5-sound-playing-sound-from-samples/4414 "2018-10-24T19:04:48Z")

</div>

Hi,I have an image of sound wave,and I want to make it play using P5.js. So I sample it then I get a number array ,like {0.51,0.52,0.43…}. Is there a way to play the sound using P5.js from the array,or should I do FFT…

---

## [Uploading recorded audio to web server (node.js, express)](https://discourse.processing.org/t/uploading-recorded-audio-to-web-server-node-js-express/4569)

<div class="topic-metadata">

**Author:** [@candyjdavis](https://discourse.processing.org/u/candyjdavis)\
**Replies:** 2\
**Last updated:** [October 19, 2018, 2:05am UTC](https://discourse.processing.org/t/uploading-recorded-audio-to-web-server-node-js-express/4569 "2018-10-19T02:05:09Z")

</div>

I have an audio file recorder, created in p5.js, similar to what has been created in the p5 Record Save Audio example page. Using node, I am trying to find a good way to save that audio file to the server as a .wav or .…

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

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