import ddf.minim.*;
//AudioPlayer player;
//AudioInput input;
Minim minim;
AudioPlayer song;
import com.temboo.core.*;
import com.temboo.Library.Twitter.Tweets.*;
// Create a session using your Temboo account application details
TembooSession session = new TembooSession("", "", "");
PFont font;
String time = "10";
int t;
int interval = 10;
void setup()
{
size(500, 500);
;
minim = new Minim(this);
song = minim.loadFile("alarm.mp3");
//song.play();
font = createFont("Arial", 100);
background(255);
fill(0);
}
void draw()
{
background(255);
t = interval-int(millis()/1000);
time = nf(t , 1);
if(t == 0){
song.play();
noLoop();
// if (keyPressed == false){
// delay(16000);
// runStatusesUpdateChoreo();
}
interval+=10;
}
text(time, width/2, height/2);
}
void keyPressed() {
if (keyPressed == true);
{
songClose();
}
if (keyPressed == false);
{
//else // Run the StatusesUpdate Choreo function
runStatusesUpdateChoreo();
}
}
void songClose() {
song.close();
}
void runStatusesUpdateChoreo() {
// Create the Choreo object using your Temboo session
StatusesUpdate statusesUpdateChoreo = new StatusesUpdate(session);
// Set inputs
statusesUpdateChoreo.setAccessToken("");
statusesUpdateChoreo.setAccessTokenSecret("");
statusesUpdateChoreo.setConsumerSecret("");
statusesUpdateChoreo.setStatusUpdate("");
statusesUpdateChoreo.setConsumerKey("");
// Run the Choreo and store the results
StatusesUpdateResultSet statusesUpdateResults = statusesUpdateChoreo.run();
// Print results
println(statusesUpdateResults.getResponse());
}
I'm having problems running the sketch, I'm new to processing and not sure what it means by mixing "active and "static" modes.
Thanks