Tuesday, October 16, 2012

Sound & Timer : DSDN142, Project3

I decided to have a instrumental song in the background to add the the cartoon aesthetic. To make this clear I chose one that hopefully most people will know- the spongebob theme song but to make it a bit different it is only the ukulele and nothing else.

I downloaded Minim to be able to import music into my processing sketch. And pretty much just followed the instructions from there. The only thing I had trouble with was that when the song finished it wouldn't keep playing so it only lasted about 38 seconds. After a bit of a sing around I found out I needed to put a timer on it so it new to start again at a certain frames pre second. Soo I came up with this and now it seems to play over and over just fine.


"

 if(frames==678){
  frames = 0;
}
 if(frames==0){
    backgsong.trigger();
  }

  frames = frames + 1;
  println(frames);


I also want to put in an inflating sound for when the fish blow up, I think this would be quite effective but will see how that goes, I have a vague idea of what I will need to do but could be a different story when I try. I have found the sounds I want so now it is just putting it into Processing.
 "

No comments:

Post a Comment