# Latest

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

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

**Page:** 565

---

## [File syntax for subdirectory](https://discourse.processing.org/t/file-syntax-for-subdirectory/5200)

<div class="topic-metadata">

**Author:** [@jeffmarc](https://discourse.processing.org/u/jeffmarc)\
**Replies:** 2\
**Last updated:** [November 5, 2018, 2:15am UTC](https://discourse.processing.org/t/file-syntax-for-subdirectory/5200 "2018-11-05T02:15:41Z")

</div>

I use creatWriter to output to a file. it works for the first level dircetory example: createWriter("c:/main "+string); so i created a c:/main/reports but when i try to output to that sub directory it just writes it …

---

## [Problem with a variable. Don't know where to declare](https://discourse.processing.org/t/problem-with-a-variable-dont-know-where-to-declare/5155)

<div class="topic-metadata">

**Author:** [@bking](https://discourse.processing.org/u/bking)\
**Replies:** 8\
**Last updated:** [November 4, 2018, 11:32pm UTC](https://discourse.processing.org/t/problem-with-a-variable-dont-know-where-to-declare/5155 "2018-11-04T23:32:54Z")

</div>

Hello, I made a program with works when two variables (here two pulsations) are declared before the setup with a constant value. Like that: float w1 = 0.1; float w2 = 0.11; But actually I want the second value…

---

## [Refreshing a SoundFile](https://discourse.processing.org/t/refreshing-a-soundfile/5198)

<div class="topic-metadata">

**Author:** [@LapnLook](https://discourse.processing.org/u/LapnLook)\
**Replies:** 0\
**Last updated:** [November 4, 2018, 8:38pm UTC](https://discourse.processing.org/t/refreshing-a-soundfile/5198 "2018-11-04T20:38:41Z")

</div>

Hi I’m playing around with the sound library of Processing to create a very basic synthesizer of sorts. My sketch right now displays a few draggable sliders, using which the user can define a waveform. When the “t” key …

---

## [Changing innerHtml trough p5](https://discourse.processing.org/t/changing-innerhtml-trough-p5/5192)

<div class="topic-metadata">

**Author:** [@Noxid](https://discourse.processing.org/u/Noxid)\
**Replies:** 5\
**Last updated:** [November 4, 2018, 7:40pm UTC](https://discourse.processing.org/t/changing-innerhtml-trough-p5/5192 "2018-11-04T19:40:36Z")

</div>

Is p5 capable of changing the innerHTML of an html element?I know that you can change the value trough select(#something).value(); but is there an equivalent to this function for changing innerHTML

---

## [Using the Array of Objects Resource with unique objects](https://discourse.processing.org/t/using-the-array-of-objects-resource-with-unique-objects/5182)

<div class="topic-metadata">

**Author:** [@yangs](https://discourse.processing.org/u/yangs)\
**Replies:** 8\
**Last updated:** [November 4, 2018, 7:39pm UTC](https://discourse.processing.org/t/using-the-array-of-objects-resource-with-unique-objects/5182 "2018-11-04T19:39:37Z")

</div>

Hi all! I’m stuck on something and I’m sure the answer is a simple one but I can’t seem to find the issue. Using the p5js Array of Objects, I’m essentially trying to exactly that, with squiggly objects instead of ellips…

---

## [Playing video backwards (ogg file does not load)](https://discourse.processing.org/t/playing-video-backwards-ogg-file-does-not-load/5194)

<div class="topic-metadata">

**Author:** [@eda](https://discourse.processing.org/u/eda)\
**Replies:** 0\
**Last updated:** [November 4, 2018, 7:14pm UTC](https://discourse.processing.org/t/playing-video-backwards-ogg-file-does-not-load/5194 "2018-11-04T19:14:57Z")

</div>

Hello, I am trying to play a video backwards and forwards. As advised on the video library - speed (https://processing.org/reference/libraries/video/Movie\_speed\_.html), I managed to convert the video from a mp4 to ogg fi…

---

## [P5js Agent Based Modeling](https://discourse.processing.org/t/p5js-agent-based-modeling/5188)

<div class="topic-metadata">

**Author:** [@backspaces](https://discourse.processing.org/u/backspaces)\
**Replies:** 0\
**Last updated:** [November 4, 2018, 6:45pm UTC](https://discourse.processing.org/t/p5js-agent-based-modeling/5188 "2018-11-04T18:45:39Z")

</div>

I’m currently working on AgentScript, a Javascript subset of NetLogo. Are any of us P5js’ers working in that area? My interest in P5js is using it as a View/App for AgentScript’s core Model module. (We distinguish bet…

---

## [oscP5 TCPIP stop in client cant disconnect from server](https://discourse.processing.org/t/oscp5-tcpip-stop-in-client-cant-disconnect-from-server/5178)

<div class="topic-metadata">

**Author:** [@GeorgeJava](https://discourse.processing.org/u/GeorgeJava)\
**Replies:** 1\
**Last updated:** [November 4, 2018, 9:34am UTC](https://discourse.processing.org/t/oscp5-tcpip-stop-in-client-cant-disconnect-from-server/5178 "2018-11-04T09:34:38Z")

</div>

Hello, i want to stop and start new connection, but oscP5tcpClient.stop(); not working… Can i somehow disconnect from the server ? and create new connection ? CLIENT import oscP5.\*; OscP5 oscP5tcpClient; OscMessage m;…

---

## [Animated text / Spacing problem](https://discourse.processing.org/t/animated-text-spacing-problem/4559)

<div class="topic-metadata">

**Author:** [@RC75018](https://discourse.processing.org/u/RC75018)\
**Replies:** 4\
**Last updated:** [November 4, 2018, 8:57am UTC](https://discourse.processing.org/t/animated-text-spacing-problem/4559 "2018-11-04T08:57:06Z")

</div>

Hi Everyone, I am trying to create an animated text, starting with a random size and color on the page. Each letter move according a sine fonction. Unfortunately, i get lost in my thoughts and don’t understand anymore…

---

## [Manipulating Processing Templates with a Cyton board (EEG waves)](https://discourse.processing.org/t/manipulating-processing-templates-with-a-cyton-board-eeg-waves/4997)

<div class="topic-metadata">

**Author:** [@roguetheory](https://discourse.processing.org/u/roguetheory)\
**Replies:** 1\
**Last updated:** [November 4, 2018, 5:35am UTC](https://discourse.processing.org/t/manipulating-processing-templates-with-a-cyton-board-eeg-waves/4997 "2018-11-04T05:35:40Z")

</div>

I was wondering if anybody had any experience controlling any of the processing templates using an Open BCI Cyton 8 channel board and their EEG hand band (or similar)?

---

## ["couldn't run the sketch" while using sound](https://discourse.processing.org/t/couldnt-run-the-sketch-while-using-sound/5106)

<div class="topic-metadata">

**Author:** [@meiyangjie](https://discourse.processing.org/u/meiyangjie)\
**Replies:** 1\
**Last updated:** [November 4, 2018, 4:40am UTC](https://discourse.processing.org/t/couldnt-run-the-sketch-while-using-sound/5106 "2018-11-04T04:40:14Z")

</div>

Hi, guys, when I want to use the sound to play a music, it comes to some problems and I don’t what to do. here is the problem.

---

## [Alternative to Circular Array?](https://discourse.processing.org/t/alternative-to-circular-array/5147)

<div class="topic-metadata">

**Author:** [@Lexyth](https://discourse.processing.org/u/Lexyth)\
**Replies:** 13\
**Last updated:** [November 3, 2018, 11:46pm UTC](https://discourse.processing.org/t/alternative-to-circular-array/5147 "2018-11-03T23:46:04Z")

</div>

Now, i‘m not really looking for an alternative for a circular array, But for a System that works similar to it. A circular array is basically a normal array, that works like \[i%array.length\] (if i got that right…). What…

---

## [Images will open fine on Apple IMac but won't open on windows pc](https://discourse.processing.org/t/images-will-open-fine-on-apple-imac-but-wont-open-on-windows-pc/5168)

<div class="topic-metadata">

**Author:** [@corbyn](https://discourse.processing.org/u/corbyn)\
**Replies:** 1\
**Last updated:** [November 3, 2018, 11:35pm UTC](https://discourse.processing.org/t/images-will-open-fine-on-apple-imac-but-wont-open-on-windows-pc/5168 "2018-11-03T23:35:56Z")

</div>

When I work with images on an Apple IMac they work fine, I then save my code onto a flash drive with the data folder as well and everything else that is usually there in the sketch folder when I open it on a windows PC a…

---

## [Sorting Two Arrays at a Time?](https://discourse.processing.org/t/sorting-two-arrays-at-a-time/5164)

<div class="topic-metadata">

**Author:** [@alexac692](https://discourse.processing.org/u/alexac692)\
**Replies:** 2\
**Last updated:** [November 3, 2018, 10:37pm UTC](https://discourse.processing.org/t/sorting-two-arrays-at-a-time/5164 "2018-11-03T22:37:00Z")

</div>

My problem is that I want to take an array and “reassign” indices so that you can list them from lowest to highest, without actually shuffling the original array. In this case it’s with student IDs and I want to be able …

---

## [Draw rows of squares pattern](https://discourse.processing.org/t/draw-rows-of-squares-pattern/5100)

<div class="topic-metadata">

**Author:** [@gpevehou](https://discourse.processing.org/u/gpevehou)\
**Replies:** 10\
**Last updated:** [November 3, 2018, 10:04pm UTC](https://discourse.processing.org/t/draw-rows-of-squares-pattern/5100 "2018-11-03T22:04:41Z")

</div>

This code is supposed to be drawing the attached pattern, but is only drawing one square. . does anyone know what I need to add/ what I’m doing wrong? Thank you! int X\_coordinate=150; int y\_coordinate=200; void change…

---

## [Why does my spikes not show up?](https://discourse.processing.org/t/why-does-my-spikes-not-show-up/5161)

<div class="topic-metadata">

**Author:** [@Xeeker](https://discourse.processing.org/u/Xeeker)\
**Replies:** 2\
**Last updated:** [November 3, 2018, 6:39pm UTC](https://discourse.processing.org/t/why-does-my-spikes-not-show-up/5161 "2018-11-03T18:39:52Z")

</div>

float x = 150; float y = 200; float okning = 3; int toggle = 0; float r; int gravity = 0.07; int velocity; int NumbOfSpikes = 10; //S stands for Spike float\[\] SPos = new float \[NumbOfSpikes\]; float\[\] SX = new float \[N…

---

## [Processing sound library on pi](https://discourse.processing.org/t/processing-sound-library-on-pi/5103)

<div class="topic-metadata">

**Author:** [@gwenn](https://discourse.processing.org/u/gwenn)\
**Replies:** 4\
**Last updated:** [November 3, 2018, 4:50pm UTC](https://discourse.processing.org/t/processing-sound-library-on-pi/5103 "2018-11-03T16:50:40Z")

</div>

Hi all, me again The sound library is working fine on the pi, but I am getting an issue (and I noticed someone on GitHub having a similar recent issue, but as of now that thread is unresolved) I am trying a super simpl…

---

## [How to save Level Progress?](https://discourse.processing.org/t/how-to-save-level-progress/5156)

<div class="topic-metadata">

**Author:** [@Schred](https://discourse.processing.org/u/Schred)\
**Replies:** 13\
**Last updated:** [November 3, 2018, 4:34pm UTC](https://discourse.processing.org/t/how-to-save-level-progress/5156 "2018-11-03T16:34:39Z")

</div>

So I’m trying to make a small adventure mode for my game, and I need to be able to store the information when a level is completed. I am trying to use a PrintWriter, and it actually prints the right result into a text fi…

---

## [Problem with accelerometer](https://discourse.processing.org/t/problem-with-accelerometer/5131)

<div class="topic-metadata">

**Author:** [@chalita](https://discourse.processing.org/u/chalita)\
**Replies:** 1\
**Last updated:** [November 3, 2018, 10:44am UTC](https://discourse.processing.org/t/problem-with-accelerometer/5131 "2018-11-03T10:44:22Z")

</div>

import processing.serial.\*; Serial c; void setup() { size(800, 600, OPENGL); c = new Serial(this, "/dev/cu.usbserial-DN02SMXZ", 115200); // change the COM port } void draw() { float x, y, z; if (c.available()…

---

## [Difference between i/10\*10 and i?](https://discourse.processing.org/t/difference-between-i-10-10-and-i/5149)

<div class="topic-metadata">

**Author:** [@Lexyth](https://discourse.processing.org/u/Lexyth)\
**Replies:** 4\
**Last updated:** [November 3, 2018, 7:49am UTC](https://discourse.processing.org/t/difference-between-i-10-10-and-i/5149 "2018-11-03T07:49:37Z")

</div>

These are two codes, that should have the exact same result, but don’t… why? for (int i = 0; i \< vectors.length; i++) { vectors\[i\] = new PVector(i%10\*10 + 50, i/10\*10); } for (int i = 0; i \< vectors.length; i++)…

---

## [Getting a specific character printed when mouse is clicked](https://discourse.processing.org/t/getting-a-specific-character-printed-when-mouse-is-clicked/5138)

<div class="topic-metadata">

**Author:** [@rebelcoder](https://discourse.processing.org/u/rebelcoder)\
**Replies:** 8\
**Last updated:** [November 3, 2018, 2:29am UTC](https://discourse.processing.org/t/getting-a-specific-character-printed-when-mouse-is-clicked/5138 "2018-11-03T02:29:40Z")

</div>

Hey Guys, I am trying to write a program in which the alphabets are rotating in a circle with constant speed. this is my code for drawing the characters in a circle and then rotating them in a circle. the first angle dra…

---

## [Sliding Tile Puzzle](https://discourse.processing.org/t/sliding-tile-puzzle/4930)

<div class="topic-metadata">

**Author:** [@Shimuni](https://discourse.processing.org/u/Shimuni)\
**Replies:** 8\
**Last updated:** [November 3, 2018, 3:21am UTC](https://discourse.processing.org/t/sliding-tile-puzzle/4930 "2018-11-03T03:21:00Z")

</div>

I have to create a sliding tile puzzle, but it seems I am stuck. I don’t know how to make it so the tiles in the grid can swap places in order for me to arrange them correctly. Integer AmountOfButtons = 16; int cols = 4…

---

## [Trouble pushing a box with another box, collision detection](https://discourse.processing.org/t/trouble-pushing-a-box-with-another-box-collision-detection/4551)

<div class="topic-metadata">

**Author:** [@ddownn](https://discourse.processing.org/u/ddownn)\
**Replies:** 9\
**Last updated:** [November 3, 2018, 3:11am UTC](https://discourse.processing.org/t/trouble-pushing-a-box-with-another-box-collision-detection/4551 "2018-11-03T03:11:00Z")

</div>

Hello. I have been trying to find a way to get a box to push another box from any of its sides. This seems to almost work, but it keeps failing for some reason. Pushing from the top and right seem to work better than the…

---

## [How to make shapes out of characters using loop?](https://discourse.processing.org/t/how-to-make-shapes-out-of-characters-using-loop/5134)

<div class="topic-metadata">

**Author:** [@rollbon](https://discourse.processing.org/u/rollbon)\
**Replies:** 1\
**Last updated:** [November 2, 2018, 11:07pm UTC](https://discourse.processing.org/t/how-to-make-shapes-out-of-characters-using-loop/5134 "2018-11-02T23:07:22Z")

</div>

I am trying to make a circle that is made out of English Alphabet. I made a String that included the entire alphabet and I tried creating the circle using each character from the string individually using ‘for’ command (…

---

## [Sorting ArrayList](https://discourse.processing.org/t/sorting-arraylist/5083)

<div class="topic-metadata">

**Author:** [@Yann](https://discourse.processing.org/u/Yann)\
**Replies:** 5\
**Last updated:** [November 2, 2018, 10:13pm UTC](https://discourse.processing.org/t/sorting-arraylist/5083 "2018-11-02T22:13:25Z")

</div>

Hi, I can’t find how to sort an ArrayList by one of the variables of the contained objects. Let’s say I have a class like this one: class Event { int position; int value; Event(int p, int v) { position = p;…

---

## [TrueType loadFont](https://discourse.processing.org/t/truetype-loadfont/5127)

<div class="topic-metadata">

**Author:** [@FerrariLuigi](https://discourse.processing.org/u/FerrariLuigi)\
**Replies:** 3\
**Last updated:** [November 2, 2018, 9:25pm UTC](https://discourse.processing.org/t/truetype-loadfont/5127 "2018-11-02T21:25:40Z")

</div>

Dear all, according the example ( https://processing.org/reference/textFont\_.html ) on the reference manual I wrote the following sketch: PFont font32; void setup() { font32 = loadFont("steelfish rg.ttf"); size…

---

## [Need a help in simple "Label Marker" processing game](https://discourse.processing.org/t/need-a-help-in-simple-label-marker-processing-game/5130)

<div class="topic-metadata">

**Author:** [@John](https://discourse.processing.org/u/John)\
**Replies:** 1\
**Last updated:** [November 2, 2018, 8:38pm UTC](https://discourse.processing.org/t/need-a-help-in-simple-label-marker-processing-game/5130 "2018-11-02T20:38:40Z")

</div>

As i am new to processing so the program seemed vary hard for me. if some one helped me with that i would be glad.The instructions are given below: Write a program which will allow you to type a message at the bottom of…

---

## [Changing colors on a rectangle](https://discourse.processing.org/t/changing-colors-on-a-rectangle/5090)

<div class="topic-metadata">

**Author:** [@chalita](https://discourse.processing.org/u/chalita)\
**Replies:** 3\
**Last updated:** [November 2, 2018, 7:01pm UTC](https://discourse.processing.org/t/changing-colors-on-a-rectangle/5090 "2018-11-02T19:01:37Z")

</div>

THE FOLLOWING CODE IS WRITTEN ON PROCESSING. I NEED THE CODE TO CHANGE THE COLOR OF A RECTANGLE WHEN THE VARIABLE B CHANGES ITS VALUE. WHEN D\>20 THE RECTANGLE SHOULD BE GREEN, WHEN 20\>D\>10 IT SHOULD BE YELLOW, AND WHEN D\<…

---

## [Flood Fill Very Slow](https://discourse.processing.org/t/flood-fill-very-slow/5110)

<div class="topic-metadata">

**Author:** [@murphysuk](https://discourse.processing.org/u/murphysuk)\
**Replies:** 1\
**Last updated:** [November 2, 2018, 6:08pm UTC](https://discourse.processing.org/t/flood-fill-very-slow/5110 "2018-11-02T18:08:14Z")

</div>

I have created the flood fill program shown below. When you click in an area then that shape will fill with black. I am pleased with the result except that it is incredibly slow. I believe this is because every surroundi…

---

## [Transitioning to p5.js from Processing. Maybe. Begrudgingly](https://discourse.processing.org/t/transitioning-to-p5-js-from-processing-maybe-begrudgingly/5125)

<div class="topic-metadata">

**Author:** [@dgennetten](https://discourse.processing.org/u/dgennetten)\
**Replies:** 1\
**Last updated:** [November 2, 2018, 5:56pm UTC](https://discourse.processing.org/t/transitioning-to-p5-js-from-processing-maybe-begrudgingly/5125 "2018-11-02T17:56:00Z")

</div>

It is my understanding that p5.js still puts a bunch of stuff in the global scope which isn’t a common pattern for JS libraries anymore, and isn’t very comforting to someone coming from Java. This also trips up my desire…

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

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