# Libraries

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

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

**Page:** 16

---

## [AUTO size() not working on createImg](https://discourse.processing.org/t/auto-size-not-working-on-createimg/12776)

<div class="topic-metadata">

**Author:** [@epignosis567](https://discourse.processing.org/u/epignosis567)\
**Replies:** 4\
**Last updated:** [July 18, 2019, 5:08pm UTC](https://discourse.processing.org/t/auto-size-not-working-on-createimg/12776 "2019-07-18T17:08:10Z")

</div>

Hi. I’m still learning coding. As far as I can tell setting one of the values of the size() when applied to createImg doesn’t work, the image just disappears. As in: button = createImg(’…/dumbo.jpg’); button.size(500,…

---

## [Sound in p5.js gives warnings](https://discourse.processing.org/t/sound-in-p5-js-gives-warnings/12731)

<div class="topic-metadata">

**Author:** [@Checkers99](https://discourse.processing.org/u/Checkers99)\
**Replies:** 1\
**Last updated:** [July 16, 2019, 12:36am UTC](https://discourse.processing.org/t/sound-in-p5-js-gives-warnings/12731 "2019-07-16T00:36:16Z")

</div>

Hello, I’m currently trying to add sound to a p5.js sketch but i keep getting these ‘warnings’? This is the source of the problem i think… If I write the preload code and loadSound I then get error codes from the p5 s…

---

## [Issue "promises" creating a model P5.js and Tensorflow.js](https://discourse.processing.org/t/issue-promises-creating-a-model-p5-js-and-tensorflow-js/12532)

<div class="topic-metadata">

**Author:** [@dinda](https://discourse.processing.org/u/dinda)\
**Replies:** 3\
**Last updated:** [July 9, 2019, 1:27am UTC](https://discourse.processing.org/t/issue-promises-creating-a-model-p5-js-and-tensorflow-js/12532 "2019-07-09T01:27:14Z")

</div>

Hello!!! How are you? I am trying to fit a model to predict 3 vectors (x, y coordinates) when I show them 28x28px image tensors. I’m also doing it in P5.js because I want it to work in the browser. The thing is that …

---

## [Mp3 jukebox in background](https://discourse.processing.org/t/mp3-jukebox-in-background/9843)

<div class="topic-metadata">

**Author:** [@peor](https://discourse.processing.org/u/peor)\
**Replies:** 11\
**Last updated:** [July 5, 2019, 9:15pm UTC](https://discourse.processing.org/t/mp3-jukebox-in-background/9843 "2019-07-05T21:15:51Z")

</div>

In like this https://p5js.org/examples/sound-preload-soundfile.html but then want a sequence of several mp3 files that are played one track where there are also fade in and fade out for each track. Can you help me how I …

---

## [Is it possible to perform p5js.sound FFT for the whole audio input without playing it back?](https://discourse.processing.org/t/is-it-possible-to-perform-p5js-sound-fft-for-the-whole-audio-input-without-playing-it-back/12318)

<div class="topic-metadata">

**Author:** [@fftnana](https://discourse.processing.org/u/fftnana)\
**Replies:** 1\
**Last updated:** [July 5, 2019, 2:24pm UTC](https://discourse.processing.org/t/is-it-possible-to-perform-p5js-sound-fft-for-the-whole-audio-input-without-playing-it-back/12318 "2019-07-05T14:24:14Z")

</div>

Hi all, I am currently working on an audio plotting/visualizer project which takes in amplitude of the audio input and also FFT for more data, so that the resulting plot/image will be more variative. As for amplitude, …

---

## [Poster Generator: Sketch should not automatically redraw (p5js + p5gui)](https://discourse.processing.org/t/poster-generator-sketch-should-not-automatically-redraw-p5js-p5gui/12437)

<div class="topic-metadata">

**Author:** [@kr1schiii](https://discourse.processing.org/u/kr1schiii)\
**Replies:** 5\
**Last updated:** [July 2, 2019, 6:40pm UTC](https://discourse.processing.org/t/poster-generator-sketch-should-not-automatically-redraw-p5js-p5gui/12437 "2019-07-02T18:40:45Z")

</div>

Hey guys, I’m trying to build a simple pattern generator to create posters for some design idea. I’m using mainly p5.js and also the p5.gui library to have an interface to control some functions. During this process I …

---

## [Timer function help](https://discourse.processing.org/t/timer-function-help/12373)

<div class="topic-metadata">

**Author:** [@dackdel](https://discourse.processing.org/u/dackdel)\
**Replies:** 3\
**Last updated:** [July 1, 2019, 10:52am UTC](https://discourse.processing.org/t/timer-function-help/12373 "2019-07-01T10:52:37Z")

</div>

to explain the whole program as it is now: there are 6 tracks. I have speech recognition running where user speech is detected and when he speaks the first track is played fully and stopped when the track is over. then i…

---

## [Adding multiple p5.js sketches with Angular 7](https://discourse.processing.org/t/adding-multiple-p5-js-sketches-with-angular-7/12150)

<div class="topic-metadata">

**Author:** [@thonpy](https://discourse.processing.org/u/thonpy)\
**Replies:** 2\
**Last updated:** [June 30, 2019, 9:11pm UTC](https://discourse.processing.org/t/adding-multiple-p5-js-sketches-with-angular-7/12150 "2019-06-30T21:11:17Z")

</div>

I am trying to make a website and in one page I am trying to integrate all my p5.js sketches into a single webpage. I have separate sketch.js files and I wanted to integrate it to the Angular project, any ideas on how to…

---

## [Beginner Frequency Problem](https://discourse.processing.org/t/beginner-frequency-problem/12400)

<div class="topic-metadata">

**Author:** [@Sugallat](https://discourse.processing.org/u/Sugallat)\
**Replies:** 0\
**Last updated:** [June 30, 2019, 7:51am UTC](https://discourse.processing.org/t/beginner-frequency-problem/12400 "2019-06-30T07:51:56Z")

</div>

Hello! :slight\_smile: This is my first post. I’m working on a Frequency analyzer. The problem is that, when I sing G#4, it writes G#5 with wrong Herz. How should I fix this code? https://codepen.io/asinger/pen/pXWxZB …

---

## [How to Graph data from csv file?](https://discourse.processing.org/t/how-to-graph-data-from-csv-file/12388)

<div class="topic-metadata">

**Author:** [@RichardDL](https://discourse.processing.org/u/RichardDL)\
**Replies:** 2\
**Last updated:** [June 30, 2019, 12:19pm UTC](https://discourse.processing.org/t/how-to-graph-data-from-csv-file/12388 "2019-06-30T12:19:37Z")

</div>

Hi, I’ve made myself an application with a node.js server serial-connected to Arduino. The Arduino is collecting temperature data and the server sends it to a P5.js web-page and logs it to csv file. I’d like to show a…

---

## [How to use javascript libraries (e.g. gauge.js)](https://discourse.processing.org/t/how-to-use-javascript-libraries-e-g-gauge-js/12393)

<div class="topic-metadata">

**Author:** [@demket](https://discourse.processing.org/u/demket)\
**Replies:** 3\
**Last updated:** [June 30, 2019, 2:02am UTC](https://discourse.processing.org/t/how-to-use-javascript-libraries-e-g-gauge-js/12393 "2019-06-30T02:02:38Z")

</div>

Hi, is it possible to use external javascript libraries like gauge.js? I’ve added the p5.dom.min.js file in a similar way to the Gauge.min.js file, but it doesn’t work. Thanks

---

## [Why is p5.js preload so slow?](https://discourse.processing.org/t/why-is-p5-js-preload-so-slow/12176)

<div class="topic-metadata">

**Author:** [@clankill3r](https://discourse.processing.org/u/clankill3r)\
**Replies:** 3\
**Last updated:** [June 29, 2019, 10:39am UTC](https://discourse.processing.org/t/why-is-p5-js-preload-so-slow/12176 "2019-06-29T10:39:53Z")

</div>

I load a few mp3 files that are 2 minutes long. function preload() { sound\_dancer\_1\_l = loadSound('data/GH010103\_1-L.mp3'); sound\_dancer\_1\_r = loadSound('data/GH010103\_1-R.mp3'); sound\_dancer\_2\_l = loadSound('data/…

---

## [P5.js with Divi in wordpress?](https://discourse.processing.org/t/p5-js-with-divi-in-wordpress/12148)

<div class="topic-metadata">

**Author:** [@othernode](https://discourse.processing.org/u/othernode)\
**Replies:** 1\
**Last updated:** [June 18, 2019, 2:25pm UTC](https://discourse.processing.org/t/p5-js-with-divi-in-wordpress/12148 "2019-06-18T14:25:04Z")

</div>

Hi guys, I am looking for a way to use p5.js inside the Divi builder in wordpress. does anyone have an idea if this would be possible and how to go about it? Thanks!

---

## [Problem with socket.io](https://discourse.processing.org/t/problem-with-socket-io/11907)

<div class="topic-metadata">

**Author:** [@LittleBoxes](https://discourse.processing.org/u/LittleBoxes)\
**Replies:** 4\
**Last updated:** [June 9, 2019, 4:22pm UTC](https://discourse.processing.org/t/problem-with-socket-io/11907 "2019-06-09T16:22:34Z")

</div>

Hello, II would like to use socket.io to create a small multiplayer game. To try this lib, I try to install a Shared-canvas script found on the Coding Train site (tuto about websocket). It works well on a local server …

---

## [Render SVG in P5.js](https://discourse.processing.org/t/render-svg-in-p5-js/11935)

<div class="topic-metadata">

**Author:** [@Alexandra](https://discourse.processing.org/u/Alexandra)\
**Replies:** 5\
**Last updated:** [June 9, 2019, 11:27am UTC](https://discourse.processing.org/t/render-svg-in-p5-js/11935 "2019-06-09T11:27:57Z")

</div>

Hi everyone! I’m checking out the graphics/shapes examples in P5 and found out that they are all raster-based. I’m wondering whether there’s a way to render SVG files inside P5. Thanks! Alexandra

---

## [Printable graphic needed: Processed graphic doesn't fit canvas (SVG export doesn't work as either)](https://discourse.processing.org/t/printable-graphic-needed-processed-graphic-doesnt-fit-canvas-svg-export-doesnt-work-as-either/11861)

<div class="topic-metadata">

**Author:** [@optimaprima](https://discourse.processing.org/u/optimaprima)\
**Replies:** 8\
**Last updated:** [June 7, 2019, 9:35am UTC](https://discourse.processing.org/t/printable-graphic-needed-processed-graphic-doesnt-fit-canvas-svg-export-doesnt-work-as-either/11861 "2019-06-07T09:35:22Z")

</div>

Hi there, I am totally new to p5.js and I need this for my master thesis. I had this concept for a book that has some illustrations made with generated design. For example this code. Maybe someone can help to fit this…

---

## [How to pass React prop into setup()?](https://discourse.processing.org/t/how-to-pass-react-prop-into-setup/11849)

<div class="topic-metadata">

**Author:** [@venn](https://discourse.processing.org/u/venn)\
**Replies:** 4\
**Last updated:** [June 5, 2019, 7:28am UTC](https://discourse.processing.org/t/how-to-pass-react-prop-into-setup/11849 "2019-06-05T07:28:41Z")

</div>

Hi legends, I’m trying to figure out a problem with combining React UI with p5.js Currently I’m using p5-react-wrapper. I do aware @atoro has a more advanced and elegant solution (but it’s currently too complicated) fo…

---

## [Some problems with sound](https://discourse.processing.org/t/some-problems-with-sound/11833)

<div class="topic-metadata">

**Author:** [@Dolivan](https://discourse.processing.org/u/Dolivan)\
**Replies:** 2\
**Last updated:** [June 4, 2019, 10:46pm UTC](https://discourse.processing.org/t/some-problems-with-sound/11833 "2019-06-04T22:46:04Z")

</div>

Hi! This is my sketch. https://editor.p5js.org/Dolivan/sketches/QQznxnFsQ I have some problems about Audio In, delay process and reverb process. I hope you help me. Bye.

---

## [Help building a superorganism](https://discourse.processing.org/t/help-building-a-superorganism/11799)

<div class="topic-metadata">

**Author:** [@mcintyre](https://discourse.processing.org/u/mcintyre)\
**Replies:** 1\
**Last updated:** [June 3, 2019, 11:38pm UTC](https://discourse.processing.org/t/help-building-a-superorganism/11799 "2019-06-03T23:38:20Z")

</div>

Hey y’all, I’m trying to superimpose bodies detected by different webcams onto the same canvas, creating a sort of superorganism. The prototype is built with p5.js, ml5.js, React (thanks @atoro), and Meteor. The interac…

---

## [FFT in p5.js p5.sound](https://discourse.processing.org/t/fft-in-p5-js-p5-sound/8265)

<div class="topic-metadata">

**Author:** [@srinivas](https://discourse.processing.org/u/srinivas)\
**Replies:** 4\
**Last updated:** [June 3, 2019, 1:06pm UTC](https://discourse.processing.org/t/fft-in-p5-js-p5-sound/8265 "2019-06-03T13:06:05Z")

</div>

How is FFT done in p5.sound… i need fft Algorithm of p5.FFT .please…

---

## [How to add libraries to p5 Web editor?](https://discourse.processing.org/t/how-to-add-libraries-to-p5-web-editor/11769)

<div class="topic-metadata">

**Author:** [@TurboFanny](https://discourse.processing.org/u/TurboFanny)\
**Replies:** 1\
**Last updated:** [June 2, 2019, 9:17am UTC](https://discourse.processing.org/t/how-to-add-libraries-to-p5-web-editor/11769 "2019-06-02T09:17:18Z")

</div>

I am new to using p5 and am struggling to find out how to add libraries to the web editor. :upside\_down\_face::upside\_down\_face:

---

## [loadFont is not working](https://discourse.processing.org/t/loadfont-is-not-working/10146)

<div class="topic-metadata">

**Author:** [@baisampayans](https://discourse.processing.org/u/baisampayans)\
**Replies:** 9\
**Last updated:** [May 29, 2019, 10:17am UTC](https://discourse.processing.org/t/loadfont-is-not-working/10146 "2019-05-29T10:17:59Z")

</div>

Hi All, I am using react-p5-wrapper npm module to use p5 sketches inside my react based portfolio site. While it works pretty fine, I got stuck in loadFonts. As per the example and documentation, in preload function l…

---

## [HELP: playMode('sustain') is not working](https://discourse.processing.org/t/help-playmode-sustain-is-not-working/11565)

<div class="topic-metadata">

**Author:** [@Carpece](https://discourse.processing.org/u/Carpece)\
**Replies:** 1\
**Last updated:** [May 26, 2019, 5:20am UTC](https://discourse.processing.org/t/help-playmode-sustain-is-not-working/11565 "2019-05-26T05:20:12Z")

</div>

Hi to all… here’s my code. I can’t figure out why playMode(‘sustain’) is not working… I’ve point to it inside a conditional and maybe could be the problem but I don’t find the solution. https://editor.p5js.org/carpece/s…

---

## [Play p5.js not an importable libraries in Processing IDE?](https://discourse.processing.org/t/play-p5-js-not-an-importable-libraries-in-processing-ide/11538)

<div class="topic-metadata">

**Author:** [@Laurent](https://discourse.processing.org/u/Laurent)\
**Replies:** 2\
**Last updated:** [May 25, 2019, 4:51pm UTC](https://discourse.processing.org/t/play-p5-js-not-an-importable-libraries-in-processing-ide/11538 "2019-05-25T16:51:04Z")

</div>

Hi everyone, Does anyone know why the Play p5.js (http://molleindustria.github.io/p5.play/) is not avalaible from the ‘Import libraries’ command of Procesing IDE, while there are many others? Is it “safe” to use it or d…

---

## [Get data from ultrasonic sensor hc-sr04 on Raspberry Pi](https://discourse.processing.org/t/get-data-from-ultrasonic-sensor-hc-sr04-on-raspberry-pi/11478)

<div class="topic-metadata">

**Author:** [@petemanzel](https://discourse.processing.org/u/petemanzel)\
**Replies:** 1\
**Last updated:** [May 24, 2019, 2:12pm UTC](https://discourse.processing.org/t/get-data-from-ultrasonic-sensor-hc-sr04-on-raspberry-pi/11478 "2019-05-24T14:12:45Z")

</div>

Hello, i intend to visualize realtime sensor data from an ultrasonic sensor (hc-sr04) on an Raspberry Pi with p5.js. How can i read in the data? Thanks!

---

## [P5js Music Loop Crash](https://discourse.processing.org/t/p5js-music-loop-crash/11250)

<div class="topic-metadata">

**Author:** [@mcldad1901](https://discourse.processing.org/u/mcldad1901)\
**Replies:** 3\
**Last updated:** [May 15, 2019, 12:30pm UTC](https://discourse.processing.org/t/p5js-music-loop-crash/11250 "2019-05-15T12:30:43Z")

</div>

So, I have just start JS this year for my uni course (diploma), we have been tasked to build a simple game that includes arrays, images, sound, objects, etc. That is why the code may be all over the place, as we must inc…

---

## [P5js save() to input field?](https://discourse.processing.org/t/p5js-save-to-input-field/11243)

<div class="topic-metadata">

**Author:** [@Gollink](https://discourse.processing.org/u/Gollink)\
**Replies:** 6\
**Last updated:** [May 15, 2019, 6:29am UTC](https://discourse.processing.org/t/p5js-save-to-input-field/11243 "2019-05-15T06:29:05Z")

</div>

I’m experimenting and learning about p5js for a new project I’m about to start. I got quite some processing experience but very little p5js experience. What I’m trying to do is make a SVG with p5.svg.js and trying to edi…

---

## [Collision detection doesn't work when using translate() and rotate() - p5.collide2d](https://discourse.processing.org/t/collision-detection-doesnt-work-when-using-translate-and-rotate-p5-collide2d/11116)

<div class="topic-metadata">

**Author:** [@feelthemall](https://discourse.processing.org/u/feelthemall)\
**Replies:** 3\
**Last updated:** [May 12, 2019, 10:37am UTC](https://discourse.processing.org/t/collision-detection-doesnt-work-when-using-translate-and-rotate-p5-collide2d/11116 "2019-05-12T10:37:55Z")

</div>

So I’m using the p5.collide2d library here, but the problem is still the same when I use something like: if ((mouseX \> x) && (mouseX \< x+w) && (mouseY \> y) && (mouseY \< y+h)) {} When I use translate() and rotate() t…

---

## [Pushing To Array adds an ID to the object?](https://discourse.processing.org/t/pushing-to-array-adds-an-id-to-the-object/11037)

<div class="topic-metadata">

**Author:** [@peachman](https://discourse.processing.org/u/peachman)\
**Replies:** 3\
**Last updated:** [May 8, 2019, 9:41pm UTC](https://discourse.processing.org/t/pushing-to-array-adds-an-id-to-the-object/11037 "2019-05-08T21:41:38Z")

</div>

HI, Confusing one here, really not sure whats happening. As you can see below, i am only creating a from entry and a to entry in the object. var edgesToLoad = \[\]; for (var j = 0; j \< dataArr.length; j++) { edge …

---

## [Working with html/css and p5.js](https://discourse.processing.org/t/working-with-html-css-and-p5-js/10970)

<div class="topic-metadata">

**Author:** [@Indieminor](https://discourse.processing.org/u/Indieminor)\
**Replies:** 4\
**Last updated:** [May 7, 2019, 10:24pm UTC](https://discourse.processing.org/t/working-with-html-css-and-p5-js/10970 "2019-05-07T22:24:13Z")

</div>

Hey all, So I’ve built my first app with p5.js, yippeee! It’s a simple music visualizer that I plan on building more on later. For now though, I would love to have instructions on my site that tell the user what to do. M…

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

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