// Record one-second of microphone sound input into a Sample object.
Sample mySampleObj;
void setup(){
Sonia.start(this);
LiveInput.start();
mySampleObj = new Sample(44100); // Create an empty Sample object with 44100 frames (one second of data).
}
void mousePressed(){
LiveInput.startRec(mySampleObj); // Record LiveInput data into the Sample object.
// The recording will automatically end when all of the Sample's frames are filled with data.
}
public void stop(){
Sonia.stop();
super.stop();
}
|