# Latest

**URL:** https://discourse.processing.org/latest.md?no_subcategories=false&page=189

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

**Page:** 190

---

## [Draw a waveform from an oscillator (e.g. SawOsc)](https://discourse.processing.org/t/draw-a-waveform-from-an-oscillator-e-g-sawosc/32525)

<div class="topic-metadata">

**Author:** [@matteo](https://discourse.processing.org/u/matteo)\
**Replies:** 2\
**Last updated:** [September 30, 2021, 4:01pm UTC](https://discourse.processing.org/t/draw-a-waveform-from-an-oscillator-e-g-sawosc/32525 "2021-09-30T16:01:02Z")

</div>

Hi, My goal is to create a sketch which displays the waveform of the sounds it’s generating. To make it easier, i would like that the example here: https://processing.org/reference/libraries/sound/SawOsc.html would al…

---

## [Need help to create this](https://discourse.processing.org/t/need-help-to-create-this/32482)

<div class="topic-metadata">

**Author:** [@patcantin](https://discourse.processing.org/u/patcantin)\
**Replies:** 2\
**Last updated:** [September 30, 2021, 1:59pm UTC](https://discourse.processing.org/t/need-help-to-create-this/32482 "2021-09-30T13:59:33Z")

</div>

Hi, Is anybody can guide me to do this kind of stuff?

---

## [Editable text in PDF](https://discourse.processing.org/t/editable-text-in-pdf/32526)

<div class="topic-metadata">

**Author:** [@clankill3r](https://discourse.processing.org/u/clankill3r)\
**Replies:** 0\
**Last updated:** [September 30, 2021, 1:28pm UTC](https://discourse.processing.org/t/editable-text-in-pdf/32526 "2021-09-30T13:28:55Z")

</div>

Some people might remember that in the days of Processing 1 you could export to PDF and edit the text in Illustrator. This has been broken down the road and has never been restored. Here is a small class that can export…

---

## [Performance issue between p5.js vs p5.min.js](https://discourse.processing.org/t/performance-issue-between-p5-js-vs-p5-min-js/32522)

<div class="topic-metadata">

**Author:** [@fabieninspiration](https://discourse.processing.org/u/fabieninspiration)\
**Replies:** 1\
**Last updated:** [September 30, 2021, 12:08pm UTC](https://discourse.processing.org/t/performance-issue-between-p5-js-vs-p5-min-js/32522 "2021-09-30T12:08:11Z")

</div>

Hi team! I am playing with P5.js since 2 weeks! I love it! I’ve just turned around many hours to understand why i got performance issue. I just use this simple example examples | p5.js At the end i just change the p5.…

---

## [How can I turn an image or svg into Basic Shapes?](https://discourse.processing.org/t/how-can-i-turn-an-image-or-svg-into-basic-shapes/32465)

<div class="topic-metadata">

**Author:** [@Violet](https://discourse.processing.org/u/Violet)\
**Replies:** 1\
**Last updated:** [September 30, 2021, 11:53am UTC](https://discourse.processing.org/t/how-can-i-turn-an-image-or-svg-into-basic-shapes/32465 "2021-09-30T11:53:16Z")

</div>

How to intelligently recognize graphics and extract the outer contour of the icon, especially the third change in the figure. I can’t do it with my current level of knowledge, so I would like to ask if processing can…

---

## [Splitting a canvas into multiple random areas](https://discourse.processing.org/t/splitting-a-canvas-into-multiple-random-areas/32403)

<div class="topic-metadata">

**Author:** [@goldorak](https://discourse.processing.org/u/goldorak)\
**Replies:** 4\
**Last updated:** [September 30, 2021, 9:20am UTC](https://discourse.processing.org/t/splitting-a-canvas-into-multiple-random-areas/32403 "2021-09-30T09:20:45Z")

</div>

Hi, I’m trying to subdivide my canvas into multiple random areas and then being able to access each area’s width and height to draw patterns inside. Is there a classic algorithm to do this? Would you recommend and not…

---

## [ControlP5 contol toggles](https://discourse.processing.org/t/controlp5-contol-toggles/32514)

<div class="topic-metadata">

**Author:** [@PaladinBobcat](https://discourse.processing.org/u/PaladinBobcat)\
**Replies:** 1\
**Last updated:** [September 30, 2021, 8:48am UTC](https://discourse.processing.org/t/controlp5-contol-toggles/32514 "2021-09-30T08:48:51Z")

</div>

please format code with \</\> button \* homework policy \* asking questions I’m trying to make a panel of toggles that can be affected/changed by buttons, like setting multiple toggles’ state from false to true using one…

---

## [How to lock a variable?](https://discourse.processing.org/t/how-to-lock-a-variable/32515)

<div class="topic-metadata">

**Author:** [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)\
**Replies:** 5\
**Last updated:** [September 29, 2021, 8:57pm UTC](https://discourse.processing.org/t/how-to-lock-a-variable/32515 "2021-09-29T20:57:33Z")

</div>

how to make a variable unchangeable so it can’t be changed anymore?

---

## [Random Color Gen . Store , Use](https://discourse.processing.org/t/random-color-gen-store-use/32493)

<div class="topic-metadata">

**Author:** [@ADG](https://discourse.processing.org/u/ADG)\
**Replies:** 4\
**Last updated:** [September 29, 2021, 3:46pm UTC](https://discourse.processing.org/t/random-color-gen-store-use/32493 "2021-09-29T15:46:03Z")

</div>

Hi, Very new to programming, and its concepts so I’m trying to create a random color generator that I can call anytime to provide my r,g,b values. This is what I wrote: let x; let y; let col = { r: \[\], g: \[\], b: …

---

## [Char, lower/upper case](https://discourse.processing.org/t/char-lower-upper-case/32505)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 4\
**Last updated:** [September 29, 2021, 10:19am UTC](https://discourse.processing.org/t/char-lower-upper-case/32505 "2021-09-29T10:19:00Z")

</div>

Hi! Is there a way to check if a char is uppercase / lowercase other than: (char+"").toLowerCase().charAt(0) == char ? I saw this method but it didn’t seem to work. I tried using: println(a.isUpperCase(), isUpper…

---

## [P5 and InfluxDB](https://discourse.processing.org/t/p5-and-influxdb/32496)

<div class="topic-metadata">

**Author:** [@Jhdgkss](https://discourse.processing.org/u/Jhdgkss)\
**Replies:** 0\
**Last updated:** [September 28, 2021, 10:09pm UTC](https://discourse.processing.org/t/p5-and-influxdb/32496 "2021-09-28T22:09:07Z")

</div>

Hi, all has anyone used P5.js to read data from a time-series database such as InfluxDB. If so is there any example code?

---

## [Feeling completely lost regarding problem solving?](https://discourse.processing.org/t/feeling-completely-lost-regarding-problem-solving/32483)

<div class="topic-metadata">

**Author:** [@HasarangaWanindu](https://discourse.processing.org/u/HasarangaWanindu)\
**Replies:** 3\
**Last updated:** [September 29, 2021, 5:57am UTC](https://discourse.processing.org/t/feeling-completely-lost-regarding-problem-solving/32483 "2021-09-29T05:57:50Z")

</div>

Hi, I feel incredibly lost and I don’t think that programming is for me after all. I’m doing the MIT Python for beginners course and I can’t do any of the midterm exam problems. I understand the lectures but when I am fa…

---

## [Rect following mouseX slowing speed problem](https://discourse.processing.org/t/rect-following-mousex-slowing-speed-problem/32491)

<div class="topic-metadata">

**Author:** [@Kenga123456](https://discourse.processing.org/u/Kenga123456)\
**Replies:** 2\
**Last updated:** [September 28, 2021, 9:05pm UTC](https://discourse.processing.org/t/rect-following-mousex-slowing-speed-problem/32491 "2021-09-28T21:05:30Z")

</div>

I have tried changing this line -xVel = xVel\*0,999- here but I can’t find a way to make the ellipse more gradually lose speed. Here is my code float ellipseXPos = 300; float ellipseYPos = 300; float xVel = 1; float yVe…

---

## [How to repeat static drawing rotated four times by 90 degrees - python mode](https://discourse.processing.org/t/how-to-repeat-static-drawing-rotated-four-times-by-90-degrees-python-mode/32409)

<div class="topic-metadata">

**Author:** [@LeoP](https://discourse.processing.org/u/LeoP)\
**Replies:** 4\
**Last updated:** [September 28, 2021, 8:49pm UTC](https://discourse.processing.org/t/how-to-repeat-static-drawing-rotated-four-times-by-90-degrees-python-mode/32409 "2021-09-28T20:49:40Z")

</div>

Hi all, I am new to Processing and to python for that matter. I am interested in creating linear, geometric ‘art’, in the first instance without animation, static. I have managed to create a set of circles shifting inc…

---

## [I want to draw pixels in bigger sizes with more simple methods](https://discourse.processing.org/t/i-want-to-draw-pixels-in-bigger-sizes-with-more-simple-methods/32485)

<div class="topic-metadata">

**Author:** [@R1S8K](https://discourse.processing.org/u/R1S8K)\
**Replies:** 1\
**Last updated:** [September 28, 2021, 8:39pm UTC](https://discourse.processing.org/t/i-want-to-draw-pixels-in-bigger-sizes-with-more-simple-methods/32485 "2021-09-28T20:39:14Z")

</div>

Hi, I want a simple way to draw pixels in bigger shapes. I want to test basic pixel draw functions; like, lines, circles, rectangles … etc. With small resolutions like 128 x 64. Even if you know a simple library that c…

---

## [Why does the square stay in the previous position](https://discourse.processing.org/t/why-does-the-square-stay-in-the-previous-position/32487)

<div class="topic-metadata">

**Author:** [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)\
**Replies:** 4\
**Last updated:** [September 28, 2021, 8:29pm UTC](https://discourse.processing.org/t/why-does-the-square-stay-in-the-previous-position/32487 "2021-09-28T20:29:07Z")

</div>

when the square moves it also stays in the previous position. noStroke(); dit not solve it PVector pos1; PVector pos2; PVector pos3; PVector pos4; PVector pos5; PVector pos6; PVector pos7; PVector pos8; PVector pos9; i…

---

## [How to avoid image compression using the get() function?](https://discourse.processing.org/t/how-to-avoid-image-compression-using-the-get-function/32477)

<div class="topic-metadata">

**Author:** [@hspencer](https://discourse.processing.org/u/hspencer)\
**Replies:** 3\
**Last updated:** [September 28, 2021, 6:50pm UTC](https://discourse.processing.org/t/how-to-avoid-image-compression-using-the-get-function/32477 "2021-09-28T18:50:33Z")

</div>

Hello! I’m using the get() function repeatedly and the resulting image degrades, apparently due to compression. Is there any way to get around this? Thanks! /\* animator tool \*/ let frames, span, current; function set…

---

## [Help with dragging an object using mousePressed](https://discourse.processing.org/t/help-with-dragging-an-object-using-mousepressed/23968)

<div class="topic-metadata">

**Author:** [@Chigoz](https://discourse.processing.org/u/Chigoz)\
**Replies:** 44\
**Last updated:** [September 28, 2021, 5:32pm UTC](https://discourse.processing.org/t/help-with-dragging-an-object-using-mousepressed/23968 "2021-09-28T17:32:10Z")

</div>

I created a hexagon by using a function, I intend to mousePress when the cursor is inside the hexagon and drag it around similar to the object shown in this sketch; https://editor.p5js.org/enickles/sketches/H1n19TObz …

---

## [Processing 3 and 4 Compatibility](https://discourse.processing.org/t/processing-3-and-4-compatibility/32446)

<div class="topic-metadata">

**Author:** [@reProcessing](https://discourse.processing.org/u/reProcessing)\
**Replies:** 2\
**Last updated:** [September 28, 2021, 3:34pm UTC](https://discourse.processing.org/t/processing-3-and-4-compatibility/32446 "2021-09-28T15:34:35Z")

</div>

For the last few months I’ve been cobbling together a really cool system in Processing 3. In fact it is so cool I really don’t know what its ultimate purpose or capabilities will be. A first for me! I’d like to instal…

---

## [Block does not move when button is pressed](https://discourse.processing.org/t/block-does-not-move-when-button-is-pressed/32456)

<div class="topic-metadata">

**Author:** [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)\
**Replies:** 6\
**Last updated:** [September 28, 2021, 3:12pm UTC](https://discourse.processing.org/t/block-does-not-move-when-button-is-pressed/32456 "2021-09-28T15:12:25Z")

</div>

float\[\] blockx= new float\[9\]; float\[\] blocky= new float\[9\]; int i=1; void setup(){ size(400,300); blockx\[1\]= 0; blocky\[1\]=0; } void draw(){ if(keyPressed){ if(key=='d'){ blockx\[i\]=blockx\[i\]+100;}} …

---

## [I can not see the Python Mode - Processing 3.5.4](https://discourse.processing.org/t/i-can-not-see-the-python-mode-processing-3-5-4/32440)

<div class="topic-metadata">

**Author:** [@seym](https://discourse.processing.org/u/seym)\
**Replies:** 2\
**Last updated:** [September 28, 2021, 1:33pm UTC](https://discourse.processing.org/t/i-can-not-see-the-python-mode-processing-3-5-4/32440 "2021-09-28T13:33:06Z")

</div>

Should I do something else to see the Python Mode? Right now, it can not be seen as an option in the mode selection:

---

## [\[SOLVED\] Android SDK license error](https://discourse.processing.org/t/solved-android-sdk-license-error/2956)

<div class="topic-metadata">

**Author:** [@aradarbel10](https://discourse.processing.org/u/aradarbel10)\
**Replies:** 3\
**Last updated:** [September 28, 2021, 1:23pm UTC](https://discourse.processing.org/t/solved-android-sdk-license-error/2956 "2021-09-28T13:23:24Z")

</div>

Hello! I am trying to create my first android app with processing, and I tried the code from the example “noBackgroundTest” from the demos in examples. I just can’t build the app. it said: You have not accepted the li…

---

## [Making Box appear in random locations](https://discourse.processing.org/t/making-box-appear-in-random-locations/32458)

<div class="topic-metadata">

**Author:** [@zack10](https://discourse.processing.org/u/zack10)\
**Replies:** 2\
**Last updated:** [September 28, 2021, 10:18am UTC](https://discourse.processing.org/t/making-box-appear-in-random-locations/32458 "2021-09-28T10:18:17Z")

</div>

class Box{ float z = 50; float dz = 2; void moveBox() { z += dz; } void show() { lights(); pushMatrix(); translate(130, 220, z); noStroke(); fill(10, 98, 240); rotateX(fra…

---

## [How can I light up separate circles instead of them all](https://discourse.processing.org/t/how-can-i-light-up-separate-circles-instead-of-them-all/32468)

<div class="topic-metadata">

**Author:** [@Caprisunny](https://discourse.processing.org/u/Caprisunny)\
**Replies:** 2\
**Last updated:** [September 28, 2021, 10:08am UTC](https://discourse.processing.org/t/how-can-i-light-up-separate-circles-instead-of-them-all/32468 "2021-09-28T10:08:14Z")

</div>

int\[\]\[\] cirkels = { {10, 15}, {100, 130}, {77, 43}, {30, 145}, {185, 17}, {99, 76} }; final int DIAMETER = 20; final int STRAAL = 10; final int GEEL = #FFFF00; final int ROOD = #FF0000; int kleur; void setup() { size(…

---

## [How to position button relative to canvas?](https://discourse.processing.org/t/how-to-position-button-relative-to-canvas/32442)

<div class="topic-metadata">

**Author:** [@processing\_user](https://discourse.processing.org/u/processing_user)\
**Replies:** 2\
**Last updated:** [September 28, 2021, 9:10am UTC](https://discourse.processing.org/t/how-to-position-button-relative-to-canvas/32442 "2021-09-28T09:10:44Z")

</div>

hello all, How can I position button(using createButton()) relative to canvas? with button.position() I can position the button on the canvas area, but I wanted to know whether there is a way to change button position w…

---

## [Does anyone know what type of game this is?](https://discourse.processing.org/t/does-anyone-know-what-type-of-game-this-is/32466)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 0\
**Last updated:** [September 28, 2021, 8:12am UTC](https://discourse.processing.org/t/does-anyone-know-what-type-of-game-this-is/32466 "2021-09-28T08:12:28Z")

</div>

(I have no idea what flare to set this as, so yeah. Maybe community?) You rotate the shapes in order to fill the white shape in the background. Once you stop holding a shape, the game ends. The large black dots are …

---

## [Show different text depending upon condition](https://discourse.processing.org/t/show-different-text-depending-upon-condition/32447)

<div class="topic-metadata">

**Author:** [@processing\_user](https://discourse.processing.org/u/processing_user)\
**Replies:** 2\
**Last updated:** [September 28, 2021, 6:04am UTC](https://discourse.processing.org/t/show-different-text-depending-upon-condition/32447 "2021-09-28T06:04:25Z")

</div>

hello all, how can I write p5 code that shows different text depending upon if condition? here is an example code that I wrote but the text just shows momentarily and disappears once the mouse click is done… let state;…

---

## [Adjust text size based on length of text](https://discourse.processing.org/t/adjust-text-size-based-on-length-of-text/32411)

<div class="topic-metadata">

**Author:** [@Naison](https://discourse.processing.org/u/Naison)\
**Replies:** 8\
**Last updated:** [September 28, 2021, 2:41am UTC](https://discourse.processing.org/t/adjust-text-size-based-on-length-of-text/32411 "2021-09-28T02:41:44Z")

</div>

Hello, I am coding a game and for this, I tryna write code that sizes the text based on the length of the text. My goal is to scale the text (the bigger the text width / the longer the text, the smaller the text size) t…

---

## [Problem with OSC send from Max For Live?](https://discourse.processing.org/t/problem-with-osc-send-from-max-for-live/32455)

<div class="topic-metadata">

**Author:** [@bking](https://discourse.processing.org/u/bking)\
**Replies:** 0\
**Last updated:** [September 27, 2021, 8:56pm UTC](https://discourse.processing.org/t/problem-with-osc-send-from-max-for-live/32455 "2021-09-27T20:56:17Z")

</div>

Hi there, I can read OSC midi from max for live but I can’t read OSC data from max for Live while it is the same port. I give you a screenshot with Live and OSC “object” of M4Live just that you can see I send good data…

---

## [Help with Opacity(Transparency)](https://discourse.processing.org/t/help-with-opacity-transparency/32445)

<div class="topic-metadata">

**Author:** [@Chigoz](https://discourse.processing.org/u/Chigoz)\
**Replies:** 6\
**Last updated:** [September 28, 2021, 12:19am UTC](https://discourse.processing.org/t/help-with-opacity-transparency/32445 "2021-09-28T00:19:45Z")

</div>

I need help with how to change the opacity(transparency) of the colours used to fill the hexagons such that when a hexagon is above a number(say 30 as in the image) the number will still be visible? e.g I want the hexa…

[Previous page](https://discourse.processing.org/latest.md?no_subcategories=false&page=188)

[Next page](https://discourse.processing.org/latest.md?no_subcategories=false&page=190)
