# Libraries

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

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

**Page:** 9

---

## [Using p5.js on a jetson nano](https://discourse.processing.org/t/using-p5-js-on-a-jetson-nano/27511)

<div class="topic-metadata">

**Author:** [@skypickle](https://discourse.processing.org/u/skypickle)\
**Replies:** 0\
**Last updated:** [January 31, 2021, 9:31pm UTC](https://discourse.processing.org/t/using-p5-js-on-a-jetson-nano/27511 "2021-01-31T21:31:09Z")

</div>

P5js is a javascript library that enables media presentation, interactive drawing as well as user input in an area of a web page defined as the CANVAS. https://p5js.org/ I’ve gotten it to work with the jetson nano sinc…

---

## [Library import won´t work](https://discourse.processing.org/t/library-import-won-t-work/27364)

<div class="topic-metadata">

**Author:** [@myCatIsAwesome](https://discourse.processing.org/u/myCatIsAwesome)\
**Replies:** 2\
**Last updated:** [January 25, 2021, 7:47pm UTC](https://discourse.processing.org/t/library-import-won-t-work/27364 "2021-01-25T19:47:17Z")

</div>

Hello I am pretty new to coding and very new to processing/p5. I have the simple problem that if I want to include a library in my p5 project it just won´t work. In the web editor I made it work though by simply includ…

---

## [decodeAudioData' of undefined](https://discourse.processing.org/t/decodeaudiodata-of-undefined/27340)

<div class="topic-metadata">

**Author:** [@kokosic](https://discourse.processing.org/u/kokosic)\
**Replies:** 0\
**Last updated:** [January 24, 2021, 5:39pm UTC](https://discourse.processing.org/t/decodeaudiodata-of-undefined/27340 "2021-01-24T17:39:58Z")

</div>

Hi, I was trying to rewrite some code and then I started getting an error Uncaught TypeError: Cannot read property 'decodeAudioData' of undefined at FileReader.reader.onload (lvl.js:131) on this line this.conte…

---

## [Play music - Clicking in objects](https://discourse.processing.org/t/play-music-clicking-in-objects/27339)

<div class="topic-metadata">

**Author:** [@leobarros](https://discourse.processing.org/u/leobarros)\
**Replies:** 0\
**Last updated:** [January 24, 2021, 4:57pm UTC](https://discourse.processing.org/t/play-music-clicking-in-objects/27339 "2021-01-24T16:57:54Z")

</div>

please format code with \</\> button \* homework policy \* asking questions Hello guys. I am trying to make a specific mp3 file plays when a specific circle is clicked. I have a class named as Balls. Can someone help m…

---

## [Website sometimes unable to load. Preload() sound file issue](https://discourse.processing.org/t/website-sometimes-unable-to-load-preload-sound-file-issue/27324)

<div class="topic-metadata">

**Author:** [@nsegal](https://discourse.processing.org/u/nsegal)\
**Replies:** 0\
**Last updated:** [January 24, 2021, 2:18am UTC](https://discourse.processing.org/t/website-sometimes-unable-to-load-preload-sound-file-issue/27324 "2021-01-24T02:18:29Z")

</div>

I’ve made a website with a sketch that utilizes the preload() function to load a sound file. When one visits the website for the first time, it gets stuck loading. If you open the console through developer tools you see …

---

## [How to use ml5js + face-api to do face recognition?](https://discourse.processing.org/t/how-to-use-ml5js-face-api-to-do-face-recognition/26985)

<div class="topic-metadata">

**Author:** [@stephanschulz](https://discourse.processing.org/u/stephanschulz)\
**Replies:** 0\
**Last updated:** [January 11, 2021, 7:48pm UTC](https://discourse.processing.org/t/how-to-use-ml5js-face-api-to-do-face-recognition/26985 "2021-01-11T19:48:33Z")

</div>

Hello. I know ml5js gives access to faceapi as this example shows: https://learn.ml5js.org/#/reference/face-api But this shows you how to use face detection - knowing if and where a face is. I am hoping to also do the…

---

## [Updating drawing with codemirror contents](https://discourse.processing.org/t/updating-drawing-with-codemirror-contents/26695)

<div class="topic-metadata">

**Author:** [@kutal](https://discourse.processing.org/u/kutal)\
**Replies:** 1\
**Last updated:** [January 3, 2021, 4:00pm UTC](https://discourse.processing.org/t/updating-drawing-with-codemirror-contents/26695 "2021-01-03T16:00:47Z")

</div>

Hi all, Problem statement I am struggling to understand how to pass the contents of a codemirror editor (when it’s updated manually on screen, by deleting or add new code) to a p5.js instance, on a button click. In ot…

---

## [Filter allow only a specific range of frequency to pass through](https://discourse.processing.org/t/filter-allow-only-a-specific-range-of-frequency-to-pass-through/26623)

<div class="topic-metadata">

**Author:** [@wonderhope](https://discourse.processing.org/u/wonderhope)\
**Replies:** 5\
**Last updated:** [December 30, 2020, 11:23pm UTC](https://discourse.processing.org/t/filter-allow-only-a-specific-range-of-frequency-to-pass-through/26623 "2020-12-30T23:23:56Z")

</div>

how can i filter a song and allow only a specific range of frequency to pass through? Cuz when i use bandpass filter, it only allows me to input one frequency instead of a range(i.e. one lower frequency and one higher fr…

---

## [Asteroid game errors](https://discourse.processing.org/t/asteroid-game-errors/26478)

<div class="topic-metadata">

**Author:** [@gmoangher](https://discourse.processing.org/u/gmoangher)\
**Replies:** 1\
**Last updated:** [December 28, 2020, 10:27am UTC](https://discourse.processing.org/t/asteroid-game-errors/26478 "2020-12-28T10:27:21Z")

</div>

I got weird error messages on my code. I’m trying to make an asteroid game prototype, and most of the time when I shoot an asteroid it gives me a message that shouldn’t be there. I’ve tried debugging multiple times. My c…

---

## [Use an existing canvas with p5js](https://discourse.processing.org/t/use-an-existing-canvas-with-p5js/26113)

<div class="topic-metadata">

**Author:** [@niko](https://discourse.processing.org/u/niko)\
**Replies:** 5\
**Last updated:** [December 27, 2020, 10:48am UTC](https://discourse.processing.org/t/use-an-existing-canvas-with-p5js/26113 "2020-12-27T10:48:51Z")

</div>

Hi, I would like to use an existing canvas with p5js. It seems not possible in a simple way. The reason I want to do that is: I don’t want p5js to insert a canvas and make my already displayed page to suddenly extend. …

---

## [React and P5 problem with loadSound and loadImage](https://discourse.processing.org/t/react-and-p5-problem-with-loadsound-and-loadimage/26440)

<div class="topic-metadata">

**Author:** [@teemee](https://discourse.processing.org/u/teemee)\
**Replies:** 1\
**Last updated:** [December 22, 2020, 3:34pm UTC](https://discourse.processing.org/t/react-and-p5-problem-with-loadsound-and-loadimage/26440 "2020-12-22T15:34:23Z")

</div>

I’m new to React and Node.js and I have a problem using it with P5.js. I have successfully made this project with p5.js and tone.js but the project involved some sensitive data that I want to hide from the public, such a…

---

## [Wondering if anyone would wanna pair up to help?](https://discourse.processing.org/t/wondering-if-anyone-would-wanna-pair-up-to-help/26360)

<div class="topic-metadata">

**Author:** [@Duckablo](https://discourse.processing.org/u/Duckablo)\
**Replies:** 2\
**Last updated:** [December 18, 2020, 9:56am UTC](https://discourse.processing.org/t/wondering-if-anyone-would-wanna-pair-up-to-help/26360 "2020-12-18T09:56:42Z")

</div>

I’ve just go into coding and wrestled myself on a language to start with. I finally decided JavaScript because p5.js is looks so fun and very nice to learn. I have this idea for visualization for music and it seems sorta…

---

## [Create playlist with p5js](https://discourse.processing.org/t/create-playlist-with-p5js/26235)

<div class="topic-metadata">

**Author:** [@ari01](https://discourse.processing.org/u/ari01)\
**Replies:** 1\
**Last updated:** [December 15, 2020, 2:02am UTC](https://discourse.processing.org/t/create-playlist-with-p5js/26235 "2020-12-15T02:02:52Z")

</div>

Hello! Can someone guide me on creating a music player with p5js? this is the code I have so far: var files = \[ ‘7rings.mp3’, ‘antisocial.mp3’, ‘badguy.mp3’, ‘badguyjb.mp3’, ‘beautifulpeople.mp3’, ‘boyfriend.mp3’, ‘cr…

---

## [P5.js and FMOD integration](https://discourse.processing.org/t/p5-js-and-fmod-integration/22200)

<div class="topic-metadata">

**Author:** [@spencerbambrick](https://discourse.processing.org/u/spencerbambrick)\
**Replies:** 3\
**Last updated:** [December 14, 2020, 2:02pm UTC](https://discourse.processing.org/t/p5-js-and-fmod-integration/22200 "2020-12-14T14:02:46Z")

</div>

I’m curious if anyone here has successfully used the audio middleware FMOD for a project made in P5.js. It seems it’s compatible but is a bit beyond my understanding of how to execute: https://fmod.com/resources/documen…

---

## [How can I get sound data?](https://discourse.processing.org/t/how-can-i-get-sound-data/26160)

<div class="topic-metadata">

**Author:** [@kokosic](https://discourse.processing.org/u/kokosic)\
**Replies:** 1\
**Last updated:** [December 13, 2020, 8:55am UTC](https://discourse.processing.org/t/how-can-i-get-sound-data/26160 "2020-12-13T08:55:20Z")

</div>

I have this library and this code var context = new AudioContext(); var fileInput = document.getElementById("fileInput"); fileInput.onchange = function () { var files = fileInput.files; if (files.length == 0) ret…

---

## [P5js: play a song when selecting an item from a dropdown list](https://discourse.processing.org/t/p5js-play-a-song-when-selecting-an-item-from-a-dropdown-list/26152)

<div class="topic-metadata">

**Author:** [@ari01](https://discourse.processing.org/u/ari01)\
**Replies:** 0\
**Last updated:** [December 12, 2020, 6:11am UTC](https://discourse.processing.org/t/p5js-play-a-song-when-selecting-an-item-from-a-dropdown-list/26152 "2020-12-12T06:11:09Z")

</div>

Hello! I want to use p5js to play songs when I select an item from a dropdown list. When an item is selected it should play a song allocated to it. And, also, the song needs to start playing after reCaptcha verification…

---

## [How can I get bpm from an audio file using p5.js?](https://discourse.processing.org/t/how-can-i-get-bpm-from-an-audio-file-using-p5-js/26121)

<div class="topic-metadata">

**Author:** [@kokosic](https://discourse.processing.org/u/kokosic)\
**Replies:** 2\
**Last updated:** [December 12, 2020, 3:12am UTC](https://discourse.processing.org/t/how-can-i-get-bpm-from-an-audio-file-using-p5-js/26121 "2020-12-12T03:12:16Z")

</div>

Hello everybody! How can I get bpm from an audio file using p5.js? I have not been able to figure out all this

---

## [How to get full text tweets with the codebird?](https://discourse.processing.org/t/how-to-get-full-text-tweets-with-the-codebird/26086)

<div class="topic-metadata">

**Author:** [@kokopo](https://discourse.processing.org/u/kokopo)\
**Replies:** 1\
**Last updated:** [December 12, 2020, 12:23am UTC](https://discourse.processing.org/t/how-to-get-full-text-tweets-with-the-codebird/26086 "2020-12-12T00:23:46Z")

</div>

I want to use a twitter api to search tweets in P5, and came across this codebird api but the tweets returned are truncated, is there a way to get full text? Thank you :slight\_smile:

---

## [P5js and database](https://discourse.processing.org/t/p5js-and-database/26088)

<div class="topic-metadata">

**Author:** [@ari01](https://discourse.processing.org/u/ari01)\
**Replies:** 2\
**Last updated:** [December 11, 2020, 3:24pm UTC](https://discourse.processing.org/t/p5js-and-database/26088 "2020-12-11T15:24:00Z")

</div>

Hello! I am new to p5js and I would like to make a creative project using it but I do not know how… I created a MySQL database and I would like its content to be displayed in ‘bubbles’ using the bubbles p5js library. Thi…

---

## [How to use Sound in P5.js Instance Mode](https://discourse.processing.org/t/how-to-use-sound-in-p5-js-instance-mode/25999)

<div class="topic-metadata">

**Author:** [@jgsantos](https://discourse.processing.org/u/jgsantos)\
**Replies:** 3\
**Last updated:** [December 6, 2020, 7:54pm UTC](https://discourse.processing.org/t/how-to-use-sound-in-p5-js-instance-mode/25999 "2020-12-06T19:54:05Z")

</div>

Hi! I’m trying to make a website with multiple p5 canvases on the same page, so, after a lot of research, I came to the conclusion that the most adequate way to do that is by using instance mode. I spent the whole day tr…

---

## [P5.js highPass is not working as expected](https://discourse.processing.org/t/p5-js-highpass-is-not-working-as-expected/25950)

<div class="topic-metadata">

**Author:** [@exactspace](https://discourse.processing.org/u/exactspace)\
**Replies:** 0\
**Last updated:** [December 4, 2020, 6:46pm UTC](https://discourse.processing.org/t/p5-js-highpass-is-not-working-as-expected/25950 "2020-12-04T18:46:53Z")

</div>

I thought highPass would only let frequencies pass above a set frequency. For example, if I have a tone at 1000 Hz, and I set the high pass 18000, I still hear frequencies well below 18000 Hz. It changes the sound overa…

---

## [P5 node server with socket.io and websocket protocoll](https://discourse.processing.org/t/p5-node-server-with-socket-io-and-websocket-protocoll/25871)

<div class="topic-metadata">

**Author:** [@Theo68](https://discourse.processing.org/u/Theo68)\
**Replies:** 0\
**Last updated:** [December 1, 2020, 6:48pm UTC](https://discourse.processing.org/t/p5-node-server-with-socket-io-and-websocket-protocoll/25871 "2020-12-01T18:48:12Z")

</div>

I have created a P5 server node with socket.io. at locahost: 4000. I can also connect to it from the wifi network of my devices ( laptop, mobile). Can I integrate websocket protocol for communication with esp32 device i…

---

## [Live Input from Multiple Computers?](https://discourse.processing.org/t/live-input-from-multiple-computers/24110)

<div class="topic-metadata">

**Author:** [@alsumwas](https://discourse.processing.org/u/alsumwas)\
**Replies:** 2\
**Last updated:** [December 1, 2020, 3:23am UTC](https://discourse.processing.org/t/live-input-from-multiple-computers/24110 "2020-12-01T03:23:16Z")

</div>

I am wondering if it is possible to have mic input from multiple users at the same time? Also is there an official name for the thing that I am trying to do? Here is a little sketch that I made from some examples on th…

---

## [How to get a P5 image into the DOM?](https://discourse.processing.org/t/how-to-get-a-p5-image-into-the-dom/25726)

<div class="topic-metadata">

**Author:** [@zenglenn](https://discourse.processing.org/u/zenglenn)\
**Replies:** 9\
**Last updated:** [November 28, 2020, 7:08am UTC](https://discourse.processing.org/t/how-to-get-a-p5-image-into-the-dom/25726 "2020-11-28T07:08:07Z")

</div>

Hi I want to get an internally created image file (not loaded or from a url) into the DOM. I’m sure it’s really simple, but have no idea, thanks.

---

## [processPeaks() not returning in p5.Sound](https://discourse.processing.org/t/processpeaks-not-returning-in-p5-sound/25649)

<div class="topic-metadata">

**Author:** [@koopakondra](https://discourse.processing.org/u/koopakondra)\
**Replies:** 0\
**Last updated:** [November 23, 2020, 11:38pm UTC](https://discourse.processing.org/t/processpeaks-not-returning-in-p5-sound/25649 "2020-11-23T23:38:15Z")

</div>

I’m trying to get the processPeaks() method in the Sound library to return the Array it says it should in documentation. None of the examples provided in the p5 github/website work either. I’ve tried the sketches in both…

---

## [How I can create a physical line using material.js?](https://discourse.processing.org/t/how-i-can-create-a-physical-line-using-material-js/25623)

<div class="topic-metadata">

**Author:** [@kokosic](https://discourse.processing.org/u/kokosic)\
**Replies:** 1\
**Last updated:** [November 23, 2020, 7:11am UTC](https://discourse.processing.org/t/how-i-can-create-a-physical-line-using-material-js/25623 "2020-11-23T07:11:28Z")

</div>

I have a simple p5.js code and I need add collision using matter.js. One of the options is to draw rectangles instead of lines and then hang the necessary component on them, but I don’t know how to rotate and place these…

---

## [For loop doesn't load properly](https://discourse.processing.org/t/for-loop-doesnt-load-properly/25463)

<div class="topic-metadata">

**Author:** [@Gianni](https://discourse.processing.org/u/Gianni)\
**Replies:** 10\
**Last updated:** [November 16, 2020, 9:50pm UTC](https://discourse.processing.org/t/for-loop-doesnt-load-properly/25463 "2020-11-16T21:50:19Z")

</div>

Hello everyone! I’m working on a sketch that looks for collision between a grid of points and a random polygon. I’m trying to find a way to make sure the colliding points always match a chosen number. because the polyg…

---

## [Spacing out obstacles](https://discourse.processing.org/t/spacing-out-obstacles/25467)

<div class="topic-metadata">

**Author:** [@ninjarick](https://discourse.processing.org/u/ninjarick)\
**Replies:** 1\
**Last updated:** [November 16, 2020, 7:23pm UTC](https://discourse.processing.org/t/spacing-out-obstacles/25467 "2020-11-16T19:23:27Z")

</div>

I’ve hit another snag with my code. As of now, I have the obstacles moving towards the player at random with this code. // Spawn obstacles if (random(1) \< 0.01) { obstacle.push(new Obstacle()); } Though this c…

---

## [Tone.js embedded/presentation does not work in Chrome browser](https://discourse.processing.org/t/tone-js-embedded-presentation-does-not-work-in-chrome-browser/25046)

<div class="topic-metadata">

**Author:** [@cpt.credible](https://discourse.processing.org/u/cpt.credible)\
**Replies:** 5\
**Last updated:** [November 12, 2020, 11:24am UTC](https://discourse.processing.org/t/tone-js-embedded-presentation-does-not-work-in-chrome-browser/25046 "2020-11-12T11:24:20Z")

</div>

Hi, I am having trouble getting a sequencer to run when embedded on a site in Chrome. E.G. this sketch runs fine in the editor: but when you try to embed or run it in presentation mode on chrome, the play button stops…

---

## [Is it possible to preload sounds into an array with p5 sound?](https://discourse.processing.org/t/is-it-possible-to-preload-sounds-into-an-array-with-p5-sound/25306)

<div class="topic-metadata">

**Author:** [@egg\_yolk](https://discourse.processing.org/u/egg_yolk)\
**Replies:** 2\
**Last updated:** [November 9, 2020, 10:13pm UTC](https://discourse.processing.org/t/is-it-possible-to-preload-sounds-into-an-array-with-p5-sound/25306 "2020-11-09T22:13:35Z")

</div>

I am using p5.js in a rather unconventional way where having sounds in an array would help a lot. Is it possible to do something like, function preload(){ for(i = 0; i \< songLocations.length; i++){ p5SongList\[i\] = lo…

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

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