Tree-Axis ``` Processing  


Back  
Name  

Envelope

   
Examples  
// Example by Krister Olsson

import krister.Ess.*;

AudioChannel myChannel;
Envelope myEnvelope;

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

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

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

  // apply a 3 point envelope
  EPoint[] env=new EPoint[3];
  env[0]=new EPoint(0,0);
  env[1]=new EPoint(.25,1);
  env[2]=new EPoint(2,0);

  myEnvelope=new Envelope(env);
  
  myEnvelope.filter(myChannel);

  // play
  myChannel.play();
}

void draw() {
}

// we are done, clean up Ess

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


Description   The Envelope class is used to create amplitude envelope filters. An amplitude envelope is defined by a collection of EPoints, each containing a time and an amplitude. When an envelope is applied EPoints are stretched over the length of the sample data, allowing a single envelope to be used for different numbers of frames. Each sample is modified by an amplitude value calculated by interpolating between the two closest envelope points on either side of the sample
   
   
Constructors  
Envelope(points)
   
Parameters  
points   EPoint[]: an array of EPoint instances defining the shape of the envelope

   
Usage   Web & Application
   
 
 






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


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