FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Topics & Contributions
   Sound
(Moderators: pitaru, REAS)
   easiest way for any sound?
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: easiest way for any sound?  (Read 810 times)
kirkjerk

Email
easiest way for any sound?
« on: Jul 30th, 2004, 6:53pm »

I'm making a simple "60 second timer" (used on a laptop, it can be used in like pictionary or cranium, and you don't have to wait for it to run out if the person gets done early), and I'd like to have the option of some kind of audible alert...is there anything short of using Sonia and needing a browser plugin?  A system beep would even be better for my purposes...
 
Thanks!
 
PS, is there any way of seeing if there are any replies to posts you've made in YaBB? That's one of the things I dig about phpBB...
 
bsr

WWW Email
Re: easiest way for any sound?
« Reply #1 on: Jul 30th, 2004, 8:09pm »

here's the old example code, but this method wont be supported in future versions of processing.
 
BSound hello;  
void setup() {  
  hello = loadSound("Hello.wav");  
  play(hello);  
}  
 
and:
 
BSound beep;  
void setup() {  
  beep = new BSound(400); // create an empty sound  
  for (int i = 0; i < beep.length; i++) {  
    // fill the sound with a sine wave  
    beep.samples[i] = int(127 * sin(float(i)));  
  }  
  repeat(beep);  
}
« Last Edit: Jul 30th, 2004, 8:11pm by bsr »  

http://hippocamp.net
kirkjerk

Email
Re: easiest way for any sound?
« Reply #2 on: Jul 30th, 2004, 9:48pm »

Are they taking both out?  That's too bad...
 
Too much hassle w/ the wav format?
 
Pages: 1 

« Previous topic | Next topic »