# Processing

**URL:** https://discourse.processing.org/c/processing/6.md?no_subcategories=false&page=370

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

**Page:** 371

---

## [Run Window can't be moved](https://discourse.processing.org/t/run-window-cant-be-moved/2721)

<div class="topic-metadata">

**Author:** [@L0RDZed](https://discourse.processing.org/u/L0RDZed)\
**Replies:** 6\
**Last updated:** [August 24, 2018, 3:42pm UTC](https://discourse.processing.org/t/run-window-cant-be-moved/2721 "2018-08-24T15:42:12Z")

</div>

Hi, when I click ‘Run’ the window gets locked to my screen and I can’t move it. Maybe a bug, it’s not happened before today. Code (D.Shiffman’s Perlin Terrain) Apologies for code formatting - I tried to rectify in an …

---

## [Key press ignored if key is released at same time](https://discourse.processing.org/t/key-press-ignored-if-key-is-released-at-same-time/2863)

<div class="topic-metadata">

**Author:** [@mono](https://discourse.processing.org/u/mono)\
**Replies:** 5\
**Last updated:** [August 24, 2018, 3:38pm UTC](https://discourse.processing.org/t/key-press-ignored-if-key-is-released-at-same-time/2863 "2018-08-24T15:38:16Z")

</div>

Hey guys! I am trying to create a sketch where an object on the screen will move when the WASD keys are pressed. The object exists on a grid and will to the centre of a square adjacent to its own in a direction according…

---

## [Press space bar to stop animation](https://discourse.processing.org/t/press-space-bar-to-stop-animation/2933)

<div class="topic-metadata">

**Author:** [@suptoabha](https://discourse.processing.org/u/suptoabha)\
**Replies:** 2\
**Last updated:** [August 24, 2018, 3:26pm UTC](https://discourse.processing.org/t/press-space-bar-to-stop-animation/2933 "2018-08-24T15:26:50Z")

</div>

I have written this code. int x; int y=241; void setup() { size(800, 400); background(0); } void draw() { cave(); stone(); clumsy(); } void cave() { noStroke(); fill(160); rect(0,100,width,200);…

---

## [Tank movement seen from above](https://discourse.processing.org/t/tank-movement-seen-from-above/2883)

<div class="topic-metadata">

**Author:** [@Toki](https://discourse.processing.org/u/Toki)\
**Replies:** 11\
**Last updated:** [August 24, 2018, 2:51pm UTC](https://discourse.processing.org/t/tank-movement-seen-from-above/2883 "2018-08-24T14:51:17Z")

</div>

Hello, Im new to processing and coding in general. Im trying to code a “tank” move around (seen from above). I want to have a tank rotate left when pressing keyboard “A” and right when pressing “D”. And I want it to dri…

---

## [A repeated color pattern](https://discourse.processing.org/t/a-repeated-color-pattern/2928)

<div class="topic-metadata">

**Author:** [@suptoabha](https://discourse.processing.org/u/suptoabha)\
**Replies:** 5\
**Last updated:** [August 24, 2018, 2:42pm UTC](https://discourse.processing.org/t/a-repeated-color-pattern/2928 "2018-08-24T14:42:24Z")

</div>

I have written this code. void setup(){ size(800,400); background(0); } void draw(){ cave(); stone(); } void cave(){ noStroke(); fill(160); rect(0,100,width,200); } void stone(){ for(int i=0;i\<width;i+…

---

## [\[ask\] how to use an array of double in Java Processing](https://discourse.processing.org/t/ask-how-to-use-an-array-of-double-in-java-processing/2908)

<div class="topic-metadata">

**Author:** [@tavisena](https://discourse.processing.org/u/tavisena)\
**Replies:** 20\
**Last updated:** [August 24, 2018, 1:51pm UTC](https://discourse.processing.org/t/ask-how-to-use-an-array-of-double-in-java-processing/2908 "2018-08-24T13:51:07Z")

</div>

hi everyone! i have some project about using svm the coding using C++, ii wanna use this parameter in my java processing because i needed to control robot using leap motion and the svm as the decision maker. the array o…

---

## [Neural Network help](https://discourse.processing.org/t/neural-network-help/2871)

<div class="topic-metadata">

**Author:** [@Manatee](https://discourse.processing.org/u/Manatee)\
**Replies:** 6\
**Last updated:** [August 24, 2018, 1:37pm UTC](https://discourse.processing.org/t/neural-network-help/2871 "2018-08-24T13:37:55Z")

</div>

Hi everybody, I built a Neural Network super easy and now try to test it out I discovered that when I have to multiply the Weights \* Input (sigmoid = W \* I + B) I found different matrices size and so I cant do that and …

---

## [noSmooth() doesn't works with P2D](https://discourse.processing.org/t/nosmooth-doesnt-works-with-p2d/2924)

<div class="topic-metadata">

**Author:** [@Kayno](https://discourse.processing.org/u/Kayno)\
**Replies:** 10\
**Last updated:** [August 24, 2018, 1:37pm UTC](https://discourse.processing.org/t/nosmooth-doesnt-works-with-p2d/2924 "2018-08-24T13:37:26Z")

</div>

Hello, I’m doing a little game and I’m using pixel art images so I need to use noSmooth() which doesn’t works in P2D… I would like to know if there is another way to use pixel art in P2D. Sorry about mistakes, I’m fre…

---

## [Multiple line graphs](https://discourse.processing.org/t/multiple-line-graphs/2785)

<div class="topic-metadata">

**Author:** [@Groot](https://discourse.processing.org/u/Groot)\
**Replies:** 8\
**Last updated:** [August 24, 2018, 1:03pm UTC](https://discourse.processing.org/t/multiple-line-graphs/2785 "2018-08-24T13:03:27Z")

</div>

Hi all - with the much appreciated help from TfGuy44, i managed to develop the below. which is great and very useful. I have decided however to go in a slightly different direction and want to view my data in the form of…

---

## [Incrementing frameRate() based on time](https://discourse.processing.org/t/incrementing-framerate-based-on-time/2897)

<div class="topic-metadata">

**Author:** [@digitaldetritus](https://discourse.processing.org/u/digitaldetritus)\
**Replies:** 4\
**Last updated:** [August 24, 2018, 11:09am UTC](https://discourse.processing.org/t/incrementing-framerate-based-on-time/2897 "2018-08-24T11:09:15Z")

</div>

I am trying to increment the framerate of my animation from 16fps to 1fps over a 4 second period of time with 4 second (4000 millis) delay in between. Is frameRate() the best way to do this? The current playback seems gl…

---

## [Creating an ArrayList of SinOsc objects, trouble with adding, removing, play sound and stop sound](https://discourse.processing.org/t/creating-an-arraylist-of-sinosc-objects-trouble-with-adding-removing-play-sound-and-stop-sound/2844)

<div class="topic-metadata">

**Author:** [@lanelps](https://discourse.processing.org/u/lanelps)\
**Replies:** 1\
**Last updated:** [August 24, 2018, 10:26am UTC](https://discourse.processing.org/t/creating-an-arraylist-of-sinosc-objects-trouble-with-adding-removing-play-sound-and-stop-sound/2844 "2018-08-24T10:26:43Z")

</div>

As the title says I’m trying to create an ArrayList of SinOsc objects. When I click the mouse I want it to add a new SinOsc object to the ArrayList which will play a sine wave. The sin wave will differ in frequency and…

---

## [Where can I upload my sketch for someone to see and interact with online?](https://discourse.processing.org/t/where-can-i-upload-my-sketch-for-someone-to-see-and-interact-with-online/2902)

<div class="topic-metadata">

**Author:** [@stonesyy](https://discourse.processing.org/u/stonesyy)\
**Replies:** 10\
**Last updated:** [August 24, 2018, 5:30am UTC](https://discourse.processing.org/t/where-can-i-upload-my-sketch-for-someone-to-see-and-interact-with-online/2902 "2018-08-24T05:30:03Z")

</div>

Hi Everyone, Do any of you have any suggestions regarding where I could upload my processing sketch online(it’s not working in openprocessing)? I want to show my Mom who is across the country and not very computer savvy…

---

## [Adding data to a string array how to?](https://discourse.processing.org/t/adding-data-to-a-string-array-how-to/2891)

<div class="topic-metadata">

**Author:** [@stevenette](https://discourse.processing.org/u/stevenette)\
**Replies:** 2\
**Last updated:** [August 24, 2018, 5:17am UTC](https://discourse.processing.org/t/adding-data-to-a-string-array-how-to/2891 "2018-08-24T05:17:12Z")

</div>

Hello, I am trying to add data to a string array every time one of those data values changes. I don’t know if this is possible. time = timeStamp.format(now); for (int i = 0; i \< 2; i++) { String\[\] gateGageTime; …

---

## [Present random shape, then fixed order (assignment help)](https://discourse.processing.org/t/present-random-shape-then-fixed-order-assignment-help/2773)

<div class="topic-metadata">

**Author:** [@FrankieZ](https://discourse.processing.org/u/FrankieZ)\
**Replies:** 16\
**Last updated:** [August 24, 2018, 5:02am UTC](https://discourse.processing.org/t/present-random-shape-then-fixed-order-assignment-help/2773 "2018-08-24T05:02:25Z")

</div>

Hi there! Does anyone know how to write a program that randomly presents a shape out of a collection of 3 (let’s say line out of rectangle,ellipse and line) and when users press a key it will change to anothet shape in a…

---

## [how to program HC SR04 ultrasonic sensor ](https://discourse.processing.org/t/how-to-program-hc-sr04-ultrasonic-sensor/2890)

<div class="topic-metadata">

**Author:** [@reedoh](https://discourse.processing.org/u/reedoh)\
**Replies:** 1\
**Last updated:** [August 24, 2018, 5:01am UTC](https://discourse.processing.org/t/how-to-program-hc-sr04-ultrasonic-sensor/2890 "2018-08-24T05:01:47Z")

</div>

Hi, can anyone guide me on how to obtain distance from sonar sensor using processing IDE for raspberry pi

---

## [Error playing SinOsc objects from an ArrayList](https://discourse.processing.org/t/error-playing-sinosc-objects-from-an-arraylist/2867)

<div class="topic-metadata">

**Author:** [@lanelps](https://discourse.processing.org/u/lanelps)\
**Replies:** 11\
**Last updated:** [August 24, 2018, 12:11am UTC](https://discourse.processing.org/t/error-playing-sinosc-objects-from-an-arraylist/2867 "2018-08-24T00:11:29Z")

</div>

I’m trying to create an ArrayList of SinOsc objects (Which works), but then the usual functions to play and stop sound aren’t recognised? The end goal is to be able to click to create a new object and hit a key to remov…

---

## [Playing a video from a specific start time?](https://discourse.processing.org/t/playing-a-video-from-a-specific-start-time/2894)

<div class="topic-metadata">

**Author:** [@Laurent](https://discourse.processing.org/u/Laurent)\
**Replies:** 1\
**Last updated:** [August 23, 2018, 10:19pm UTC](https://discourse.processing.org/t/playing-a-video-from-a-specific-start-time/2894 "2018-08-23T22:19:44Z")

</div>

Hi everyone. I try to play a video but starting it not at the beginning but after a specific time. The video plays well, but always starts at the beginning. What am I doing wrong? Thanks a lot for your ideas and suggesti…

---

## [Can you help -- mouse over thing gives error Unexpected identifier](https://discourse.processing.org/t/can-you-help-mouse-over-thing-gives-error-unexpected-identifier/2888)

<div class="topic-metadata">

**Author:** [@warrenj](https://discourse.processing.org/u/warrenj)\
**Replies:** 1\
**Last updated:** [August 23, 2018, 6:28pm UTC](https://discourse.processing.org/t/can-you-help-mouse-over-thing-gives-error-unexpected-identifier/2888 "2018-08-23T18:28:06Z")

</div>

Can you help find and fix the Unexpected identifier error … int thingX = 10; int thingY = 20; int thingW = 30; int thingH = 40; void setup() { // noStroke(); } // end setup void draw() { // mouse over ( thing ) …

---

## [Need help in processing function](https://discourse.processing.org/t/need-help-in-processing-function/2875)

<div class="topic-metadata">

**Author:** [@avro](https://discourse.processing.org/u/avro)\
**Replies:** 4\
**Last updated:** [August 23, 2018, 4:36pm UTC](https://discourse.processing.org/t/need-help-in-processing-function/2875 "2018-08-23T16:36:18Z")

</div>

Define a function call BuildTheWall that gets the parameters/inputs (the size of each rectangle width or/and height), x coordinate and y coordinate of the first and the last point. The function should draw the rectangle…

---

## [G4P GTextArea & GLabel object update across windows cause app crash](https://discourse.processing.org/t/g4p-gtextarea-glabel-object-update-across-windows-cause-app-crash/2854)

<div class="topic-metadata">

**Author:** [@ayoung12](https://discourse.processing.org/u/ayoung12)\
**Replies:** 15\
**Last updated:** [August 23, 2018, 4:23pm UTC](https://discourse.processing.org/t/g4p-gtextarea-glabel-object-update-across-windows-cause-app-crash/2854 "2018-08-23T16:23:40Z")

</div>

HI - I have been experiencing random an intermittent lock ups of my application. I am using G4P 4.1.5 on processing 3.3.7 so all upto date. I have worked out that my problem is caused by using multiple windows with a sl…

---

## [Must qualify the allocation with](https://discourse.processing.org/t/must-qualify-the-allocation-with/2828)

<div class="topic-metadata">

**Author:** [@Manatee](https://discourse.processing.org/u/Manatee)\
**Replies:** 29\
**Last updated:** [August 23, 2018, 3:42pm UTC](https://discourse.processing.org/t/must-qualify-the-allocation-with/2828 "2018-08-23T15:42:31Z")

</div>

I google this problem but otehr one sort out! I cannot create a new instance of one of my class, here is the main: Snake snake; A tmp; int frameSpeed = 1;//the frame rate int score = 0; //int bestScore = 0; int attemp…

---

## [Network library data transfer question](https://discourse.processing.org/t/network-library-data-transfer-question/2850)

<div class="topic-metadata">

**Author:** [@creepercrack](https://discourse.processing.org/u/creepercrack)\
**Replies:** 1\
**Last updated:** [August 23, 2018, 6:03am UTC](https://discourse.processing.org/t/network-library-data-transfer-question/2850 "2018-08-23T06:03:26Z")

</div>

I recently started working with the processing network library, and when it comes to data transfer between a server and clients, I don’t see a good way to do it. I managed to transfer data reliable using Strings, but if…

---

## [How do I define an object with curly brackets?](https://discourse.processing.org/t/how-do-i-define-an-object-with-curly-brackets/2872)

<div class="topic-metadata">

**Author:** [@Grimtin10](https://discourse.processing.org/u/Grimtin10)\
**Replies:** 13\
**Last updated:** [August 23, 2018, 5:33am UTC](https://discourse.processing.org/t/how-do-i-define-an-object-with-curly-brackets/2872 "2018-08-23T05:33:07Z")

</div>

I want to define objects in an array like this: {name: "name", temp: 123, ...} How would I do this? -Grim

---

## [Why ellipse doesn't work?](https://discourse.processing.org/t/why-ellipse-doesnt-work/2864)

<div class="topic-metadata">

**Author:** [@rioma7](https://discourse.processing.org/u/rioma7)\
**Replies:** 1\
**Last updated:** [August 22, 2018, 8:42pm UTC](https://discourse.processing.org/t/why-ellipse-doesnt-work/2864 "2018-08-22T20:42:48Z")

</div>

Hello guys, I was playing a bit with processing and I tried to make a program which does a boucing shape. This shape at the beginning is a square and when it touches the right edge it goes back but becoming a circle…buu…

---

## [3D Grid Design Help](https://discourse.processing.org/t/3d-grid-design-help/2862)

<div class="topic-metadata">

**Author:** [@thedurf18](https://discourse.processing.org/u/thedurf18)\
**Replies:** 4\
**Last updated:** [August 22, 2018, 8:40pm UTC](https://discourse.processing.org/t/3d-grid-design-help/2862 "2018-08-22T20:40:02Z")

</div>

Hi, I need help designing a 3D Grid, like the pic below. I have more than half of it done, I just need the third plane. Here’s the code I have so far: int gridSize = 10; float inc = 0.001; int density = 10; float zn…

---

## [Switch between 2 sketches with PraxisLive](https://discourse.processing.org/t/switch-between-2-sketches-with-praxislive/2686)

<div class="topic-metadata">

**Author:** [@squirelo](https://discourse.processing.org/u/squirelo)\
**Replies:** 3\
**Last updated:** [August 22, 2018, 5:50pm UTC](https://discourse.processing.org/t/switch-between-2-sketches-with-praxislive/2686 "2018-08-22T17:50:46Z")

</div>

Hi there, and also hi @neilcsmith :slight\_smile: I would like to use Praxis live to easily switch between processing sketches during a live performance (using midi controller) I installed it and tried some stuff, but i…

---

## [Custom classes with many drawing components?](https://discourse.processing.org/t/custom-classes-with-many-drawing-components/2853)

<div class="topic-metadata">

**Author:** [@ehasti21](https://discourse.processing.org/u/ehasti21)\
**Replies:** 2\
**Last updated:** [August 22, 2018, 4:31pm UTC](https://discourse.processing.org/t/custom-classes-with-many-drawing-components/2853 "2018-08-22T16:31:45Z")

</div>

Hello! I’m trying to take a drawing of a cat face i’ve made and put it into custom classes that follow a mouse as it moves. I’m a bit confused as to the differences between the base class and an implemented child class. …

---

## ["Blend" two Shapes in processing](https://discourse.processing.org/t/blend-two-shapes-in-processing/2816)

<div class="topic-metadata">

**Author:** [@kiraw](https://discourse.processing.org/u/kiraw)\
**Replies:** 9\
**Last updated:** [August 22, 2018, 4:26pm UTC](https://discourse.processing.org/t/blend-two-shapes-in-processing/2816 "2018-08-22T16:26:07Z")

</div>

Hey, English isn’t my first language so please be kind. I do by best and hope you understand my problem. :slight\_smile: This is my first processing project and i have completely no idea what i’m doing or have to do… I w…

---

## [Exporting processing sketch issue](https://discourse.processing.org/t/exporting-processing-sketch-issue/2842)

<div class="topic-metadata">

**Author:** [@12345](https://discourse.processing.org/u/12345)\
**Replies:** 3\
**Last updated:** [August 22, 2018, 1:29pm UTC](https://discourse.processing.org/t/exporting-processing-sketch-issue/2842 "2018-08-22T13:29:00Z")

</div>

Hi, I’m trying to export my sketch as frame images in order to make a movie. However, when I do, only the background of my sketch comes up. Have I missed something? I’ve used saveFrame in line 73. timport ddf.minim.\*; i…

---

## [mousePressed not working? or something else?](https://discourse.processing.org/t/mousepressed-not-working-or-something-else/2848)

<div class="topic-metadata">

**Author:** [@mdeepak](https://discourse.processing.org/u/mdeepak)\
**Replies:** 2\
**Last updated:** [August 22, 2018, 1:11pm UTC](https://discourse.processing.org/t/mousepressed-not-working-or-something-else/2848 "2018-08-22T13:11:24Z")

</div>

if(!mousePressed){ ellipse(width/2, height/2,100,100); } else { rect(width/2, height/2,100,100); } error: mousePressed is not defined I have referenced to p5.js, p5.sound.js and p5.dom.js in my index.html. What is…

[Previous page](https://discourse.processing.org/c/processing/6.md?no_subcategories=false&page=369)

[Next page](https://discourse.processing.org/c/processing/6.md?no_subcategories=false&page=371)
