Tree-Axis ``` Processing  


Back  
Class   Channel
   
Name  

samples[]

   
Examples  
// Example by Krister Olsson

import krister.Ess.*;

AudioChannel myChannel;

void setup() {
  size(256,200);
  background(0,0,255);

  // start up Ess
  Ess.start(this);

  // load "cell.aif" into a new AudioChannel
  myChannel=new AudioChannel("cell.aif");

  // draw every 200th sample
  for (int i=0;i<256;i++) {
    set(i,(int)(100+myChannel.samples[i*200]*100),255);
  }
}

void draw() {
}

// we are done, clean up Ess

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


Description   samples holds all of an AudioChannel's sample data in floating point format. This array can be read to and written from. All values should be between -1 and 1 or clipping will result during playback.
   
Syntax  
channel.samples[]
   
Parameters  
channel   any instance of AudioChannel

   
Usage   Web & Application
   
 
 






   
 
Updated: Tue May 31 04:52:41 PDT 2006


 
  Questions, comments, corrections: e-mail Krister Olsson.