Back
Class   LiveInput
   
Name  

startRec()

   
Examples  
// 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(); 
} 

Description   Stores the LiveInput data to a Sample object.
   
Syntax  
LiveInput.startRecLoop(mySample)
LiveInput.startRecLoop(mySample, startFrame, endFrame)
   
Parameters  
mySample   Any Sample Object.

startFrame   int: The first Sample frame to be written.

endFrame   int: The last Sample frame to be written. Recording will automatically stop when this sample is reached.

   
Returns   None
   
Usage   Web & Application
   
Related   startRecLoop()
stopRec()