How do I use the Processing Sound Library in Android Mode?

edited May 2017 in Android Mode

I'm having trouble using the Processing Sound Library. I know I am probably doing it wrong, but I don't know how to do it right. If I need another library, if I need different syntax, or whatever it is, I would like to know. The error comes in on line 12, but deleting line 12 moves it to the code that is currently on line 13. The error message I get (squiggly red line as opposed to console error) says "The type processing.core.PApplet cannot be resolved. It is indirectly referenced from required .class files." I would also like to know what files it is talking about. The relevant code is below.

import processing.sound.*;

PFont font;

SinOsc sine, sine2, sine3, sine4, sine5, sine6, sine7, sine8, sine9, sine10, sine11, sine12, bassTone, bassTone2;
Env env, env2, env3, env4, env5, env6, env7, env8, env9, env10, env11, env12, bassEnv, bassEnv2;

void setup() 
  sine = new SinOsc(this);
  sine2 = new SinOsc(this);
  sine3 = new SinOsc(this);
  sine4 = new SinOsc(this);
  sine5 = new SinOsc(this);
  sine6 = new SinOsc(this);
  sine7 = new SinOsc(this);
  sine8 = new SinOsc(this);
  sine9 = new SinOsc(this);
  sine10 = new SinOsc(this);
  sine11 = new SinOsc(this);
  sine12 = new SinOsc(this);
  bassTone = new SinOsc(this);
  bassTone2 = new SinOsc(this);
  env = new Env(this);
  env2 = new Env(this);
  env3 = new Env(this);
  env4 = new Env(this);
  env5 = new Env(this);
  env6 = new Env(this);
  env7 = new Env(this);
  env8 = new Env(this);
  env9 = new Env(this);
  env10 = new Env(this);
  env11 = new Env(this);
  env12 = new Env(this);
  bassEnv = new Env(this);
  bassEnv2 = new Env(this);
  font = createFont("Arial Bold", 30);

If there is anything that seems to be strewn into the code without purpose, it's because I tried to delete everything that I wasn't having an issue with. The PFont and orientation() were things I've been having an issue with (namely the class not existing and "LANDSCAPE" not being recognized), but my primary goal here is to get the sound working. There actually doesn't seem to be a problem with the play() function, surprisingly.


Sign In or Register to comment.