# Libraries

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

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

**Page:** 4

---

## [Which face is which? Persistence faces tracking](https://discourse.processing.org/t/which-face-is-which-persistence-faces-tracking/38282)

<div class="topic-metadata">

**Author:** [@AndreasRef](https://discourse.processing.org/u/AndreasRef)\
**Replies:** 0\
**Last updated:** [August 9, 2022, 2:29pm UTC](https://discourse.processing.org/t/which-face-is-which-persistence-faces-tracking/38282 "2022-08-09T14:29:18Z")

</div>

Hi! I have this p5js sketch that uses tensorflow Blazeface to track faces. I was wondering how I would go about keeping track of multiple faces for an interactive installation I am doing? Kinda like Face-It/FaceDetec…

---

## [Fourier image analysis in P5](https://discourse.processing.org/t/fourier-image-analysis-in-p5/38121)

<div class="topic-metadata">

**Author:** [@scannerlicker](https://discourse.processing.org/u/scannerlicker)\
**Replies:** 0\
**Last updated:** [July 27, 2022, 4:10pm UTC](https://discourse.processing.org/t/fourier-image-analysis-in-p5/38121 "2022-07-27T16:10:39Z")

</div>

Hello everyone! I’ve been trying to make a little diffraction simulator and I’m struggling with finding 2D FFT and IFFT libraries to work along with P5. The program I’m trying to do should do the following: Get a FFT…

---

## [I want to set the background as the canvas](https://discourse.processing.org/t/i-want-to-set-the-background-as-the-canvas/26154)

<div class="topic-metadata">

**Author:** [@bi3her](https://discourse.processing.org/u/bi3her)\
**Replies:** 2\
**Last updated:** [July 19, 2022, 1:56pm UTC](https://discourse.processing.org/t/i-want-to-set-the-background-as-the-canvas/26154 "2022-07-19T13:56:38Z")

</div>

I’m working on a small project website where clients draw something and then they can click a button to send the canvas to the server, and then the server sends it back to other clients and the canvas image is set as th…

---

## [How can I see additive filter frequency with two LFOs?](https://discourse.processing.org/t/how-can-i-see-additive-filter-frequency-with-two-lfos/37895)

<div class="topic-metadata">

**Author:** [@exactspace](https://discourse.processing.org/u/exactspace)\
**Replies:** 9\
**Last updated:** [July 15, 2022, 7:03pm UTC](https://discourse.processing.org/t/how-can-i-see-additive-filter-frequency-with-two-lfos/37895 "2022-07-15T19:03:35Z")

</div>

please format code with \</\> button \* homework policy \* asking questions I have two LFOs (which are oscillators) running at 2.9 and 3.9 for their frequencies, set to 1500, and 1600 for their amplitude, and I’m setting…

---

## [P5js and ZeroTier (or Hamachi)](https://discourse.processing.org/t/p5js-and-zerotier-or-hamachi/37916)

<div class="topic-metadata">

**Author:** [@patricio1979](https://discourse.processing.org/u/patricio1979)\
**Replies:** 2\
**Last updated:** [July 11, 2022, 12:46pm UTC](https://discourse.processing.org/t/p5js-and-zerotier-or-hamachi/37916 "2022-07-11T12:46:51Z")

</div>

Is there a way to send OSC data or even messages from P5js through ZeroTier or Hamachi. Tryed P5js sketch with oscBrowser.js but it gives me SecurityError: Failed to construct 'WebSocket': An insecure WebSocket conne…

---

## [Keep p5.serial port open while mac screen is closed](https://discourse.processing.org/t/keep-p5-serial-port-open-while-mac-screen-is-closed/37892)

<div class="topic-metadata">

**Author:** [@joe\_processing](https://discourse.processing.org/u/joe_processing)\
**Replies:** 0\
**Last updated:** [July 9, 2022, 3:59pm UTC](https://discourse.processing.org/t/keep-p5-serial-port-open-while-mac-screen-is-closed/37892 "2022-07-09T15:59:08Z")

</div>

Hi guys, I attached an Arduino to P5 SERIAL CONTROL. I want to keep the port open while my mac is closed (For an exhibition I’m having). I tried to change the preferences of the Mac battery so it will continue to work…

---

## [Hover effect triangle](https://discourse.processing.org/t/hover-effect-triangle/37873)

<div class="topic-metadata">

**Author:** [@caleidolex](https://discourse.processing.org/u/caleidolex)\
**Replies:** 4\
**Last updated:** [July 9, 2022, 11:35am UTC](https://discourse.processing.org/t/hover-effect-triangle/37873 "2022-07-09T11:35:30Z")

</div>

Hey everyone, i started arround 1 month ago with programming and loving p5js. Right now I have a problem I can’t figure out to implement into my code. I want to have a hover effect on a triangle. I did this with the col…

---

## [Amplitude of oscillator using slider in p5.js](https://discourse.processing.org/t/amplitude-of-oscillator-using-slider-in-p5-js/37817)

<div class="topic-metadata">

**Author:** [@processing\_user](https://discourse.processing.org/u/processing_user)\
**Replies:** 7\
**Last updated:** [July 5, 2022, 5:33pm UTC](https://discourse.processing.org/t/amplitude-of-oscillator-using-slider-in-p5-js/37817 "2022-07-05T17:33:14Z")

</div>

i am following the tutorial https://www.youtube.com/watch?v=Bk8rLzzSink where frequency is changed using slider. how can i change the amplitude using slider in the same manner? i tried the following: function draw() { …

---

## [Microphone usage browser popup stops working](https://discourse.processing.org/t/microphone-usage-browser-popup-stops-working/37808)

<div class="topic-metadata">

**Author:** [@processing\_user](https://discourse.processing.org/u/processing_user)\
**Replies:** 3\
**Last updated:** [July 3, 2022, 2:14pm UTC](https://discourse.processing.org/t/microphone-usage-browser-popup-stops-working/37808 "2022-07-03T14:14:06Z")

</div>

I am using the microphone example here examples | p5.js and it works only but just for the first time. after page refresh the browser stops asking for microphone usage the program stops working. how can i re-enable the …

---

## [Sketch using p5-wrapper-react not receiving props on route change but is receiving them on page refresh, reload](https://discourse.processing.org/t/sketch-using-p5-wrapper-react-not-receiving-props-on-route-change-but-is-receiving-them-on-page-refresh-reload/37797)

<div class="topic-metadata">

**Author:** [@hifilorau](https://discourse.processing.org/u/hifilorau)\
**Replies:** 0\
**Last updated:** [July 2, 2022, 4:01pm UTC](https://discourse.processing.org/t/sketch-using-p5-wrapper-react-not-receiving-props-on-route-change-but-is-receiving-them-on-page-refresh-reload/37797 "2022-07-02T16:01:11Z")

</div>

Am facing an interesting challenge here. Have a somewhat straightforward architecture where i am passing props into my sketch via: p5.updateWithProps = props =\> { if (props.isLoading) { isLoading = props…

---

## [How to make p5.speech work in electron application for speech to text?](https://discourse.processing.org/t/how-to-make-p5-speech-work-in-electron-application-for-speech-to-text/37739)

<div class="topic-metadata">

**Author:** [@alokmahor](https://discourse.processing.org/u/alokmahor)\
**Replies:** 1\
**Last updated:** [June 27, 2022, 9:33pm UTC](https://discourse.processing.org/t/how-to-make-p5-speech-work-in-electron-application-for-speech-to-text/37739 "2022-06-27T21:33:10Z")

</div>

I have created a smaple electron application to try p5.speech. But that is not working and I am not seeing any error in console. Index.html \<!DOCTYPE html\> \<html\> \<head\> \<meta charset="UTF-8"\> \<title\>Hello p5…

---

## [Using API with node.js and p5](https://discourse.processing.org/t/using-api-with-node-js-and-p5/37410)

<div class="topic-metadata">

**Author:** [@Omri](https://discourse.processing.org/u/Omri)\
**Replies:** 3\
**Last updated:** [June 10, 2022, 11:42am UTC](https://discourse.processing.org/t/using-api-with-node-js-and-p5/37410 "2022-06-10T11:42:36Z")

</div>

hey, there is a website I’d like to use his API in a P5 sketch I’m doing. The API looks like that: const { Configuration, OpenAIApi } = require("openai"); const configuration = new Configuration({ apiKey: process.en…

---

## [How do I play sound smoothly while also running Perlin Flow Field?](https://discourse.processing.org/t/how-do-i-play-sound-smoothly-while-also-running-perlin-flow-field/36657)

<div class="topic-metadata">

**Author:** [@JessJess](https://discourse.processing.org/u/JessJess)\
**Replies:** 9\
**Last updated:** [June 3, 2022, 6:31pm UTC](https://discourse.processing.org/t/how-do-i-play-sound-smoothly-while-also-running-perlin-flow-field/36657 "2022-06-03T18:31:12Z")

</div>

The background sound I used works perfectly fine before I added the code for Perlin Flow Field but now that both sound and Perlin Flow Field code works, the sound that comes out is lagging and distorted, is there any way…

---

## [Synth and .mp3 notes play twice on Android-nowhere else](https://discourse.processing.org/t/synth-and-mp3-notes-play-twice-on-android-nowhere-else/37214)

<div class="topic-metadata">

**Author:** [@HFredrickson](https://discourse.processing.org/u/HFredrickson)\
**Replies:** 0\
**Last updated:** [May 29, 2022, 10:23pm UTC](https://discourse.processing.org/t/synth-and-mp3-notes-play-twice-on-android-nowhere-else/37214 "2022-05-29T22:23:55Z")

</div>

Does anyone know why-This code works fine on laptops, ipads, iphones but plays double (one repeat) notes on Android phone systems: \<!DOCTYPE html\>\<html lang="en"\> \<head\> \<script src="https://icanplaypiano.com…

---

## [Synthesizer and .mp3 notes play twice on Android-nowhere else (using P5.js)](https://discourse.processing.org/t/synthesizer-and-mp3-notes-play-twice-on-android-nowhere-else-using-p5-js/37216)

<div class="topic-metadata">

**Author:** [@HFredrickson](https://discourse.processing.org/u/HFredrickson)\
**Replies:** 0\
**Last updated:** [May 29, 2022, 11:10pm UTC](https://discourse.processing.org/t/synthesizer-and-mp3-notes-play-twice-on-android-nowhere-else-using-p5-js/37216 "2022-05-29T23:10:12Z")

</div>

Also asked on: https://stackoverflow.com/questions/72427862/synthesizer-and-mp3-notes-play-twice-on-android-nowhere-else https://icanplaypiano.com/ Synthesizer and .mp3 notes play twice on Android-nowhere else Doe…

---

## [GUI for controlling sketches from separate windows/places](https://discourse.processing.org/t/gui-for-controlling-sketches-from-separate-windows-places/37027)

<div class="topic-metadata">

**Author:** [@jaschanarveson](https://discourse.processing.org/u/jaschanarveson)\
**Replies:** 2\
**Last updated:** [May 27, 2022, 10:12am UTC](https://discourse.processing.org/t/gui-for-controlling-sketches-from-separate-windows-places/37027 "2022-05-27T10:12:01Z")

</div>

How do people run interactive full-screen p5js sketches while also being able to see controls? do people pipe OSC around? is there an easy way to create a second window so that you can have controls on one window and t…

---

## [Keyboard keypresses are ignored](https://discourse.processing.org/t/keyboard-keypresses-are-ignored/34781)

<div class="topic-metadata">

**Author:** [@tanzor](https://discourse.processing.org/u/tanzor)\
**Replies:** 5\
**Last updated:** [May 24, 2022, 7:10am UTC](https://discourse.processing.org/t/keyboard-keypresses-are-ignored/34781 "2022-05-24T07:10:05Z")

</div>

Hello experts, I’m programming a psychology experiment using jsPsych and P5. Participants should see a stimulus on the screen, make a decision, press a button, and get feedback on the accuracy of their response before m…

---

## [P5 library - YOLO / Web works well, but does not work in p5](https://discourse.processing.org/t/p5-library-yolo-web-works-well-but-does-not-work-in-p5/36790)

<div class="topic-metadata">

**Author:** [@GWAK](https://discourse.processing.org/u/GWAK)\
**Replies:** 2\
**Last updated:** [May 10, 2022, 6:35am UTC](https://discourse.processing.org/t/p5-library-yolo-web-works-well-but-does-not-work-in-p5/36790 "2022-05-10T06:35:39Z")

</div>

\[p5 library - YOLO / Web works well, but does not work in p5.\] hello. Source code running on the web https://editor.p5js.org/ml5/sketches/ObjectDetector\_YOLO\_single\_image It works fine. If you copy the WEB source…

---

## [Problem with TensorFlow load model](https://discourse.processing.org/t/problem-with-tensorflow-load-model/36390)

<div class="topic-metadata">

**Author:** [@Omri](https://discourse.processing.org/u/Omri)\
**Replies:** 4\
**Last updated:** [April 17, 2022, 7:32pm UTC](https://discourse.processing.org/t/problem-with-tensorflow-load-model/36390 "2022-04-17T19:32:25Z")

</div>

Hey, first time I’m using TensorFlow.js and I got a problem: I trained a model and saved it on my computer (2 files: JSON and bin). Now I want to load it on another sketch, but I got this error that it like didn’t load…

---

## [P5js open MIDI file](https://discourse.processing.org/t/p5js-open-midi-file/36259)

<div class="topic-metadata">

**Author:** [@patricio1979](https://discourse.processing.org/u/patricio1979)\
**Replies:** 4\
**Last updated:** [April 10, 2022, 11:44pm UTC](https://discourse.processing.org/t/p5js-open-midi-file/36259 "2022-04-10T23:44:24Z")

</div>

Is there a way to open MIDI files in P5js? I’ve found a library but is written in typescript Tonejs Also, is there a way to integrate that typescript library with P5js?

---

## [Audio glitching issue with sound lib - any fix in sight?](https://discourse.processing.org/t/audio-glitching-issue-with-sound-lib-any-fix-in-sight/34446)

<div class="topic-metadata">

**Author:** [@moutcast](https://discourse.processing.org/u/moutcast)\
**Replies:** 1\
**Last updated:** [April 8, 2022, 12:51pm UTC](https://discourse.processing.org/t/audio-glitching-issue-with-sound-lib-any-fix-in-sight/34446 "2022-04-08T12:51:30Z")

</div>

hi, i was interested to use p5js to bring my sound exeriments from the analog synth world and from other digital platforms to the browser based world. but there is this audio glitching issue that i and appaerently others…

---

## [Firebase in P5JS](https://discourse.processing.org/t/firebase-in-p5js/36080)

<div class="topic-metadata">

**Author:** [@Omri](https://discourse.processing.org/u/Omri)\
**Replies:** 0\
**Last updated:** [April 2, 2022, 3:44pm UTC](https://discourse.processing.org/t/firebase-in-p5js/36080 "2022-04-02T15:44:10Z")

</div>

Hey there, I want to use firebase in my project and I follow Shiffman’s project to do so, but I think the firebase configuration has changed… in Shiffman’s HTML he wrote: \<script src="https://www.gstatic.com/firebasej…

---

## [Easy use recording library 🎉](https://discourse.processing.org/t/easy-use-recording-library/35960)

<div class="topic-metadata">

**Author:** [@rux](https://discourse.processing.org/u/rux)\
**Replies:** 0\
**Last updated:** [March 27, 2022, 5:45am UTC](https://discourse.processing.org/t/easy-use-recording-library/35960 "2022-03-27T05:45:30Z")

</div>

Hi everyone! I’ve found a great library of recording p5.js work, and I’d like to share it with you here! :point\_down: Check out the demo: Demo on p5.js Web Editor Demo on OpenProcessing Demo on CodePen It is ca…

---

## [Instance mode : accessing \`p5\` functions in an external class](https://discourse.processing.org/t/instance-mode-accessing-p5-functions-in-an-external-class/35875)

<div class="topic-metadata">

**Author:** [@sylcha](https://discourse.processing.org/u/sylcha)\
**Replies:** 6\
**Last updated:** [March 21, 2022, 1:02pm UTC](https://discourse.processing.org/t/instance-mode-accessing-p5-functions-in-an-external-class/35875 "2022-03-21T13:02:02Z")

</div>

Hi everyone ! I’m using p5.js in a project (code here). I have to use p5.js in instance mode and attach the p5 object to the canvas which is just working fine so far. Now I would like to create a class in a separate fo…

---

## [If you don't talk for a while, speech recognition will not work](https://discourse.processing.org/t/if-you-dont-talk-for-a-while-speech-recognition-will-not-work/6432)

<div class="topic-metadata">

**Author:** [@SL7080](https://discourse.processing.org/u/SL7080)\
**Replies:** 1\
**Last updated:** [March 20, 2022, 1:24pm UTC](https://discourse.processing.org/t/if-you-dont-talk-for-a-while-speech-recognition-will-not-work/6432 "2022-03-20T13:24:25Z")

</div>

I use p5.speech library to do continuous recognition in my project. The problem is the recognition will not work if I don’t talk for a while. How could I active it again?

---

## [P5.js sound and keyTyped() or keyPressed()](https://discourse.processing.org/t/p5-js-sound-and-keytyped-or-keypressed/35583)

<div class="topic-metadata">

**Author:** [@JessJess](https://discourse.processing.org/u/JessJess)\
**Replies:** 25\
**Last updated:** [March 6, 2022, 10:31pm UTC](https://discourse.processing.org/t/p5-js-sound-and-keytyped-or-keypressed/35583 "2022-03-06T22:31:29Z")

</div>

hi! i’m trying to write a code where when i press a certain keyboard key, a sound will play. I’m using p5.js and have tried keyTyped() function and keyPressed() function but it’s not working. Need help as soon as possibl…

---

## [Web Audio doesn't work on iPhone's Safari and Chrome](https://discourse.processing.org/t/web-audio-doesnt-work-on-iphones-safari-and-chrome/35596)

<div class="topic-metadata">

**Author:** [@teemee](https://discourse.processing.org/u/teemee)\
**Replies:** 0\
**Last updated:** [March 6, 2022, 5:20pm UTC](https://discourse.processing.org/t/web-audio-doesnt-work-on-iphones-safari-and-chrome/35596 "2022-03-06T17:20:14Z")

</div>

I have made a website that plays audio after a user does the mousePressed(). The site works fine on all the platforms like, desktop Internet browser and Android’s browser but, not in iPhone’s Safari and Chrome. My audio …

---

## [Accessing \`p5.js\` instance from Vue file](https://discourse.processing.org/t/accessing-p5-js-instance-from-vue-file/35537)

<div class="topic-metadata">

**Author:** [@sylcha](https://discourse.processing.org/u/sylcha)\
**Replies:** 5\
**Last updated:** [March 5, 2022, 10:00am UTC](https://discourse.processing.org/t/accessing-p5-js-instance-from-vue-file/35537 "2022-03-05T10:00:24Z")

</div>

Hi everyone, I’m currently working on an app involving Quasar framework (which works in top of Vue) and p5.js. I have a vue where I want to insert a sketch (please, have a look to the code below). Following these recomm…

---

## [Create colored circle based on midi note](https://discourse.processing.org/t/create-colored-circle-based-on-midi-note/35079)

<div class="topic-metadata">

**Author:** [@AMax](https://discourse.processing.org/u/AMax)\
**Replies:** 6\
**Last updated:** [March 3, 2022, 3:04pm UTC](https://discourse.processing.org/t/create-colored-circle-based-on-midi-note/35079 "2022-03-03T15:04:53Z")

</div>

I’m trying to create code that will let me input a musical note (via midi) and have a corresponding small circle appear that has an assigned color value. The circles will appear next to one another in succession, so that…

---

## ["no content type found for .mp3" error](https://discourse.processing.org/t/no-content-type-found-for-mp3-error/35343)

<div class="topic-metadata">

**Author:** [@heurihermilab](https://discourse.processing.org/u/heurihermilab)\
**Replies:** 11\
**Last updated:** [February 24, 2022, 9:36pm UTC](https://discourse.processing.org/t/no-content-type-found-for-mp3-error/35343 "2022-02-24T21:36:00Z")

</div>

Howdy all, I’m trying to work with the example at reference | p5.js but clicking on the canvas to start/pause the audio inexplicably only works once for each state the sketch only executes once, thereafter failing…

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

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