We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSound,  Music Libraries › Ess Help with Multiple streams
Page Index Toggle Pages: 1
Ess Help with Multiple streams (Read 579 times)
Ess Help with Multiple streams
Nov 14th, 2006, 5:57am
 
I'm trying to get mulitple streams to play at once, but it doesn't seem to do it. It will only play one of the streams.


Quote:




import krister.Ess.*;
AudioStream myStream2;
AudioFile myFile2;
AudioStream myStream;
AudioFile myFile;
FFT myFFT;
void setup() {
 size(300,300);
frameRate(15);
 // start up Ess
 Ess.start(this);
myFile2= new AudioFile("cell.aif",0,Ess.READ);
myStream2=new AudioStream(32*1000);
myStream2.sampleRate(myFile2.sampleRate);


 // create a new AudioStream
 myFile=new AudioFile("cell2.mp3",0,Ess.READ);
 myStream=new AudioStream(32*1000);
 myStream.sampleRate(myFile.sampleRate);


 // start
  myStream2.start();
 myStream.start();

}

void draw() {
 background(255);
 //int bgdColor=(int)(myFFT.getLevel(myStream)*255);
 strokeWeight(3);
 //line(150,5,150,bgdColor);


}
void audioStreamWrite(AudioStream theStream){
 int samplesRead=myFile.read(myStream);
}
[/color]

public void stop() {
 Ess.stop();
 super.stop();
}



Page Index Toggle Pages: 1