Tree-Axis ``` Processing  


Back  
Class   RateShift
   
Name  

percent

   
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));
  
  // figure out where to start a second rate shift
  int nextShift=myRateShift.getOutputSize(myChannel.frames(2000));
  
  // second rate shift
  myRateShift.multiplier=Ess.calcShift(6);
  
  myRateShift.filter(myChannel,nextShift,myChannel.frames(3000));

  // play
  myChannel.play();
}

void draw() {
}

// we are done, clean up Ess

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


Description   The percent to rate shift as a decimal (between 0 and 2). Ess.calcShift() can be use to convert a number in semitones to a percentage value
   
Syntax  
rateshift.percent
   
Parameters  
rateshift   any instance of RateShift

   
Usage   Web & Application
   
 
 






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


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