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.
Page Index Toggle Pages: 1
basic recording ess (Read 368 times)
basic recording ess
Jan 16th, 2008, 8:24pm
 
hey guys, kinda new to ess and all i want is a basic recording code when you pressed a button that records audio from processing.

i have tried the audiofile() example from the ess library

void audioStreamWrite(AudioStream myChannel) {
 
 if (recording) {
   myFile.write(myChannel);
   bytesWritten+=myChannel.size*2;
 }
}

void keyPressed() {
 if (recording) {
   // stop
   myFile.close();
   
   println("Finished recording. "+bytesWritten+" bytes written.");
 } else {
   // start
   myFile.open("out.aif",myChannel.sampleRate,Ess.WRITE);
   bytesWritten=0;
   
   println("Recording started.");
 }
 
 recording=!recording;
}


anything that was myStream has now become myChannel, it records, however, it records one sound repeated over, when only clicked once.

I have 8 myChannels e.g. mychannel1, myChannel2 etc


greatly appreciated
Page Index Toggle Pages: 1