Quantcast
Channel: Android Mode - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 941

App taking consderable time while loading in Android mode, but java mode is normal.

$
0
0

Code is shown below. Please help.

                        import oscP5.*;
                        import netP5.*;

                        OscMessage myMessage;
                        OscP5 oscP5tcpClient;

                        float i;
                        float a = 0.0;
                        float inc = TWO_PI/25.0;

                        void setup() {
                        size(640, 360);

                          oscP5tcpClient = new OscP5( this, "127.0.0.1", 1234, OscP5.TCP);
                        }

                        void draw() {
                          background(255);
                          calcWave();
                          OscMessage myMessage = new OscMessage("");
                          myMessage.add(new float[] {sin(180+sin(a)*100.0), 180+sin(a)*100.0}); /* add an int to the osc message */
                          oscP5tcpClient.send(myMessage);

                        }

                        void calcWave() {
                          for (int i = 0; i < 600; i=i+4) {
                            line(i, 180, i, 180+sin(a)*100.0);
                            a = a + inc;
                          }
                        }

Viewing all articles
Browse latest Browse all 941

Trending Articles