Tree-Axis ``` Processing  


Back  
Class   TempoShift
   
Name  

percent

   
Examples  
// Example by Krister Olsson

import krister.Ess.*;

AudioChannel myChannel;
TempoShift myTempoShift;

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

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

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

  // tempo shift the first 1.8 seconds
  myTempoShift=new TempoShift(.33);
  
  myTempoShift.filter(myChannel,0,myChannel.frames(1800));
  
  // figure out where to start a second tempo shift
  int nextShift=myTempoShift.getOutputSize(myChannel.frames(1800));
  
  // second tempo shift
  myTempoShift.percent=1.25;
  
  myTempoShift.filter(myChannel,nextShift,myChannel.frames(1800));

  // 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)
   
Syntax  
temposhift.percent
   
Parameters  
temposhift   any instance of TempoShift

   
Usage   Web & Application
   
 
 






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


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