Tree-Axis ``` Processing  


Back  
Class   AudioChannel
   
Name  

initChannel()

   
Examples  
// Example by Krister Olsson

import krister.Ess.*;

AudioChannel myChannel;
TriangleWave myWave;

void setup() {
  size(256,200);

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

  // create a new AudioChannel
  myChannel=new AudioChannel();

  // set the size to 5 seconds
  myChannel.initChannel(myChannel.frames(5000));

  // generate 3 seconds of a soft triangle wave
  myWave=new TriangleWave(480,.1);
  myWave.generate(myChannel,0,myChannel.frames(3000));

  // play
  myChannel.play();
}

void draw() {
}

// we are done, clean up Ess

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


Description   Sets the size of an AudioChannel and fills it with silence
   
Syntax  
channel.initChannel(size)
   
Parameters  
channel   any instance of AudioChannel

size   int: the new size of the AudioChannel in sample frames

   
Returns   nothing
   
Usage   Web & Application
   
 
 






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


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