Back
Class   Sample
   
Name  

setPan()

   
Examples  
// set the sample's pan to the left speaker. 
// Notes: Make sure to include the specified audio file in your project's 'data' folder. 
 
Sample mySample; 
 
void setup() { 
  size(100,100); 
  Sonia.start(this); 
  mySample = new Sample("sine.aiff"); 
  mySample.setPan(-1); 
  mySample.repeat(); 
} 
 
public void stop(){ 
  Sonia.stop(); 
  super.stop(); 
} 

Description  
   
Syntax  
mySample.setPan(panValue)
mySample.setPan(panValue, channel)
   
Parameters  
panValue   float: -1 for Left channel, 1 for Right channel

channel   float: 0 for Left channel, 1 for Right channel

   
Returns   None
   
Usage   Web & Application
   
Related   getPan()