Tree-Axis ``` Processing  


Back  
Class   RateShift
   
Name  

filter()

   
Examples  
// Example by Krister Olsson

import krister.Ess.*;

AudioChannel myChannel;
RateShift myRateShift;

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

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

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

  // rate shift the first 2 seconds
  myRateShift=new RateShift(Ess.calcShift(3));
  
  myRateShift.filter(myChannel,0,myChannel.frames(2000));

  // play
  myChannel.play();
}

void draw() {
}

// we are done, clean up Ess

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


Description   Applies the filter to an AudioChannel, AudioStream, or a floating point array storing the result in place or in a new AudioChannel, AudioStream, or floating point array
   
Syntax  
rateshift.filter(src)
rateshift.filter(src, wet)
rateshift.filter(src, offset, frames) 
rateshift.filter(src, wet, offset, frames)

rateshift.filter(src, dest)
rateshift.filter(src, dest, wet)
rateshift.filter(src, dest, offset, frames)
rateshift.filter(src, dest, wet, offset, frames) 
  
rateshift.filter(srcArray, rate)
rateshift.filter(srcArray, rate, wet)
rateshift.filter(srcArray, rate, offset, frames)
rateshift.filter(srcArray, rate, wet, offset, frames) 
  
rateshift.filter(srcArray, dest, rate)
rateshift.filter(srcArray, dest, rate, wet)
rateshift.filter(srcArray, dest, rate, offset, frames)
rateshift.filter(srcArray, dest, rate, wet, offset, frames)
   
Parameters   ,
rateshift   any instance of RateShift

src   the source AudioChannel or AudioStream instance

srcArray   float[]: the source array containing sample data

rate   float: the sample rate of the source floating point array

dest   the destination AudioChannel or AudioStream or floating point array. The default is the source AudioChannel, AudioStream, or floating point array

wet   float: the wet/dry mix value, 0 being completely dry (all source) and 1 being completely wet (all filtered output)

offset  int: the sample frame from which to start filtering. The default is the first frame

frames   int: the number of frames to filter. The default is the entire AudioChannel, AudioStream, or floating point array

   
Returns   nothing
   
Usage   Web & Application
   
 
 






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


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