Tree-Axis ``` Processing  


Back  
Name  

RateShift

   
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   The RateShift class is used to create filters that shift pitch without maintaining tempo. Rate shifting up will shorten duration, rate shifting down will lengthen it. The size of the output buffer will not be modified; cropping of filtered sample data may occur. Ess.calcShift() can be use to convert a number in semitones to a percentage value
   
   
Constructors  
RateShift(percent)
RateShift(percent, zeroOutputBuffer)
   
Parameters  
percent   float: the percent to rate shift as a decimal (between 0 and 2)

zeroOutputBuffer   boolean: zero output buffer before rate shift? The default is true

   
Usage   Web & Application
   
 
 






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


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